Use power or multiplication with users parameters

remy.muller
Explorer Explorer
4,107 Views
10 Replies
Message 1 of 11

Use power or multiplication with users parameters

remy.muller
Explorer
Explorer

Hello the community,

 

I'm disapointed ! I want to create an user parameters with power on a "model parameters" (d1)  but I can't.

I try this expression :

Add User parameters > 

Name : calcul

Unit : mm

Expression : 10 ^2

and it works !

 

But I would like to use this with model parameters :

Name : calcul

Unit : mm

Expression : d1 ^2

calcul error.jpg

And it doesn't work !

 

Anybody have an idea ?

 

Rémy

1 Like
Accepted solutions (2)
4,108 Views
10 Replies
Replies (10)
Message 2 of 11

HughesTooling
Consultant
Consultant
Accepted solution

You need to match the units, the input type needs to be unitless so (d1/mm)^2 will work. If you don't cancel the units the output would be square mm so you'd need to select an area unit type for the parameter.

 

Mark

Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


2 Likes
Message 3 of 11

Phil.E
Autodesk
Autodesk
Accepted solution

Hi,

 

The reason you can square 10 in your example is it produces a unitless result, which is given the units "mm" by the parameter. So 10^2 = 100, and the value of the parameter is shown as 100, with mm units. It is a linear value.

 

When you try to square d1, it already has mm units. The result is square mm which conflicts with your chosen units of "mm". d1 squared is an area value.

 

Assuming you just want the linear result (mm) and not area (mm^2), you just need to eliminate the squaring of "mm".

 

If that's what you need, try this:

squaring_or_not.png

 

If not, please let me know, or if you have any other questions of course just ask!





Phil Eichmiller
Software Engineer
Quality Assurance
Autodesk, Inc.


2 Likes
Message 4 of 11

remy.muller
Explorer
Explorer

Thanks a lot Mark and Phil ! I understand and It works 😃

Thank you for your rapidity !

1 Like
Message 5 of 11

edburns000
Contributor
Contributor

@Phil.E Powers handle units correctly but sqrt() or ^0.5 do not!

 

To do some simple length-of-hypotenuse sums I am having to convert dimensionless quantities before calculating, i.e. sqrt(((width/1mm)^2)/2).  Not the worst workaround to implement if you know how to handle it, but the unit handling seems half-baked...

 

 

0 Likes
Message 6 of 11

Phil.E
Autodesk
Autodesk

Referring to the product documentation, sqrt is handled by: unit^1/2

 

http://help.autodesk.com/view/fusion360/ENU/?guid=GUID-76272551-3275-46C4-AE4D-10D58B408C20





Phil Eichmiller
Software Engineer
Quality Assurance
Autodesk, Inc.


0 Likes
Message 7 of 11

edburns000
Contributor
Contributor

@Phil.E 

Any idea why I can't enter "sqrt(2mm^2)" as a valid expression then? (sqrt(2^2) is valid) Am I missing something obvious?!

 

0 Likes
Message 8 of 11

Phil.E
Autodesk
Autodesk

2mm squared is an area measurement. You cannot take the sqrt of an area. 





Phil Eichmiller
Software Engineer
Quality Assurance
Autodesk, Inc.


0 Likes
Message 9 of 11

edburns000
Contributor
Contributor

In the example above, if length^2 = area (as it should) and length^3 = volume, then sqrt(area) = area^1/2 = length and cube-root(volume) = volume^1/3 = length

 

It's a perfectly valid calculation, and mathematically correct - if the square of a number squares the units, then sqrt of a number should sqrt the units.

 

I might want to calculate the length of the sides of a square face from its area. Or calculating the length of a hypotenuse on a triangle:

sqrt(side1[mm]^2 + side2[mm]^2) = side3

sqrt(length^2) = length

 

 

 

 

0 Likes
Message 10 of 11

Phil.E
Autodesk
Autodesk

You are correct, Fusion should allow you to use unit measures. At this time you must strip units out before using sqrt.

 

remove units.PNG





Phil Eichmiller
Software Engineer
Quality Assurance
Autodesk, Inc.


0 Likes
Message 11 of 11

Anonymous
Not applicable

You can divide it out. 

asmith0935_1-1636205497106.png

 

1 Like