Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

rounding length values 1

Status
Not open for further replies.

abeschneider

Mechanical
Joined
Sep 25, 2003
Messages
189
Location
US
Guys,
I know there have been a couple threads discussing how to deal with the round function in Catia, but I'm confused how to effectively use it.

Let's say I have a value: "length" = 50.225mm

How do I round this to:

(a) no significant digits (ie: 50mm)
(b) 1 significant digit (ie: 50.2mm)
(c) 2 significant digits (ie: 50.23mm)

I haven't been able to figure out the combination of code to get Catia to do this for me yet; I'd really appreciate it if someone can help on this.

Thanks
 
Are you asking about parameters? or drawing dimensions? or something else?
 
Rounding of dimensions on a drawing is in ASME Y14.5-1994, 1.6.4, which references ANSI/IEEE 268.

Basically dimesnions are rounded to even numbers, so your 50.225 would be 50.22 as 2 significant digits.

The explainations is that by always going to even numbers, it reduces tolerance build-up, as some numbers go up and some go down.



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

Ben Loosli
Sr IS Technologist
L-3 Communications
 
I should've been more clear in my question: I'm referring to parameters.

My example of "length" = 50.225mm was an example of a parameter in Part Design.

Being able to use Round with length parameters could enable some powerful knowledge-based part design functionality.
 
Hi,

try this

if "Lenght" is a lenght paramater and the value is 50.225mm
the round() command needs a real paramater as input. By divide 1mm you convert the lenght to a real.

a) (round("Lenght"/1mm))*1mm should give 50mm
b) (round("Lenght" /1mm*10))*1mm/10 should give 50.2mm
c) (round("Lenght" /1mm*100))*1mm/100 should give 50.23mm
 
Akesson,

Thank you very much! Your suggestion worked perfectly. I gave you a star in return :)
 
this remind me something :

I just used search "round" and found Eng-Tips : 124350

Eric N.
indocti discant et ament meminisse periti
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top