FoundationPartsOperationsThicken

Thicken

Thicken turns a surface into a solid by offsetting along its normal. Use it to convert an intermediate SurfaceLoft (or any other surface op) into a boolean-compatible solid. Setting both_sides=True offsets equally in both directions.

from cadbuildr.foundation import *


class SurfaceLoftThickened(Part):
    def __init__(self):
        pf = PlaneFactory()
        p0 = self.xy()
        p1 = pf.get_parallel_plane(p0, 40)
        s0 = Sketch(p0)
        s1 = Sketch(p1)
        c0 = Ellipse(s0.origin, 30, 15)
        c1 = Ellipse(s1.origin, 15, 30)
        surface = SurfaceLoft(shapes=[c0, c1])
        self.add_operation(Thicken(surface=surface, thickness=2.0, both_sides=True))


show(SurfaceLoftThickened())