I’ve put up a script that iteratively place a square (rounded, if needed) on your curve, and check for next intersection, and go on.
It is probably easy to edit the code to make it work with a rectangle…
Made multithreaded, because why not.
Works only with planar XY curves. It doesn’t consider curve self-intersections.
thank you for your time and consideration. but It doesn’t seem follow my concept. I want just one brick in any column. in your script in some columns we have two or three bricks face to face each other.
thank you so much Daniel. but how can I control the space between bricks in your script and also how to define the start point. for example I want the start point of every other rows are placed just half of brick width forward.
You can add a gap between the bricks without changing Daniel’s script. You can array an offset outline of the brick with half of the gap added to it then use the flow command to place the original brick in the arrayed outline.