Grasshopper

algorithmic modeling for Rhino

Hi,

I have a mesh,

I would like to count how many triangles are present within the mesh. I have tried the triangulate command, however, the 'count' of that component seems to only tell me how many triangles were created where previously there were quads. i would like to know the total number of triangles in the whole mesh please.

please see image attached. the meshes shown are baked so that their polygons are visible. the panels show 3 branches of data - please disregard this, in the actual model these objects are part of a wider group which is why there are multiple branches.

is there a plugin or something?

thank you so much! 

Views: 2646

Attachments:

Replies to This Discussion

Hi Kenneth,

Try this:

Attachments:

is there a plugin i need to download? mesh explode? is that the mesh edit plugin?

thank you so much for your prompt reply!

It's regular grasshopper component.
But you do not even need it, the definition will work without it.

Just open the attached file, and apply the initial surface (or in case you have a mesh than just delete the "surface" parameter on the far left and apply your mesh to the "mesh" parameter).

yes that works! thank you so much!!!!!

i got a warning from grasshopper when i tried to open it before. thank you !!!!

Ken 

No custom plugins were you used, just regular grasshopper components.

So it seem you are using some older version of grasshopper. The newest one is 0.9.0014.
Download the Rhino4 version from here. Or Rhino5 from here.

Try this

apologies for the really late reply guys - weekdays are intense and i only have time to work on this dissertation work on weekends. 

thank you both for for your replies, the solution i found was largely based on djordje's solution but slightly tweaked to work for me. i am uploading it so that someone looking through this feed in future can reference it.

tags - COUNT MESH TRIANGLES / POLYGONS

anyway the difference i made to djordje's solution was due to the fact that it counted the number of triangles in the mesh but not the quads. originally i had to have two definitions, one to count the quads and one to count the triangles and add them together to get the total number of polygons. I wanted to count all fo the triangles in one go, therefore, i triangulated all of the quads to create a new mesh of just triangles therefore the definition counted all of the polygons contained in one go.

IMAGE AND GH DEFINITION IS ATTACHED (i cannot figure out how to copy and paste and image into this reply....STILL)

thanks again guys

Ken

Attachments:
Why such a long method to just count the number?

because i couldnt figure out any other way and i need do calculate the optimum polygon number for a sum of 6 separate meshes used in my definition to be exported into an external optimisation program.

Did you see the image I posted above? By the way, to put the image into the reply use the little picture icon. Not the attach file button.

yes i did and it does work but i had already reworked the other solution.

it does output information in a list form so iv made a few alterations to get an easy to use output but yeah i could have easily used this solution, i believe it is more economical. thanks again for all of your help. sorry for the slow reply - i have just noticed another problem that i am trying to solve....

Hi Kenneth,

Michael is right - his solution is far better and simpler. Use it:

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service