Distance

Measures the distance between two 3-D points, or between a 3-D point and an array of 3-D points.

Syntax

rhinoscriptsyntax.Distance (point1, point2)

rhinoscript.utility.Distance (point1, point2)

Parameters

point1

Required.  List of 3 numbers or Point3d.  The first 3-D point.

point2

Required.  point or list of points.

Returns

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.

Example

import rhinoscriptsyntax as rs

point1 = rs.GetPoint("First point")

if point1:

    point2 = rs.GetPoint("Second point")

    if point2:

        print "Distance: ", rs.Distance(point1, point2)

Also See

Angle

Angle2