IsPointOnCurve

Verifies that a point is on a curve.

Syntax

rhinoscriptsyntax.IsPointOnCurve (object_id, point, segment_index=-1)

rhinoscript.curve.IsPointOnCurve (object_id, point, segment_index=-1)

Parameters

object_id

Required. String or Guid. The object's identifier.

point

Required.  List of 3 numbers or Point3d.  The test, or sampling, point.

segment_index

Optional. Number. If object_id identifies a polycurve object, then segment_index identifies the curve segment of the polycurve to query.

Returns

Boolean

True if successful, otherwise False.

Example

import rhinoscriptsyntax as rs

obj = rs.GetObject("Select a curve")

if rs.IsCurve(obj):

    point = rs.GetPoint("Pick a test point")

    if point:

        if rs.IsPointOnCurve(obj, point):

            print "The point is on the curve"

        else:

            print "The point is not on the curve"

Also See

IsCurve