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;
      cpObj.CommitChanges();
    }

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: http://lmnts.lmnarchitects.com/visualization/section-boxes-in-grasshopper/#.UNQP03fSl8U

 



3 Comments

  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

Leave a Reply