DesignEngrLab / MIConvexHull

A .Net fast convex hull library for 2, 3, and higher dimensions.
http://designengrlab.github.io/MIConvexHull/
MIT License
341 stars 60 forks source link

Convex Hull result is not shown correctly #49

Closed xxxdomi closed 1 year ago

xxxdomi commented 1 year ago

Hello! :-)

Currently, I am making some experiments with your convex hull lib.

When I try your eifelturm sample, this works perfectly, as you can seen in the following pictures.

Orig image

Convex Hull image

If I try to simplify another CAD like this one (monkey head) below, it does not output the result that i am expect. What do you think - is it a problem of your algorithm, or is this probem somewhere else?

Orig: image

Convex Hull

image

Thanks in adavance, Dominik

suzanne.zip

massonib commented 1 year ago

Dominik, that is the correct convex hull. The issue is with your tessellation/viewer dropping triangles and perhaps not seeing it at the correct orientation. Here is an image of your part with the convex hull wrapped around it, created using TVLG (https://github.com/DesignEngrLab/TVGL), I should also mention that your model is not a proper tessellation and may cause some issues in TVGL and other such model tessellation manipulators.

image

image

micampbell commented 1 year ago

Thanks @massonib. The tessellation error should not affect the accuracy of the convex hull since convex hull only uses vertex information.