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

Face: concave vs convex

Scheduled Pinned Locked Moved Developers' Forum
10 Posts 6 Posters 1.8k 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.
  • B Offline
    bomastudio
    last edited by 29 Jan 2011, 13:58

    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 29 Jan 2011, 16:12

      That's painful.

      Look for a convex hull algorithm.

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

        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
        • B Offline
          bomastudio
          last edited by 30 Jan 2011, 17:25

          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
          • T Offline
            thomthom
            last edited by 30 Jan 2011, 17:42

            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
            • B Offline
              bomastudio
              last edited by 31 Jan 2011, 11:37

              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
              • C Offline
                Chris Fullmer
                last edited by 31 Jan 2011, 15:42

                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
                • T Offline
                  thomthom
                  last edited by 31 Jan 2011, 15:53

                  @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
                  • D Offline
                    Didier Bur
                    last edited by 31 Jan 2011, 16:03

                    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
                    • J Offline
                      jason_maranto
                      last edited by 31 Jan 2011, 18:15

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

                      Advertisement