File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 125
125
BRepAlgoAPI_Fuse ,
126
126
BRepAlgoAPI_Cut ,
127
127
BRepAlgoAPI_BooleanOperation ,
128
+ BRepAlgoAPI_Splitter ,
129
+ BRepAlgoAPI_BuilderAlgo ,
128
130
)
129
131
130
132
from OCP .Geom import (
@@ -945,7 +947,7 @@ def _bool_op(
945
947
self ,
946
948
args : Iterable ["Shape" ],
947
949
tools : Iterable ["Shape" ],
948
- op : BRepAlgoAPI_BooleanOperation ,
950
+ op : Union [ BRepAlgoAPI_BooleanOperation , BRepAlgoAPI_Splitter ] ,
949
951
) -> "Shape" :
950
952
"""
951
953
Generic boolean operation
@@ -1006,6 +1008,15 @@ def intersect(self, *toIntersect: "Shape") -> "Shape":
1006
1008
1007
1009
return self ._bool_op ((self ,), toIntersect , intersect_op )
1008
1010
1011
+ def split (self , * splitters : "Shape" ) -> "Shape" :
1012
+ """
1013
+ Split this shape with the positional arguments.
1014
+ """
1015
+
1016
+ split_op = BRepAlgoAPI_Splitter ()
1017
+
1018
+ return self ._bool_op ((self ,), splitters , split_op )
1019
+
1009
1020
def mesh (self , tolerance : float , angularTolerance : float = 0.1 ):
1010
1021
"""
1011
1022
Generate traingulation if none exists.
You can’t perform that action at this time.
0 commit comments