[Plugin] Layer Zero Fixup Tools
-
The attached ruby adds two context menu items when you select a Group or ComponentInstance. These are intended as quick fixups for when you accidentally get Faces and Edges onto layers other than Layer0 and cause confusing visibility issues with the Groups and Components that use them. A prime culprit in creating this situation is the default explode command, which puts all the exploded parts onto the layer of the container, even if they were originally on Layer0. The first added context menu item, Explode to Layer0, modifies this behavior to put Faces and Edges onto Layer0. The second added context menu item, Primitives to Layer0, recursively descends through all nested contents of the selection and puts all Faces and Edges on Layer0 without exploding anything. This is the quick fixup when you can't remember what you did to create the mess.
-
Hi slbaumgartner
We the messy thank you
Great ideaCheers
dtr
-
Well I could move this to the "DUH" thread. I did not realize that happen when I exploded a named group. It explains a lot of the mystery to me on how some primitive got to another layer besides "O".
Thanks for the Plugin.
Ken
-
That'a a "duh" for me too, Ken.
Thanks for the tool, slbaumgartner, it'll get a lot of use. -
Thanks, good idea.
Tip: you can avoid all of the 'Layer0' coding/tests by using
ent.layer=nil
which gives 'ent' the default-layer, irrespective of the default-layer's name or where it is in the model.layers list... -
Thank you for sharing.
-
@tig said:
Thanks, good idea.
Tip: you can avoid all of the 'Layer0' coding/tests by using
ent.layer=nil
which gives 'ent' the default-layer, irrespective of the default-layer's name or where it is in the model.layers list...Absolutely right! I discovered that reading other threads here after I posted the original. The version here uses that fix.
Steve
-
quite similar with the Default Layer Geometry main purpose then?
-
I wrote a plugin some time ago that do the same thing, and you can choose entities you want to "normalize", and if the script has to analyze nested entities.
i post it here, if someone finds it useful.
-
@matt666 said:
I wrote a plugin some time ago that do the same thing, and you can choose entities you want to "normalize", and if the script has to analyze nested entities.
[attachment=0:x79lxjjg]<!-- ia0 -->Sans titre 1.jpg<!-- ia0 -->[/attachment:x79lxjjg]
i post it here, if someone finds it useful.
it looks like TT CleanUp
interesting. thank you -
Here are links to PutOnLayer
http://rhin.crai.archi.fr/rld/plugin_details.php?id=315And PutOnCurrentLayer
http://rhin.crai.archi.fr/rld/plugin_details.php?id=312Both were originated by Chris Grant.
I combined the two into one.
I use them religiously when importing components or cutting and pasting geometry from other models or when importing DWG files.
-
@jclements said:
Here are links to PutOnLayer
http://rhin.crai.archi.fr/rld/plugin_details.php?id=315And PutOnCurrentLayer
http://rhin.crai.archi.fr/rld/plugin_details.php?id=312@jclements said:
I combined the two into one.
Where
Advertisement