Help Debugging Attractor Point

Need help debugging the attractor point in this script! I want to be able to drag the centrepoints of rectangles around based on the location of the attractor point, but the code is currently not moving my array of points. I have one version with a scattered (read: random) array of points, and one that is based on a surface division. Ideally the script will work on non-rectangular polygons. I drew a complex polygon to represent a building facade.

I attached a Rhino file with a complex curve to use as an example, and the scattered and surface division versions of the attractor point file.

Thank you! (16.1 KB) (16.4 KB)
For Debugging.3dm (25.9 KB)

You didin’t internalised your referenced curve.

I know; I want it to be able to work for any curve I draw in Rhino. I set the curve in the very first command (not tidy, I know, but it works for what I need it to do).

And that is fine - but when you ask a question on the forum, you should try to minimize the amount of work other have to do to help you. Therefore, when you post a GH definition, make sure to clean up your definition so that only necessary components remain, AND internalize any Rhino geometry that is used as input. Always.

I edited the files, thank you for letting me know.

Is something you need like this? (15.1 KB)