Using sign function to make a pattern conditional

Using sign function to make a pattern conditional

troyostrander
Advocate Advocate
635 Views
2 Replies
Message 1 of 3

Using sign function to make a pattern conditional

troyostrander
Advocate
Advocate

 

  • For example tall doors need 3 hinges and and shorter doors need 2 hinges. How to make this parametrically using Fusion 360 parameter functions.
  • Use the Sign(expr) which returns 0 if negative, 1 if positive
  • Let's say a door shorter than 1200 mm, the "Rectangular Pattern" quantity should be 1. Which is basically rectangular pattern disabled.
  • Anything taller than 1200 mm, the "Rectangular Pattern" quantity should be 2. Which is produces only one more pattern feature.
  • See video for a demo: https://autode.sk/3vRW8on
  • Attached is the .f3d file
  • From the parameter table:
    • ThirdHingeCalcThen = sign(ThirdHingeCalcIf) + 1 (Use No Units)
    • ThirdHingeCalcIf = d2 - 1200 mm
    • ThirdHingeCalcDist = floor(( ( ( d2 / 2 ) - 100 mm ) - 64 mm ) / 32) * 32 //this calc is very complicated but the hinge couldn't be in the middle//
  • Don't overlook the power of these built in functions. See a list of Fusion 360's functions here, you might find some other uses: https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-76272551-3275-46C4-AE4D-10D58B408C20

ConditionalPatternParameters.pngConditionalPatternSketch.png

Accepted solutions (1)
636 Views
2 Replies
Replies (2)
Message 2 of 3

g-andresen
Consultant
Consultant
Accepted solution

Hi,

Nice of you to bring this feature back to mind.

I think it can be a help as long as IF/THEN/ELSE are not present.
I had also posted an example file in this post (#6).

 

günther

Message 3 of 3

troyostrander
Advocate
Advocate

Wow @g-andresen Very nice solution and thanks for the file to play with in this post:

 

Holes that populate on variable lengths

0 Likes