Hem

Renders the 3D model in your browser. The first run downloads the Python runtime (≈30 MB).
from cadbuildr.foundation import (
    Assembly,
    Line,
    Part,
    Point,
    Rectangle,
    SheetMetalBaseFlange,
    SheetMetalHem,
    SheetMetalToSolid,
    Sketch,
    show,
)
from cadbuildr.foundation.gen.models import HemType


class _HemSample(Part):
    def __init__(self, hem_type, x, width=30, depth=30, thickness=1.5):
        s = Sketch(self.xy())
        body = 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))
        body = SheetMetalHem(
            body=body, edge=front, hem_type=hem_type, length=8, gap_or_radius=2
        )
        self.add_operation(SheetMetalToSolid(body=body))
        self.translate([x, 0, 0])
        self.paint("light_blue")


class SheetMetalHemTypes(Assembly):
    """All four hem types on the front edge: CLOSED, OPEN, TEARDROP, ROLLED (left to right)."""

    def __init__(self):
        for i, kind in enumerate(
            [HemType.CLOSED, HemType.OPEN, HemType.TEARDROP, HemType.ROLLED]
        ):
            self.add_component(_HemSample(kind, -60 + 40 * i))


show(SheetMetalHemTypes())

SheetMetalHem(body, edge, hem_type, length, gap_or_radius) folds an edge back on itself, to stiffen it and remove the sharp edge. Left to right above:

hem_typeShape
CLOSEDthe flap lies flat back on the sheet
OPENa 180° loop with inner radius gap_or_radius
TEARDROPfolded past 180° (200°), so the flap leans back onto the sheet
ROLLEDa curl of radius gap_or_radius wrapped 270°, ending under the sheet

Hems can sit on any flange’s edge (see Chaining Flanges), and they unfold like any other bend.

from cadbuildr.foundation import (
    Assembly,
    Line,
    Part,
    Point,
    Rectangle,
    SheetMetalBaseFlange,
    SheetMetalHem,
    SheetMetalToSolid,
    Sketch,
    show,
)
from cadbuildr.foundation.gen.models import HemType


class _HemSample(Part):
    def __init__(self, hem_type, x, width=30, depth=30, thickness=1.5):
        s = Sketch(self.xy())
        body = 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))
        body = SheetMetalHem(
            body=body, edge=front, hem_type=hem_type, length=8, gap_or_radius=2
        )
        self.add_operation(SheetMetalToSolid(body=body))
        self.translate([x, 0, 0])
        self.paint("light_blue")


class SheetMetalHemTypes(Assembly):
    """All four hem types on the front edge: CLOSED, OPEN, TEARDROP, ROLLED (left to right)."""

    def __init__(self):
        for i, kind in enumerate(
            [HemType.CLOSED, HemType.OPEN, HemType.TEARDROP, HemType.ROLLED]
        ):
            self.add_component(_HemSample(kind, -60 + 40 * i))


show(SheetMetalHemTypes())