Restrict by area?

Is it possible to restrict an object by it’s area? For example, I have a planar surface with sliders for the X and Y values. Is there a way that I can change both values freely until the shape goes above/below a certain total area, at which point the slider won’t go any further or a warning message is returned, etc? I currently have an area component and a panel that I can manually check as I go, but is there a way to do this automatically?

Don’t know how to lock sliders, but this could be a visual solution. Display the surface in different colors.

area_warning.gh (8.4 KB)


Thanks Tim, this is a nice solution!

Your welcome. Glad I could help you.
There are some ways to edit sliders without opening the editor, but this requires scripting, and I have no experience with it.
For example, David Stasiuk has something like this in his “marching cubes” (http://www.grasshopper3d.com/profiles/blogs/marching-cubes-curve-wrapping-more-metaballs)
And I think I remember I saw one of @PeterFotiadis around this forum. (Sorry if I am wrong and linked you :smiley: )

I have in Pufferfish components like Constrained Area Rectangle and Scale To Area which will let you just pick the desired area.

Indeed I have some examples on that matter (via C#)