Sheet metal: mirrored and copied sheet bodies stay sheet metal (#3353) (#3354)

* claim: #3353

* Sheet metal: mirrored and copied sheet bodies stay sheet metal

Mirroring a sheet metal body into a new body gave a plain solid: the
opposite-hand bracket had no flat pattern, DXF or bend table
("`Body1 (2)` is not a sheet metal body"). Copies from a body pattern or
Move with copy lost their sheet model the same way.

A copy now takes the sheet model with it (SheetBody::copied). A rigid
copy moves the flat frame. A mirror moves the frame with its x axis
turned round, so the thickness side stays, and mirrors everything in
flat coordinates (x -> -x): base, flange bend lines (run from their far
end, with their end extensions, slopes and tears swapped), panel shapes,
cut-outs, pockets, bores, letters and base sketch lines. Arcs stay exact
and loops keep their sense. A perforation field of a mirrored copy runs
its grid from the right, so its holes are the mirror image too. The flat
length, bends and K-factor are unchanged, and the copy takes further
sheet metal features of its own.

Mirror with combine is unchanged: the joined body has no single sheet
model yet. Mirroring or patterning flange features is still refused.
Sheet models are derived from the timeline, so no design format change.

* Format: note the saved from_right of a mirrored sheet's perforation field

The new `from_right` flag is saved in the design, so it gets a pending
format note. No migration: a field without it runs from the left as
before.
This commit is contained in:
raykholo
2026-10-21 00:54:07 +00:00
committed by GitHub
parent 38c710e72e
commit d9d6af51c6
6 changed files with 235 additions and 4 deletions
+8
View File
@@ -16,6 +16,14 @@ and selected when the active body is a sheet), and builds parts from a sheet of
Bends follow the rule's K-factor, so flat lengths match what a press brake will make. Tests
check flat lengths against hand-computed bend allowances.
A copy of a sheet metal body is sheet metal too. **Mirror** (`solid.mirror` with `bodies`)
makes the opposite hand: its own flat pattern, DXF and bend table, the mirror image of the
original's flat, with the same thickness side, bends and flat lengths, and holes where the
mirror puts them. A copy from **Move** (`copy: true`) or a body pattern keeps the original's
flat pattern. Every copy takes further sheet metal features of its own. Mirroring with
`combine` joins the two halves into one solid, which has no single sheet model yet; mirroring
or patterning flange features themselves is not supported yet.
An edge flange takes its setback off its own edge only. Where that edge ends at an inside
corner of the base (the base runs on past it, like the leg of an L), the rest of the base
stays, and the rule's **bend relief** (`relief_width` and `relief_depth`; Relief Width and