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

    [Request] Force new face Front or Back ?

    Scheduled Pinned Locked Moved Plugins
    8 Posts 4 Posters 1.0k 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.
    • JClementsJ Offline
      JClements
      last edited by JClements

      Is there or could there be a script to force all new faces to be either Front or Back?

      I am tracing some old CAD imports and it would be convenient if the faces generated would always face one way. Hopefully, it would work with Makefaces.rb too.

      Thinking the script could ask user which face-direction they'd prefer for their default.

      John | Illustrator | Beaverton, Oregon

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

        here's another thing you could do; when your done tracing all your faces, right click a face, and click "orient faces". I don't know if anyone here could make a script like you're talking about, and I don't know if it could be possible.

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

          In your case the manual method is probably the quickest and best.

          There is my scripted additional method for 'face' - called 'orient_faces'. orient_faces.rb This tries to orient any faces connected to the given face... It can give unpredictable results if an edge is shared by several faces in 3D - just as the manual version - although strangely the weirdness is not always the same in the two versions - but then there's no 'right' orientation answer when several faces share an edge...

          If you put 'orient_faces.rb' into your plugins folder, then instead of manually orienting faces you can incorporate its methods into a wider ranging script, or just select a face and type something into the Ruby Console like

          face=Sketchup.active_model.selection[0];face.orient_faces
          

          All connected faces should flip to match the selected one... You can copy and paste the text command into the console to do multiple sets of faces if required...

          TIG

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

            TIg:

            Sorry for not responding sooner. Been swamped.

            Thanks for looking into this for me. Perhaps in the SU8 they'll have better code related to face normal control.

            John

            John | Illustrator | Beaverton, Oregon

            1 Reply Last reply Reply Quote 0
            • Chris FullmerC Offline
              Chris Fullmer
              last edited by

              John, what is still missing? Seems like what you wanted is do-able through either the ruby, or the built in tools. Maybe I missed what is going wrong?

              Chris

              Lately you've been tan, suspicious for the winter.
              All my Plugins I've written

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

                Hi Chris:

                Just the predicability issue mentioned above. I know there have been other postings which mentioned faces being flipped while executing a script and I believe it can happen at times when pasting in place too.

                I'm guessing there is a reason for this behavior in the core program (to facilitate the creation of faces during a push-pull?). But in situations like tracing cadd files it seems there should be a way to force face orientation to avoid unecessary reversing and/or orienting faces.

                John | Illustrator | Beaverton, Oregon

                1 Reply Last reply Reply Quote 0
                • Chris FullmerC Offline
                  Chris Fullmer
                  last edited by

                  I see, do you always trace files that are flat, plan view? Or are you tracing 3d files or anything? TIG's method should work to correct the problem after its happened, but I guess you just want it to not happen at all.

                  Lately you've been tan, suspicious for the winter.
                  All my Plugins I've written

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

                    Yup, I admit I am lazy, just don't want it to happen at all.

                    I do a lot plan and section tracing. They represent various interconnected concrete channels, tanks, flumes, wells, and the like. Not like a building where you have fixed floor heights, but a lot of intermediate elevations, with "zig-zagging", sloping channels. Tracing is far better faster than redrawing from a dimensioned plan or section (if you don't have to do a lot of cleanup) and is less prone to operator (me) error. :0

                    John | Illustrator | Beaverton, Oregon

                    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