sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    πŸ›£οΈ Road Profile Builder | Generate roads, curbs and pavements easily Download

    SOLVED by TIG - How can I select all vertical faces?

    Scheduled Pinned Locked Moved Plugins
    7 Posts 4 Posters 688 Views 4 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.
    • J Offline
      JGA
      last edited by JGA

      I have created a basic 3D model of an area, to show a new housing development in context.
      I would like a way to quickly select all vertical faces, so I can paint on a colour for walls, then pick all sloping faces to apply a roof material.
      I can't figure out a way to do tis with the default SKUP tools - is there a plugin available that can do the trick?
      I've tried ThomThoms Selection Tools (v.2.2), it can select almost everything but what I'm looking for!

      Regards,
      JGA

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

        These one-liners will do this kind of thing...
        Type or easier Copy+Paste into the Ruby Console +<enter>

        ALL vertical faces in selection

        s=Sketchup.active_model.selection;a=s.to_a;s.clear;a.grep(Sketchup;;Face).each{|f|s.add(f)if f.normal.z==0}
        

        ALL horizontal [up] faces in selection

        s=Sketchup.active_model.selection;a=s.to_a;s.clear;a.grep(Sketchup;;Face).each{|f|s.add(f)if f.normal.z==1}
        

        ALL sloping [up] faces in selection

        s=Sketchup.active_model.selection;a=s.to_a;s.clear;a.grep(Sketchup;;Face).each{|f|s.add(f)if f.normal.z>0 && f.normal.z<1}
        

        To do it for all active_entities [no preselection].
        ALL vertical faces in active_entities

        m=Sketchup.active_model;s=m.selection;s.clear;m.active_entities.grep(Sketchup;;Face).each{|f|s.add(f)if f.normal.z==0}
        

        ALL horizontal [up] faces in active_entities

        m=Sketchup.active_model;s=m.selection;s.clear;m.active_entities.grep(Sketchup;;Face).each{|f|s.add(f)if f.normal.z==1}
        

        ALL sloping [up] faces in active_entities

        m=Sketchup.active_model;s=m.selection;s.clear;m.active_entities.grep(Sketchup;;Face).each{|f|s.add(f)if f.normal.z>0 && f.normal.z<1}
        

        TIG

        1 Reply Last reply Reply Quote 0
        • J Offline
          JGA
          last edited by

          TIG,
          Thanks very much.
          I've just tested them & all but one work perfectly. The "ALL sloping [up] faces in selection" doesn't pick up a slope in the selection, but the "ALL sloping [up] faces in active_entities" does.
          Thanks again.

          Regards,
          JGA

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

            @JGA

            There was a typo in the 'faulty' line of code.
            I've corrected it in the original post - if you want to re-get it...
            I typed all of those one-liners from memory, without any testing - so we were lucky that only one had a typo ! πŸ˜‰

            TIG

            1 Reply Last reply Reply Quote 0
            • J Offline
              JGA
              last edited by

              TIG,

              @unknownuser said:

              I typed all of those one-liners from memory, without any testing

              That's just showing off now... πŸ˜›
              Just tested - works perfectly, thanks again.

              Regards,
              JGA

              1 Reply Last reply Reply Quote 0
              • pilouP Offline
                pilou
                last edited by

                And you can blend these lines also with Inverse Selection by TIG! πŸ˜‰

                Frenchy Pilou
                Is beautiful that please without concept!
                My Little site :)

                1 Reply Last reply Reply Quote 0
                • hdpvH Offline
                  hdpv
                  last edited by

                  You can test my plugin
                  http://extensions.sketchup.com/en/content/s4u_selectool

                  Suforyou
                  http://www.sketchupforyou.com

                  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