sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] Layer Zero Fixup Tools

    Scheduled Pinned Locked Moved Plugins
    12 Posts 9 Posters 11.8k Views 9 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      slbaumgartner
      last edited by

      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.


      tozero.rb

      1 Reply Last reply Reply Quote 0
      • D Offline
        dtrarch
        last edited by

        Hi slbaumgartner
        We the messy thank you
        Great idea πŸ‘ β˜€

        Cheers

        dtr

        1 Reply Last reply Reply Quote 0
        • kenK Offline
          ken
          last edited by

          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

          Fight like your the third monkey on Noah's Ark gangway.

          1 Reply Last reply Reply Quote 0
          • Bob JamesB Offline
            Bob James
            last edited by

            That'a a "duh" for me too, Ken.
            Thanks for the tool, slbaumgartner, it'll get a lot of use.

            i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60

            1 Reply Last reply Reply Quote 0
            • TIGT Offline
              TIG Moderator
              last edited by

              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...

              TIG

              1 Reply Last reply Reply Quote 0
              • B Offline
                Ben Ritter
                last edited by

                Thank you for sharing.

                1 Reply Last reply Reply Quote 0
                • S Offline
                  slbaumgartner
                  last edited by

                  @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


                  tozero.rb

                  1 Reply Last reply Reply Quote 0
                  • irwanwrI Offline
                    irwanwr
                    last edited by

                    quite similar with the Default Layer Geometry main purpose then?

                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      Matt666
                      last edited by

                      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.
                      Sans titre 1.jpg
                      i post it here, if someone finds it useful.
                      πŸ˜‰


                      Matt_Normalize.zip

                      Frenglish at its best !
                      My scripts

                      1 Reply Last reply Reply Quote 0
                      • irwanwrI Offline
                        irwanwr
                        last edited by

                        @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 πŸ‘

                        1 Reply Last reply Reply Quote 0
                        • JClementsJ Offline
                          JClements
                          last edited by

                          Here are links to PutOnLayer
                          http://rhin.crai.archi.fr/rld/plugin_details.php?id=315

                          And PutOnCurrentLayer
                          http://rhin.crai.archi.fr/rld/plugin_details.php?id=312

                          Both 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.

                          John | Illustrator | Beaverton, Oregon

                          1 Reply Last reply Reply Quote 0
                          • Bob JamesB Offline
                            Bob James
                            last edited by

                            @jclements said:

                            Here are links to PutOnLayer
                            http://rhin.crai.archi.fr/rld/plugin_details.php?id=315

                            And PutOnCurrentLayer
                            http://rhin.crai.archi.fr/rld/plugin_details.php?id=312

                            @jclements said:

                            I combined the two into one.

                            Where ❓

                            i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60

                            1 Reply Last reply Reply Quote 0
                            • 1 / 1
                            • First post
                              Last post
                            Buy SketchPlus
                            Buy SUbD
                            Buy WrapR
                            Buy eBook
                            Buy Modelur
                            Buy Vertex Tools
                            Buy SketchCuisine
                            Buy FormFonts

                            Advertisement