Sometimes when i use Clipping plane, accidentally i turn off the layer which the plane was created,
then i waste time finding it…
Any ideas how to easily find it ?
As layer operations are in the undo stack, I would suggest perhaps turning on all layers with the AllLayersOn button (macro ! _-Layer _On * _Enter
), find the clipping plane, and in Properties get its layer. Then Undo and just turn on the appropriate layer.
There is no real way in base Rhino to find specific objects on off layers, a script however could locate specific types of objects on off layers and report what layer they’re on…
Edit - just tested here and unfortunately, there looks like there is a bug in python rhinoscriptsyntax, it won’t find clipping planes that are hidden or on off layers…
(changed category to Rhino for Windows)
–Mitch
Here is a draft of a (vb) Rhinoscript… --Mitch
Option Explicit
'Script by Mitch Heynick ©
'Version 8 December, 2014
Call FindAllHiddenClippingPlaneLayers()
Sub FindAllHiddenClippingPlaneLayers()
Dim cp, cps, nc, msg, layer
cps = Rhino.ObjectsByType(536870912)
nc = "No hidden clipping planes found !"
If IsNull(cps) Then
Call Rhino.Print(nc)
Exit Sub
End If
msg = ""
For Each cp In cps:
layer = Rhino.ObjectLayer(cp)
If Not Rhino.IsLayerOn(layer) Or Rhino.IsObjectHidden(cp) Then
msg = msg & "Hidden clipping plane found on layer " & layer & vbNewLine
End If
Next
If msg <> "" Then
Call Rhino.MessageBox(msg, 0, "ClippingPlane finder")
Else
Call Rhino.Print(nc)
End If
End Sub
Tnx @Helvetosaur that works just fine for me ! & Tnx for writing that down for me !
Im not a VB guy buy i’v run it with the Script edit tool & saved it,
Now, how do i make a button out of it ?
G.
Create a new button, shift+right click to open the button editor.
In the command box, type in the following code:
! _NoEcho -_Runscript (
<paste the entire script in here>
)
Finish editing the button with type, image, etc. as per usual…
–Mitch
Its Done !
Tnx A Lot @Helvetosaur, you’v been very helpful :
G.
I run this command and located the clipping plane, “Hidden clipping plane found on layer 3D-Model,” however I am unable to “unhide” the clipping plane or locate it. I run the command show and “showing one hidden object” and no object is in sight or can be located when entering ZE.
If I attempt to delete the layer I receive a window stating that there is 1 hidden object… are you sure you want to delete the layer? no not really and go ahead and delete it.
I run the command again and states the same respectively, yet the layer is deleted. I save the file as a copy, close rhino, then restart rhino and open the copied file and the layer that was deleted is now showing again. I delete the layer again, save, close rhino, restart… again the layer is back with hidden clippingplane. I am borked of ideas.
Can you post the file here?
not really; proprietary drawings
Hi - if possible, please upload your file on https://www.rhino3d.com/upload so that we can take a look. Make sure to put the URL to this thread in the comments field. Without something that we can reproduce, I’m afraid there’s nothing we can fix.
-wim