GH: Dynamic CPlane with GhPython?

I would like to be able to dynamically generate the Plane, for example using GhPython, and then feed the Plane into another GH component? (The Plane depends on user interaction, in 90 degree flips), for example like so :

Or is there a smarter way of achieving a “flippable plane”?

// Rolf

Interaction in Rhino, in Grasshopper? Like mouse moves, or mouse clicks?

Yes, Interactive with GrassHopper. Ticking a Button should flip (Button name = “Mirror Model”, kind of.

BTW, I just tried using a PlaneSurf component (input from Srf, see below), and I read the centroid of the surface as to determine on which side of the Y axis it currently lays and so flip the surface over to the other side. But GhPython doesn’t like me, it just complains on type error all the time.

This is what I have; The open surface connected to the Srf component, and on row 10 I’m trying to determine on which side of the Y-axis the Srf currently is:

The in-port srf_plane is a one “Item Access”, of type Surface, but the RotateObject seems to expect a list, while it won’t accept a list either…

// Rolf

Ok, so if I understand you want a special object which takes planes on the left side, outputs the same planes on the right side, except when you click on it the outputted planes are flipped? (10.8 KB)

Or, with separate buttons for X-Flip, Y-Flip and XYSwap: (15.3 KB)

1 Like

Yes, cool solutions. This is exactly what I need, thanks!

// Rolf

If you want to do this in Python (RhinoCommon), here is the exact thing David did, in Python.



Giulio Piacentino
for Robert McNeel & Associates (12.2 KB)

1 Like

Wow, that was perfect. Yes, I try to use Python for this project so this version came handy in.


// Rolf