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

Method __and__

cadquery/cq.py:3466–3479  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

3464
3465 @deprecate()
3466 def __and__(self: T, other: Union["Workplane", Solid, Compound]) -> T:
3467 """
3468 Syntactic sugar for intersect.
3469
3470 Notice that :code:`r = a & b` is equivalent to :code:`r = a.intersect(b)`.
3471
3472 Example::
3473
3474 Box = Workplane("XY").box(1, 1, 1, centered=(False, False, False))
3475 Sphere = Workplane("XY").sphere(1)
3476 result = Box & Sphere
3477 """
3478
3479 return self.intersect(other)
3480
3481 def __mul__(self: T, other: Union["Workplane", Solid, Compound]) -> T:
3482 """

Callers

nothing calls this directly

Calls 1

intersectMethod · 0.95

Tested by

no test coverage detected