@@ -190,6 +190,9 @@ class BezierSegment:
190
190
"""
191
191
A d-dimensional Bézier segment.
192
192
193
+ A BezierSegment can be called with an argument, either a scalar or an array-like
194
+ object, to evaluate the curve at that/those location(s).
195
+
193
196
Parameters
194
197
----------
195
198
control_points : (N, d) array
@@ -223,6 +226,8 @@ def __call__(self, t):
223
226
return (np .power .outer (1 - t , self ._orders [::- 1 ])
224
227
* np .power .outer (t , self ._orders )) @ self ._px
225
228
229
+ @_api .deprecated (
230
+ "3.11" , alternative = "Call the BezierSegment object with an argument." )
226
231
def point_at_t (self , t ):
227
232
"""
228
233
Evaluate the curve at a single point, returning a tuple of *d* floats.
@@ -336,10 +341,9 @@ def split_bezier_intersecting_with_closedpath(
336
341
"""
337
342
338
343
bz = BezierSegment (bezier )
339
- bezier_point_at_t = bz .point_at_t
340
344
341
345
t0 , t1 = find_bezier_t_intersecting_with_closedpath (
342
- bezier_point_at_t , inside_closedpath , tolerance = tolerance )
346
+ lambda t : tuple ( bz ( t )) , inside_closedpath , tolerance = tolerance )
343
347
344
348
_left , _right = split_de_casteljau (bezier , (t0 + t1 ) / 2. )
345
349
return _left , _right
0 commit comments