algorithmic modeling for Rhino
Hi,
working on a component library in C# and encountered this problem:
1. Solution exception:Object reference not set to an instance of an object.
line that seems to work
Rhino.Geometry.Intersect.CurveIntersections intersection = Rhino.Geometry.Intersect.Intersection.CurvePlane(tempCurve, testPlane, Rhino.RhinoDoc.ActiveDoc.ModelAbsoluteTolerance);
however any attempt to work with intersection throws the error. i've tried these:
intersection.Count;
intersection.ToString();
intersection.First().IsPoint;
I have tested both, tempCurve and testPlane for validity and also tried some constant numbers for the tolerance parameter. The curve and the plane are intersecting in this case.
Thanks, any help appreciated!
Tags:
OK, allow me a couple of minutes to add every imaginable intersection thingy (and tests and try/catch and cats and dogs) to this test def (I have about 30).
In the mean time get this as it is and have fun.
more soon, best, Peter
Sorry for the delay but something urgent occurred. Get this update (more intersection stuff soon)
thank you!
this is incredibly useful. i'll have a closer look after the new year's craze.
Get the usual update and another example (Curve/Curve) as well
You may try to :
If (intersection != null) {
intersection.Count;
intersection.ToString();
intersection.First().IsPoint;
}
else
{
//some other code...
}
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by