×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# rounding off to 10mm

## rounding off to 10mm

(OP)
Is there a way to round off a number to the nearest 10mm?
As in 2786mm would become 2790mm?

NX 7.5
Teamcenter 8

### RE: rounding off to 10mm

google can search eng-tips really effectively.

for example try typing this into google:

round nx site:eng-tips.com

you'll find this thread: thread561-168324: Round number to certain number of digits

and this post from Mr. Baker:

X = the original number you wish to round
XR = the result after rounding
places = represents the number of places that you wish to round to, using the following scheme:

1 decimal place  = 10
2 decimal places = 100
3 decimal places = 1000
etc.

Also make sure that the places expression has a dimensionality of "Constant".

This then gives you a final expression of:
XR = round(X*places)/places

Of course you could replace the variable "places" in the above expression with the 10's, 100's, 1000's, etc. as needed.

### RE: rounding off to 10mm

ah, reading your post a little closer I see my response doesn't exactly answer your question but hopefully it points you in the right direction.

### RE: rounding off to 10mm

(OP)
Hmm, I forgot to add some necessary information for my question. Apologies.

The numbers I'm trying to round off are dimensions in a drafting. Via the dimension style you can choose the precision behind the comma, but you can't get any further then 0 (2732,4==>2732).

NX 7.5
Teamcenter 8

### RE: rounding off to 10mm

There is NO explicit control in Drafting to 'round' a Dimension.  There is only control for the number of decimal places which of course would force the rounding of the Dimension, but only up to the first or 1's place.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
UG/NX Museum:   http://www.plmworld.org/p/cm/ld/fid=209

To an Engineer, the glass is twice as big as it needs to be.

### RE: rounding off to 10mm

(OP)
Thanks John I was afraid that would be the answer. I'm assuming there is no other way around it then to add the requested dimension as a note and put the real dimension on a very tiny size.

On another note, NX drafting seems to have a peculiar rounding off rule:
1.55 becomes 1.6
1.65 also becomes 1.6

I've found an explanation on this from 2007 here:

But don't see a reference to any standard there.

NX 7.5
Teamcenter 8

### RE: rounding off to 10mm

#### Quote (Walterke):

Thanks John I was afraid that would be the answer. I'm assuming there is no other way around it then to add the requested dimension as a note and put the real dimension on a very tiny size.
You can override the dimension text and add your own 'manual' text entry. This is generally frowned upon as "bad practice", but if you understand and are willing to manage the risks (model changes, dimensions do not), you can change the text by going to Edit -> Annotation -> Text.... As you enter new text you will get a warning message.

### RE: rounding off to 10mm

I can't site a standard, all I know is that this is what I was taught in engineering school and it's how I've always seen it done in my 45+ years of working in engineering.

If you read the Eng-Tips thread that you referenced you will see an explanation that the approach used by NX was designed to eliminate the statistical 'error' one gets if they DON'T follow the odd/even rule when the digit to be removed is exactly 5.

To show you what I mean, add a column of ten unrounded numbers consisting of alternating values of 1.55 and 1.65 (each would appear five times).  Now using both the method you've been using and the NX method, add columns of the same numbers rounded to the 0.1/th place.  Now compare the results of all three columns (I've already done it in the attached Excel file).

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
UG/NX Museum:   http://www.plmworld.org/p/cm/ld/fid=209

To an Engineer, the glass is twice as big as it needs to be.

### RE: rounding off to 10mm

(OP)
I understand the statistical explanation but I'm nut sure of the practical use.
If you have, for example a 21,5mm axis going into a 22,5 hole: rounded off that would be 22 and 22 which would hardly fit
However, a 22,5axis in a 23,5 hole would round off to 22 and 24mm.

Then again, you tolerance will probably be a lot smaller if it actually matters.

NX 7.5
Teamcenter 8

### RE: rounding off to 10mm

If you know that the number will always need to be rounded UP then use the word "ceiling" in place of the word "round" in the equation John posted above.
If you know that the number will always need to be rounded DOWN then use the word "floor" in place of the word "round" in the below equation:
XR = round(X*places)/places

### RE: rounding off to 10mm

Actually I said that wrong.
It will not be "rounded" up (or down), it will be moved up (or down). For example: ceiling(2.062) = 3.0

### RE: rounding off to 10mm

Change the driving design data so your model is 2790 instead of 2786. Then you will not have interference/gap issues at assembly time.

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli

### RE: rounding off to 10mm

I always thought it was an error in the way NX sometimes calculates its lengths. you create a line at 16.5 and it measures at 16.499999...

### RE: rounding off to 10mm

That IS an error and should be reported to GTAC if you're able to duplicate it on demand.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
UG/NX Museum:   http://www.plmworld.org/p/cm/ld/fid=209

To an Engineer, the glass is twice as big as it needs to be.

### RE: rounding off to 10mm

(OP)
@looslib, dimension just has to change for aesthetic reasons in a brochure. (no important dimensions were harmed during the creation of the brochure). I guess overriding will be the easiest way.

#### Quote:

if you're able to duplicate it on demand.
That's the problem, it happens very randomly. Then again, changing it once usually fixes the problem, so it's not that big of a deal.

NX 7.5
Teamcenter 8

### RE: rounding off to 10mm

happens all the time with edit arc length and edit fillet.

### RE: rounding off to 10mm

make that "curve length" and edit fillet

### RE: rounding off to 10mm

Jnikolauk, now you are discussing a completely different matter than the others , this "error" is due to how computers calculate things, See Wikipedia about "Double precision". ( Above my head...)

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Close Box

# Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!