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

Method __sub__

cadquery/cq.py:3415–3427  ·  view source on GitHub ↗

Syntactic sugar for cut. Notice that :code:`r = a - b` is equivalent to :code:`r = a.cut(b)`. Example:: Box = Workplane("XY").box(1, 1, 1, centered=(False, False, False)) Sphere = Workplane("XY").sphere(1) result = Box - Sphere

(self: T, other: Union["Workplane", Solid, Compound])

Source from the content-addressed store, hash-verified

3413 return self.newObject([newS])
3414
3415 def __sub__(self: T, other: Union["Workplane", Solid, Compound]) -> T:
3416 """
3417 Syntactic sugar for cut.
3418
3419 Notice that :code:`r = a - b` is equivalent to :code:`r = a.cut(b)`.
3420
3421 Example::
3422
3423 Box = Workplane("XY").box(1, 1, 1, centered=(False, False, False))
3424 Sphere = Workplane("XY").sphere(1)
3425 result = Box - Sphere
3426 """
3427 return self.cut(other)
3428
3429 def intersect(
3430 self: T,

Callers

nothing calls this directly

Calls 1

cutMethod · 0.95

Tested by

no test coverage detected