Nested blocks - any pitfalls?


I’m thinking about setting up a workflow that uses nested blocks and will manipulate them algorithmically (change the content of the blocks, replace blocks with other blocks). Probably the “nestedness” would go up to 10 levels deep. Technically it should not be very complicated, I’ll just have to keep track of a bunch of InstanceObject and InstanceDefinition objects.

However, are there any pitfalls with using nested block that might be non-obvious?

I’m asking this because in many other CAD softwares there are issues with nesting blocks and especially manipulating them algorithmically.


Hi @Taavi_Looke,

Why do you need nested blocks, and up to 10 levels deep? What exactly are you trying to do?

What kind of problems do these products have?

– Dale

We are using Rhino to prepare models that consist of parts that can contain other parts, forming a hierarchy of sorts where one part can be exchanged with another. These map quite well to blocks, geometry in the block is the part and nested blocks are references to other parts. In practice the hierarchy will not go very deep, but maybe 3-5 levels, but I said 10 as maybe the upper limit.

I think it was with Revit for example, where using nested blocks made updating the definitions of the block or replacing instances with another type of block rather complicated because of the limitations of the API.

not directly a pitfall, but in V6 non-uniform scaling of blocks still breaks shading normals in the viewport:
@dale - any chance this gets fixed soon?

I’m not seeing this. Perhaps you can provide a file that demonstrates this?

– Dale

Hi @Taavi_Looke,

OK cool, let us know if you run into any issues.

– Dale

We use nested blocks all that time as a means of tracking hierarchy in assemblies and allowing for reuse. Thousands of models, up to roughly 6 deep. No major issues but minor things that I can think of:

Technical/Pen/Artistic views will break (it already does to a lesser extent with non-nested blocks), we had one occasion where a Rhino 5 file with nested linked blocks borked when opened in Rhino 6. There’s of course the headache if you keep those blocks linked you can only edit them in the original file.

here a file: blockShaderBroken.3dm (244.0 KB)

but the issue is documented in the tracker - just no one is working on it…

also related: how to reset the transformation matrix on blocks?

in code and in the rhino ui? cant find either… i can get the xform from Rhino.Geometry.InstanceReferenceGeometry but not set it… Not sure its the right class, never worked with blocks in code, but its on my todo list…

Dale was most likely running an in-house version of SR12 when he said that he was not seeing this.
I have now downgraded to SR10a to check this issue and this is the result:

So, it appears that this has been fixed in the meanwhile - you could install the following daily to confirm this:

1 Like