algorithmic modeling for Rhino
Hi Everyone,
I have been working on creating a code to make clipping planes in GH Python but have come unstuck
1. How to define the named viewport the clipping plane should be active and not have it set to the active viewport. I have been able to find the Viewport ID for all the viewports but not just select by name then extract the ID and use it in the clipping plane code below. This is current code, (not included broken broken experiments)
import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino
sc.doc = Rhino.RhinoDoc.ActiveDoc
# Get the active view
view = scriptcontext.doc.Views.ActiveView
# Add a clipping plane object to the document
Clipping_Plane = sc.doc.Objects.AddClippingPlane(P, 1, 1,view.ActiveViewportID)
2. How would i get the GUID of this Clipping plane and use it to delete itself before the script is run again and the new one is created so i don't end up loads of clipping planes. I have been able to do it using selclipping plane and delete scripted from the command line but would rather have everything done in the code where possible.
Thanks matt
Tags:
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2025 Created by Scott Davidson.
Powered by