FoundationPartsSheet MetalLofted Bend

Lofted Bend

SheetMetalLoftedBend(profile_start, profile_end, thickness) blends a sheet between two open profiles on different sketches. This is the classic transition piece: square-to-round hoppers and duct transitions. Above, a straight-sided channel profile blends into a half-round 40 mm higher.

Lofted bends aren’t developable by this kernel yet: Unfold on one raises a clear error rather than producing a wrong flat pattern.

from cadbuildr.foundation import (
    Arc,
    CustomOpenShape,
    Line,
    Part,
    Point,
    SheetMetalLoftedBend,
    SheetMetalToSolid,
    Sketch,
    show,
)


class LoftedTransition(Part):
    """SheetMetalLoftedBend: a 2 mm sheet blended from a straight-sided channel
    profile at the bottom to a half-round at the top (a duct transition)."""

    def __init__(self, height=40, thickness=2):
        bottom = Sketch(self.xy())
        top = Sketch(self.xy().get_parallel_plane(height))
        u_channel = CustomOpenShape(
            [
                Line(Point(bottom, -20, 0), Point(bottom, -20, 20)),
                Line(Point(bottom, -20, 20), Point(bottom, 20, 20)),
                Line(Point(bottom, 20, 20), Point(bottom, 20, 0)),
            ]
        )
        half_round = CustomOpenShape(
            [Arc(Point(top, -15, 0), Point(top, 0, 15), Point(top, 15, 0))]
        )
        body = SheetMetalLoftedBend(
            profile_start=u_channel, profile_end=half_round, thickness=thickness
        )
        self.add_operation(SheetMetalToSolid(body=body))
        self.paint("light_blue")


show(LoftedTransition())