@@ -8,19 +8,19 @@ def _boolean(A, B, operation):
88
99 Parameters
1010 ----------
11- A : tuple of vertices and faces
11+ A : tuple[sequence[[float, float, float] | :class:`compas.geometry.Point`], sequence[[int, int, int]]]
1212 Mesh A.
13- B : tuple of vertices and faces
13+ B : tuple[sequence[[float, float, float] | :class:`compas.geometry.Point`], sequence[[int, int, int]]]
1414 Mesh B.
15- operation : { 'union', 'difference', 'intersection'}
15+ operation : Literal[ 'union', 'difference', 'intersection']
1616 The type of boolean operation.
1717
1818 Returns
1919 -------
20- list
21- The vertices of the boolean mesh,
22- and the faces of the boolean mesh,
23- as a list of two numpy arrays .
20+ (V, 3) np.array[float]
21+ The vertices of the boolean mesh.
22+ (F, 3) np.array[int]
23+ The faces of the boolean mesh .
2424
2525 Raises
2626 ------
@@ -49,14 +49,71 @@ def _boolean(A, B, operation):
4949
5050@plugin (category = 'booleans' , pluggable_name = 'boolean_union_mesh_mesh' )
5151def boolean_union (A , B ):
52+ """Boolean union of two meshes.
53+
54+ Parameters
55+ ----------
56+ A : tuple[sequence[[float, float, float] | :class:`compas.geometry.Point`], sequence[[int, int, int]]]
57+ Mesh A.
58+ B : tuple[sequence[[float, float, float] | :class:`compas.geometry.Point`], sequence[[int, int, int]]]
59+ Mesh B.
60+ operation : Literal['union', 'difference', 'intersection']
61+ The type of boolean operation.
62+
63+ Returns
64+ -------
65+ (V, 3) np.array[float]
66+ The vertices of the boolean mesh.
67+ (F, 3) np.array[int]
68+ The faces of the boolean mesh.
69+
70+ """
5271 return _boolean (A , B , 'union' )
5372
5473
5574@plugin (category = 'booleans' , pluggable_name = 'boolean_difference_mesh_mesh' )
5675def boolean_difference (A , B ):
76+ """Boolean difference of two meshes.
77+
78+ Parameters
79+ ----------
80+ A : tuple[sequence[[float, float, float] | :class:`compas.geometry.Point`], sequence[[int, int, int]]]
81+ Mesh A.
82+ B : tuple[sequence[[float, float, float] | :class:`compas.geometry.Point`], sequence[[int, int, int]]]
83+ Mesh B.
84+ operation : Literal['union', 'difference', 'intersection']
85+ The type of boolean operation.
86+
87+ Returns
88+ -------
89+ (V, 3) np.array[float]
90+ The vertices of the boolean mesh.
91+ (F, 3) np.array[int]
92+ The faces of the boolean mesh.
93+
94+ """
5795 return _boolean (A , B , 'difference' )
5896
5997
6098@plugin (category = 'booleans' , pluggable_name = 'boolean_intersection_mesh_mesh' )
6199def boolean_intersection (A , B ):
100+ """Boolean intersection of two meshes.
101+
102+ Parameters
103+ ----------
104+ A : tuple[sequence[[float, float, float] | :class:`compas.geometry.Point`], sequence[[int, int, int]]]
105+ Mesh A.
106+ B : tuple[sequence[[float, float, float] | :class:`compas.geometry.Point`], sequence[[int, int, int]]]
107+ Mesh B.
108+ operation : Literal['union', 'difference', 'intersection']
109+ The type of boolean operation.
110+
111+ Returns
112+ -------
113+ (V, 3) np.array[float]
114+ The vertices of the boolean mesh.
115+ (F, 3) np.array[int]
116+ The faces of the boolean mesh.
117+
118+ """
62119 return _boolean (A , B , 'intersection' )
0 commit comments