Hi, I’m a beginner at Grasshopper and I want to move rectangles along their edges but never going each other’s inner area. Please see the first image of what I want to achieve. In the first Grasshopper screenshot the second rectangle moves along the base rectangle edge and stays outside but in the second screenshot, as I move the Point on Curve, naturally, it goes inside of the base rectangle.
If you can help me with this problem. I’d appreciate it thank you!
CCX.gh (11.1 KB)
Thank you very much for this!
But I want the second rectangle to move around the base rectangle as I change the ‘Slider’ or ‘Point on Curve Slider’. It’s like the first image I attached.
I don’t know much but seems like in the script you sent the rectangle only moves in one direction or am I missing something?
Any other ideas about how to achieve this?
Thank you!
here’s a crude definition
i haven’t tested it with all possible rectangles, but it should get you going
rotate_rectangle_about_rectangle.gh (10.4 KB)
Thank you very much! I couldn’t have done this and still trying to understand the script
Are there any ways to add more rectangles to the base rectangle?
Thank you!
You’re welcome.
can you sketch that idea?
the way i’m understanding your question, i can say that yes, just connect other rectangles to the battery of the base
Sure, here is the sketch:
So basically, I want the “c” and “d” rectangles to also move around on the edge of the “a” rectangle but independently from each other but they should stop when they encounter each other. For example, “c” rectangle can go in the x direction “d” can go in the -x direction or the same direction and stop when their edges contact the “b” rectangle or each other.
Is this possible?
Thank you very much again!
i see. unfortunately that’s on another level of complexity and need collision detection, both with the concave portions of the base curve as well as the other curves. you might be able to pull it off in grasshopper with kangaroo, but I’m not entirely certain
Thank you very much again, I will try to do that