Code Red => ARX Programming => Topic started by: It's Alive! on October 30, 2021, 07:36:52 PM

Title: Concave hull
Post by: It's Alive! on October 30, 2021, 07:36:52 PM
Its not perfect, must maybe useful down the line

concavity:  is a relative measure of concavity. 1 results in a relatively detailed shape, Infinity results in a convex hull. You can use values lower than 1, but they can produce pretty crazy shapes.
engthThreshold: when a segment length is under this threshold, it stops being considered for further detalization. Higher values result in simpler shapes.

I put it in the ArxBrxDelaunay project, I was thinking about using this to remove tin triangles that have edges that fall outside.. someday

Title: Re: Concave hull
Post by: MickD on October 31, 2021, 02:43:51 AM
Awesome stuff!
I wish I had the time, always wanted to build my own CSG (Constructive Solid Geometry) engine (like the ACIS modeler), a lot of the stuff you're doing is closely/directly related. I've dabbled and made a few starts with a bit of help from a book (will dig it out) and just dig a quick search and there's a lot more info out there now on the topic.
Good stuff, it's pretty heavy going math wise :)
Title: Re: Concave hull
Post by: It's Alive! on November 15, 2021, 05:20:53 AM
ArxBrxDelaunay2 should be much faster on larger point sets. I modified the code to use AcGePoint3d, so its no longer necessary to track the Z in a map.
I left both solutions attached.