mkeeter / antimony

CAD from a parallel universe
2.09k stars 159 forks source link

Convex hull #79

Open angus-g opened 9 years ago

angus-g commented 9 years ago

I'm a fan of being able to generate a convex hull of multiple shapes. From what I can tell, this can't quite be replicated by CSG nodes at the moment.

AstraLuma commented 9 years ago

Discussed on the list. From @mkeeter:

Interesting question. There isn’t anything equivalent at the moment, because convex hulls fall into the category of “easy to do with b-reps, hard to do with implicit surfaces”.

If anyone has thoughts (or relevant research literature), I’d be interested in thinking more about this kind of operator.

Pupo1 commented 8 years ago

Perhaps the developers of Openscad might give a hint on how to do it?

AstraLuma commented 8 years ago

The internal representation used by Antimony (functional representation) makes this non-trivial, as discussed in #31.

tl;dr: Antimony doesn't actually know the shape of a model, it knows a function that happens to be at 0 in all the places the model is. This makes certain operations easier (CSG) and certain operations harder (offsets, hulls).

aurelw commented 7 years ago

Is it completely out of the question to introduce non-implicit surfaces for these kind of problems? Transform the functional representation into an SDF. SDF to convex hull is fairly straight forward.