Using formulas for patterns

Using formulas for patterns

fulcrumusa
Advocate Advocate
4,380 Views
11 Replies
Message 1 of 12

Using formulas for patterns

fulcrumusa
Advocate
Advocate

Yesterday I ran into something that I could not figure out. I am hoping that the forum can help me.

 

What I would like to do is use a rectangular pattern in a sketch to repeat a feature with a specific spacing. I wanted the pattern to start at offset X,Y from the top left corner of the parent sketch and extend to -X,-Y from the top right corner of the parent sketch. I could easily do that with the "Extend" pattern type and using the formula "(Width - (2*X))" as the distance.

 

However, when I tried to use a formula to compute the number of occurances, Fusion did not allow me to do that. The formula that I was trying to use was "(Width - (2*X))/5" (where 5 is the spacing that I wanted between occurances). I even tries using a user parameter and that did not work either.

 

 

I think this is related to Fusion getting confused about the units of the resulting value. Since the formulas are based off of "Width", which is in milimiters, I am suspecting that Fusion concludes that the resulting value will also be in milimeters. In turn, it throws an error because the occurances parameter cannot be in milimeters.
 
What is confusing is Fusion is refusing to accept the user parameter when I clearly select "No units".
 
Am I doing something wrong or is this a bug?
0 Likes
Accepted solutions (1)
4,381 Views
11 Replies
Replies (11)
Message 2 of 12

HughesTooling
Consultant
Consultant

The count needs to be unitless so you need to divide Width by 1 unit to make it unitless, something like (Width / 1 mm - (2*X))/5"

 

You might need to do the same with X as well.

 

Mark

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

HughesTooling
Consultant
Consultant
Accepted solution

I just remembered I had a problem entering a formula like this in the pattern dialog and found I could only enter it in the parameters dialog. Also pretty sure you'll need to enter (Width / 1mm - (2*(X/ 1 mm))/5 or you might get away with ((Width - (2*X))/5) / 1mm

 

Mark

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
Message 4 of 12

fulcrumusa
Advocate
Advocate

To be perfectly honest, that is a very non-intuitive way to fix it. Is that a well known practice in CAD circles? I come from the software development worlds where values take on the units of the variable they are being assigned to. To me, what you are describing is backwards. 🙂

 

 

Why would the user parameter definition fail if I clearly has specified "No Units" as the unit of the user parameter?

0 Likes
Message 5 of 12

HughesTooling
Consultant
Consultant

@fulcrumusa wrote:

To be perfectly honest, that is a very non-intuitive way to fix it. Is that a well known practice in CAD circles?


 

Yes that's the way it works in all the solidmodelers I've used. I'd guess it's partly because you can have mixed units in an equation so you need to specify how you want the parameter converted. You could have the width in meters and the spacing in mm for example.

 

Mark

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
Message 6 of 12

fulcrumusa
Advocate
Advocate

@HughesTooling wrote:

@fulcrumusa wrote:

To be perfectly honest, that is a very non-intuitive way to fix it. Is that a well known practice in CAD circles?


 

Yes that's the way it works in all the solidmodelers I've used. I'd guess it's partly because you can have mixed units in an equation so you need to specify how you want the parameter converted. You could have the width in meters and the spacing in mm for example.

 

Mark


 

So, just for my own education: if I had a formula which had the with in meter and the spacing in milimeters would I have to "remove" the units from each one individually? ((Width/1m) + ((2*X)/1mm))?

 

If that is the case, this could get complicated in complex formulas, especially if you start mixing radii, or volumes, etc. I would think that it would be much easier for Fusion to provide casting operators. For example: int(Width + (2*X)) would result in a unitless value.

0 Likes
Message 7 of 12

Anonymous
Not applicable

I'm having the same issue. I understand that I have to make it unitless and I think that I have but it still won't work. I have tried a bunch of different combinations and I would appreciate some help if anyone has the time! I attached an image of my parameters. What I want to do is pattern a feature along a path. The path is the perimeter of a shape and then I have the quantity calculated by (Perimeter / 6). QTY2 is just another attempt at making it work by making the parameter unitless. Once again any help would be appreciated!

0 Likes
Message 8 of 12

HughesTooling
Consultant
Consultant

Can you export the file as an f3d and attach, you can delete all of the model info if you like just leave the parameters.

 

Mark

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
Message 9 of 12

Anonymous
Not applicable

Everything is there. Just to give some info on the piece, this is a test model for a conference table top that has a solid wood edge and a MDF board in the middle. The MDF has holes cut into it every 6 inches or so for the two pieces to be glued and clamped together. I hope this helps!

 

0 Likes
Message 10 of 12

HughesTooling
Consultant
Consultant

I think the problem might be because quantity need to be a whole number, try this. Here's a link to help on parameters and what's available.

Clipboard01.png

 

Mark

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

Anonymous
Not applicable

That was the problem, thank you so much!

0 Likes
Message 12 of 12

CargoFlyer777
Participant
Participant

This was definitely the problem - I created a parameter for use in the 'pattern on a path' command - the pattern was a tilted coil winding on a double helix solenoid.  The number of repeating patterns depended on the length of the solenoid - I calculated the NumTurns by dividing the SolenoidLength by the LengthOfEachTurn...even though I divided each value by 1 mm AND specified NO UNITS for the parameter it still was not working..i.e. (SolenoidLength/1mm)/(LengthofEachTurn/1mm) ans. in NO UNITS....The Fix was this: round((SolenoidLength/1mm)/(LengthofEachTurn/1mm))...Note that the answer BEFORE 'round' was a whole number!  Also note the answer was UNCHANGED by the addition of the round command.  Additional clue was when I put NumTurns in the pattern on a path dialog, it displayed in red before the addition of 'round', and NumTurns disappeared and was replaced by a number when pulled up the dialog next time - once I added 'round' NumTurns stayed and was not red...

 

0 Likes