FoundationPartsSheet MetalClosed Corner

Closed Corner

The SheetMetalClosedCorner node seals the open corner where two adjacent walls meet. With full-length SheetMetalEdgeFlange walls they already extend to and meet at each corner — the walls themselves form the corner (no separate filler is added). Pass a gap to open a clean weld slot along each corner bisector. Here a four-walled tray is folded up from a base plate and its corners are sealed.

from cadbuildr.foundation import Part, Sketch, Rectangle, Line, Point, show
from cadbuildr.foundation import (
    SheetMetalBaseFlange, SheetMetalEdgeFlange, SheetMetalClosedCorner, SheetMetalToSolid,
)


class SheetMetalBoxCorners(Part):
    """Closed Corner — an open tray whose four corners are sealed. Each edge is
    a constructed Line; the full-length walls meet at the corners."""

    def __init__(self, width=80, depth=80, thickness=2, wall_height=25):
        s = Sketch(self.xy())
        base = SheetMetalBaseFlange(
            profile=Rectangle.from_center_and_sides(s.origin, width, depth), thickness=thickness
        )
        hw, hd = width / 2.0, depth / 2.0
        body = SheetMetalEdgeFlange(body=base, edge=Line(Point(s, -hw, -hd), Point(s, hw, -hd)), length=wall_height)
        body = SheetMetalEdgeFlange(body=body, edge=Line(Point(s, hw, hd), Point(s, -hw, hd)), length=wall_height)
        body = SheetMetalEdgeFlange(body=body, edge=Line(Point(s, -hw, hd), Point(s, -hw, -hd)), length=wall_height)
        body = SheetMetalEdgeFlange(body=body, edge=Line(Point(s, hw, -hd), Point(s, hw, hd)), length=wall_height)
        self.add_operation(SheetMetalToSolid(body=SheetMetalClosedCorner(body=body)))


show(SheetMetalBoxCorners())