parameter equation for number of instances along length

parameter equation for number of instances along length

blaine.warner
Contributor Contributor
312 Views
3 Replies
Message 1 of 4

parameter equation for number of instances along length

blaine.warner
Contributor
Contributor

modeling a pipe routing set up. going a certain distance.

i have a standard length of pipe, they are joined by flanges

i have a distance to travel

the distance is not perfectly divisible by the pipe length

i have a model parameter "pipeLen" in inches

i have a model parameter "distance" in feet and inches

i have a top level sketch with a radius that is dimensioned as "distance" parameter

i have a pattern of pipes going from the edge of the circle to the center or the circle (or the "distance" parameter"

i have a unitless user parameter named "pipeInstances" that is (round("distance"/"pipeLen)

i have that parameter "pipeInstances" as the number of instances in the pattern

 

the goal is to set the pattern so that when i shorten or lengthen it (because distance is not decided yet) the number of standard length pipes willl change up or down while the length of each pipe stays the same. i somehow need to make the number of instances in the unitless parameter always come out as a rounded down integer, basically act like the "int()" command in python (im very new to python)

 

then the strategy for making up the distance of the last pipe is to join it to the endpoint of the distance sketch radius and extrude backwards by ("distance"-("instances" x "pipeLen") this should make the last length of pipe (cut to fit) meet the last instance of standard length pipe even though they are not joined. 

 

need a unitless parameter represented by an equation (a length in inches divided by another length in inches) to always come out as a rounded down integer. "round" function doesnt seem to be working in user parameter equation.

0 Likes
313 Views
3 Replies
Replies (3)
Message 2 of 4

hamid.sh.
Advisor
Advisor

@blaine.warner wrote:

.... need a unitless parameter represented by an equation (a length in inches divided by another length in inches) to always come out as a rounded down integer. "round" function doesnt seem to be working in user parameter equation.


You need "floor()" function. Just don't forget to chose "No Units" when creating it:

 

floor.png

 

Hamid
0 Likes
Message 3 of 4

g-andresen
Consultant
Consultant

Hi,

try this

 

added lenght.png

 

günther

0 Likes
Message 4 of 4

blaine.warner
Contributor
Contributor

thanks, so i did figure out the problem i was having, i had it in unitless parameter and everything. one of my named parameters was just misnamed.

 

but now, so the last pipe, im calling "terminal", i have it joined to the end point of the sketch and have the length set to full length minus instancenumber times length of instance (so, the remainder) but if the math comes out so that i have lets say 10 foot sections, and the length is exactly divisible by ten, i now have an error for the terminal pipe that is trying to extrude 0 inches. is there a way to configure suppressed or not suppressed with a boolean statement somewhere in parameters? like, if:terminalLen>!0; 1, else 0 then place that somewhere in a parameter for... idk, in solidworks i can suppress a part or instance anywhere but it seems like in fusion they would rather you hide stuff than suppress it because i can only suppress stuff in the timeline, not the window or browser. i may be doing it wrong, idk

and the array along path (or rectangular array too) needs more than just extent and spacing, there needs to be a way to end it at a desired geometry, how is that function missing. "make me an array, fusion"  "ok, how long do you want it to be?  "long enough to get to this point right here"  "ok, and how long is that distance?"  "idk, it changes, just end at that point no matter how far away it is"  "no, but like, how far is it away?"  "no... youre....  just make parts until one of the parts touches this point, that's all i want"  "ok, but like... how far is it?"  "... goddamn it fusion... this is why nobody will ever love you as much as they do solidworks. you're the ford native entertainment user interface and navigation when literally everybody prefers to just sync their car with their phone and use apple carplay or android auto. ford is never going to be as good at making a user interface as the people who just make touch screen computers.!" 

 

im sorry, what was i talking about? parametric array along path, without haing to write so many equations when i already have a mile of model parameters to scroll through would be pretty sweet