Пример #1
0
    def __init__(self, spine, profile):
        if isinstance(spine, Curve):
            spine = Wire.by_curve(spine)
        elif spine.is_edge:
            spine = Wire.by_edge(spine)

        if not spine.is_wire:
            raise TypeError('Spine is not a wire.')

        profile = Shape.to_shape(profile)
        self._tool = BRepOffsetAPI_MakePipe(spine.object, profile.object)

        self._tool.Build()
Пример #2
0
 def __init__(self, wire):
     if isinstance(wire, Curve):
         wire = Wire.by_curve(wire)
     elif isinstance(wire, Edge):
         wire = Wire.by_edge(wire)
     self._f = Face(BRepBuilderAPI_MakeFace(wire.object, True).Face())