Skip to content

Sheet metal: walls on a base with 20 or more sides are refused ("the edges beside it close the flange before it reaches its height") #19833

Closed

Description

@h0witzer

What happened

Edge flanges on every edge of a regular polygon base are refused once the polygon has 20 or more sides, with 100 mm sides and 20 mm walls at 90°:

error: step 6 (sheet.flange): edge 1: the edges beside it close the flange before it reaches its height
Base Corner 20 mm walls on every edge
12 sides 150° builds
16 sides 157.5° builds
20 sides 162° refused
24 sides 165° refused

At 90° on corners this shallow, the miter planes between neighboring walls are vertical and nowhere near closing a 20 mm wall, so the refusal looks spurious. Many shallow corners are what a faceted shell (a lantern, a bowl, a pumpkin made of gores) has.

Expected: the walls build, mitered at each corner as on the 16-sided base.

Steps to reproduce

solidcraft-cli run twenty_sided_tray.json

[
 {"command": "sheet.manage_rules", "params": {"name": "T1", "thickness": "1 mm", "k_factor": "0.5", "bend_radius": "1 mm", "active": true}},
 {"command": "sketch.create", "params": {"plane": "XY", "name": "base"}},
 {"command": "sketch.line", "params": {"points": [[0.0, 0.0], [100.0, 0.0], [195.10565163, 30.901699437], [276.007351067, 89.680224667], [334.785876296, 170.581924104], [365.687575734, 265.687575734], [365.687575734, 365.687575734], [334.785876296, 460.793227363], [276.007351067, 541.694926801], [195.10565163, 600.47345203], [100.0, 631.375151468], [0.0, 631.375151468], [-95.10565163, 600.47345203], [-176.007351067, 541.694926801], [-234.785876296, 460.793227363], [-265.687575734, 365.687575734], [-265.687575734, 265.687575734], [-234.785876296, 170.581924104], [-176.007351067, 89.680224667], [-95.10565163, 30.901699437]], "closed": true}},
 {"command": "sketch.finish", "params": {}},
 {"command": "sheet.flange", "params": {"sketch": "base", "body_name": "tray"}},
 {"command": "sheet.flange", "params": {"body": "tray", "height": 20, "angle": "90 deg", "edges": [[50.0, 0.0, 1], [147.552825815, 15.450849719, 1], [235.556501348, 60.290962052, 1], [305.396613682, 130.131074385, 1], [350.236726015, 218.134749919, 1], [365.687575734, 315.687575734, 1], [350.236726015, 413.240401549, 1], [305.396613682, 501.244077082, 1], [235.556501348, 571.084189415, 1], [147.552825815, 615.924301749, 1], [50.0, 631.375151468, 1], [-47.552825815, 615.924301749, 1], [-135.556501348, 571.084189415, 1], [-205.396613682, 501.244077082, 1], [-250.236726015, 413.240401549, 1], [-265.687575734, 315.687575734, 1], [-250.236726015, 218.134749919, 1], [-205.396613682, 130.131074385, 1], [-135.556501348, 60.290962052, 1], [-47.552825815, 15.450849719, 1]]}},
 {"command": "sheet.flange", "params": {"body": "tray", "height": 10, "flip": true, "edges": [[50, 0, 20]]}}
]

SolidCraft version and OS

SolidCraft 0.45.0 (e8ce12e), Windows x64 portable, solidcraft-cli. Also reproduced on a build of #9245's branch from 2026-11-14.

Activity

  1. added
    area:render
    needs-triage
    on Nov 20, 2026
  2. dudedagger42 commented on Nov 20, 2026

    @dudedagger42
    Collaborator

    Triage by dudedagger42: Result: reproduced on 0.45.0: your 20-sided script stops at step 6 with "edge 1: the edges beside it close the flange before it reaches its height".
    Boundary: Tested on 0.45.0: on 0.44.1 the same script runs with no error, so this is new in 0.45.0. I ran only the 20-sided script, not the 24-sided one.
    Root cause (likely): the check in crates/doc/src/sheet_surface_features.rs (flange run, "close the flange before it reaches its height") that tests the edge slants. I did not trace why a 162 degree corner trips it.

  3. MarkusReichart commented on Nov 21, 2026

    @MarkusReichart
    Contributor

    Cause traced to the provisional-side check in flanges_on that came with #9245; details and a fix sketch are on #20193, which rewrites that check: #20193 (comment). Not claiming while that is open.

  4. khanahmad4527 commented on Nov 22, 2026

    @khanahmad4527
    Contributor

    Another case with the same refusal, from a part I was moving to 0.45: a short edge between two 135° corners, with no polygon involved. It still happens on current main (0.46.2, 40c61c3).

    A 200 × 200 plate (1.5 mm, R 1.5, K 0.4) with one corner chamfered 60 × 60, which leaves an 84.85 mm edge with 135° corners at both ends. 90° walls on the chamfer and on the next edge:

    {"commands": [
     {"command": "sheet.manage_rules", "params": {"name": "Steel 1.5mm", "thickness": "1.5 mm", "bend_radius": "1.5 mm", "k_factor": "0.4", "active": true}},
     {"command": "sketch.create", "params": {"plane": "XY", "name": "Plate"}},
     {"command": "sketch.line", "params": {"points": [[60, 0], [200, 0], [200, 200], [0, 200], [0, 60]], "closed": true}},
     {"command": "sketch.finish", "params": {}},
     {"command": "sheet.flange", "params": {"sketch": "Plate"}},
     {"command": "sheet.flange", "params": {"edges": [[30, 30, 1.5], [0, 130, 1.5]], "height": 80}}
    ]}
    Walls Height 0.46.2 (main)
    chamfer + next edge 40, 45 builds
    chamfer + next edge 50, 80 refused: "edge 1: the edges beside it close the flange before it reaches its height"
    chamfer alone 40 builds
    chamfer alone 50, 80 refused: "the edges beside it close the flange before it reaches its height"

    0.44.1 builds the two-wall part at 80 mm, and a 50 mm edge between two 90° corners takes a 300 mm wall on main. The two neighbouring plate edges, carried on past the chamfer, meet 60/√2 = 42.4 mm out from it, which is where 45 builds and 50 is refused. That fits the provisional-side reading above.

    The picture shows why. At 40 mm the chamfer wall is already a trapezoid: its sides follow the neighbouring plate edges inwards instead of standing square, so its top edge is shorter than its bend:

    The chamfer wall at 40 mm, its top edge narrower than its base

    The plate from the top, with the chamfer at the origin:

    The 200 x 200 plate with the 60 x 60 chamfer

    One point for the fix sketch above: the chamfer wall on its own, with no other bend in the feature and no neighbouring wall at all, is refused too. So a check that only skips sides where another bend of the same feature meets the end would still refuse this. A lone 90° wall on a convex corner has nothing to close it.

    Pictures are headless renders (solidcraft-cli snapshot, 1280 × 720) from the script above at 40 mm.

  5. added
    in progress
    on Nov 23, 2026
  6. github-actions commented on Nov 23, 2026

    @github-actions
    Contributor

    Claimed by @MarkusReichart through #21021. The claim lapses after 14 days without pushes.

  7. khanahmad4527 commented on Nov 23, 2026

    @khanahmad4527
    Contributor

    I re-ran the chamfered-plate case from my comment above (200 × 200 plate, one corner chamfered 60 × 60, 90° walls on the chamfer and on the next edge), now that #20193 has merged, on current main and on the draft fix #21021:

    Walls Height main 3f999f8 (has #20193) #21021 head b3eb705
    chamfer + next edge 45 builds builds
    chamfer + next edge 50, 80 refused: "edge 1: the edges beside it close the flange before it reaches its height" builds
    chamfer alone 40 builds builds
    chamfer alone 50, 80 refused refused (same message)
    control: 50 mm edge between two 90° corners 300 builds builds

    So #20193 alone does not change this case, and #21021 fixes the two-wall part. The chamfer wall alone stays refused on #21021, which matches its description (a wall met by no bend on either side is still checked as on main).

    How the two-wall part comes out on #21021 at 80 mm: the mitre with the next wall is square, and the chamfer wall's free side follows the neighbouring plate edge carried upwards, leaning in about 1 mm per mm of height. At 80 mm that leaves a top edge of only about 5 mm (an estimate from the 84.85 mm chamfer edge), so the wall is nearly a triangle:

    On #21021: walls 80 mm high on the chamfer and the next edge; the chamfer wall's free side leans in and the wall narrows to a sliver at the top

    0.44.1 built this part with a full-width chamfer wall (square sides). If the slanted free side is the intended rule since #20193, the part builds now; if a square end is wanted where no plate edge continues the wall's side, that would be a separate choice.

    Picture: headless render (solidcraft-cli snapshot, 1280 × 720) of the script above with "height": 80, built from #21021's head, seen from behind the chamfer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:renderin progressneeds-triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions