Merge pull request #737 from RubenRubens/fix_boolean_docs
Improve docs of boolean operations
This commit is contained in:
@ -3245,9 +3245,10 @@ class Workplane(object):
|
|||||||
def __or__(self: T, toUnion: Union["Workplane", Solid, Compound]) -> T:
|
def __or__(self: T, toUnion: Union["Workplane", Solid, Compound]) -> T:
|
||||||
"""
|
"""
|
||||||
Syntactic sugar for union.
|
Syntactic sugar for union.
|
||||||
Notice that `r = a | b` is equivalent to `r = a.union(b)` and `r = a + b`.
|
Notice that :code:`r = a | b` is equivalent to :code:`r = a.union(b)` and :code:`r = a + b`.
|
||||||
|
|
||||||
Example::
|
Example::
|
||||||
|
|
||||||
Box = Workplane("XY").box(1, 1, 1, centered=(False, False, False))
|
Box = Workplane("XY").box(1, 1, 1, centered=(False, False, False))
|
||||||
Sphere = Workplane("XY").sphere(1)
|
Sphere = Workplane("XY").sphere(1)
|
||||||
result = Box | Sphere
|
result = Box | Sphere
|
||||||
@ -3257,7 +3258,7 @@ class Workplane(object):
|
|||||||
def __add__(self: T, toUnion: Union["Workplane", Solid, Compound]) -> T:
|
def __add__(self: T, toUnion: Union["Workplane", Solid, Compound]) -> T:
|
||||||
"""
|
"""
|
||||||
Syntactic sugar for union.
|
Syntactic sugar for union.
|
||||||
Notice that `r = a + b` is equivalent to `r = a.union(b)` and `r = a | b`.
|
Notice that :code:`r = a + b` is equivalent to :code:`r = a.union(b)` and :code:`r = a | b`.
|
||||||
"""
|
"""
|
||||||
return self.union(toUnion)
|
return self.union(toUnion)
|
||||||
|
|
||||||
@ -3296,7 +3297,7 @@ class Workplane(object):
|
|||||||
def __sub__(self: T, toUnion: Union["Workplane", Solid, Compound]) -> T:
|
def __sub__(self: T, toUnion: Union["Workplane", Solid, Compound]) -> T:
|
||||||
"""
|
"""
|
||||||
Syntactic sugar for cut.
|
Syntactic sugar for cut.
|
||||||
Notice that `r = a - b` is equivalent to `r = a.cut(b)`.
|
Notice that :code:`r = a - b` is equivalent to :code:`r = a.cut(b)`.
|
||||||
|
|
||||||
Example::
|
Example::
|
||||||
|
|
||||||
@ -3341,7 +3342,7 @@ class Workplane(object):
|
|||||||
def __and__(self: T, toUnion: Union["Workplane", Solid, Compound]) -> T:
|
def __and__(self: T, toUnion: Union["Workplane", Solid, Compound]) -> T:
|
||||||
"""
|
"""
|
||||||
Syntactic sugar for intersect.
|
Syntactic sugar for intersect.
|
||||||
Notice that `r = a & b` is equivalent to `r = a.intersect(b)`.
|
Notice that :code:`r = a & b` is equivalent to :code:`r = a.intersect(b)`.
|
||||||
|
|
||||||
Example::
|
Example::
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user