Rhino construct plane in grasshooper

Is there any fonction tu use the rhino Cplane collection as grasshooper plane (to extract Z axis for exemple)?

Thanks


NamedConstructionPlanes.gh (5.8 KB)

 List<Plane> lst_planes = new List<Plane>   ();
 List<string> lst_names = new List<string>();

   foreach( ConstructionPlane constructionPlane in  RhinoDoc.ActiveDoc.NamedConstructionPlanes)
       {
      lst_planes.Add(constructionPlane.Plane);
      lst_names.Add(constructionPlane.Name);
    }

    planes = lst_planes;
    names = lst_names;

From this link


And don’t forget, this link
https://developer.rhino3d.com/api/RhinoCommon/html/N_Rhino.htm#!

1 Like

It’s also possible to extract CPlanes from viewports:

    Component.Message = "Viewport CPlanes";
    var planes = new List<Plane>();
    var views = Rhino.RhinoDoc.ActiveDoc.Views.GetViewList(true, false);
    foreach(var view in views)
    {
      Print(view.ActiveViewport.Name);
      planes.Add(view.ActiveViewport.ConstructionPlane());
    }
    A = planes;

CPlanes.gh (15.1 KB)

2 Likes

thank you very much!