Grasshopper

algorithmic modeling for Rhino

Hi everybody,

 

I am wondering if there is a method for creating meshes with Delaunay´s algorithm with RhinoCommon? I did not find it in the SDK help file.

 

Thanks

 

Cheers!

Views: 1906

Replies to This Discussion

grasshopper.Kernel.Geometry.Delaunay.Solver.
Thanks Andy!

Sorry, what are the constructors for this type, I did not find them in the help file.

 

Thanks!

Hi Miguel,

 

no constructors, it exposes a bunch of static Solve_XXXX methods.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Hi David,

 

Thanks for your reply.

 

Just a quick question: how could I actually get the Delaunay mesh from a set of points then?

I tried:

Grasshopper.Kernel.Geometry.Node2List nodes = new Grasshopper.Kernel.Geometry.Node2List();
for(int i = 0; i < points.Count; i++)
{
nodes.Append(new Grasshopper.Kernel.Geometry.Node2(points[i].X, points[i].Y));
}
List faces = Grasshopper.Kernel.Geometry.Delaunay.Solver.Solve_Faces(nodes, 0.0);
M = faces;

to get the faces but I  don´t obtain the actual mesh faces and don´t know how to convert them.

I used that because I didn´t know what the List of faces referred to in the .Delaunay.Solver(node2List,  double jitter,  List<faces>)  type.

 

With the code above what I get is a set of Delaunay.FaceEx.

 

Many thanks!

If you want a Mesh, you should use Solve_Mesh() as it returns a Rhino.Geometry.Mesh instance.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Ah!

 

Ok, David, I got it!

 

Thanks.

 

Cheers.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service