FoundationPartsOperationsShell

Shell

Shell hollows a solid by offsetting its faces inward by thickness, leaving a uniform-thickness shell. Pass face_finder to remove specific faces (e.g. to leave one face open — the classic “open box” pattern).

from cadbuildr.foundation import *


class ShellBox(Part):
    def __init__(self, size=40, height=20, thickness=2):
        s = Sketch(self.xy())
        sq = Square.from_center_and_side(s.origin, size)
        ext = Extrusion(sq, height)
        self.add_operation(Shell(solid=ext, thickness=thickness))


show(ShellBox())