Blocks scaling quirks when changing unit systems


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.

Hello - I am not sure what you see but this is what I get if I insert a new instance of ‘test’"



I probably didn’t explain myself clearly enough. Yes that’s how it appears to me as well, but here’s the thing.

This cube was created in a file that has millimeters as units with side length of 1000mm (39.37 inches). Then the units of the file were changed to inches.

Now when I insert one new instance with the scale set to 1, it looks exactly like the earlier one. I would assume that cube was inserted literally at scale 1:1.
image image

However when you look at the xForm of the new block, it has actually been inserted with the following matrix, that obviously scales the contents of the block from millimeters to inches.


(I placed it at 0,0,0 to understand the matrix better and used this script to get the matrix

I understand why it makes sense to scale the instance of the block when changing the unit system. Where does rhino save the information that this block should be inserted already scaled when i insert it at 1:1 scale?

I just found out that when you uncheck the Prompt insertation point box in the Insert Block dialog, it rather weirdly inserts the block at 1:1 scale, this is with the side length 1000 inches.

Hi - We have an open YT issue where scaling of blocks is discussed.
This item is currently on the “ Future ” list: RH-28728 .

I’ve added your last observation so that this is looked at when that item is worked on.

I just want to also add that this is a frustrating issue that I encounter often, working between different unit systems. If there’s a fix I’ll cry for joy.