sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    πŸ›£οΈ Road Profile Builder | Generate roads, curbs and pavements easily Download

    Triangulation and Convex Polygons

    Scheduled Pinned Locked Moved Plugins
    25 Posts 7 Posters 1.0k Views 7 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

      what if... for each face with a hole in it one edge is drawn from the inner loop to the outer loop? (Even here there are cases where it could be difficult to do by script - for instance if there are multiple holes in the face.)

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

      1 Reply Last reply Reply Quote 0
      • M Offline
        mrapsouthern
        last edited by

        Got a solution in theory...

        What I need is a plugin that will allow me to select a face with one (or multiple) holes in it and then divide that face in some way so that there would be multiple faces without holes.

        i.e. for each hole in a face you only need to add two lines to split the face with 1 hole into 2 faces without holes.

        Similarly,
        a face with 2 holes requires 4 dividing lines and results in 3 faces with no holes.
        a face with 3 holes requires 6 dividing lines and results in 4 faces with no holes.
        a face with 4 holes requires 8 dividing lines and results in 5 faces with no holes.

        This solution would mean you can represent a complex geometry with holes without splitting the whole model into triangles.

        Is there anything already out there?

        Thanks
        Alex

        1 Reply Last reply Reply Quote 0
        • M Offline
          MattC
          last edited by

          Thomthom's idea should work great in case there is only one hole in a face, and if You make more vertices on the outside loop. The problem with 'spiky' triangles is that You have only 4 vertices to which the edges are drawn.

          Assume that You have two sets of points:
          [inner_vertices]
          [outer_vertices] - for example 25 points per rectangle side

          For every point from [inner_vertices] find closest point from [outer_vertices] and draw an edge between those two.

          (Possible problem) when two outer points have the same distance to inner point. Which point to choose ?

          Cheers
          Matt

          1 Reply Last reply Reply Quote 0
          • pilouP Offline
            pilou
            last edited by

            Can you post an image with result wished ?

            Frenchy Pilou
            Is beautiful that please without concept!
            My Little site :)

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

              I was thinking one edge from inner to outer was enough - in order to reduce the number of faces.

              But thinking of it more, ultimately everything breaks down to triangles, so if you have a polygonal face in SU - internally it'll be made up of many triangles. The same thing goes for any other software. So converting a face into it's internal triangles doesn't really make the model heavier - in terms of total number of triangles the graphic card needs to draw.

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

              1 Reply Last reply Reply Quote 0
              • pilouP Offline
                pilou
                last edited by

                Better to make a retoplogy in 3D party ?

                Frenchy Pilou
                Is beautiful that please without concept!
                My Little site :)

                1 Reply Last reply Reply Quote 0
                • M Offline
                  mrapsouthern
                  last edited by

                  Hi,

                  To update my previous post -

                  Any 1 face with ANY number of holes can be divided into 2 faces with no holes.

                  where the number of required dividing lines is defined by,

                  NumDividingLines = NumHoles + 1

                  please see the following diagram as illustration.

                  http://dl.dropbox.com/u/22511393/tmp3.png

                  Alex

                  1 Reply Last reply Reply Quote 0
                  • gullfoG Offline
                    gullfo
                    last edited by

                    slightly off-topic:
                    http://gamma.cs.unc.edu/propagation/main.pdf
                    http://sketchucation.com/forums/viewtopic.php?t=36063

                    Glenn

                    http://www.runnel.com

                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      mrapsouthern
                      last edited by

                      @gullfo said:

                      slightly off-topic:
                      http://gamma.cs.unc.edu/propagation/main.pdf
                      http://sketchucation.com/forums/viewtopic.php?t=36063

                      It is off topic - but I am very familiar with that work - it's quite a coincidence you posted it....

                      1 Reply Last reply Reply Quote 0
                      • gullfoG Offline
                        gullfo
                        last edited by

                        @mrapsouthern said:

                        http://dl.dropbox.com/u/22511393/tmp3.png

                        does the SU-Catt converter then create the correct output?

                        Glenn

                        http://www.runnel.com

                        1 Reply Last reply Reply Quote 0
                        • gullfoG Offline
                          gullfo
                          last edited by

                          @mrapsouthern said:

                          It is off topic - but I am very familiar with that work - it's quite a coincidence you posted it....

                          i'm trying to re-work Jonathan's SU-ABEC to use ABEC 2.0 but it's tough because their model shifted a lot... http://www.jonsh.net/blog/?page_id=197

                          Glenn

                          http://www.runnel.com

                          1 Reply Last reply Reply Quote 0
                          • M Offline
                            mrapsouthern
                            last edited by

                            Glenn,

                            Small world. I know Jonathan well also. Have we met?

                            Anyway, Yes, if the faces with holes are partitioned as shown the output of SU2CATT is interpreted correctly.

                            Cheers
                            A.

                            1 Reply Last reply Reply Quote 0
                            • M Offline
                              mac1
                              last edited by

                              Will merging vertices help?
                              Your model reduced from 200+ to ~72


                              example_mac1_2.jpg

                              1 Reply Last reply Reply Quote 0
                              • M Offline
                                mrapsouthern
                                last edited by

                                Merging vertices looks like it helps for that case. I can't check it for multiple holes though right now. Thanks

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

                                Advertisement