gradientspace / geometry3Sharp

C# library for 2D/3D geometric computation, mesh algorithms, and so on. Boost license.
http://www.gradientspace.com
Boost Software License 1.0
1.71k stars 384 forks source link

Triangles cleanup [solved] #134

Open CBenghi opened 4 years ago

CBenghi commented 4 years ago

Hello there,

I'm much impressed with this work, I've found impressive surface fixing algorithms, but I could not identify anyone that could aim for the following on the co-planar areas of a mesh, is there one of your functions that does that?

Many thanks, Claudio

image

CBenghi commented 4 years ago

Hello again,

just to report that I've given it a try at implementing a re-mesher class that does this. I've not profiled the performance at all, but I've got somewhere and I can achieve the following:

image

The code inherits from MeshRefinerBase and I reused as much as I could from your approach.

The commit is available at: 849a569535c214a557a59722faecabd7a4e22b2e for the library code and at https://github.com/CBenghi/geometry3SharpDemos/commit/214dd08c33c2df4469de3e6d86bc217eb45a1dce if you want to have a look at the sample code and associated models.

If you are interested I'll make any changes you ask and prepare a PR.

I fully expect that this could be achieved with a couple of lines in your existing classes, but I had a blast at doing geometry today.

Thanks for the amazing library.

48design commented 3 years ago

Your results shown here look really great! I tried your code but my results don't look as good as yours. Too bad.

CBenghi commented 3 years ago

@48design,

I've had to drop pursuing this project for a long while, but I'm hoping to pick it up again in the future as soon as I have some time available. If you want to send me some models to look at. I'll keep u posted when I manage to resume.

Best. Claudio