Grasshopper

algorithmic modeling for Rhino

what is the most efficient way to convert mesh faces into breps?

I used the following workflow to convert the faces in a mesh into individual brep surfaces so that I can calculate the surface area for each of them.

However, it took 2.7 minutes to process 14k mesh faces.

May I ask if there is more efficient way to do this?

Thanks.

Views: 4998

Replies to This Discussion

You can certainly cut out the middle man and just plug the curves directly into the area. Does that make an appreciable difference?

Alternatively, for triangles there's (fast) alternative ways to calculate areas.

Thanks, David. Getting the area of each face is the priority here, and the middle man "create surface by boundary lines" is not necessary here indeed.

Just doing it all in C# allows you to get really efficient. The area of a triangle can be easily calculated using the cross product of two edges. The length of the vector cross product equals the area of the parallelogram (i.e. twice the area of the triangle).

Attachments:

There's also a "mesh area" component that is designed for this purpose - no conversion required. 

However, if you need to convert to surfaces for other reasons, I think you'll find it's fastest to deconstruct your mesh faces into points and then use surface 4 pt to construct the surfaces directly. The Boundary Surface component you're using has to do a bunch of extra work that isn't any use to you in this content - that's what makes it slow.

Thanks, Andrew for your suggestion to covert mesh face to surface.

However, I'm unable to find the "mesh area" component. Is it a GH native component?

Nik Wilmore did a definition that merged the mesh faces into continuous surfaces I believe

here is the verdict :

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