meshpro / optimesh

:spider_web: Mesh optimization, mesh smoothing.
575 stars 56 forks source link

Mesh smoothing without edge flips? #58

Closed lemmih closed 4 years ago

lemmih commented 4 years ago

Hi, I'm trying to smooth a compatibly triangulated mesh which means edge flips aren't valid. Is it possible to use optimesh to do smoothing without edge flips? Thanks.

nschloe commented 4 years ago

If your triangulation is compatible, how is edge flipping a problem? In general, optimization doesn't make much sense without flipping. That's because, if two nodes aren't connected by an edge, they don't "know" about each other, so they might get very close, leading to a bad-quality mesh.

lemmih commented 4 years ago

I shouldn't have used the word 'valid'. The edge flips are valid but without looking at both meshes at the same time, edge flips tend to ruin the min-angles of the mesh you're not looking at.

Ideally I'd do one pass of smoothing for both meshes, then flip those edges that improve min-angles in both meshes, then go back to smoothing and repeat.

nschloe commented 4 years ago

I don't understand. What are "both" meshes?

lemmih commented 4 years ago

I have two meshes with the same number of points. The location of the points may differ but the edges are the same in the two meshes. Ie. they have been compatibly triangulated. If I flip an edge in one of the meshes, I'll have to flip it in the other as well. My goal is to smooth these two meshes without breaking the invariant.

nschloe commented 4 years ago

Aha. Okay, this is going to be difficult. optimesh might not be the right tool for the task. Like I said, optimization without flips is really no optimization at all, it leads to bad meshes.

lemmih commented 4 years ago

Okay, thanks.