I racked my head for hours on equations of this type.
I lost hair lol.
The ones I use make a number of holes according to a maximum center distance (which I enter in a global variable) and according to the length. Taking into account departures if there are departures.
but I don't really know if that's what you're looking for...
View image
Example:
I want a maximum center distance of 500mm by 1693mm with a start on each side at 150mm.
I enter the values on the 3d. Length, start and I enter the equations in global variable 500 in maximum center distance
A little reconstruction and presto! I end up with 4 holes with a center distance of 464.33mm
Hello, I used formulas that do exactly that on Xcel, it helps me to quickly size networks according to my regulatory speeds and diameters. I don't know if on Solidworks it works but basically my formula is:
=CHOOSE(EQUIV(Value of the centre distance;{ has; b; c;d;e; f; g; h; i;j; k}; 1); 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11)
or the letters (a; b; c...) are your intervals and or the sequence of numbers (except the 1 in bold) are the values to give according to your interval.
To better edit my formula:
-If your center distance is between a and b, then your result is 1 -If your center distance is between b and c, then your result is 2 -... etc... etc -If your center distance is greater than k, then your result is 11
I'm not sure it helps you but you never know ^^
After that, if the formula doesn't work directly on Solidworks, you can integrate an Xcel board into your part.