FoundationPartsSheet MetalBase Flange

Base Flange

A base flange 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 the helpers reuse them.

from cadbuildr.foundation import *
from cadbuildr.foundation.sheet_metal import base_flange, to_solid


class SheetMetalBase(Part):
    def __init__(self, width=60, depth=40, thickness=2):
        s = Sketch(self.xy())
        plate = Rectangle.from_center_and_sides(s.origin, width, depth)
        flange = base_flange(profile=plate, sketch=s, thickness=thickness)
        self.add_operation(to_solid(flange))


show(SheetMetalBase())