We have one more for the heap for the clipping plane handling in RhinoScript:
where: strView - optional, name of the view, current vport if omitted
strClipPlane - clipping plane ID
blnEnable - True to enable, False to disable, if omitted, method would return the current state of the clipping plane in given vport.
thanks, I see that something has to change deeper in the code to have it exposed in RS…
The main thing I can’t find a workaround for is checking if a clipping plane is enabled in given vport.
EDIT: there actually IS a way to check for clipping plane being enabled in current vport: using the EnableClippingPlane command on ClippingPlane that is already enabled results in a “Viewport already clipped by selected clipping plane” message in command line, and no message if it was disabled. So checking the command history holds the answer. This is an ugly workaround but would do for now. Still hope at some point we can get a clean a nice way to access this.
The enabling and disabling part could be done via selecting the clipping plane object and running “EnableClippingPlane / DisableClippingPlane” commands.
I just tried the new method - thank you for adding it!
I see two issues with how it is now implemented:
I don’t see a way to disable clipping in one vport only, but keep clipping in others.
How can I tell if the clipping plane is enabled or disabled in the given vport?
(also, it is not easy to add one view to the ‘clipped’ ones… if I use only one view, it would ‘unclip’ the others, so every time I’d need to keep a list of views that need to remain clipped…and with not being able to tell what’s clipping via script it makes is difficult.
In my initial suggestion, the method would take the ClippingPlaneID, strViewName/ID, True/False for enabled/disabled and return True/False for enabled/disabled. It would solve the above 2 issues. What do you think ?