Clipping plane toggle with layer on/off?

Hi All,

was wondering if anyone has a suggestion how to easily toggle clipping plane on/off by toggling the layer visibility the clipping plane is lying on.

the aim is: have a 3d model of a building with associated plans and sections.
when I tun on a layer containing a plan I would like to turn on/off the corresponding clipping plane too. (it would be lying on the same layer where the blocked plan is on)

with many plans/sections, hence many clipping planes, it is a lot of manual clicking to get this done right now.


If you save a NamedView with a clipping plane active, recalling that named view will reinstate the clipping planes. There is a bug in RH5 that requires you to turn on the layer that has the clipping plane residing on it for the named view to be able to turn it off (turning it on doesn’t require the layer to be on).

Example: I have default named clipped views baked into my template file and just typing v1 will activate one clipped view. Typing v0 should get the non-clipped view back but for that to work, I need to turn on the layer with the clipping planes.

ha… that is a good one !

just trying it out… means creating some surplus named views but fair deal for the time being.

thank you

@dale, @stevebaer,

i´ve tried to script this using layer table events and had to stop it since there was no way to control the visibility toggles of the clipping plane views in Python or RhinoCommon. Even scripting _-Properties using rs.Command went nowhere, the entry _ClippingPlane in _Properties did nothing in the command line.

Could this be added please to the ClippingPlaneSurface Class in RhinoCommon ? It seems to be possible yet to get the list of ViewportIds of a ClippingPlaneSurface, but there is nothing to remove or add viewport ids using scripting.


1 Like

Added -

1 Like