I just faced a little problem while I was checking rhinocommon. Let me explain! When we want to check if a point is inside a curve or not we use curve.contain() == rg.containment. inside-outside-…
But this function only works if we want to check the situation of a “Single” point!
I was looking for any other function that works with a list of points but couldn’t find any!
Is it possible for any of you to help me in this case?
from Rhino.Geometry import Plane
import scriptcontext as sc
a = []
for pt in pts:
a.append(crv.Contains(pt, Plane.WorldXY, sc.doc.ModelAbsoluteTolerance))
private void RunScript(Curve crv, List<Point3d> pts, ref object A)
{
var relationships = new List<PointContainment>();
foreach(var pt in pts)
relationships.Add(crv.Contains(pt, Plane.WorldXY, RhinoDocument.ModelAbsoluteTolerance));
A = relationships;
}
Also not sure why it did not work. Since it should work also with item access and without a loop.
But as often without code and explicit description of the problem