MCPcopy
hub / github.com/CadQuery/cadquery / _setSweepMode

Method _setSweepMode

cadquery/occ_impl/shapes.py:4571–4589  ·  view source on GitHub ↗
(
        cls,
        builder: BRepOffsetAPI_MakePipeShell,
        path: Wire | Edge,
        mode: Vector | Wire | Edge,
    )

Source from the content-addressed store, hash-verified

4569
4570 @classmethod
4571 def _setSweepMode(
4572 cls,
4573 builder: BRepOffsetAPI_MakePipeShell,
4574 path: Wire | Edge,
4575 mode: Vector | Wire | Edge,
4576 ) -> bool:
4577
4578 rotate = False
4579
4580 if isinstance(mode, Vector):
4581 ax = gp_Ax2()
4582 ax.SetLocation(path.startPoint().toPnt())
4583 ax.SetDirection(mode.toDir())
4584 builder.SetMode(ax)
4585 rotate = True
4586 elif isinstance(mode, (Wire, Edge)):
4587 builder.SetMode(cls._toWire(mode).wrapped, True)
4588
4589 return rotate
4590
4591 @staticmethod
4592 def _toWire(p: Edge | Wire) -> Wire:

Callers 2

sweepMethod · 0.80
sweep_multiMethod · 0.80

Calls 4

toPntMethod · 0.80
startPointMethod · 0.80
toDirMethod · 0.80
_toWireMethod · 0.80

Tested by

no test coverage detected