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

Method __or__

cadquery/cq.py:3357–3369  ·  view source on GitHub ↗

Syntactic sugar for union. Notice that :code:`r = a | b` is equivalent to :code:`r = a.union(b)` and :code:`r = a + b`. Example:: Box = Workplane("XY").box(1, 1, 1, centered=(False, False, False)) Sphere = Workplane("XY").sphere(1) resu

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

Source from the content-addressed store, hash-verified

3355
3356 @deprecate()
3357 def __or__(self: T, other: Union["Workplane", Solid, Compound]) -> T:
3358 """
3359 Syntactic sugar for union.
3360
3361 Notice that :code:`r = a | b` is equivalent to :code:`r = a.union(b)` and :code:`r = a + b`.
3362
3363 Example::
3364
3365 Box = Workplane("XY").box(1, 1, 1, centered=(False, False, False))
3366 Sphere = Workplane("XY").sphere(1)
3367 result = Box | Sphere
3368 """
3369 return self.union(other)
3370
3371 def __add__(self: T, other: Union["Workplane", Solid, Compound]) -> T:
3372 """

Callers

nothing calls this directly

Calls 1

unionMethod · 0.95

Tested by

no test coverage detected