Equally spacing in assemblies

Hi

Say for instance I have a frame with a known outside dimension, but I dont know how many bars I want to put inbetween (think gates). Is there a macro or similar that would enable me to adjust the amount of bars inbetween the outside bars but would dynamicaly keep them equally spaced.

Thanks

Steve

SolidworksParts And Features
Answers 9
SF
SF 2010-07-19 Best Answer

Have you thought about using Component Patterns?  ...perhaps in conjunction with a skeleton sketch and equations?

SC
SC 2010-07-19

The trouble as far as I can tell with using component patterns is that it has to have a start point. So my problem is that if I wanted to use 10 internal bars instead of 5 then the start point would be a different dimension from the outside frame bars. I had it working once with equasions but it was a hammer to crack a nut and to be honest I cant remember how I did it.

Thanks

Steve

SF
SF 2010-07-19

I believe you could do this with an equation. (You could also do it with a macro, but it may be a little steeper learning curve).  The key is that the number of items in the pattern is accessible as an input in the equation editor.  Create the features (including the pattern), then open the equation editor.  You're dimensions should be available for entry.

SC
SC 2010-07-19

Hi

Is there any chance you can give me an example. Ive just tried it but my end bars are not the right dimensions. I have attached something similar to what I am after. You will see the attempt at my limited knowledge of equations for the bottom row pattern.

Thanks for any insite

Steve

SC
SC 2010-07-20

After an hour or so of trying to get this right I have now come to the end of my tether. 8 years ago when I used to use Turbocad there was a pattern type that allowed you to specify the amount you wanted in the pattern then you selected the 2 inside faces of the outside parts that you wanted to equally space inbetween. The whole thing took about 5 seconds.

This is something that I have requested via an ER on about 5 seperate occasions, but still I have to resort to the calculator to do the maths .

Thanks

Steve

SF
SF 2010-07-20

It may be too late, but I finally got the equation right.

"D3@LocalLPattern3" = "D1@Sketch11@200 LOWER BAR.Part"+(("D1@Sketch1@730 FLATBAR.Part"-("D1@Sketch11@200 LOWER BAR.Part"*"D1@LocalLPattern3"))/("D1@LocalLPattern3"+1))

To repeat it with simpler variables:

Y = Total width

N = Number of items in the pattern

W = Width of patterned item

X = Desired pattern spacing

X = ((Y-NW)/(N+1))+W

Maybe this will help for the future?

SC
SC 2010-07-20

Thank you Scott

It still seems to me to be a hard way of doing something that should be quite simple. It just a variation on a theme of a curve driven pattern in parts. I'm sure the programmers could come up with something.

Again thanks for you time and I hope your head isnt hurting too much after working that out

Steve

SF
SF 2010-07-20

Steve,

It really wasn't too bad once I drew it out.  The part that was confusing me is that I was initially calculating the gap between the parts, not the center to center distance.

To make it easier to use that equation, you could probably create equations for each of the variables I gave in my explanation.

Simply have an equation like:

W = "D1@Sketch.....

Do that for all the variables except the output, and set the output equal the the proper dim.

I agree that it would be a nice feature to have the pattern feature figure it out for you in a method similar to a width mate.

Scott

SC
SC 2010-07-20

Hi Scott

Yes it certainly would!!!

Thanks

Steve