Skip to content

[family-fix] slotted_din_rail: side_relief invents a flange lip, and all four sheet bends are square #98

Description

@BenchCAD

Merged in #38. Two things in part.py do not match the DN-R35S1 sheet or the product photo in that PR.

1. side_relief invents a return lip the rail does not have. When the flag is set, build() unions an extra box at each flange edge:

lip_height = min(rail_thickness * 1.8, rail_height - rail_thickness)
y_lip = sign * (rail_width / 2.0 - rail_thickness / 2.0)
result = result.union(_box(rail_length, rail_thickness, lip_height, 0.0, y_lip, ...))

The datasheet section ends each 35 mm flange on the plain 1.0 mm sheet edge, and the photo shows the same — the flange edges are bare, nothing turns back down. The flag is also not constant across tiers: easy renders with side_relief=0, medium and hard with side_relief=1, so two of the three difficulty tiers show a feature the part does not have, and the three tiers are not the same product. A fixed profile should not be a variable; if there is a source for a lip variant it should be cited, otherwise the flag should go.

(Same class of defect as the one already corrected in heldout's extrusion_profile_4040, where a corner_r toggle let the profile render with sharp corners the real extrusion never has.)

2. The bends are square. The rail is built as six unioned boxes, so every one of the four bends is a perfectly sharp inside-and-outside corner. It is a roll-formed 1.0 mm sheet: the section drawing rounds all four bends and the photo shows the radii plainly. As modelled, the section is also not constant-thickness — measured across the diagonal at a bend the material is ~1.4 mm rather than 1.0.

Fix for both: sketch the rail's real cross-section once as a closed wire — 27 mm web, two 7.5 mm walls, two 4 mm flanges, with a bend radius at each of the four corners — and extrude it to rail_length, then cut the slots. That removes the union-of-boxes seams, gives constant sheet thickness, and leaves no room for a lip that isn't in the source.

What is right and I am not asking to change: 35.0 / 27.0 / 7.5 / 1.0, slot 6.3 × 18.0 at 25.0 pitch, and the slot count per length all read straight off the sheet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions