Move object on the surface


I would like to kindly ask if someone could suggest to me how to move a rectangle within a surface. I need that the moving object remains within the frame.

Many thanks!!!

Best regards,


Hi Julia, Can you provide a little more info on the question. Ideally a small file with the issue. Thanks!

1 Like

Hi Japhy,

sorry for not being specific.

Here, I attach my initial script with an object to be moved and a moving area.

I would like to move the object within the rectangle without exceeding its boundaries.

Many thanks for your support!
Moving object on a surface.3dm (20.5 KB)
Move object on (26.5 KB)

If you’re really just looking for the region where no intersection will occur, there’s something called a Minkowski Sum that is a way of combining the points of an object and an obstacle. If the centroid of your rectangle lies in the “Zone of Safety”, it will not intersect the boundary.

Move object on surface (38.9 KB)

That component comes from the Clipper plugin BTW

1 Like

Hi Ethan,

it’s great!!! It’s exactly what I was looking for!

Thank you very much for your support!

I added to your script the part to move the object within the safe zone.

Thank you and I wish you a happy New Year.

Kind regards,

Move object on surface (40.0 KB)