• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ 30% Off | Artisan 2 on sale until April 30th Buy Now

[Plugin] #SelectionHideShow.rb v1.1

Scheduled Pinned Locked Moved Plugins
22 Posts 13 Posters 36.2k Views
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.
  • T Offline
    thomthom
    last edited by 4 Jun 2009, 10:16

    Maybe we could add this info to a new stickcy where we collect such useful tips and info?

    Thomas Thomassen β€” SketchUp Monkey & Coding addict
    List of my plugins and link to the CookieWare fund

    1 Reply Last reply Reply Quote 0
    • T Offline
      TIG Moderator
      last edited by 4 Jun 2009, 10:58

      Thanks Alex - you've probably noticed I used the .is_a? test everywhere else in the script - however, I didn't realise it was so much slower to use typename=="". 😳
      I've also incorporated my own version of your group_miner speed-up suggestion that now avoids testing groups that area already unique... πŸ€“

      I just need to edit ALL of my other scripts to change e.typename=="" to e.is_a?() !!! 😒

      Here's v1.1 http://forums.sketchucation.com/viewtopic.php?p=161963#p161963

      TIG

      1 Reply Last reply Reply Quote 0
      • A Offline
        AlexMozg
        last edited by 5 Jun 2009, 21:34

        @tig said:

        ...I didn't realise it was so much slower to use typename=="". 😳
        .....

        For a model ot a few kilobytes to 10 megabyte of substantial difference it is not, but my models ot 40 to 75 megabyte!


        My model statistics:

        @unknownuser said:

        Model 68.4 Mb:
        Edges 485016
        Faces 128906
        Component Instances 6055
        Groups 3078
        Section Planes 4

        P.S.
        It was even necessary to write the analogue of SketchUp Text tool, because a standard tool begins to work very long.
        πŸ˜’

        1 Reply Last reply Reply Quote 0
        • B Offline
          bianhai
          last edited by 8 Jun 2009, 03:25

          Very good 😎 !

          1 Reply Last reply Reply Quote 0
          • T Offline
            thomthom
            last edited by 20 Jun 2009, 13:20

            @alexmozg said:

            @chris fullmer said:

            Alex, I have not run any tests on typename, but I use it regularly. Are you saying that it is much slower than .is_a?
            Chris

            Easily to check...
            The more elements in the model - the better results script.

            @unknownuser said:

            SpeedTest
            is_a? - 0.36c
            kind_of? - 0.39c
            class - 0.422c
            typename - 1.313c

            Model Statistics:
            edges = 48981
            faces = 8009
            groups = 729
            components = 365
            construction_lines = 1
            construction_points = 4
            images = 3
            section_planes = 4
            texts = 4
            others = 2

            Hmm... .kind_of? is an alias for .is_a? - Is that fraction of a differences just some other random outside co-incidence?
            http://www.ruby-doc.org/core/classes/Object.html#M000370

            Thomas Thomassen β€” SketchUp Monkey & Coding addict
            List of my plugins and link to the CookieWare fund

            1 Reply Last reply Reply Quote 0
            • T Offline
              thomthom
              last edited by 22 Jun 2009, 11:11

              I did a somewhat larger test. By the looks of it .is_a?, .kind_of? and .class are pretty much the same. I take the differences due to other system factors at the time of execution.

              AT - SpeedTest:
              is_a? - 0.89c
              kind_of? - 0.782c
              class - 0.875c
              typename - 2.297c

              Model Statistics:
              edges = 159630
              faces = 61300
              groups = 0
              components = 1000
              construction_lines = 0
              construction_points = 0
              images = 0
              section_planes = 0
              texts = 0
              others = 0

              Thomas Thomassen β€” SketchUp Monkey & Coding addict
              List of my plugins and link to the CookieWare fund

              1 Reply Last reply Reply Quote 0
              • T Offline
                thomthom
                last edited by 22 Jun 2009, 11:51

                Much larger test. (did have a few programs open while I did the tests.)

                AT - SpeedTest:
                is_a? - 16.297c
                kind_of? - 16.141c
                class - 18.703c
                typename - 88.703c

                Model Statistics:
                edges = 8396595
                faces = 1026520
                groups = 52643
                components = 526428
                construction_lines = 2
                construction_points = 4
                images = 0
                section_planes = 0
                texts = 0
                others = 0

                Thomas Thomassen β€” SketchUp Monkey & Coding addict
                List of my plugins and link to the CookieWare fund

                1 Reply Last reply Reply Quote 0
                • 3 Offline
                  3dsmax9
                  last edited by 28 Jul 2011, 16:19

                  a tool bar will be very great with this script

                  1 Reply Last reply Reply Quote 0
                  • irwanwrI Offline
                    irwanwr
                    last edited by 24 Dec 2011, 10:36

                    i think i need this plugin
                    thank you in advance, sir.

                    1 Reply Last reply Reply Quote 0
                    • I Offline
                      Ivancho
                      last edited by 15 Mar 2013, 11:06

                      [highlight=#ffff40:2a81c421]NICE[/highlight:2a81c421]!! 😍

                      1 Reply Last reply Reply Quote 0
                      • H Offline
                        hygicell
                        last edited by 10 Sept 2013, 07:49

                        I have lost a component somewhere in my drawing
                        to find it, I pasted a second one in a visible place
                        when I select this, the entity info clearly says Component (2 in model)
                        with the components window context menu, I selected all components
                        I thought then, if I could hide the rest of the model, I would easily spot where the original one is
                        but view/hide rest of model doesn't work unless you are inside the component,
                        which means you can select only one of both, and the other one is deselected
                        please help
                        Frank

                        1 Reply Last reply Reply Quote 0
                        • T Offline
                          TIG Moderator
                          last edited by 11 Sept 2013, 10:44

                          View > Hidden Geometry ON will show all hidden objects.
                          If it's on a Layer that is OFF you won't see it though...
                          The Outliner will also show all instances that are on ON Layers...
                          You can select them in the Outliner and they select in the model.

                          TIG

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

                          Advertisement