@@ -155,19 +155,20 @@ def intersect(self, tool_body: 'Body') -> 'Body':
155155 self .__wp = wp
156156 return self
157157
158- def add_extrude (self , faceStr : str , sketch : Optional ['Sketch' ], amount : float ) -> 'Body' :
158+ def add_extrude (self , faceQuery : str , sketch : Optional ['Sketch' ], amount : float ) -> 'Body' :
159159 """
160160 Adds an extrusion to the specified face of the body using a sketch.
161161
162162 Args:
163- faceStr (str): The face to extrude.
163+ faceQuery (str): Query string that selects the face to extrude. Must evaluate to exactly one face.
164+ The query syntax is documented at :ref:`query_faces`.
164165 sketch (Sketch): The sketch to extrude. If None is given, the face itself is extruded.
165166 amount (float): The amount of extrusion.
166167
167168 Returns:
168169 Body: The modified body object.
169170 """
170- face = self .__wp .faces (faceStr )
171+ face = self .__wp .faces (faceQuery )
171172 plane = face .workplane (origin = (0 , 0 , 0 ))
172173 if sketch :
173174 plane = plane .placeSketch (sketch .cq ())
@@ -176,19 +177,20 @@ def add_extrude(self, faceStr: str, sketch: Optional['Sketch'], amount: float) -
176177 self .__wp = plane .extrude (amount , "a" )
177178 return self
178179
179- def cut_extrude (self , faceStr : str , sketch : Optional ['Sketch' ], amount : float ) -> 'Body' :
180+ def cut_extrude (self , faceQuery : str , sketch : Optional ['Sketch' ], amount : float ) -> 'Body' :
180181 """
181182 Adds a cut extrusion to the specified face of the body using a sketch.
182183
183184 Args:
184- faceStr (str): The face to extrude.
185+ faceQuery (str): Query string that selects the face to extrude. Must evaluate to exactly one face.
186+ The query syntax is documented at :ref:`query_faces`.
185187 sketch (Sketch): The sketch to extrude. If None is given, the face itself is extruded.
186188 amount (float): The amount of extrusion. For cutting you usually want to use a negative value to cut into the body.
187189
188190 Returns:
189191 Body: The modified body object.
190192 """
191- face = self .__wp .faces (faceStr )
193+ face = self .__wp .faces (faceQuery )
192194 plane = face .workplane (origin = (0 , 0 , 0 ))
193195 if sketch :
194196 plane = plane .placeSketch (sketch .cq ())
@@ -197,12 +199,13 @@ def cut_extrude(self, faceStr: str, sketch: Optional['Sketch'], amount: float) -
197199 self .__wp = plane .extrude (amount , "s" )
198200 return self
199201
200- def make_extrude (self , faceStr : str , sketch : Optional ['Sketch' ], amount : DimensionDefinitionType ) -> 'Body' :
202+ def make_extrude (self , faceQuery : str , sketch : Optional ['Sketch' ], amount : DimensionDefinitionType ) -> 'Body' :
201203 """
202204 Creates a new body by extruding the specified face of the body using a sketch.
203205
204206 Args:
205- faceStr (str): The face to extrude.
207+ faceQuery (str): Query string that selects the face to extrude. Must evaluate to exactly one face.
208+ The query syntax is documented at :ref:`query_faces`.
206209 sketch (Sketch): The sketch to extrude. If None is given, the face itself is extruded.
207210 amount (float): The amount of extrusion. Can also be a tuple of two floats to extrude between two planes with the given offsets.
208211
@@ -215,7 +218,7 @@ def make_extrude(self, faceStr: str, sketch: Optional['Sketch'], amount: Dimensi
215218 dim = get_dimension (amount , False )
216219 offset = dim .min if abs (dim .min ) > 1e-6 else 0.0
217220
218- face = self .__wp .faces (faceStr )
221+ face = self .__wp .faces (faceQuery )
219222 plane = face .workplane (origin = (0 , 0 , 0 )) # offset param does not work for some reason, move result instead
220223 if sketch :
221224 plane = plane .placeSketch (sketch .cq ())
0 commit comments