Geometry within an area

Hi,
I am trying to make a geometry within an area, like this:

So far I have combed up with this grasshopper script, if the rectangle collides with the area (Curve) the collision component with return True.

How can I use this information to stop my sliders from “sliding” if a collision has occurred?

I appreciate all help.

I don’t know if there’s something that will disable your sliders, but 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 center of your rectangle lies in the “Safe Zone”, it will not intersect the boundary.
minkowski sum.gh (10.1 KB)

https://cp-algorithms.com/geometry/minkowski.html

Thanks for the answer!

This could be possible to use, but I Want to use this with Galapagos (evolutionary solver) to check what location within an area the best placement of a building should be. Therefore the sliders is essential. I’ll take a look at Minkowski Sum and see if it could be any use!

If you’re generating random points, why can’t you use Point in Curve to check if the center point of the rectangle lies in the boundary curve of the “Safety Zone” or just confine all your points there to begin with?