Repository navigation
Open
Labels
area:kernelB-rep kernel, booleans, blends, STEP/IGESneeds-triageno priority yet; a maintainer sorts it with /triage
Description
Part of #860 (W37, sheet metal on drawings). It sits on the view work in #5866 (W07) and #4816 (W17).
Goal: a flat pattern view on a drawing. A drafter places the flat pattern of a sheet-metal part on a sheet, next to its folded views, with its bend lines (up and down drawn differently) and its overall size. Shops use this sheet to cut and fold the part.
What exists today
sheet.flat_pattern(crates/engine/src/cmd/sheet.rs) returns the flat size, the outline loops, the cut-outs exactly (circles, lines, arcs), pockets, the bend lines and the bend table, in flat coordinates.sheet.export_dxfandsheet.export_bend_tablewrite the flat pattern and its bend table to files. The Flat Pattern page shows it in the app.- Drawing views (
drawing.view.base,.projected) draw a body's lines from a direction. None of them can draw a flat pattern. - The sheet-metal model is being rebuilt on the part's surfaces ([RFC] Sheet metal: keep the folded sheet as the master and derive the flat pattern from it #6748, draft Sheet metal: one model, the part's surfaces; the flat pattern is derived (#6748) #9245 by @h0witzer). This slice reads the flat pattern only through
sheet.flat_pattern's result, so it doesn't depend on how the flat pattern is made.
The slice
- A flat pattern view of a sheet body (an option of
drawing.view.base, or its own command): it draws the outline, the cut-outs and the bend lines from the flat pattern's exact curves, at the view's scale. - Bend lines: up and down in two line types. Their ends stop at the outline.
- An option for bend notes beside each bend line (direction, angle, radius), from the same data the DXF bend notes use.
- The view's orientation: as the flat pattern lies, or turned in 90° steps.
- Dimensions on a flat view use the same commands as on other views.
- The folded views and the flat view on one sheet keep their own scales.
Out of scope
- The bend table as a sheet table: a follow-up on the sheet-table work (Drawing W24–W26: bill of materials, sheet tables (parts lists) and balloons #3874).
- Punch marks and forming tools on the flat view.
- The UI: @Nathan-Dane's drawing UI.
Acceptance
- A 100 × 60 × 2 mm sheet with one 90° flange gives a flat view whose outline measures the flat size that
sheet.flat_patternreports, to 1e-6 mm, at 1:1 and 1:2. - A round hole on the flat view is a circle of its exact diameter, not a polyline.
- An up bend and a down bend are drawn in different line types. Each bend line ends on the outline.
- Changing the flange height updates the flat view after an update.
- A body that isn't sheet metal is refused with a clear message.
- Hostile input never panics.
Metadata
Metadata
Assignees
Labels
area:kernelB-rep kernel, booleans, blends, STEP/IGESneeds-triageno priority yet; a maintainer sorts it with /triage
Activity
github-actions commentedon Nov 7, 2026
Claimed by @CamWight through #13033. The claim lapses after 14 days without pushes.
CamWight commentedon Nov 7, 2026
Plan
A flat pattern view is a third kind of drawing view, next to base and projected views, with its own command,
drawing.view.flat. It draws the flat pattern of one sheet-metal body at its own scale, turned in 90° steps.It reads only
sheet.flat_pattern's reply. The scene draws with a read-only session, socmd/sheet.rsgets one small read-only function thatflat_patternitself calls. Nothing else in the sheet-metal code changes. The sheet-metal rebuild (#9245) changes the same few lines. Whichever lands second moves that one call, and the view then draws the new model's flat with no other change. #12545's typed reply can replace the JSON later without touching the view.Slices
drawings).drawing.view.flat {sheet, body?, scale?, position_mm?, turn?}: one undo step, saved as a new view kind (one pending format file). With nobody, the last sheet body, assheet.flat_patterndoes.cutout_shapes, exact. The outline comes from the reply's points.turnis 0, 90, 180 or 270, never a free angle, so the flat's coordinates map exactly.sheet.flat_pattern's own message. A body that is later renamed or changed fails the view with a reason; it never panics.drawing.statuskeep working.main): anoutline_shapeskey next tocutout_shapes, agreed with Agents and scripts: Flat Pattern, Export Bend Table and Path Flange describe their exact parameters and replies (#6581) #12545 and Sheet metal: one model, the part's surfaces; the flat pattern is derived (#6748) #9245 first.FV1's PR says "Part of #13030", because the acceptance list asks for dimensions, which come in FV3.
Tests, written first
The cost of one flat reply is measured on the desktop and in the web app, for this plate and for a sheet with 100 cut-outs.
Nearby work
geom/src/paper/line.rs, with the same numbers Drawing sheets: add manual centre marks and centre lines (#9419) #9421 uses for its centre lines. Whichever lands second points the other at that rule.flat_pattern: Sheet metal: one model, the part's surfaces; the flat pattern is derived (#6748) #9245, Agents and scripts: Flat Pattern, Export Bend Table and Path Flange describe their exact parameters and replies (#6581) #12545, Flat pattern DXF can mark each bend's zone boundaries and allowance, for the shop floor (#11488) #11616 and CSV exports: a field that starts with =, +, - or @ stays text in a spreadsheet (#12728) #12729. Merge-trees run before the push.Drawings: a flat pattern view of a sheet-metal part, with its bend li…
Drawings: bend lines use ISO 128-20's chain-line lengths, from one sh…
Drawings: bend lines use ISO 128-20's chain-line lengths, from one sh…
Drawings: chain_dashes_mm stays inside drawing_view, and its note nam…
Drawings: bend lines use ISO 128-20's chain-line lengths, from one sh…
Drawings: chain_dashes_mm stays inside drawing_view, and its note nam…
Drawings: the bend-line centring test changes the model through with_…
Drawings: flat pattern bend lines use ISO 128-20's chain-line lengths (…
github-actions commentedon Nov 26, 2026
No draft PR showed up within 72 h, so this one is free again. Anyone can
/claimit.