Skip to content

Port of #15357: bend relief at an edge-flange junction on the surfaces-first sheet model - #26

Draft
raykholo wants to merge 3 commits into
h0witzer:fix-6748-developfrom
raykholo:port/15357-junction-relief
Draft

raykholo wants to merge 3 commits into
h0witzer:fix-6748-developfrom
raykholo:port/15357-junction-relief

Conversation

@raykholo

Copy link
Copy Markdown

Port of tangency-labs#15357 (edge-flange segment junction relief, by @lychee888) onto the surfaces-first develop in tangency-labs#9245.

What it does

  • An edge-flange segment can ask for a relief at the junction after it: relief: {shape, width?, depth?}.
  • The shapes are notch/straight, rectangular, obround and tear. round is refused, as in the original. The width and depth default to the rule's relief_width and relief_depth.
  • The Flange dialog has a relief choice for each segment.

How it maps onto the surfaces

  • straight / rectangular / obround: a record Cut across the joint, on the panel both bends stand on. It is the relief width wide, centred on the junction, and runs from depth before the deeper tangent line out to the nearer far edge. The flat, the folded body, the bend table and the DXF all derive from that cut. There is no flat-to-3D bridge.
  • tear: cuts nothing. It is stored in SurfaceSheet::junction_tears, and the junction slit starts depth deeper. It also applies to same-side junctions.
  • Guard: a feature that would increase the flat's piece count is refused, and the message names the segment. The original's geometric refusals keep their wording.
  • Separate JunctionShape: the original added straight and obround to ReliefShape, which would have leaked them into corner reliefs and rule parsing. This port uses its own JunctionShape instead.
  • Mirroring: a mirrored copy keeps its relief and tears.

Commits

  1. f03b5c9 (lychee888): the contract half. That is the document field, parsing and refusals, dialog, locales, book, skill and contract tests. It does not compile alone, because it names ReliefShape::JUNCTION. The next commit replaces that name, so a squash merge is cleanest.
  2. d30eb34: the adaptation. It adds sheet_surface_junction.rs, JunctionShape and JunctionRelief, the wiring in SurfaceSheet, the schema relief, and the tests moved onto surface_sheets.
  3. af0f431: a test that a relieved split edge still closes its outer corner against another edge's flange. The original's drop_plain_shape protected this, and the panel field it touched no longer exists.

Tests (buildq)

  • engine sheet: 438 passed, 5 failed. The 5 failures are the existing failures on fix-6748-develop (two convert tests, one dxf round-notch test, two face_names tests).
  • engine junction / tear / segment-relief filters: 19 passed. The new corner test passes too.
  • ui-egui sheet: 75 passed. engine schema::sheet: 14 passed. doc sheet: 35 passed.
  • Closed forms are kept from the original:
    • notch flat area 7364 + 98π
    • bends 49 mm
    • tear area 7400 + 100π
    • two-setback far edge −14.0855149525563
    • obround arc r = 1 at (50, 3)

Credit: @lychee888 for the feature and the original PR.

lychee888 and others added 3 commits November 15, 2026 05:35
…junction (tangency-labs#15357)

Squash of the contract half of solidcraft PR tangency-labs#15357 by lychee888 (16 commits,
FR-13), ported onto the surface-sheet model of tangency-labs#9245: the `relief` key of a
segment (`{shape, width?, depth?}`), its parse and refusals in `sheet.flange`,
the Flange dialog's relief choice, the pending format and locale files, the
book chapter, the sheet metal skill, and the contract tests.

The part of tangency-labs#15357 that edited the deleted flat model (`SheetBody`,
`sheet_convert`, `flat_dxf`) and the tests that read it are not in this commit;
they are rebuilt on the folded sheet's surfaces in the next commit.

This commit alone does not compile: `cmd/sheet.rs` names
`ReliefShape::JUNCTION`, which the next commit replaces with `JunctionShape`.
…flat follows (tangency-labs#15357)

Rebuilds the build half of tangency-labs#15357 on the surface sheet instead of the deleted
flat model. A segment's relief at a junction of a split edge
(`SurfaceSheet::junctions`) is now:

- straight / rectangular / obround: a `Cut` of the sheet on the panel the two
  bends stand on, `width` across the junction, centred, from `depth` before the
  deeper tangent line out to the nearer far edge. The flat, the folded body,
  the bend table and the DXF all derive from it.
- tear: the junction's own slit (`SurfaceSheet::junction_tears`), started
  `depth` deeper and made whichever sides the two bends turn to.
- refusals (depth past the parent panel, obround depth, notch wider than the
  narrower stretch, a notch or tear that would part the blank, one tear meeting
  another junction's cut) name the segment; nothing is clamped.

New: `sheet_surface_junction.rs`, `JunctionShape`/`JunctionRelief` in sheet.rs,
`relief` in the sheet.flange segment schema; `cmd/sheet.rs` now uses
`JunctionShape` (the previous commit named `ReliefShape::JUNCTION`). Tests
rebuilt on `surface_sheets` and `sheet.export_dxf` with closed-form values.
tangency-labs#15357 dropped a stretch panel's plain `shape` so `corners` could
still close a relieved split edge's outer end against another edge's
flange. That panel field is gone on the surfaces-first develop; this
pins the behaviour it protected: the far corner's outline is the same
with and without the junction relief, and the relief takes exactly
its closed-form 2 x (pi + 13) of the flat.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants