feat: Convert to Sheet Metal takes a solid or a shelled body by its bend edges (#725)
Convert to Sheet Metal now takes a solid or a shelled body by its bend edges (`bends`): the faces reached from the fixed face across those edges become the sheet, keeping the part's envelope, with the flat pattern by the rule's K-factor and radius. Other edges between sheet faces are cut open. The result works with edge flanges, cuts, Unfold/Refold, the flat pattern and DXF. A conversion without `bends` is the plate conversion as before. The optional `bends` field is noted under format 17. Fixes #647. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
a513304917
commit
a1cb8d4d36
16 files changed
+1044
-20
No files matched your search
@@ -58,7 +58,7 @@ is available. Missing or incompatible pictures use the usual thumbnail generatio
|
||||
The default `cache: false` omits the portable thumbnail too.
|
||||
The repository's `docs/design-container.md` describes limits and encoding details.
|
||||
|
||||
Current designs use format 17, including face anchors on a piece of a face by its own name, sheet metal rims and bend ends, physical materials defined in the design, the font of sketch text, sheet metal corner relief shapes, sketch face anchors on cylinder caps, sketch axis
|
||||
Current designs use format 17, including face anchors on a piece of a face by its own name, sheet metal rims and bend ends, bend edges for Convert to Sheet Metal, physical materials defined in the design, the font of sketch text, sheet metal corner relief shapes, sketch face anchors on cylinder caps, sketch axis
|
||||
links, persistent
|
||||
names from exact face history, exact planar shell-face anchors, persistent analytic offset boundary roles and
|
||||
association profile references, durable sketch face anchors, periodic fit splines and versioned
|
||||
|
||||
@@ -7,7 +7,8 @@ The SHEET METAL tab builds parts from a sheet of constant thickness under a **sh
|
||||
sketch, or an edge flange from a part edge.
|
||||
- **Hem** (`sheet.hem`) and **Fold** (`sheet.fold`) along a sketch line.
|
||||
- **Unfold / Refold** (`sheet.unfold`, `sheet.refold`) for working on the flat part.
|
||||
- **Convert** (`sheet.convert`) turns a solid of constant thickness into sheet metal.
|
||||
- **Convert** (`sheet.convert`) turns a plate of constant thickness into sheet metal, or, with
|
||||
bend edges, a solid or a shelled body.
|
||||
- **Create Flat Pattern** (`sheet.flat_pattern`) shows the flat part with its bend lines and a
|
||||
bend table, and exports it as DXF or a bend-table CSV through the save picker.
|
||||
|
||||
@@ -104,6 +105,29 @@ returns on them close over a relieved corner as over a whole one.
|
||||
(The four returns of a 120 x 90 tray in 2 mm sheet with 90° walls 20 high: each point is the
|
||||
middle of a wall's far edge on its inner face, so the returns turn in over the base.)
|
||||
|
||||
**Convert** also takes a solid or a shelled body: pick the face that stays fixed and the sharp
|
||||
edges that become bends (`bends`; Bend Edges in the dialog). The flat faces reached from the
|
||||
fixed face across those edges become the sheet. A shelled body keeps its walls and their
|
||||
thickness; any other solid's faces become the outside of the sheet, with the rule's thickness
|
||||
taken into the body. Each sharp edge stays where the faces of its bend would meet, so the part
|
||||
keeps its envelope and the flat pattern is the outside lengths less a bend deduction per bend,
|
||||
2·(R + T)·tan(θ/2) − θ·(R + K·T). A bend can be picked on either skin of a shell; bends turn
|
||||
either way, follow one another and take any angle (the walls of a tapered tray at 72°). An
|
||||
edge between two faces of the sheet that is no bend is cut open, each side half the rule's
|
||||
**gap** from the plane halfway between the two, like the corners of a tray. The result is an
|
||||
ordinary sheet body: edge flanges, cuts, Unfold, the flat pattern and its exports work on it,
|
||||
and it follows the solid when a parameter changes (the edges and the fixed face are found by
|
||||
their names). Without bend edges Convert expects a plate, as before. Not converted yet: curved
|
||||
faces (rolled sheet, a filleted edge as a bend), faces with holes or curved edges (cut them
|
||||
after converting) and bends that close a ring.
|
||||
|
||||
```json
|
||||
{"command":"solid.box","params":{"length":100,"width":60,"height":30,"body_name":"Tray"}}
|
||||
{"command":"solid.shell","params":{"faces":[[50,30,30]],"thickness":2}}
|
||||
{"command":"sheet.convert","params":{"body":"Tray","face":[50,30,0],
|
||||
"bends":[[50,0,0],[100,30,0],[50,60,0],[0,30,0]]}}
|
||||
```
|
||||
|
||||
For a shop drawing or spreadsheet, `sheet.export_bend_table` returns CSV by default; choose
|
||||
`format: "json"` for structured data. It includes the sheet rule, thickness, bend angles,
|
||||
radii, allowances and flat centre-line coordinates. Lengths use millimetres and angles use
|
||||
|
||||
Reference in new issue
Block a user