Help with a rectangle pattern spacing equation

Help with a rectangle pattern spacing equation

SlowEvo
Contributor Contributor
1,850 Views
5 Replies
Message 1 of 6

Help with a rectangle pattern spacing equation

SlowEvo
Contributor
Contributor

.f3d attached.

 

I have a series of squares(I labeled them blocks in parameters), spaced evenly with a 1mm gap between each. For every 2 squares wide, underneath will have one rectangle spanning 2 squares. I figured out an equation that spaces the rectangles correctly when the model is 6 squares wide. If I change a parameter to say 8 squares wide it the rectangles don't space out properly. Same if I reduce it to 4 squares wide.

 

When it works properly:

Screenshot 2023-10-21 103010.jpg

After changing to 8 squares wide:

Screenshot 2023-10-21 103918.jpg

 

I'm using the rectangle pattern tool(in the sketch, this better suits my need in this case).

In the rectangle pattern tool:

Quantity= countWide/2

Distance= blockWidth * ( countWide / 2 + 1 ) + ( spacingWidth * ( countWide / 2 + 1 ) )

 

Those parameters:

countWide=6

blockWidth=25mm

spacingWidth=1mm

Screenshot 2023-10-21 103454.jpg

All parameters:

Screenshot 2023-10-21 104240.jpg

 

I'm really, really bad at math and honestly am surprised I even figured out as much as I did.

Could someone please help me figure out the correct equation so it will update properly?

 

Also I know the amount of rectangles wide will have to be an even number.

0 Likes
Accepted solutions (1)
1,851 Views
5 Replies
Replies (5)
Message 2 of 6

jhackney1972
Consultant
Consultant
Accepted solution

I did not want to add to your Parameter table so I added my extra equations to the Sketch Rectangular Pattern command.  I also edited your existing Parameter called "rectangularWidth".  Model attached.

 

Pattern Calculation.jpg

John Hackney, Retired
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 6

SlowEvo
Contributor
Contributor

Wow thanks so much for that! One thing I dont understand is how its getting the information to add more rectangles if I add more blocks.

 

Edit:

I see it must have something to do with you changing Distribution to Spacing while I had it at Extent. I've never played with this option, I'll have to learn more about it and it's use cases.

0 Likes
Message 4 of 6

SlowEvo
Contributor
Contributor

Included original message in edit above.

0 Likes
Message 5 of 6

jhackney1972
Consultant
Consultant

As my screen capture indicates, I have created a Rectangular Pattern on the rectangular sketch.  You can add the equations to the Parameter table is you wish but since you have only a sketch, I added the required equations to the rectangular pattern dialog box.  The quantity is using one of your existing parameters.

 

Rectangular Pattern on Sketch.jpg

John Hackney, Retired
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 6

SlowEvo
Contributor
Contributor

Thanks so much again!

0 Likes