geometry-central icon indicating copy to clipboard operation
geometry-central copied to clipboard

quadric error simplification should avoid creating triangular ravioli

Open lfyMeta opened this issue 3 years ago • 2 comments

Hi, I was running the quadric error simplification on meshes with multiple connected components and it aborts because it encounters degree 2 vertices in the interior (the face indexing { 0, 1, 2, 0, 2, 1 } situation). Should it just avoid getting into that situation in the first place, especially if we started with something that didn't have those?

lfyMeta avatar Nov 11 '22 00:11 lfyMeta

Are you saying that it throws an exception or something? Or just that the algorithm stops processing?

My initial instinct is that a {(0,1,2),(0,2,1)} mesh is an okay configuration. It's the smallest closed, manifold mesh. Generally geometry-central follows the policies of allowing these configurations even if they are slightly weird. If it's a big practical issue for you, I'd be happy to accept a PR with a flag to disallow such configurations.

nmwsharp avatar Nov 22 '22 17:11 nmwsharp

Probably both, but my main issue is that the quadric error simplification algorithm currently throws an exception in that case (because a vertex has degree 2); it’s in collapseEdgeTriangular()

I would actually be fine with processing the simplest closed manifold in my application but I’m not sure if that was also the intent of collapseEdgeTriangular()

lfyMeta avatar Nov 22 '22 19:11 lfyMeta