User Parameters in math functions

User Parameters in math functions

7P332B5QTVW4MF
Enthusiast Enthusiast
2,000 Views
11 Replies
Message 1 of 12

User Parameters in math functions

7P332B5QTVW4MF
Enthusiast
Enthusiast

Hello,

I'm trying to tessellate some hexagons with the rectangular pattern tool but I am coming up against some problems in the User Parameters.

I need to reference the hypotenuse of a triangle to get one of the side for the X spacing of my pattern. I'd like to drop this equation in as a User Parameter:

sqrt(pow(4*hexrad+2*spacing;2)+pow(2*hexrad+spacing;2))

But I can't put a parameter into the sqrt function. I need Fusion to do the trig to get spacing right. You can see the needed dimension on my screenshot. It resolves to 19.053. 

This would be easy if the driven dimensions had names that I could use further along in the design.

Anyone else have an idea how to make a parametric grid of hexagons?

0 Likes
2,001 Views
11 Replies
Replies (11)
Message 2 of 12

MichaelT_123
Advisor
Advisor

Hi Mr Eagleapex

 

 .... for hexagon structures you might consider using circular pattern(s) and deselect unwanted tiles (manually or programmatically).

 

Regards 

MichaelT

 

 

MichaelT
0 Likes
Message 3 of 12

TrippyLighting
Consultant
Consultant

Or you can use Fusion 360's way to conveniently reference other dimension in the same sketch and use simpler math. 

But to answer the initial question, yes, you canuse formulae in user parameters.

 

Hex spacing.png


EESignature

0 Likes
Message 4 of 12

Theoforus
Advocate
Advocate

Interesting. I am trying to do the same and came across your explanation. Seems like a good solution. Anyway ... could you answer why I can not use the ratio_hexagon_.... parametric value in other parametric values? 

0 Likes
Message 5 of 12

laughingcreek
Mentor
Mentor

i haven't digested your question yet, just starting my first cup of coffee.  my first thought is that ratio's are inherently unitless, but your parameter "ratio_hexagon_radius_vs_point" is in mm.  you probably need to make that a unitless variable in order to use it in equations. 

Message 6 of 12

simon.dyer
Advocate
Advocate

I believe the OP question was to use parameters in formulas, not vice versa.
Eg to get the angle from my parameter using this formula,
asin(MyParameterValue)
cannot be evaluated.
I have tried all methods I can find and now asking here.
Please see below images.

 

 

simondyer_2-1706056664386.png

simondyer_3-1706056674309.png

 

 

 



0 Likes
Message 7 of 12

jhackney1972
Consultant
Consultant

Works OK for me.  See Screen Capture below.

 

Also see the solution to your Forum Post here.

 

Parameter Problem.jpg

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 8 of 12

laughingcreek
Mentor
Mentor

you can now reference driven dimensions from a sketch out side of that sketch, and use them in formulas and other features.  Being inherently lazy, I prefer to let fusion solve these types of things rather than using trig to do it.  I have seem very few cases where it was actually necessary to use trig.  letting fusion do it for you has the additional advantage of a adding visual elements, which will be much easier for someone other than you to figure out what your design intent is.

Message 9 of 12

HughesTooling
Consultant
Consultant

@simon.dyer wrote:

 

simondyer_3-1706056674309.png

 

 

 




I'd guess the problem is you created a parameter in mm then changed it to unitless? Trouble is Fusion seems not to make a true unitless parameter and still sees it as mm.

 

I get this after changing a mm parameter to unitless.

HughesTooling_1-1706088762606.png

 

And it works if I cancel the units. Seem to remember this bug being reported but not sure if it was accepted as a bug of just another Fusion Feature!

HughesTooling_2-1706088836770.png

 

 

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


Message 10 of 12

laughingcreek
Mentor
Mentor

@Phil.E - see post 9

0 Likes
Message 11 of 12

simon.dyer
Advocate
Advocate

Many thanks for resolving that 'feature' for me - how did you know to divide by mm ?

0 Likes
Message 12 of 12

HughesTooling
Consultant
Consultant

@simon.dyer wrote:

Many thanks for resolving that 'feature' for me - how did you know to divide by mm ?


You can cancel a parameter's units by dividing by the parameter's units. You can see in my pictures it still shows mm in the tool tip even though you changed the parameter to unitless. 

HughesTooling_1-1706088762606.png

If you create the parameter as unitless from the start it will work without any canceling of units.

HughesTooling_0-1706192962546.png

 

 

 

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


0 Likes