Skip to content

Commit f6c0547

Browse files
committed
now its really fixed
1 parent 340e35f commit f6c0547

File tree

1 file changed

+4
-2
lines changed
  • src/compas_rhino/geometry/curves

1 file changed

+4
-2
lines changed

src/compas_rhino/geometry/curves/nurbs.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,8 +524,10 @@ def closest_point(self, point, return_parameter=False):
524524
The nearest point on the curve, if ``parameter`` is false.
525525
The nearest as (point, parameter) tuple, if ``parameter`` is true.
526526
"""
527-
point, t = self.rhino_curve.ClosestPoint(point_to_rhino(point))
528-
point = point_to_compas(point)
527+
result, t = self.rhino_curve.ClosestPoint(point_to_rhino(point))
528+
if not result:
529+
return
530+
point = self.point_at(t)
529531
if return_parameter:
530532
return point, t
531533
return point

0 commit comments

Comments
 (0)