sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Front face vs back face

    Scheduled Pinned Locked Moved Developers' Forum
    10 Posts 6 Posters 466 Views 6 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.
    • thomthomT Offline
      thomthom
      last edited by

      was there some rule about the order of the vertices that determined the orientation of front vs back?

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

      1 Reply Last reply Reply Quote 0
      • R Offline
        remus
        last edited by

        I have a vague recollection of it being bogus, although that might be my imagination.

        http://remusrendering.wordpress.com/

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

          I believe TIG posted an explanation of this recently. I forgot what the thread was about though.

          Chris

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

          1 Reply Last reply Reply Quote 0
          • W Offline
            Whaat
            last edited by

            From my recollection:
            face.outer_loop.vertices will give you the vertices in counter-clockwise order wrt to the front side of the face
            face.vertices will give you vertices in no particular order

            SketchUp Plugins for Professionals

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

              face.outer_loop.vertices ### is a counter-clockwise collection...

              loops=face.loop-[face.outer_loop] ### other internal loops...

              loops.each{|loop|verts=loop.vertices} ### each of these 'verts' collections is clockwise...

              TIG

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

                So if the vertices are added clockwise vs counter-clockwise affects front vs back when you create faces?

                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
                  tomasz
                  last edited by

                  @thomthom said:

                  So if the vertices are added clockwise vs counter-clockwise affects front vs back when you create faces?

                  In SU there is right hand rule used. If the normal of a face is pointing towards you, the vertices has to go counter-clockwise.

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

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

                    "Towards you"? Where does one assume "you" are located? I take it it's related to the global axes?

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

                    1 Reply Last reply Reply Quote 0
                    • W Offline
                      Whaat
                      last edited by

                      @thomthom said:

                      "Towards you"? Where does one assume "you" are located? I take it it's related to the global axes?

                      'You' being on the side of the face pointed at by the front face normal. Global axis is irrelevant.

                      SketchUp Plugins for Professionals

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

                        The right-hand rule: imagine holding the face's normal vector [axis' if you will] in your right-hand, with you thumb pointing in the + direction. Your fingers will curl counter-clockwise.

                        That rule applies to a face's outer_loop's vertices array.
                        It also applies to rotations etc about an axis etc...

                        It's opposite for any inner_loops vertices array - i.e. clockwise.

                        It doesn't matter which direction/order the face's edges were originally drawn: an array of the loop's vertices is always returned ordered in that particular way - ccw or cw.

                        The vertices' order does affect the face's normal when drawing faces: however, SUp does seem to have that overriding rule to draw a face with its normal pointing down IF the face's Z=0 !!!

                        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