Using variable for pattern quantity

Using variable for pattern quantity

Anonymous
Not applicable
4,861 Views
8 Replies
Message 1 of 9

Using variable for pattern quantity

Anonymous
Not applicable

I'm attempting to make a rectangular pattern based on the overall dimensions of a face. The distance accepts variables/formulas without issue. The quantity though, acts as if it will accept, bringing up variable names as autocomplete but then does red when I put a variable in. Is this the expected behavior? If so is there a way to dynamically change the number of times a pattern is repeated?

 

4,862 Views
8 Replies
Replies (8)
Message 2 of 9

HughesTooling
Consultant
Consultant

It does work but the parameter needs to be unitless so you'll need something like d1/1mm to make a distance parameter unitless. Can you get a screen grab of the dialog with the equation you're trying to enter.

 

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

Anonymous
Not applicable

Oh yeah, I see it now. I'm getting * 1 in tacked onto the end of what should be a unitless variable. Deleting and recreating with the No Units dropdown selected did the trick.

 

FWIW, that field looks disabled.

 

0 Likes
Message 4 of 9

patrick.dyke
Explorer
Explorer

I was running into this, too. I was trying to divide two lengths to get a count (depth / finger_width). It seems that it only works if the numerator (depth in my case) is a whole number, regardless if the resulting number is a whole number. 

 

Example:

8in/.25in = Worked

7.75in/.25in = Doesn't Work

 

Even if I put this expression on a unit-less parameter and use that, it still will not accept it if the numerator is not whole.  What did work was adding a rounding function so the the result will always be whole. In my case I used floor: floor(depth / finger_width)

Message 5 of 9

juha.ruhkala
Explorer
Explorer

Worked once then moved component under subcomponent and made the pattern there so browser stays bit cleaner.
Now with same parameters can't get it to work. 

And if i try to remake it under parent component doesn't work either.

 

quantity parameter name "Saleita" expression "ceil(( ( SaleverhoLeveys / 1 mm ) - ( SaleikonOsienKorkeus / 1 mm ) ) / ( SaleidenValys / 1 mm ))" gives value 108

distance parameter name "SaleidenValys" expression 22mm

 

now even editing feature using manual values gives an warning "It's an invalid input setting" and have to delete and remake "pattern on path"

 

if I manually put an value 108 on the quantity it works even replaced Ä with A but didn't make any difference.

0 Likes
Message 6 of 9

TheCADWhisperer
Consultant
Consultant

@juha.ruhkala 

You should have started a new discussion thread (and link back to this one for reference).

And 

Can you File>Export your *.f3d file to your local drive and then Attach it here to a Reply?

0 Likes
Message 7 of 9

g-andresen
Consultant
Consultant

Hi,

Please share the file.

File > export > save as f3d locally  > attach it to the next post.

 

günther

0 Likes
Message 8 of 9

juha.ruhkala
Explorer
Explorer

Made an parameter with value 20. Then put that parameter in to pattern quantity and it works.

Then made another value with calculation with parameters and added that parameter to the working quantity parameter expression.

Now it works as long as i don't edit pathpattern, If i edit it it'll give a warning and stop working.

First attachment was wrong version

 

Parameter "SaleverhonKorkeus" changes model height and that allso changes the quantity

 

ps. I'am new to Fusion 360 and It's my first cad software 🙂

0 Likes
Message 9 of 9

g-andresen
Consultant
Consultant

Hi,

Pattern on path is currently causing occasional problems in connection with variables.
But for this example Rectangular Pattern is better suited.

 

rectangualar_vs path.png


I have made two small changes in the parameter list.

 

günther