Placing a complex pattern using its middle


I am working on a project that involves chopping up a large area of patterns generated by grasshopper into sheets that can be cut with a CNC router.

In the current script. I generate the pattern around (0,0), then take its bounding-box center-point and move the pattern to a location point. However, this bounding-box center falls in different locations in the overall pattern based on how many repetitions of the pattern I have selected. I would like to be able to place the pattern based on the center of one of these bursts.

The location of this point is important, because we need to place it in the center of the greater collection of panels. How would I go about locating the pattern around this specific reference, or create the pattern radiating from this point?

I am only a novice grasshopper user with only a little background in Java and Python, so any improvements or suggestions for my definition would be appreciated. Although, this is also a fragment of a larger definition, and so some things might be redundant in this snippet. (22.4 KB)