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

    Reverse Face if side clicked on is the back.

    Scheduled Pinned Locked Moved Developers' Forum
    5 Posts 3 Posters 195 Views 3 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.
    • B Offline
      byrnebm
      last edited by

      Does anyone know how I could programmatically check what side of a face I have clicked on and if it is the back side of a face it gets reversed? So basically I click on a number of faces and for the ones that I have clicked on the back side of, they get flipped. Thanks

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

        @byrnebm said:

        Does anyone know how I could programmatically check what side of a face I have clicked on and if it is the back side of a face it gets reversed? So basically I click on a number of faces and for the ones that I have clicked on the back side of, they get flipped. Thanks

        There are already several 'reverse face' tools from which you can glean info...
        Of course if they are connected the built-in 'orient' will endure they all flip to match a selected correctly facing one without any selection needed.
        However, specific to your question - the only 'trick' I can think of would be to get the picked face.normal and if the angle between that and the vector from the picked 3d point to the model.active_view.camera.eye is more that 90 degrees you have probably clicked on the back face, so it's to flip... You have to 'flip as you pick' because the angle will change as the user orbits.
        If you want to preselect faces then those with faces > 90 degrees normal/eye-vector angles will be flipped BUT this relies on the camera position at the moment the tool activates...

        TIG

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

          See this http://forums.sketchucation.com/viewtopic.php?p=357136#p357136

          TIG

          1 Reply Last reply Reply Quote 0
          • T Offline
            tomasz
            last edited by

            @tig said:

            See this http://forums.sketchucation.com/viewtopic.php?p=357136#p357136

            or FrontFace.

            Author of [Thea Render for SketchUp](http://www.thearender.com/sketchup)

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

              @unknownuser said:

              @tig said:

              See this http://forums.sketchucation.com/viewtopic.php?p=357136#p357136

              or FrontFace.

              Sorry Tomasz - I had overlooked your similar tool - there are indeed lots to choose from 😉

              TIG

              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