I’m trying to change the units of a Rhino file with blocks in it and there’s some weird behavior with block definitions. The same thing happens when coping blocks from one file to another.
It seems that the contents of the block are not scaled, but the block instances themselves are scaled instead. At first sight this seemed reasonable.
However when I placed another instance of the block with the Insert command with no scaling (i.e. scale 1), it actually placed the new block with the same scaling applied as the original block (looked it up in the xForm that the InstanceObject has). It seems as if this scale is saved somewhere in the block definitions and it is applied on top of the scaling that the user applies to the block. Looking through the InstanceDefinition object, I couldn’t find anything like that.
I’ve attached a test model with ablock that displays this behavior, when you insert a new instance. What is going on here?
model.3dm (528.0 KB)
On a second though, is there any way to change this behavior? So the when the units are changed or when blocks are copied from one file to another, then the contents of the blocks rather than the block instances would be scaled. Down the line in another place my scripts depend on block being at the correct scale when inserted. Or if there’s a way to detect block definitions that have this quirk, then I could take precautions.