Unable to multiply or subtract with parameters

Unable to multiply or subtract with parameters

bergie5737
Enthusiast Enthusiast
3,359 Views
10 Replies
Message 1 of 11

Unable to multiply or subtract with parameters

bergie5737
Enthusiast
Enthusiast

Hi

Just after the latest update, (today 20/08/2018) parameters maths seems to have gone haywire. As soon as I try and multiply or subtract two parameters for a dimension, it refuses to accept the formula. I can add and divide with no problems. I can also multiply and subtract constants in a dimension, which should proof that I am not using the wrong key or something. I am sure this is a bug as I never had such an issue before.

I am also including a screencast. https://autode.sk/2N3uE8W

0 Likes
Accepted solutions (1)
3,360 Views
10 Replies
Replies (10)
Message 2 of 11

masa.minohara
Alumni
Alumni

 

[Edited]

 

I realized that I was wrong and deleted my original comment to avoid confusion. 

 

Masanobu Minohara

Product Support Specialist



Fusion 360 Webinars | Tips and Best Practices | Troubleshooting
0 Likes
Message 3 of 11

bergie5737
Enthusiast
Enthusiast

Hi
I am happy to report the issue and glad to see someone on it.

Here is the link:  https://a360.co/2L9G9tF
The password is "welcome"

The design is still quite a mess. ( I am a novice after only one year
with Fusion 360) I noticed the problem as I started redoing the whole
design to have parameters. The component "Holder_parametric" is what I
am working on for now. The "baseplate" component came form another
design, and was un-linked and modified without the timeline.

Hope you can solve the issue.
Regards
Jacques

 

Edit: Wrong link pasted.

0 Likes
Message 4 of 11

jeff_strater
Community Manager
Community Manager
Accepted solution

@bergie5737,

 

I'm fairly certain that nothing has changed here in a very long time.  What you are seeing is related to units and value.  A sketch dimension requires that the value be expressed in some length unit (cm, mm, in, ft, etc).  The value in that text entry box must be either a number (in which case the default unit for the design is tacked on), or have a unit which is a length measurement.  So, these are valid entries:

  • "1"
  • "20"
  • "5 in"
  • "4.34 cm"

Further, for sketch dimensions, the value must be a positive number to be valid.  You cannot type in "-3" for a sketch dimension.

 

So, think about the unit expressions in your examples.  Looking at your design, both "slot_gap" and "slot_length" are distances, slot_gap's value is "10 mm", and slot_length is "40 mm".  So, think from a unit and value perspective how various expressions are evaluated:

 

  • "slot_gap + slot_length" is "10 mm + 40 mm", which evaluates to "50 mm", which is valid
  • "slot_gap - slot_length" evaluates to "-30 mm".  The units are valid, but the value is not.  Subtraction works, but in this case the value is invalid.  "slot_length - slot_gap" is perfectly valid
  • "slot_gap * slot_length" evaluates to "400 mm**2", which is not a measure of length, but of area, which is invalid.  Note that you can make this work by just fixing up the units.  We need to divide by 1mm to get rid of the mm**2 units.  So, "(slot_gap * slot_length)/1mm" would evaluate to "400 mm" and be valid
  • "slot_gap / slot_length" evaluates to "0.25".  Note that the units have been canceled out, but as above, the document units are tacked on to simple numbers, so this is interpreted as "0.25 mm"

Hope this explanation makes sense


Jeff Strater
Engineering Director
Message 5 of 11

bergie5737
Enthusiast
Enthusiast

I accept and realise now the newbie mistake.

slot_gap - slot_length" evaluates to "-30 mm"

I should have tried with other parameters. As you can see, I tried to play with the same parameters to see if other operands were affected. Obviously this is why subtraction failed in the example I used. (I never gave it a thought at the time.)

 

The multiplication with units is now also crystal clear. It was something in a design I watched a video tutorial on, but the commentator said, "I simply don't know why you have to divide by 1mm, just do it."

 

Problem Solved. User error!

0 Likes
Message 6 of 11

jhorstink
Participant
Participant

Ok, the problem is solved, but with a work-around.

  • "slot_gap * slot_length" evaluates to "400 mm**2", which is not a measure of length, but of area, which is invalid.  Note that you can make this work by just fixing up the units.  We need to divide by 1mm to get rid of the mm**2 units.  So, "(slot_gap * slot_length)/1mm" would evaluate to "400 mm" and be valid

To me it is strange Fusion doesn't recognize mm² as an area, and that one cannot define mm², although one can use acre and cicular mil as area-units, so area's are "known" by the program.

The same for volumes, where even cups are possible, but not mm³.

Many more standard units are missing, is that done on purpose, is it something that will be solved in the future, is it a limitation in the main-engine of the software, or am I missing something?

Regards, Jaap

 

0 Likes
Message 7 of 11

bergie5737
Enthusiast
Enthusiast
Hi thanks for the heads up.

That is exactly what I do when for some reason I need to multiply
dimensions. If you divide dimensions by each other, it evaluates even
though it becomes "unitless." I think it should be straightforward to
multiply linear dimensions as that is quite normal in life. Perhaps it
should default to another length in stead of a surface area or volume when
multiplication happens. I never tested for "volume" dimensions. It may give
interesting results. Lol!
Regards
0 Likes
Message 8 of 11

jhorstink
Participant
Participant

After playing a bit with the parameters I think the work-around is NOT a good solution, it just seems like one.

When I trie to use the area to calculate the corresponding diameter Fusion has problems with the dimensions.

When working in mils one could expect such calculations possible, as Fusion knows circular_mils, but taking a sqrt from circular_mils also gives unit-troubles. The same for acres.

To prevent these issues one should define the parameters without units, and make the calculations without units.

When using a unitless parameter in the sketch add "*mm" and the parameter is converted to mm.

It is confusing Fusion has so many parameter units possible, and one needs work-arounds to use them.

 

0 Likes
Message 9 of 11

tinkercadGZWJT
Participant
Participant

This is madness.   I reckon this is buggy.

Eg
`p1=5mm`
`p2=3`  (no unit)

Then p3=p1*p2 should evaluate to
5mm * 3 = 15mm - but instead it just quietly renders red, and does not accept the calculation.  No reason given.

If this is not a bug then what is?

0 Likes
Message 10 of 11

davebYYPCU
Consultant
Consultant

Works as expected.

 

witbdb.PNG

 

Where is the bug displaying for you?

0 Likes
Message 11 of 11

jhorstink
Participant
Participant

I don't see the problem, even when you forget the units for the result

0 Likes