Face: concave vs convex
-
Any method in the API to convert a concave face into a convex one?
If no I suppose to operate as follow:
for each vertex of my face
draw lines to the other vertices fo my faceI get a "web".
Now I need to create a face (for example with the sandbox "from contour").
Then I clean the coplanar face make it my convex face.....
-
That's painful.
Look for a convex hull algorithm.
-
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
-
thomthom thanks a lot for the suggestion!!!!!
A question: but how many hours you sleep per day? U are an endless source of code!!!!!
-
I occasionally sleep...
-
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? -
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.
-
@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.
-
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, -
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.
Advertisement