Model unit change not working

working with a rather large file that someone else saved with incorrect units (opens as mm):
https://www1.nyc.gov/assets/planning/download/zip/data-maps/open-data/nyc-3d-model/nyc_3dmodel_bx06.zip

Opening it in rhino 5 (mac), it’s possible to run “Units”, select “Feet” from the dropdown and agree to the re-scale. Everything works fine.

However in the latest Version 6 WIP (6.15.19092.12046, 2019-04-02), this is what happens:

  • run “Units”
  • select “Feet” and agree to re-scale model
  • command completes, but the status bar at the bottom of the screen still reads “Millimeters”
  • the “Distance” command then returns a number labeled as Feet, but the value is still the distance in mm

potentially related to this issue, where @pascal was able to identify use of the floating command panel as part of the problem?

That post also mentions the following, marked as either resolved or not in the latest WIP:

  • using the Lasso command in a similar way to above (without the length entry), Rhino crashes when pressing “Done” or Enter/Space
  • issues importing libraries in grasshopper python components. specifically, I haven’t been able to use urllib2 which appears to work fine in Mac Rhino 5
  • in Grasshopper, “Copy All Content” and “Copy Data Only” appear to not be working (no content is available on the clipboard if these are clicked)

Hi @Carsten_Rodin-

Thank you for reporting this. I’ve tried to reproduce this behavior, but I am failing. Can you take a look at my steps and see what we are doing differently.

  1. Launch the RhinoWIP 6.15.19092.12046.
  2. From the Templates section, select Large Objects - Millimeters and start a new modeling window.
  3. Run the Box command and add a box at the origin, that is 10 x 10 x 10 (mm).
  4. Run Units command to bring up the File > Settings > Units settings.
  5. In the Model units dropdown, select Feet. You are asked to scale the model. Select Yes.
Expected Behavior

The model is scaled by 0.00328084 and the units label at the bottom of the modeling window is switched to Feet. Running the Distance command and measuring the width of the box returns ~0.3 ft.

Actual Behavior

Same as expected.

In fact, I can reverse these steps as well and end up with a 10 x 10 x 10 mm box again.

What are we doing differently?

it looks like you are also reporting different unrelated issues. I’m going to split those into separate Discourse topics because it is easier to address them that way.

A post was split to a new topic: Issues import urllib2 into Grasshopper

A post was split to a new topic: Grasshopper: “Copy All Content” and “Copy Data Only” not working

Hey @dan,

Appears to be working well on a new empty model, like you describe. I was able to reproduce those steps and got the same result.

However when opening an existing file (link in my original comment, this is a piece of the Rhino model of New York City that the Department of City Planning publishes), the behavior is as described.

Some possible differences between this file and the large objects/mm template:

  • it’s a V5 file, not V6
  • presumably created on windows
  • rather large (~100s of MB)
  • geometry is very far from the origin (10,000,000s of mm)

Possible to test with the linked file?

One more thing to note, after attempting to change units on this file and seeing the behavior described above, Rhino crashes on quit instead of exiting cleanly.

Hi Carsten - I messed with this a little here - my mac is dinky and doing anything with this file is slow. I hid a bunch of layers to speed things up and what I find is that scaling does work - my test line was the expected length after changing to feet - but the units shown at the status bar did not reflect the change until I had closed and reopened the file.
A simple file does show the change… even this file, with a lot of stuff deleted.

I do see issues with the floating command prompt, but not, as far as I can see, related to the units. However it may be related to the lag from the massive file. For example, in your file, I cannot name an object in Properties - after a couple of characters, the typing goes off to the floating command line. Sometimes.

-Pascal

Hmm… yes it is indeed a large file but since it works flawlessly in Rhino 5 on the same machine I’m led to believe something is not quite right.

I tried what you suggested and turned off a bunch of layers before doing anything, this is what happened:

  • working off a fresh copy of the file from the link above
  • Duplicate and Save the file as V6
  • turn off a bunch of layers, (enough so the model can pan/zoom freely)
  • run Distance to take a measurement across one of the streets in the model, returns ~50805 millimeters (approx ~170’)
  • run Units, change Millimeters to Feet in the drop-down, select Yes to scale the model
  • at this point, the drop-down reads Feet, but the status bar still reads Millimeters
  • run Distance again, check the measurement across the same street in the model, returns “Distance = 50804.764 feet”, leading me to believe that the units were changed but the model was not scaled.
  • save the file and Quit Rhino
  • re-open Rhino, open the file
  • now that the file is open again, the status bar reads Millimeters, as does the drop-down when running Units, and the distance measurement reads the same as above
  • delete a bunch of geometry (the whole “Buildings” layer and all sublayers in the model). the model is now 10x smaller (~40mb instead of ~400mb)
  • attempt the unit change again, at first appears to do nothing but in the Activity Monitor you can see Rhino is hitting the CPU really hard, after waiting for ~10mins everything appears to be successful

So, I guess this is more of a performance issue than a bug? I saw another post that said performance optimization will happen later in the development process. I just wonder why it would take so much longer than V5, there it seems almost instantaneous?!

Thank you for looking at the floating command prompt, I hadn’t noticed it but I’m seeing the same behavior you mention with the object naming.

Hi Carsten - thanks, I will see if I can persuade Rhino to deal with the full file on my little mac - I guess we are seeing much the same thing, I just want to pin it down for a bug report if I can. Obviously, it should just work…

-Pascal

Pascal, not sure if this issue was resolved, but I have encountered a similar problem.
The similarities are;

  1. It was a V5 file, created on a Windows platform.
  2. Even after saving to a V6 file, when changing units from inches to feet, the model does not scale. It now measures in the same numeral and before, but in feet.
  3. When closing and reverting to previous saved file, Rhino crashes.
  4. The command prompt does not work properly. The text cannot be changed or deleted.

Hello - can you please post or send to tech@mcneel.com, the file?

-Pascal

Pascal,

It’s a 85 MB file, can I FTP it?

Ouch… try www.Rhino3d.com/upload, to my attention and with a link back to this topic in your comments, please.
@Seaweed - I see that this file does not scale in V6 for mac - every other version so far scales as expected… I would like to reproduce this with a simple file but so far I cannot.

-Pascal

Pascal, one other detail you should be aware of with this file is that I get a repeated crash when I try to change a missing font in Annotation Styles. I get this warning, but when I change from the missing font or delete the Style, the App crashes.

Thanks - I see several problems in this model but I cannot reproduce them in a new model-
If I change the units and scale, actually a part of the model does scale - the objects on 9-Sections.
If I delete the blocks in the layout and Purge, more of the model scales on units change.
I crash Rhino if I close the file after a units change …
From what I can see, V7 handles it all correctly. Let me know if you would like me to save a scaled v6 version from 7.

-Pascal

Hi: This is the closest previous topic I can find. Latest Rhino 7 for Mac, and latest Mac OS.

  • I work in millimeters exclusively. But this issue only becomes apparent and problematic when exporting to 3mf, and then opening that file with 3d printer slicer software (Cura).

  • Files are frequently changed from mm to microns. It’s not clear how this is happening. (And I’m usually unable to do so manually, as noted in the next point.)

  • Once I discover the issue, I’m unable to change the files to mm. (the “Scale Model?” dialog doesn’t come up when selecting another value for units). I can create a new file with some simple geometry and change units. But for existing files I can’t. By existing files I mean ones created from minutes to years ago. (Older ones obviously created with older versions of Rhino, but subsequently saved as V7.) The workaround is to create a new file with mm template, and import the microns file. Easy enough, but shouldn’t be necessary.

  • For some time I’ve been checking settings / units frequently while working, so see if I can “catch” the change happening. No luck, until today. I’d exported a file to 3mf, and then opened the 3mf with Cura, and it was scaled correctly (mm), but was placed in the wrong location on the build plate. Instead of moving it in Cura I wanted to move it more precisely, so I opened the Rhino file, moved it, and exported again. This time it opened in Cura scaled incorrectly. Opened the file with Rhino and checked units settings, and sure enough microns.

  • Another example today. Created a drawing from scratch, to use as a template. Saved as to work on it further with changes. Exported the subsequent file, and mm as expected. Opened the original file again, and now it’s microns. Can’t change it to mm. I’ll send this example file via the upload page.

Any help would be appreciated.

Hi Donald -
It’s not clear to me, from your description, when you are working in Rhino and when you are working in Cura.
At any rate, the .3mf format doesn’t hold any information about units. Example: in Rhino, in a mm template, create a 10 × 10 × 10 cube and export that to .3mf. Start a new Rhino document from the meters template and import that .3mf file. The cube will still be 10 × 10 × 10.
I don’t know how Cura deals with that.
-wim

Hi Wim: Sorry if it’s not clear. I design in Rhino, and then slice the designs in Cura (via exported 3mf file).

I agree that Rhino doesn’t “see” or care about the units as in your example, but Cura does - and that’s why I’m having trouble. My Rhino drawings are being changed from mm to micron (not by me, but by some glitch in Rhino as far as I can tell), and when I open them in Cura, they are scaled incorrectly. As an example, create a 10 × 10 × 10 cube with both mm and microns templates. Export those drawings to 3mf (“cube-mm.3mf” and “cube-microns.3mf”). Open those files with Cura, and they are scaled differently.