Grasshopper

algorithmic modeling for Rhino

hey all!

it's very easy to get a list of GeometryBase as input to a C# plugin, but how to get a tree?

It seems we want something like

GH_Structure<GH_GeometryBase> inputTree;

DA.GetDataTree(0, out inputTree);

but there is no GH_GeometryBase

Unless it's in a different namespace?

Views: 455

Replies to This Discussion

Can't check right now, but you can also try GH_Structure<IGH_GeometricGoo>

thank you!

yes got with:

GH_Structure<IGH_GeometricGoo> inputGeometry;
if (!DA.GetDataTree(0, out inputGeometry))
{
return;
}

and

var oldGeometryGoo = inputGeometry[path][0];
var oldGeometry = Grasshopper.Kernel.GH_Convert.ToGeometryBase(oldGeometryGoo);

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