Hi Jarek - - give this one a try…
FindHighPolyCount.py (3.9 KB)
Yes, that’s exactly what I meant. Thank you!
This version does not work with block instances though, would be useful to include that as an option.
Also, not sure if there is quick access to this info, but in the end I am mostly interested in total triangular faces count. Something like the “_PolygonCount” command reports in the last line (where the total triangulated faces count is shown, after converting the quads and n-gons…)
Are you up for some more Python practice ?
Hmmm - blocks, eh? Probably do-able… nested ones might be a challenge for my brainlet but I’ll have a look.
@Jarek - meantime, optional triangle report added and updated above…
@pascal you may want to try using gists for samples like this. They become much easier to dig up over time.
Hm - checking, thanks - new to me.
OK, got it now, I think - ‘permalink’:
Other ways to share this would be
or clicking on the “raw” button and providing a link for that.
The nice thing about gists is that you can find them later and you can edit the file on the page to get a new revision.
Hi Steve - thanks, that looks better - I changed mine…
For the blocks, I know that the Polycount command returns a total polycount per object including blocks, but I guess it is slow for larger scenes and we would need to parse the command history…
Another idea is RS.ExtractRenderMesh gets meshes of all geometry, including nested ones, from blocks… but again, going over every block like that may be slow.
Not sure if there is anytime else deeper in RhinoCommon that could help to facilitate blocks processing without recurring nested block object processing headache…
PS. Any luck finding out why drag-and-drop of .py files does not work?
I could not find anything on the Forum or YT…
@Jarek - OK… give it a try. I don’t say I did it (block instance support) in a smart way but it seems to work so far in my tests. “Trust but verify”
hmm… this one does not work at all over here… I may do some more testing but with the file I tried before nothing gets selected/labelled with a treshold of 5000 even though there is plenty of block and non-block objects…
This is the code, right?
Yeah… that should be right. Works here. Let me just attach what I have the old fashioned way and see if that does anything on your end.
FindHighPolyCount.py (5.2 KB)
@Jarek - if it does not work, shout - it seems good here but my test cases are pretty limited…
Can I suggest that you add a revision number to avoid confusion, please?
One of the nice things about gists is that you can see all of the revisions. The most recent version is always presented.
sorry to ask. How do I instal this .py file to run in rhino?
I just see there is a run command then select the .py file, is this best way?
This is how I do it myself. If you follow up from the beginning of the thread, Pascal has given precise indications.
RunPythonScript works fine, thanks guys for your help. Much apprciated.
Works great Pascal - exactly what I needed. And its quite fast! Thanks so much.
I don’t use the Memory switch, but when enabled, the script throws this error:
Message: Local variable 'obj' referenced before assignment.
hm… Checking, thanks.
I’m not getting that here - maybe I’m lucky - if you see that again, can you tell me what line is called out?
Maybe I accidentally fixed it in the latest - it is posted to that ‘gist’ link