haesleinhuepf / napari-process-points-and-surfaces

Process and analyze surfaces using vedo in napari.
BSD 3-Clause "New" or "Revised" License
21 stars 4 forks source link

Run remove_duplicate_vertices per default after marching cubes? #48

Closed haesleinhuepf closed 1 year ago

haesleinhuepf commented 1 year ago

I'm just wondering if it wouldn't make sense to clean surfaces directly after marching cubes in general. In one of our example notebooks we demonstrate how to use this function after marching cubes. However, if marching cubes always produces duplicate vertices, shouldn't we remove them per default?

haesleinhuepf commented 1 year ago

Hi @jo-mueller ,

do you have an opinion here?

Thanks! Robert

jo-mueller commented 1 year ago

Hi @haesleinhuepf ,

I have been pondering about this as well.

Pro: surplus vertices/Faces are an intrinsic problem of marching cubes and it would make sense to correct them routinely Con: Does not align with our policy of "one function - one job"

Maybe we can add an additional keyword clean_mesh() to the marching cubes function that is set to True by default? This would allow to leave things as they are and if someone does not want to use it, it's still possible.

haesleinhuepf commented 1 year ago

Ok, I'd say we do it (cleaning after marching cubes) and as long as nobody comes with a scenario where this is wrong, we also will not have a way for turning this behaviour off.

jo-mueller commented 1 year ago

Agreed.