FoundationPartsSheet MetalHem

Hem

The SheetMetalHem node folds the edge back on itself to stiffen the edge and remove a sharp corner. A closed hem doubles a short flap flat back over the parent; open leaves a loop with a gap. It reuses the same bend cross-section as a SheetMetalEdgeFlange, folded 180°.

from cadbuildr.foundation import Part, Sketch, Rectangle, Line, Point, show
from cadbuildr.foundation import SheetMetalBaseFlange, SheetMetalHem, SheetMetalToSolid


class SheetMetalHemPart(Part):
    """Hem — fold the edge back on itself to stiffen / kill a sharp corner."""

    def __init__(self, width=60, depth=40, thickness=2):
        s = Sketch(self.xy())
        base = SheetMetalBaseFlange(
            profile=Rectangle.from_center_and_sides(s.origin, width, depth), thickness=thickness
        )
        front = Line(Point(s, -width / 2, -depth / 2), Point(s, width / 2, -depth / 2))
        self.add_operation(SheetMetalToSolid(body=SheetMetalHem(body=base, edge=front, hem_type="CLOSED", length=10)))


show(SheetMetalHemPart())