Skip to content

Commit c6c1956

Browse files
authored
Merge pull request #737 from RubenRubens/fix_boolean_docs
Improve docs of boolean operations
2 parents 25c3009 + db998e4 commit c6c1956

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

cadquery/cq.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3245,9 +3245,10 @@ def union(
32453245
def __or__(self: T, toUnion: Union["Workplane", Solid, Compound]) -> T:
32463246
"""
32473247
Syntactic sugar for union.
3248-
Notice that `r = a | b` is equivalent to `r = a.union(b)` and `r = a + b`.
3248+
Notice that :code:`r = a | b` is equivalent to :code:`r = a.union(b)` and :code:`r = a + b`.
32493249
32503250
Example::
3251+
32513252
Box = Workplane("XY").box(1, 1, 1, centered=(False, False, False))
32523253
Sphere = Workplane("XY").sphere(1)
32533254
result = Box | Sphere
@@ -3257,7 +3258,7 @@ def __or__(self: T, toUnion: Union["Workplane", Solid, Compound]) -> T:
32573258
def __add__(self: T, toUnion: Union["Workplane", Solid, Compound]) -> T:
32583259
"""
32593260
Syntactic sugar for union.
3260-
Notice that `r = a + b` is equivalent to `r = a.union(b)` and `r = a | b`.
3261+
Notice that :code:`r = a + b` is equivalent to :code:`r = a.union(b)` and :code:`r = a | b`.
32613262
"""
32623263
return self.union(toUnion)
32633264

@@ -3296,7 +3297,7 @@ def cut(
32963297
def __sub__(self: T, toUnion: Union["Workplane", Solid, Compound]) -> T:
32973298
"""
32983299
Syntactic sugar for cut.
3299-
Notice that `r = a - b` is equivalent to `r = a.cut(b)`.
3300+
Notice that :code:`r = a - b` is equivalent to :code:`r = a.cut(b)`.
33003301
33013302
Example::
33023303
@@ -3341,7 +3342,7 @@ def intersect(
33413342
def __and__(self: T, toUnion: Union["Workplane", Solid, Compound]) -> T:
33423343
"""
33433344
Syntactic sugar for intersect.
3344-
Notice that `r = a & b` is equivalent to `r = a.intersect(b)`.
3345+
Notice that :code:`r = a & b` is equivalent to :code:`r = a.intersect(b)`.
33453346
33463347
Example::
33473348

0 commit comments

Comments
 (0)