RC: Check if point is inside a closed curve


Does RC has a method for checking status of the point in regards to location inside or outside of closed curve?
Similar as Brep.Isinside method for breps? Cannot find anything suitable.


Use Rhino.Geometry.Curve.Contains().

Thanks Dale!

Does the point need to be planar with the curve?
Or is it view dependent?

Both are projected to the plane provided:

Contains(self: Curve, testPoint: Point3d, plane: Plane, tolerance: float) -> PointContainment

    Computes the relationship between a point and a closed curve region.    This curve must be closed or the return value will be Unset.

    testPoint: Point to test.
    plane: Plane in in which to compare point and region.
    tolerance: Tolerance to use during comparison.
    Returns: Relationship between point and curve region.

Documentation online does not provide the full range of possible arguments and is limited to the point3D argument:


Interesting. Thanks for the explanation :slight_smile:

@Willem, sorry for being dense, but I see all three overrides in the online documentation. Am I missing something?

You are right, I’m the one being dense here, was looking only at the right pane; missing the left pane completely.



is there a C++ version of Rhino.Geometry.Curve.Contains()?


For points, use RhinoPointInPlanarClosedCurve. See rhinoSdkUtilities.h for details.

– Dale