meshmash / Plankton

A C# half-edge mesh data structure, and components for using this in Grasshopper/Rhino
http://meshmash.github.io/Plankton
GNU Lesser General Public License v3.0
216 stars 66 forks source link

Adding multiple elements #15

Closed pearswj closed 10 years ago

pearswj commented 10 years ago

Resolves #9.

Allows the addition of multiple vertices/faces at once, assisting in the creation of large meshes.

@Dan-Piker, @uto – any comments?

pearswj commented 10 years ago

For the vertices I've used a parameter of IEnumerable<PlanktonXYZ>. Maybe I could add a ToPlanktonXYZ() extension method for Point3d/Point3f so that one could call the following in Grasshopper:

pMesh.AddVertices(vertices.Select(v => v.ToPlanktonXYZ()));
uto commented 10 years ago

thx for IEnumerable. this looks good to me.