Altering units to inches from mm asks to rescale model but why?


#21

I actually agree with @dmoyes. These days where we are constantly moving things from one cad system to another having to deal with scaling items up and down is pain. I can’t even coordinate with a surveyor working in same imperial system without having to scale his model up by 12. Having to scale items up and down probably made sense in 1994, but it is 2018 were we can calculate PI to over two millions digits.


(John Brock) #22

I get that, but that’s an entirely different question and problem than what was asked.
We explained what the Yes/No is about when you change unit systems in Rhino.

I agree, it would be nice to have a tool that made the details of shifting unit systems and standards.
As a land surveyor, I used decimal feet and a different convention for angles and bearings than what Rhino uses.
Back then, I constantly struggled with architects that were used to very different settings and standards.


#23

Well if someone sends you a file in Rhino or STEP or IGES, then “you” don’t have to scale it, Rhino will know what to do, but it will still ask because DWG, DXF, STL, and a myriad of other widely used formats don’t include units information at all, there is literally no way of knowing what the numbers are supposed to represent.


#25

This discussion is actually fairly useless and it is not the first time we have had it…

There is a simple solution to it.

  1. Eliminate the use of the word “scale” in the message box - that scares/annoys people. Use two buttons instead:

Unit system change: Maintain size Maintain numbers

  1. If the second is chosen, do the same as you do no with scale=no. Just change the unit system.
    1mm becomes 1inch or whatever.

  2. If the first is chosen, do what scale=yes does now BUT:
    Cut the screen redraw, figure out the exact zoom level in all viewports, scale the model as now, change the units, re-zoom to the same extents as before*, then re-enable the screen redraw. The model will not appear to have undergone any change, so no one will be the wiser, and nobody will panic.

It’s really that simple. Just don’t show the user any model movement in any case. What they don’t know won’t hurt them.

*maybe all you need to do is scale the camera and target points at the same ratio, but I haven’t tested that…


(Luis Fraguada) #26

But what about the 20 named views I had set up for renders?
Nevermind…was remembering some other named views nightmare from back in the day…


#27

It might help for some people? But the misunderstanding here seems to be not understanding that your 3D model is in fact actually constructed using the numbers you input and that those numbers matter, it’s not made at its core using some other unit system with your set unit system at some layer on top of that–well, it is in a way going from binary to base 10–and not understanding why you might want to not scale when doing a units change. I’m not sure what to do about this.


#28

If for whatever reason you are opposed to changing the model units, you can still do this if you want. You can set the units the Distance command reports in, regardless of model units. If you look at the command line, the default is Units=Model_Units, but you can change this to the units you are interested in.

Then you can be explicit when giving units in Rhino. So if you are working in a file which is set to mm, and you want a 10" box, you pick the first point for your box, for the second point you can enter r10",10".

Annotations are a separate thing from model units, and you can change them to whatever you want.

Or you could just change the model units :wink:

Sam


#29

Thanks Sam. I didn’t realize you could change the default distance units or type in different units at the command line.


#30

That doesn’t seem likely to work any better than the current language.

lets suppose a model that is in mm is changed to have “no units” and the file is saved. Another user opens the file and sets the units to inches. After taking some measurements decides inches is wrong and changes the units to mm. When asked Maintain size or Maintain numbers the user thinks the size is correct but the numbers are what’s wrong and so picks the first one . Fortunately, the user can undo and try option 2

I don’t think you can get around the fact that the user who doesn’t understand the question being asked is: "should Rhino scale the numbers that define the geometry or leave them as is " has about a 50/50 chance of answering the question correctly no matter how the question is worded.


(Javier) #31

Just out of curiosity I’ve loaded a Worksession (a house in 4 separate drawings)
and I have changed the units of the current drawing: meters to inches
I have allowed it to change the size of the objects and I have found that it only changes the size of the active drawing.
It is a case in which scaling or not scaling could have some sense, the other is the moment in which the drawing has to be printed (3d) or anything else in which the measurements must be real.
Other programs do not even have units (acad)


#32

Well, then maybe we need to be even more specific about what’s about to happen…
Let’s say the user has a model they think is in inches and wants to change it to millimeters.

UNIT SYSTEM CHANGE
Changing Model units from INCH to MILLIMETER
Choose conversion method:
1 inch --> 25.4 mm 1 inch --> 1 mm Cancel

Of course if the user hasn’t measured at least one thing in the model and figured out which of those choices they need, then it will always be a coin toss… But you can’t completely idiot-proof anything.


#34

You can’t… That’s just the point - as Jim said above, all your model is is a bunch of floating point numbers and other data that is stored in memory. What you see on screen is just a visual representation of that. So changing units while keeping physical size means that every one of those numbers has to be multiplied by a factor and replaced.

So again, the main thing here is that the user should not see any change, whatever it needs to do behind the scenes is just done silently and your on-screen display doesn’t move.


#36

This is just a proof of concept, if you run the script below with the attached file, it will change the units from mm to cm (scaling the cube from 100mm to 10cm) without any ‘apparent’ visual change.

I haven’t figured out how to do Ortho (parallel) viewports as it appears to need some other magic besides camera/target scaling; one would also need to scale dimension styles in the document and the like.

ViewscaleTest.3dm (315.8 KB)

import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino

curr_us=rs.UnitSystem() #millimeters
new_us=3 #centimeters
scale=rs.UnitScale(new_us,curr_us)
rs.UnitSystem(new_us,True,True)
vp=sc.doc.Views.ActiveView.ActiveViewport
#doesn't work for parallel projections
vp.SetCameraLocations(vp.CameraTarget*scale,vp.CameraLocation*scale)
cp=vp.GetConstructionPlane()
cp.GridSpacing*=scale
vp.SetConstructionPlane(cp)
sc.doc.Views.Redraw()

–Mitch


(Doug H) #37

That’s why I always include a 1" (25.4mm) cube in all my models. It’s essentially a scale verification. Whatever final unit system you are using just has to be verified to ensure the cube dimensions match the unit system being used.


#38

I like that idea. I’ve been using an old school drawing scale bar as well. Can’t hurt and could be part of a file template.


#39

John -

Short, clear and on-point.

Well done !

-C.


#40

Helvetosaur-
Good point, but this won’t help someone in Steve1’s position.

@Steve1-
ALL you see here is of great value, but let me help you get started. Once you get this first idea, John Brock’s explanation should SNAP into focus for you, and ALL scale bars and SCRIPTs aside, you’ll know what to do EVERY TIME you’re asked:

1-Unit INCH is more than 20 TIMES as BIG as 1 Unit Millimeter.

  1. John’s explanation is SPOT-ON.

Its NOT just a matter of a simple number “10” . The entire OPERATING ENVIRONMENT is managed on the basis of how units are set, from “TOLERANCES” to Grid settings, Material mapping and on and on, so -

  1. It REALLY DOES come down to what YOU drew -
  • Did you just draw something and discover it was in the "wrong units " ? SIMPLE:

SINCE you’ve decided the problem is the WRONG UNITS, then NO MATTTTER WHAT units you “THOUGHT” you were in, you answer YES when you’re CHANGING the units.

This is true if you typed in 10 and thought you were in MILES and discovered you were in MILLIMETERS or MILLIMETERS and changed to INCHES. The CORRECT answer is YES - RESCALE. (works in BOTH directions.)

That’s the ONLY way something will work when RHINO THOUGHT it was 10 mm and YOU are CHANGING it to 10 MILES (or Inches, or Feet … )

Here’s the KEY:
When you drew the part “10” size,
you drew it in 10 “SOMETHINGS”. (We call these somethings UNITS.) 1 unit is ONE unit, no matter what. IF you THOUGHT the “UNIT” was MILES (you THOUGHT you drew it 10 MILES BIG ! ), or INCHES (YOU THOUGHT you drew it JUST UNDER a foot) and RHINO “THOUGHT” you were in mm, it DREW THE PART “TRUE TO SCALE”: 10 REALLY SMALL (just UNDER half an INCH). YOU are CHANGING that scale. YES - RECALCULATE. NOW the part will achieve 10 Inches or Miles, or whatever from what YOU drew really TINY !

OR - you can go with John’s answer, shorter and more to the point. But your question really is "I don’t understand … " so I hope this helps :=) !

ALL the VERY BEST to you going forward ! -

  • C .

#41

WELL, I’m not quite SURE what the above actually ADDS to the conversation that’s DIFFERENT than what has ALREADY been stated, but WHATEVER…


#43

Adds ACTUAL step-by step (unusual in itself) to WHY for each step (also unusual). I understand the confusion tho, but -

whatever.