RC: Check if point is inside a closed curve

Hi,

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.

Thanks,
Dmitriy

Use Rhino.Geometry.Curve.Contains().

Great!
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.

@dale
Documentation online does not provide the full range of possible arguments and is limited to the point3D argument:
http://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Curve_Contains.htm

-Willem

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.

Thanks
-Willem

Hi,

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

Thanks!

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

– Dale