I want to bake curves from grasshopper to Rhinoceros.
So I wrote next code.
protected override void SolveInstance(IGH_DataAccess DA)
{
List<Curve> crv = new List<Curve>();
if (!DA.GetDataList(1, crv)) return;
var t = true;
if (!DA.GetData(0, ref t)) return;
Rhino.DocObjects.Tables.ObjectTable ot = Rhino.RhinoDoc.ActiveDoc.Objects;
if (t)
{
ot.Add(crv);
}
}
But the following error occurs.
Cannot convert from ‘System.Collections.Generic.List<Rhino.Geometry.Curve>’ to ‘Rhino.Geometry.GeometryBase’
Could anyone please tell me the solution?