Is there any way to know, within a Rhino file, which elements, curves, lines, surfaces, solids etc… occupy a large number of megabytes? The purpose is to optimize the file size, omitting anything which could be deleted, if too big and not strictly necessary in the layers organization.
The Audit3dmFile command in V6 will give you that detail.
You can use the SelID (Select ID) command to select the specific objects after finding their UUID in the Audit3dmFile output.
The command also includes how much data individual plug-ins are using and storing in the file.
That said, generally speaking, using the Save Small option to delete render and analysis meshes when saving will make the file a lot smaller.
Many thanks John.
@luca_biselli - in case it helps, here’s a python that will find the largest X objects (memory estimate) and mark them
FindLargestObjects.py (1.3 KB)
! _-RunPythonScript "Full path to py file inside double-quotes"
if you want some thing for an alias or button.
Is there a way to select or highlight objects > certain size? trying to work out why model so large
Many thanks Pascal. I will try that too.
this Python script is great! Exactly what I needed. I quickly found the largest elements of my geometries.
It could be lovely to incorporate this tool within the standard commands.
Would it be possible to add an option to report # of faces for mesh objects or render-mesh faces for non-mesh objects? That would be really useful - the memory readout is good to see how heavy the objects are but quite abstract number…
Hi Jarek - I think that is not hard - I’ll have a poke at it.
Yes, this is perfect… (almost ) Thank you!
It would be good if the labels were selected as well, and to disable redraw (typically this is used in a heavy scene, so If I am looking for 10 heaviest objects, it takes a while to finish redrawing).
I would also find it helpful to have an option to label and select all above “x” # of faces or memory. Seems more intuitive that way.
OT: is there a reason drag-an-drop of Python scripts into Vport doesn’t work to run scripts like RhinoScripts rvb files do?
Hi Jarek -
Updated above… the ‘above ‘x’’ seems like a reasonable idea and probably easy enough too, but a different thing.
I’m sure there is a reason drag n drop does not work for pythons… I just don’t know what it is. =) I’ll check.
@Jarek - one other thing… I add the mesh info for the objects that have the largest memory estimate but I am not checking for the largest mesh polygon count - is that what you expect?
Yes, I was actually looking for largest polygon mesh count - I assume in most cases these two would be in-line, but dont know how the memory is calculated (is it based on Render-mesh quality, too?).
For our use the mesh or render mesh polycount is the most telling info for how heavy the models will be to export/render and take measures to deal with too heavy ones.
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…