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

    [REQ] Select all connected faces with same orientation

    Scheduled Pinned Locked Moved Plugins
    11 Posts 4 Posters 1.2k 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.
    • PixeroP Offline
      Pixero
      last edited by

      Is it possible to select all connected faces with same orientation?
      Either, you select one face with the desired orientation, (Front/Back) and run the script and the script selects all faces connected with the same orientation.
      Or, you choose the plugin and triple click on a face (which selects all connected) and the script unselects all faces that don't have the same orientation as the first clicked one.
      Am I making any sense?
      Usage would be to speed up face reversing.

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        Selection toys
        Right Click -> Select -> Connected Coplanar Faces

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

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          hmmm... you didn't mean for coplanar faces, did you?

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

          1 Reply Last reply Reply Quote 0
          • PixeroP Offline
            Pixero
            last edited by

            Not coplanar. I mean connected faces that are the same, frontside or backside.
            So the tool would select all connected faces that have the "same"* normal direction as the first selected face.

            • Same, meaning either the font or back side.

            Sorry for beeing a bit vague. I hope it's a bit clearer now.

            1 Reply Last reply Reply Quote 0
            • thomthomT Offline
              thomthom
              last edited by

              Can one assume that each edge only connects to max 2 faces?

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

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

                This one liner will do it, but you might want to check that f is a face?

                m=Sketchup.active_model;s=m.selection;f=s[0];a=[f];f.all_connected.each{|e|a<<e if e.class==Sketchup;;Face and e.normal==f.normal};s.clear;s.add(a)
                

                TIG

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

                  @unknownuser said:

                  Is it possible to select all connected faces with same orientation?

                  or not connected will be very fine โ˜€
                  Asked for a while, but seems that is not very easy to make!
                  All existing plugs give partial result ๐Ÿ˜ฎ

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

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

                    For all faces with same normal try this (again you can add a check etc that f is a face)

                    m=Sketchup.active_model;s=m.selection;f=s[0];a=[f];m.active_entities.to_a.each{|e|a<<e if e.class==Sketchup;;Face and e.normal==f.normal};s.clear;s.add(a)
                    

                    ๐Ÿ˜‰

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • thomthomT Offline
                      thomthom
                      last edited by

                      My impression was a selection tools more in the way that Orient Faces works out how faces in a surface is oriented. (Sans the actual orienting.)

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

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

                        If you want to check/match face 'orientations' rather than the faces' 'normals' there are always the methods used in my orient_faces.rb - that mimics the built in 'orient' other faces tool for a face. The test to reverse faces uses the edge-reversed-in-face etc, that returns a certain way if the pairs of faces are oriented [in]consistently... It only works with two faces per edge as three means one is always 'wrong'... ๐Ÿ˜’
                        Here is the fileorient_faces.rb

                        TIG

                        1 Reply Last reply Reply Quote 0
                        • PixeroP Offline
                          Pixero
                          last edited by

                          @thomthom said:

                          My impression was a selection tools more in the way that Orient Faces works out how faces in a surface is oriented. (Sans the actual orienting.)

                          Yes that was what I was thinking also.

                          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