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

Loop returns non-planar vertices?

Scheduled Pinned Locked Moved Developers' Forum
14 Posts 5 Posters 623 Views 5 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.
  • T Online
    TIG Moderator
    last edited by 25 Jan 2011, 15:19

    It's not possible!

    However if the accuracy that is used to allow vertices to have one face and the accuracy used to test for planarity are different then it is possible to get an error.

    If you take your 'non-planar' vertices and use their points to make a face is it successful? or is this where the error arises??

    TIG

    1 Reply Last reply Reply Quote 0
    • T Offline
      thomthom
      last edited by 25 Jan 2011, 15:49

      @tig said:

      It's not possible!

      That's what I was thinking - but yet it happens. The error points to my line which is:
      g.entities.add_face( face.outer_loop.vertices )

      And it makes no difference if I convert the vertices to points first.... x_X

      I'll try to find which face is doing this. Maybe it's a face that's very small, or very thin which throws off SU's calculations...

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

      1 Reply Last reply Reply Quote 0
      • T Online
        TIG Moderator
        last edited by 25 Jan 2011, 15:54

        @thomthom said:

        @tig said:

        It's not possible!

        That's what I was thinking - but yet it happens. The error points to my line which is:
        g.entities.add_face( face.outer_loop.vertices )
        And it makes no difference if I convert the vertices to points first.... x_X
        I'll try to find which face is doing this. Maybe it's a face that's very small, or very thin which throws off SU's calculations...

        Can you pass an array of vertices to entities.add_face() ?
        The API says

        * entities.add_face(edge1, edge2, edge3, ...) * entities.add_face(edge_array) * entities.add_face(pt1, pt2, pt3, ...) * entities.add_face([pt1, pt2, pt3,...]) * entities.add_face(curve)
        BUT no mention of vertices ? As converting them to a points_array first doesn't work anyway...then it's just weird πŸ˜•

        TIG

        1 Reply Last reply Reply Quote 0
        • T Offline
          thomthom
          last edited by 25 Jan 2011, 15:57

          Yea - the API doesn't mention a lot of things. Most method that accepts Point3d object also accept Vertex objects. (And it is quicker to skip the conversion of vertices to point3d if you can)

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

          1 Reply Last reply Reply Quote 0
          • T Online
            TIG Moderator
            last edited by 25 Jan 2011, 16:02

            @thomthom said:

            Yea - the API doesn't mention a lot of things. Most method that accepts Point3d object also accept Vertex objects. (And it is quicker to skip the conversion of vertices to point3d if you can)
            Good to know... πŸ˜„

            TIG

            1 Reply Last reply Reply Quote 0
            • T Offline
              thomthom
              last edited by 25 Jan 2011, 16:15

              What cute tiny face! 0m2

              COPLANAR ERROR [#<Sketchup::Vertex:0xc4a7d68>, #<Sketchup::Vertex:0xc4a7d04>, #<Sketchup::Vertex:0xc4a7cf0>] [Point3d(5433.47, 5026.38, 0), Point3d(5433.46, 5026.38, 0), Point3d(5433.47, 5026.38, 0)] Error: #<ArgumentError: Points are not planar>

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

              1 Reply Last reply Reply Quote 0
              • T Online
                TIG Moderator
                last edited by 25 Jan 2011, 16:22

                Can you trap it by getting face.loop.edges and if edge.length < ???? then you transform one edge.vertices[0] position to be edge.vertices[1] position... so the very short edge 'heals up' - your face then 'disappears' if its a triangle!

                TIG

                1 Reply Last reply Reply Quote 0
                • C Offline
                  Chris Fullmer
                  last edited by 25 Jan 2011, 16:28

                  Please do not enclose your text in the "Flash" tags (that will not make your text flash or blink...). Please do not type in all caps. But please do keep asking questions. We're a pretty helpful group of people. Thanks!

                  Chris

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

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    Jim
                    last edited by 25 Jan 2011, 16:29

                    I think you can also get the non-planar message when points are co-linear (which is a sub-set of being co-planar?)

                    Hi

                    1 Reply Last reply Reply Quote 0
                    • C Offline
                      Chris Fullmer
                      last edited by 25 Jan 2011, 16:46

                      @unknownuser said:

                      Ooopps sorry chris! I will keep asking- thanks for letting me know.

                      Not a problem, thanks for working with us!

                      As for wondering if the problem has been solved yet, it looks like they are still actively working on solving it. Its been a busy topic this morning.

                      Chris

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

                      1 Reply Last reply Reply Quote 0
                      • T Offline
                        thomthom
                        last edited by 25 Jan 2011, 17:20

                        @unknownuser said:

                        EXCUSE ME: DID ANYONE FIGURE THIS OUT YET?

                        Yet? This topic started two and a half hour ago...

                        @unknownuser said:

                        PLEASE I ALSO HAVE THIS PROBLEM. IT IS HARD TO UNDERSTAND. PLEASE LET ME KNOW I NEED TO FIX IT TOO. THANK YOU.

                        The cause: http://forums.sketchucation.com/posting.php?mode=quote&f=180&p=303852#pr303848
                        The face I got the vertices from was very small. SU has problems then.
                        Do you have the same scenario? Are you trying to build a face from the loop vertices of another face? Or do you have another set of 3d points? Maybe your issue isn't source in the same issue as mine.

                        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
                          Rich O Brien Moderator
                          last edited by 25 Jan 2011, 20:14

                          Phone a friend?

                          Download the free D'oh Book for SketchUp πŸ“–

                          1 Reply Last reply Reply Quote 0
                          • C Offline
                            Chris Fullmer
                            last edited by 25 Jan 2011, 20:44

                            Hi Scott, the question you have is a bit different than the one being discussed here. You might just start a new topic asking the whole group your question - which seems to be specifically "How do I make a wing surface from a list of 3d points" or something along those lines. Your question is a bit burried here in this topic, and you will probably get more eyes seeing your dilema if you just made your own topic. Do you have any programming experience? Not that it matters, you can always learn, I just thought I'd ask.

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

                            1 Reply Last reply Reply Quote 0
                            • 1 / 1
                            1 / 1
                            • First post
                              11/14
                              Last post
                            Buy SketchPlus
                            Buy SUbD
                            Buy WrapR
                            Buy eBook
                            Buy Modelur
                            Buy Vertex Tools
                            Buy SketchCuisine
                            Buy FormFonts

                            Advertisement