Measures the distance between two 3-D points, or between a 3-D point and an array of 3-D points.
rhinoscriptsyntax.Distance (point1, point2)
rhinoscript.utility.Distance (point1, point2)
point1 |
Required. List of 3 numbers or Point3d. The first 3-D point. |
point2 |
Required. point or list of points. |
Number |
If point1 and point2 are specified as single points, then the distance is successful. |
List |
If point2 is a list of points, then a List of distances if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
point1 = rs.GetPoint("First point")
if point1:
point2 = rs.GetPoint("Second point")
if point2:
print "Distance: ", rs.Distance(point1, point2)