Skip to content

Commit

Permalink
closest point for points
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvanmele committed Sep 20, 2020
1 parent f947e67 commit e08b361
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/compas_rhino/geometry/point.py
Expand Up @@ -114,6 +114,28 @@ def to_compas(self):
"""
return Point(self.x, self.y, self.z)

def closest_point(self, point, maxdist=0.0, return_param=False):
"""Compute the closest point on a curve to a point in space.
Parameters
----------
point : point
A point location.
maxdist : float, optional
The maximum distance between the point on the curve and the curve.
Default is ``0.0``.
return_param : bool, optional
Return not only the point coordinates, but also the parameter of the point on the curve.
Default is ``False``.
Returns
-------
list
The XYZ coordinates of the point.
"""
return self.xyz


# ==============================================================================
# Main
Expand Down

0 comments on commit e08b361

Please sign in to comment.