Grasshopper

algorithmic modeling for Rhino

OnMesh: How to create a OnMesh object with a list of On3dPoints and the MeshFace?

Hi there,

Could anyone give me some hint, or examples, about creating a OnMesh object in C# or VB with a list of On3dPoints?

I have created the list the points , as well as MeshFace Topology, in a C# component and currently output these two to a Mesh component in Grasshopper to generate a mesh.Now I am thinking to integrate the last mesh process into C# as well. Can anyone show me how to create a OnMesh object in C# or VB with vertices and given MeshFaces topology?

Thanks for your time and I really appreciate your help.

Views: 362

Replies to This Discussion

The folks at McNeel already have... http://wiki.mcneel.com/developer/sdksamples/addmesh

Essentially, create the new mesh object with the number of points and faces, then use the SetVertex and SetFace function to fill in all the information. You will need to know how to connect those vertices into faces (IOW you can' just fill in the vertices and have Rhino sort out the faces for you). Since your creating MeshFaceTopology, I'd assume you have that organization.

I also have yet to find any example, any explanation, or any use for the OnMeshTopology classes, so I doubt they'd really be of any use to you. The can be derived (somehow) from the mesh, but can't really be used for constructing one (I don't think).
I guess I just missed the addmesh example....
tried the method OnMesh.SetVertex() before....it generate an invalid mesh...
I will try to compute the vertex normal..hope this can solve it.

Thanks for your help on this.

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