I have a love hate relationship with blocks. Designers pretty much hate them because they aren’t very friendly, and I would agree. Editing nested blocks in a pain because the object was part of it’s parent block, so when you edit that object, you see your object on top of the a copy causing duplicate face issues. We would much rather be able to more easily “open” and “close” parts, making it easier to edit things, go in/out etc. But whatever, that part is very much like most engineering CAD.
So most of the designers I know have resorted to exploding block instances the very first thing, then organizing by layers and nested layers. This makes editing things much easier (at the expense of losing part instancing), especially working with materials. BUT if you export a step file, the format is kind of messed up. So I want to fix that for my file.
I’d like to have a script that does something like:
for each object that isn’t already a block - define a new block with the location centered.
for each layer with no children, select objects and define a block.
then move through the layer parents until there are none. I’m not even sure how to write that out.
So basically, I’m just trying to split the entire scene up so that every object is defined as a part/block. But then since the objects are sorted by layers, the parts/blocks can get defined as a subassembly based on layer organization. For the blocks based on objects, they should take on the object name. For blocks based on layers, they should take on the layer name.
Doing this would basically “convert” a rhino file into a normal assembly format when exported as step. And since I’d be leaving existing blocks alone, any instancing for screws, or other parts you may have left defined, or defined yourself go untouched other than getting added to the layer based sub-assembly.
For now I’m doing it by hand. I’ve been learning python a bit in blender, but it is Slow going. And I don’t know how to find resources as easily in rhino, especially since python scripts are new as of R6.