Hi,
I would like to ask if there is another way to pass Polyline to grasshopper component.
I am always declaring Curve parameters since there is no AddPolylineParameter option:
protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager) {
pManager.AddCurveParameter("TopPlines", "C0", "TopPlines", GH_ParamAccess.tree);
}
Then casting in the solution:
int c = 0;
for(int i = 0; i < c0.Branches.Count; i++) {
List<Polyline> polylinesA = new List<Polyline>(c0.Branches[i].Count);
foreach (GH_Curve curve in c0.Branches[i])
{
Polyline pl;
curve.Value.TryGetPolyline(out pl);
polylinesA.Add(pl);
}
}
I C# editor I can directly use polylines without casting, is it possible to avoid this step also in compiled components?