FoundationPartsSheet MetalBase Flange

Base Flange

The SheetMetalBaseFlange node is the foundational flat plate of a sheet-metal body. It extrudes a closed 2D profile by thickness and tags the result as a sheet-metal wall, so subsequent flanges and bends can be added with full parametric identity (preserved through Unfold).

You configure the project-level defaults — thickness, bend_radius, k_factor — once via SheetMetalConfig and every node reads them.

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


class SheetMetalBase(Part):
    """Base Flange — the root flat plate. Construct the node directly."""

    def __init__(self, width=60, depth=40, thickness=2):
        s = Sketch(self.xy())
        plate = Rectangle.from_center_and_sides(s.origin, width, depth)
        base = SheetMetalBaseFlange(profile=plate, thickness=thickness)
        self.add_operation(SheetMetalToSolid(body=base))


show(SheetMetalBase())