Message 1 of 19
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
although I read this few times, still doesn't get how to "ceil" to next decimal.
Solved! Go to Solution.
although I read this few times, still doesn't get how to "ceil" to next decimal.
Solved! Go to Solution.
Your thread title and then problem description confuses me.
Can you attach your*.ipt file here and include a bit more information on intent for (round to next 5 division)?
Are you expecting 135 as the equation result?
For example, if I follow your design intent -
you want
130<x≤135 to round to 135. That is, anything greater than 130 but less than or equal to 135 to round to 135, and so on by divisions of 5.
Hi! Below is a link to the explanation of various functions in Inventor Parameters dialog. "Ceil" function rounds decimal points up to closest integer. For example, if a parameter value is 399.63475, ceil(399.63475) will be 400.
Many thanks!
yes, I'm expecting 135 as a result, exactly.
Hi! It looks like there might be a file specific behavior here. Could you post an example illustrating the behavior?
Many thanks!
Hello there.
In order to get it to the closest 5, you'd have to divide by 5 and later multiply by 5.
I.e.
ceil((400/5)/3)*5
Should give 135
Correct just need to add mm to the 5.
Thanks for all the answers.
ceil((400/5)/3)*5mm
Big Oops , I think its still not working as I was looking for, if I type "400" its ok. but if I choose an existing dimension, again not working.
see the attached part
Hi,
It's just a small unity problem.
Try like this :
ceil(d0 / 3 mm / 5 nd) * 5 mm
Thomas
Mechanical Designer / Inventor Professional 2025
can someone explain why all this units issues, I'm working on mm, the whole model parameters are mm.
just wonder if this something can be avoided in next releases.(I'm on 2015) and I see "nd" becomes "ul" for inventor, what does "nd" stands for?
As @ThomasB44 said it's about units.
I didn't pay attention to the units when I wrote the concept formula 🙂
UL is unitless. Not sure about ND
MM/MM = UL
MM/UL = MM
you can't divide mm by deg, for instance, since they're different units.
And a length dimension can never be deg or ul. An angle dimension can never be mm or ul. An amount in a pattern can never be mm or deg.
So you're constantly using all three types. I believe it makes sense to keep the units separate for a lot of different reasons.
You can always force a unit change though:
Isolate(d0, mm, ul) for instance. d0 is mm, but you convert it to ul for this equation.
nd means "undefined" unity
ul means "without unity"
Well, it's quite the same.
But, by default, when you type a formula, let's say :
ceil(d0 / 3 mm / 5) * 5
Some unities are automaticly filled in with "nd" :
ceil(d0 / 3 mm / 5 nd) * 5 mm
Thomas
Mechanical Designer / Inventor Professional 2025
The ceil function (along with floor and round) requires a unitless input. I think a reasonable case could be made to change those to any units. Are there any ideas posted proposing that?
Other functions, such as asin, acos, atan also require unitless inputs, but those trig functions are specifically defined as ratios, which are by definition unitless. I can't see any particular reason why ceil, floor and round need to be.
Sam B
Inventor Professional 2018.1.1
Vault Workgroup 2018.0
Windows 7 Enterprise 64-bit, SP1
Hi @SBix26
I've found @DRoam idea about this subject.
Please see here : https://forums.autodesk.com/t5/inventor-ideas/accept-any-unit-in-parameter-rounding-functions-round-...
Thomas
Mechanical Designer / Inventor Professional 2025
Thanks for doing the search! I just voted for that one, and I encourage the rest of the Inventor world to do likewise!
Sam B
Inventor Professional 2018.1.2
Vault Workgroup 2018.0
Windows 7 Enterprise 64-bit, SP1
@ThomasB44 @SBix26 I did the same. hope the whole world will vote, and internal peace will arrive.
Thanks for the shout-out, @ThomasB44, and thanks to everyone else for the votes! That idea really needed some attention, and you certainly gave it some. Hope it pays off soon!