mkeeter / antimony

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

[Q] About project #209

Closed trsh closed 4 years ago

trsh commented 4 years ago

What isosurface Extraction method are you using?

dcanelhas commented 4 years ago

I'm guessing it's marching tetrahedrons. But have a look at https://github.com/mkeeter/antimony/blob/develop/lib/fab/src/tree/triangulate/mesher.cpp if you're interested in the details.

mkeeter commented 4 years ago

This is marching tetrahedrons, plus the algorithm from "Feature Sensitive Surface Extraction from Volume Data" to drop an extra vertex on detected edges and vertices.

My more recent project, libfive, is using Manifold Dual Contouring, which is more advanced + robust, but still not perfect.

trsh commented 4 years ago

OK, Thank you for the info.

trsh commented 4 years ago

@mkeeter question, Why you don't use Dual Marching Cubes? The papers promise manifold surfaces and simplified mesh :)

https://www.cs.rice.edu/~jwarren/papers/dmc.pdf

mkeeter commented 4 years ago

I tried it, but it doesn't work as well as the paper implies. I've also tried "Isosurfaces Over Simplicial Partitions of Multiresolution Grids", which runs into similar issues. The root cause is that a straight line between two features on your model's surface isn't guaranteed to intersect that feature at all points along the line, so you end up with "crinkly" edges.

trsh commented 4 years ago

MKay! Good to know such info

trsh commented 4 years ago

@mkeeter you class is very popular along the internet https://github.com/mkeeter/kokopelli/blob/master/libfab/asdf/cms.c , as the only readable reference for the method CMS. Can you comment on the problems with that - why you dropped for your newer projects?

mkeeter commented 4 years ago

CMS is a weird, complicated algorithm – I implemented about half of it, and am still not sure if I got it totally right. The paper doesn't give enough information to fully reproduce it, e.g. a section which ends with:

We use a dynamic programming algorithm to connect and triangulate these two components to form the surface.

trsh commented 4 years ago

@mkeeter true. And the provided LibCMS is marked "will be available soon" since 2005 :D