Grasshopper

algorithmic modeling for Rhino

I'm not sure if its something I'm doing wrong, but I am trying to output a tree of curves from a custom component and some of them are polycurves.

I do this:

curveArray is a List<Curve>[] containing PolyCurves, NurbsCurves and PolyLineCurves

for (int i = 0; i < curveArray.Length; i++)
{
//List<Curve> aShapes = rPerimeter[i];
for (int j = 0; j < curveArray[i].Count; j++)
{


GH_Curve Shapes = new GH_Curve(curveArray[i][j]);
structrPerimeter.Insert(Shapes, new GH_Path(i), j);


}

This causes the component to break and tell me:

"Error: Solution exception: Attempted to read or write protected memory.  This is often an indication that other memory is corrupt."

If I try and catch all the PolyCurve items and explode the Polycurve before and output the individual segments I get the same error, but if I approximate the curves by dividing it and making a polylinecurve from the points it has no problems with that.

Any ideas what I'm doing wrong?

Views: 415

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service