Grasshopper

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!

Views: 1035

Replies to This Discussion

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

Attachments:

Sorry for the delay but something urgent occurred. Get this update (more intersection stuff soon)

Attachments:

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

Attachments:

You may try to :

If (intersection != null) {

intersection.Count;

intersection.ToString();

intersection.First().IsPoint;

}

else

{

//some other code...

}

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service