Error with parametrically-driven zero dimension

Error with parametrically-driven zero dimension

jdorrington
Contributor Contributor
692 Views
14 Replies
Message 1 of 15

Error with parametrically-driven zero dimension

jdorrington
Contributor
Contributor

I have a parametrically-driven sketch dimension, say: +10mm, that sometimes has a value of zero mm depending on other driving parameters. When it is next required to be + 10mm it actually shows as -10mm, screwing up my model. The sketches are fully defined.

Has anyone else had this problem and/or have a suggestion please?

My current workaround is to have the dimension value of say 0.00001 rather than zero but this seems inelegant and annoys me.

Thanks

0 Likes
693 Views
14 Replies
Replies (14)
Message 2 of 15

g-andresen
Consultant
Consultant

Hi,

Please share a sample file and explain which dimensions and parameters are involved.

 

 

 

günther

0 Likes
Message 3 of 15

jdorrington
Contributor
Contributor

Thank you. 

Here is simplified file recreating the problem.

 

The two bodies have been sketched identically except the Green body  has a fraction of a mm added at sketch level to  enable it to behave as intended. The o_hang operator changes the position of the body with 1 or 0.

 

On a further note, which is somewhat related (?), I would also like to have a negative dimension that can operate either side of its reference geometry enabling it to "flip". I see this has been flagged before but I wondered if it's now possible with the new if/then/else logic parameters...?  ***Update*** I may have solved this by referencing an offset plane which can be parametrically changed to a negative dimension. I will apply this to original model to see if that also helps with my original issue****

 

Many thanks, John

 

https://a360.co/3MzTVbx 

0 Likes
Message 4 of 15

jhackney1972
Consultant
Consultant

Your model works with the changing of the changing of the "o_hang_operator" without issue.  As far as the second part of your post, you will have to explain that further.

 

Parameter Exercise.gif

John Hackney, Retired
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

0 Likes
Message 5 of 15

jdorrington
Contributor
Contributor

Hi John, Thanks,

Yes, the green body works as expected because I've added a tiny measurement to the sketch (ie. it doesn't return to exact zero) but the red body should ALSO overhang. It doesn't act as intended after cycling through the o_hang condition. The dimension flips to the other side.

0 Likes
Message 6 of 15

jdorrington
Contributor
Contributor
0 Likes
Message 7 of 15

Drewpan
Advisor
Advisor

Hi,

 

I don't have any direct experience with other than basic parametrically driven dimensions. I did however see

a post on the forum about a week or 10 days ago that suggested using an absolute value on the parameters

to generate a non-negative value. The post also involved flipping and may be appropriate here.

 

I don't know the syntax of the formulas in Fusion but something resembling D1 = abs(D2/3 + D3) would make

a D1 value that was negative into a positive value. A similar solution might be D1 = sqrt (D2/3 + D3)^2 which

is a more complicated way of getting a positive value but might fail depending on the actual values of the

variables. These two equations would be how standard mathematical formulas would be written. The first one

would return 0 if (D2/3 + D3) equalled zero, but the second would probably throw an error depending on

exactly what mathematics rule was implemented for 0^2.

 

I am still learning about these parameters and formulas so I am watching here and other posts to try to work

out how to use them.

 

Cheers

 

Andrew

0 Likes
Message 8 of 15

GRSnyder
Collaborator
Collaborator

@jdorrington wrote: I have a parametrically-driven sketch dimension, say: +10mm, that sometimes has a value of zero mm depending on other driving parameters.

As you've discovered, you can't do this.

 

I haven't looked at your actual file yet, but I suspect that when you say the dimension shows as -10mm, it is actually 10mm, but on the "wrong" side of the reference object.

 

Dimensions constrain the distance or angle between things. There's no such thing as a negative distance or negative angle, at least as far as the sketch solver is concerned. All the solver knows is that, e.g., line X is supposed to be parallel and X mm away from line Y. It's free to find any solution that satisfies all constraints and dimensions, and there are often multiple options.

 

The solver normally tries to find a solution that's similar to the existing layout. But when you set a dimension to zero, you remove all the context information. The solver's just as likely to solve in the wrong direction the next time you set a nonzero value. Angles complicate things even more. Often there are multiple solutions 90 or 180 degrees apart.

 

The fix for this is to construct your dimensions such that they are never zero. Reference to a different object, or add a separate object whose only purpose is to act as a dimension reference.

0 Likes
Message 9 of 15

davebYYPCU
Consultant
Consultant

You can get the end result if you step outside the sketch for the actions you wish.

 

Might help....

Message 10 of 15

jdorrington
Contributor
Contributor
Thanks for your input, Andrew, I've found a workaround but will investigate your theory at later date.

John
0 Likes
Message 11 of 15

jdorrington
Contributor
Contributor

Thanks, Dave,

I can't actually open your file as I'm having trouble updating to latest version. I'll clean install tomorrow and give it a go

 

In the interim, I have a workaround for the pos/neg dimension utilising an offset plane and a logic operator I can work into other formulas.

 

I've posted it for the (possible!) benefit of others.

 

John

 

https://a360.co/476FFPZ

0 Likes
Message 12 of 15

jdorrington
Contributor
Contributor
Thanks for your input. I've got around it by utilising an offset plane from which to dimension pos/neg/zero. Posted further down.

John
0 Likes
Message 13 of 15

jdorrington
Contributor
Contributor

I can't actually see what you've done, Dave... The dimension still contains a fractional amount which was my first workaround. Am I missing something?

0 Likes
Message 14 of 15

davebYYPCU
Consultant
Consultant

Your parameters are working as expected, no changes on my part, ( no fudges required)

I did edit - remove stuff from your 2nd sketch, (did you check it)

and added a (new?) function on the end of the timeline.

 

Might help….

 

 

0 Likes
Message 15 of 15

jdorrington
Contributor
Contributor

Thanks, Dave

Yes checked and all good. My file management is probably working against me...

0 Likes