Grasshopper

algorithmic modeling for Rhino

dear all,

I'm new in GH.

 

I'm developing a plug in and I need to use a Curve as an input in one of the nodes. Its necessary to be any type of curve. polyline, line, bspline, etc.

as a register input parameter I have this, think is ok.

pManager.AddCurveParameter("bla bla", "bla", "bla of bla bla", GH_ParamAccess.item);

 

in the Solve Instance()

I tried this:

Curve crv = new Curve(); //but I have an error: is inaccessible due to its protection

level.

So how can I manage all the curve types as, for example, the node Curve does?

 

any clue will be appreciated.

thanks in advance.

c

Views: 871

Replies to This Discussion

You do not construct a curve yourself, you have to get it via the inout parameters

Curve curve = null;
if (!DA.GetData(0, ref curve))
return;

Muchas Gracias!

c.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service