Animated Clipping Planes in Rhinoceros

A while back I showed you how to edit Rhino object properties with a few lines of C# code in Grasshopper.  Well, with the same technique, you can animate a clipping plane in Rhino to slice through geometry:

To reference the clipping plane you should use a GUID param.  This can be called up inside of a GH C# component as such:

    private void RunScript(Guid id, Plane y, ref object A)
      Rhino.DocObjects.ObjRef obj = new Rhino.DocObjects.ObjRef(id);
      Rhino.DocObjects.ClippingPlaneObject cpObj = obj.Object() as Rhino.DocObjects.ClippingPlaneObject;
      cpObj.ClippingPlaneGeometry.Plane = y;

You can add any construction plane as the plane of the Clipping Object as seen here:

cpObj.ClippingPlaneGeometry.Plane = y;

Where ‘y’ is a construction plane I am moving with a slider.

Here it is with two clipping planes:

update: Check out lmnt taking this to the next level with Section Boxes a la Revit:



  1. Xander Dolan wrote:

    Wow this is great!

  2. […] section box script is similar to Luis Fraguada’s clipping plane script, except this script’s input is a closed brep and uses […]

  3. Dhruv wrote:

    Thankyou for sharing.
    Will help me a lot in presentations in college.
    Warm regards

  4. Deniz wrote:

    Guys, i can’t write that script into grasshopper c# component. It does not let me to write ? Can’t you just share the gh definition? (I already tried someone else’s definition for this but that was not working too. Seems that something i don’t know going on around.

  5. DeividJohnson wrote:

    Hey Luis,

    A simple screen shot of the Grasshopper definition + C# code would be super helpful.


Leave a Reply