Using conditional expression in parameters

Using conditional expression in parameters

tdesve
Explorer Explorer
1,136 Views
5 Replies
Message 1 of 6

Using conditional expression in parameters

tdesve
Explorer
Explorer

Hi there.

 

I would like to calculate the depth of a drawer based on the hardware that can fit into the box containing the drawer.

 

The hardware comes in different sizes (250mm, 280mm, 300mm,...) and I need to use a conditional expression to 1st determine the hardware which can fit in the box and then calculate the depth of the drawer based on the hardware dimensions. In conventional language, I would use a "case of" or "if ... elsif... else" xpression to do so.

 

Can I emulate this in anyway within Fusion 360 ? I'm not sure we can create user defined function using the extension API in such a way they can be used in the Design environment.

 

In between, I will do it manually (which isn't a big deal either...).

 

Regards

Thierry

 

 

0 Likes
Accepted solutions (2)
1,137 Views
5 Replies
Replies (5)
Message 2 of 6

g-andresen
Consultant
Consultant
Accepted solution

Hi,

For the arrangement of hinges in cabinets I used the workaround demonstrated in the screencast.

 

günther

0 Likes
Message 3 of 6

vladimir_michl
Advisor
Advisor
Accepted solution

You can mimick some of conditional expressions using sign, min, max and other math tricks. See:

https://www.cadforum.cz/en/how-to-use-conditional-parameter-values-in-fusion-360-tip12638

 

Vladimir Michl, www.arkance-systems.cz - www.cadforum.cz

 

 

Message 4 of 6

tdesve
Explorer
Explorer

Thanks Günther, I got the idea ! That will work ! Thanks for taking the time to help me !

0 Likes
Message 5 of 6

tdesve
Explorer
Explorer

Thanks Vladimir ! Complements what Günther proposed. I will make it work that way ! Excellent !

0 Likes
Message 6 of 6

tdesve
Explorer
Explorer

Here is the final approach...

 

Each hardware has a nominal length (NL). Drawer will be smaller than that. And NL needs to fit in the box.

 

The approach works smoothly ! Thanks !

 

Capture d’écran 2021-12-19 à 10.37.44.png

With that, I can automate drawer size calculation.

 

Have a good day,

Thierry

0 Likes