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

    Loop returns non-planar vertices?

    Scheduled Pinned Locked Moved Developers' Forum
    14 Posts 5 Posters 628 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.
    • thomthomT Offline
      thomthom
      last edited by

      @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
      • TIGT Offline
        TIG Moderator
        last edited by

        @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
        • thomthomT Offline
          thomthom
          last edited by

          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
          • TIGT Offline
            TIG Moderator
            last edited by

            @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
            • thomthomT Offline
              thomthom
              last edited by

              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
              • TIGT Offline
                TIG Moderator
                last edited by

                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
                • Chris FullmerC Offline
                  Chris Fullmer
                  last edited by

                  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

                    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
                    • Chris FullmerC Offline
                      Chris Fullmer
                      last edited by

                      @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
                      • thomthomT Offline
                        thomthom
                        last edited by

                        @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
                        • Rich O BrienR Online
                          Rich O Brien Moderator
                          last edited by

                          Phone a friend?

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

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

                            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
                            • First post
                              Last post
                            Buy SketchPlus
                            Buy SUbD
                            Buy WrapR
                            Buy eBook
                            Buy Modelur
                            Buy Vertex Tools
                            Buy SketchCuisine
                            Buy FormFonts

                            Advertisement