Inserted block 1000 times larger than expected

I have a block which I made in a layout. My layouts are typically in millimeters.
I exported it some time ago and did not use it for a while.
I have now inserted it on another layout in millimeters, but it is 1000 times larger.
I thought I had made a mistake back when I exported the block.
So I scaled it down, exploded and made a new block, different name etc.
But when I insert this block that I just created inside this same layout, it is again 1000 times larger.

What am I missing?
N

HELP.
Any idea why this is happening?
I tried to export the block and insert it in a new file Model in meters, Layout in millimeters.
When I insert it in Model it has 50 meters (when it should have 0.05m).
When I insert it in Layout it has 50000 millimeters,

I made a new block, in a new file, in a new layout, and it behaves the same.
Was this always like that???
N

If you post the file someone can take a look. Otherwise we’re working in the dark…

millimeters

Grazie Mille GIFs - Get the best GIF on GIPHY

Thanks. I corrected it so that GPT-4 and family don’t learn from my mistakes.
N

3 Likes

Hi Jeremy,
It is a simple recipe and the idea was to see if it happens on your side. I send you attached a file with the 1000 times large block in the layout.

Here’s the recipe:

  1. Open a file Large Objects, meters.
  2. Confirm that units are meters in Model and millimeters in Layout
  3. Insert layout and go there
  4. type Rec 0,0 50,5
  5. type Sellast -block 0,0 enter until exiting
  6. type -insert enter enter 0,0 enter until exiting command.

I end up with the original instance of the block - which is 50mm wide - and the second instance - which is 50000mm wide.

N
230322 Large Block in layout.3dm (37.7 KB)

Hi Nuno -

Yes, we have this issue on our list as RH-52130 Block Not Inserting in Layout Units
-wim

Is that related to the ACAD insertion problems? because I also don’t remember this happening not so long ago.
Any timeline for this being solved?
This is messing the whole workflow and it is not clear what will happen when the issue is solved, I am assuming every scaled down block will basically become miniscule.
N

Hi Wim,

I’m seeing something different going on here. If you edit the saved block file you find it has been saved with model units instead of the desired layout units. So the block is wrong, not the insertion.

HTH
Jeremy

@wim
I just scrolled the history of RH-52130 and realized that this is like that for a very long time.
I was really surprised by that because I have not noticed it and I do use it quite a bit.
Then I noticed that I have a series of shortcuts that I use constantly for copying stuff between files and that have been protecting me from this.

maybe this is stating the obvious but here it goes:
I have noticed that if you insert an external file as a block it takes the model units and therefore inserts it 1000 times larger. However, if when you insert it you choose “insert it as objects”, it inserts it at the right scale.
I always assumed that in the background, it was inserting the block and exploding it but apparently that is not the case and it is using import instead - my shortcuts (which I probably wrote 25 years ago) use import and that also works with the correct scale.

Risking stating the obvious again, it looks like the problem is not on the creation/export of the block - otherwise import would have the same result - but on its insertion.

Hi Jeremy,
What brings you to that conclusion? Please see my previous reply to Wim. the issue seems to be clearly on the insertion.
if you select the original instance and go to details you don’t see any transformation. if you select the second instance (the large one) you can see the transformation is 1000:
Block Instance
transformation:
1000, 0, 0, 0
0, 1000, 0, 0
0, 0, 1000, 0
0, 0, 0, 1
Block Definition (embedded)
name: Block 01

Hi,

I believe that the transformation is because Rhino has been set up to assume that a block is in model units and it is adjusting from model (metres) to layout (millimetres).

If you export the block into a file via the block manager you will see that the block uses model units that it has picked up from the originating model. The geometry is on the model canvas, not a layout canvas. The file takes the dimensionless lengths from the originating layout item(s) and combines them with the block’s model units. That is why the problem lies in the block creation.

Steps to demonstrate:

  1. Create an originating model file with model units as metres and layout units as millimetres.
  2. Add a layout.
  3. In layout mode draw a circle with a radius of 10mm.
  4. Make a block of the circle.
  5. From the Block Manager, export the block.
  6. Open the block file in Rhino.
  7. Note that the circle is on the model canvas.
  8. Note that the model units are metres.
  9. Measure the radius of the circle and note that it is now 10 metres.

Then when you add a block instance to a target layout from this block file, Rhino says "I have a 10m radius, I need to display it on a canvas measured in mm, so I’ll multiply by 1000 and you end up with a circle with a radius of 10000mm.

If you have further questions, don’t hesitate to ask.

Regards
Jeremy

p.s. If you use Export Selected to export geometry from a layout canvas, that ends up on the model canvas too. With the same issue of treating the layout dimensions as model dimensions.

As a further step, if you make a copy of the block file and in Rhino change its model units from metres to millimetres and say no to the resize option, you will get an object that is the right size for your target file’s layout canvas. Open the target file and place a block instance of the corrected block in it. It will place at the correct size and if you look at its details you will see there is no transformation because block and layout are using the same units.

This means you have a workaround: create your layout blocks in their own file(s) in model space, with model units set to the desired layout units, then open your target file and insert block instances on your layout.

Regards
Jeremy

Hi Jeremy,
I see what you mean and you’re probably right.
However, what is strange is that if you import the file it comes in the correct size. It seems that import ignores units altogether, which is unexpected to me, but maybe as designed… (1)

To continue your example after inserting the block in the layout

  1. import the block that you exported. it will have 10mm radius
  2. in model canvas, insert the block and it will have 10 m radius
  3. in model canvas, import the block and it will have 10 m radius

About your workaround, I think that was indeed why I have not noticed before. I did originally made the blocks in model and did not change them for a while. I started noticing the issue after editing them in place on Layouts and exporting them. Even then, I would mostly export the several layout blocks at the same time to a temporary file and import (instead of inserting) into the new layout.

N
(1) … come to think of it that could explain why sometimes I had problems with importing third party files. I was probably using my shortcut which uses Import and not Insert.
see Consider scaling in importing - Rhino / Rhino for Windows - McNeel Forum

That appears to be the case if you import the uncorrected export file to the layout canvas (and both model and layout units are metric). If you import to the model canvas then units are definitely taken into account.

And just to loosen the lid on the can and glimpse the worms within, if you import the uncorrected export file with metre units to a layout with inch units then Rhino converts the metres as if millimetres into inches. So Rhino is not simply ignoring the units.

I think McNeel need to design a consistent scheme of translations covering the whole panoply of imports, exports and block operations to and from layout space and then apply that to the relevant code (fyi @wim).

Regards
Jeremy

Oh boy, I lost you on the uncorrected export file…

On my side, to make it simple we can bypass the export.

  1. New Large Objects Meters file; make circle 10m radius; Saveas Circle.3dm;
  2. New Large Objects Meters file; create layout;
    a. insert Circle.3dm as a block in model space, results in circle with 10m;
    b. import Circle.3dm in model space, results in circle with 10m;
    c. insert Circle.3dm as a block in Layout, results in circle with 10000mm;
    d. import Circle.3dm in Layout, results in circle with 10mm!!!

I will not get into the inches issue. The real can of worms is why CAD software needs to scale geometry to convert between units. It makes absolutely no sense and it is one of the mysteries of the world. It would be like you would need to scale your fonts when you change units in Word.

Hi @jeremy5, (and @wim)
I thought I could use this workaround to edit all the blocks in Model space, but seems not to work when you have text in you block because somehow when you open the file in model space the text has disappeared (Exported block with text loses text - Rhino / Rhino for Windows - McNeel Forum).
Any idea why?

@wim

Is this expected? This is a really strange behaviour in my oppinion.
N

@jeremy5
with your workaround here and the workaround about the missing export texts, it turns out that when I reinsert the adjusted block it it redefines all the existing block instances 1000 times smaller, and the newly inserted block instance has a transformation of 1000.
This is a huge mess because I have many instances in many files, that would need to be replaced.
Which again brings us to the dilema between the problem being on the exporting or on the insertion or somewhere else…

After a few more tests, it seems that Rhino does two separate things in the process of inserting a block in the layout:

  1. it converts the block definition’s units to the model units (i.e. if the block is in mm and model units is m, then it converts the block to m, without transformation),

and then;

  1. it scales the block instance to transform the model units into the layout units.

When exporting the block, Rhino simply exports the block definition (i.e. without the step two of transformation of the instance, which was space or canvas related), which makes sense.

The problem happens when a block is created in Layout. Somehow, its block definition takes the model space units and not the Layout units, but the block instance created has no transformation. If the model space units are different than the layout, when the block definition is exported, it will use the absolute value of the layout but in model units, without any conversion or transformation.
The problem then occurs when the block is inserted and the new block instance suffers the step 2 (above) transformation, becoming 1000 times larger than designed (in the case of m versus mm). It gets even more confusing if there is already a block instance that has no transformation.

Therefore (I am hoping it is that easy :smiley: ), there are two solutions:

  1. when creating a block in layout, Rhino should, unbeknownst to the user, scale (transform) the resulting block instance in relation to the models space, as if it had been inserted from an external file;
  2. when inserting a block, Rhino should convert the block definition units to the units of the space the instance is being inserted in, without any transformation.

I would like to hear from Rhino (@wim) what do they think of this because this is really a problem.

Here are the tests I did to get to this conclusion:

Summary

A. Open a new file Large, Meters

  1. In model space, draw a circle with 0.01m radius,
  2. place a text with a redefined text style with 0.01 on the circle
  3. Save as “Done in meters.3dm”

B. Open a new file Large, Millimeters

  1. In model space, draw a circle with 10mm radius,
  2. place a text with a redefined text style with 10mm height on the circle
  3. Save as “Done in millimeters.3dm”

C. Open a new file Large, Meters

  1. Create a layout,
  2. insert “Done in meters.3dm” as a block. It looks in the right size but… the transformation is 1000
  3. insert “Done in millimeters.3dm” as a block. It looks in the right size but… the transformation is also 1000 but the text is a 1000 times larger.

D. Open a new file Large Millimeters

  1. Create a layout,
  2. insert “Done in meters.3dm” as a block. It looks in the right size and the transformation is 1, but text is 1000 times smaller
  3. insert “Done in millimeters.3dm” as a block. It looks in the right size and the transformation is also 1.

E. Inside the file C:

  1. In layout, draw a circle with 10mm radius,
  2. place a text with a redefined text style with 10mm height on the circle
  3. create a new block “done in layout m-mm” with the previous elements
  4. from model space, export the new block
  5. go to layout, insert the block exported, redefine existing block. the original instance will stay the same the new instance will have a 10000mm radius
  6. open the file “done in layout m-mm.3dm”, the circle will be 10m

F. Inside the file D:

  1. In layout, draw a circle with 10mm radius,
  2. place a text with a redefined text style with 10mm height on the circle
  3. create a new block “done in layout mm-mm” with the previous elements
  4. from model space, export the new block
  5. go to layout, insert the block exported, redefine existing block. the original instance will stay the same the new instance will have a 10mm radius
  6. open the file “done in layout mm-mm.3dm”, the circle will be 10mm

here are the files:
230326 A block done in Meters.3dm (37.6 KB)
230326 B block done in Millimeters.3dm (37.3 KB)
230326 C LargeMeters w Inserted blocks.3dm (57.9 KB)
230326 D LargeMillieters w Inserted blocks.3dm (59.1 KB)
230326 E block done in Layout m-mm.3dm (35.6 KB)
230326 F block done in layout mm-mm.3dm (27.9 KB)

PS. What is happening with the text is I am not quite sure but I think it is related to the issue that the size of the text in layout is somehow related to that of the model space (not the most clear link in Rhino)… come to think of it it may be the origin of all these convoluted conversions and scales…

@wim
I slightly edited the previous post for a bit clarification and some correction in the example steps regarding file names (insertions in italic).

It would great to have your (Rhino’s) feedback on this. I can think a few quick scripting hacks to correct this, that will at least generate consistency in the way the blocks are used/inserted.
However, depending on how you solve this, it may become really messy when it is corrected.

Is the scaling of the block really necessary? Can the same block not exist in meters in Model and in millimeters in Layout without transformation?

One thing that I did not describe in the previous post, illustrates the problem very clearly:

  1. open a Large, Meters file;
  2. create a Layout (units should be mm);
  3. draw a circle with 10mm radius;
  4. create block A with the circle;
  5. Keep the first block A instant in Layout,
  6. Insert a second block A instance in Model Space.
  7. Insert a third block A instance in Layout.

Unlike what I thought before, you don’t even need to export and insert it from the outside.
Now you have 3 Block A instances:

  • the first with 10mm and no transformation;
  • the second with 10m and no transformation;
  • the third with 10000mm and 1000 times transformation.
another curiosity

::::::::::::::::

  1. Export block A to a folder.
  2. Import block A in Model Space
  3. Import block A in Layout
    .
    The circle will have 10m in Model and 10mm in Layout

::::::::::::::::

Depending how you solve this, we will have to redefine or scale all layout blocks that we have across many documents.
N

hI @nsgma,
This is a bug and it is on the list to be fixed.
The issue occurs making a block in a layout, the Block command assigns the Block unit to the model space unit, always even when unit of the layout is different than the model…

As a workaround, try this in the Rhino 8 WIP

  1. Make the block on the layout.

  2. Use the new Rhino 8 WIP Block Definition panel, change the Block unit to the Layout unit, like MM or Inches whatever your layout unit is.

  3. Pick “No” so you do not scale the geometry.
    image

Now insert the block into the layout, and the size is comparable to the original block geometry.

Let us know if this workaround works for you.
And we will let you know when there is a fix.

Sincerely,
Mary Ann Fugier

1 Like