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!
    πŸ«› Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download

    Face: concave vs convex

    Scheduled Pinned Locked Moved Developers' Forum
    10 Posts 6 Posters 1.9k 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.
    • bomastudioB Offline
      bomastudio
      last edited by

      Any method in the API to convert a concave face into a convex one?

      http://dl.dropbox.com/u/18236667/concave_vs_convex.jpg

      If no I suppose to operate as follow:

      for each vertex of my face
      draw lines to the other vertices fo my face

      I get a "web".

      http://dl.dropbox.com/u/18236667/web.png

      Now I need to create a face (for example with the sandbox "from contour").

      http://dl.dropbox.com/u/18236667/sandbox.png

      Then I clean the coplanar face make it my convex face.....

      http://dl.dropbox.com/u/18236667/convex.png

      1 Reply Last reply Reply Quote 0
      • T Offline
        todd burch
        last edited by

        That's painful.

        Look for a convex hull algorithm.

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

          I got a 2d convex hull method in my TT_Lib

          Check out this thread: http://forums.sketchucation.com/viewtopic.php?f=180&t=34306&start=15#p302805

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

          1 Reply Last reply Reply Quote 0
          • bomastudioB Offline
            bomastudio
            last edited by

            thomthom thanks a lot for the suggestion!!!!!

            A question: but how many hours you sleep per day? U are an endless source of code!!!!! 😍 😍 😍 😍

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

              I occasionally sleep... πŸ˜•

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

              1 Reply Last reply Reply Quote 0
              • bomastudioB Offline
                bomastudio
                last edited by

                it's (of course) works. Thanx U... 😍 😍
                Now, with reference to my procedure any ideas how I can replicate with a ruby the "from contour" of the SANDBOX?

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

                  The name of that process is delauney triangulation. You can find the math and process of it on the internet, just do a Google Search. That being said, I tried to make it once myself and never quite understood the math notation, so hopefully you have a little bit of math background.

                  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

                    @chris fullmer said:

                    That being said, I tried to make it once myself and never quite understood the math notation, so hopefully you have a little bit of math background.

                    I never understand the math notations either. But often one can find an implementation in another language or pseudo code. The convex hull code I used in TT_Lib was based on pseudo code in a book I found. I have node idea of how the math fully works, but I managed to translate the pseudo code to ruby.

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

                    1 Reply Last reply Reply Quote 0
                    • Didier BurD Offline
                      Didier Bur
                      last edited by

                      Hi,
                      Delaunay in Ruby is here: http://rhin.crai.archi.fr/rld/plugin_details.php?id=292
                      Download the required file 'delaunay2.rb', I used this file (credits to P. Bourke and C. FalΓ©) for my points_cloud_triangulation script.
                      Hope this helps,

                      DB

                      1 Reply Last reply Reply Quote 0
                      • jason_marantoJ Offline
                        jason_maranto
                        last edited by

                        You can also find TIG's update of the Delaunay ruby here -- though I don't think the changes have anything to do with the math:

                        http://forums.sketchucation.com/viewtopic.php?f=323&t=34232

                        Best,
                        Jason.

                        I create video tutorial series about several 2D & 3D graphics programs.

                        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