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.72k stars 390 forks source link

hwo to merge duplicate vertices into single vertext. does it support? #91

Open Rabbit021 opened 5 years ago

Rabbit021 commented 5 years ago

hwo to merge duplicate vertices into single vertext. does it support?

CBenghi commented 4 years ago

Hello @Rabbit021,

I get some good results doing this with the MergeCoincidentEdges class.

Sometimes it does not remove all the vertices, because it tries to retain a manifold surface and windings, but if you apply that and then MeshRepairOrientation and then again you get good results.

You can get a look at the code I use here: https://github.com/CBenghi/geometry3SharpDemos/blob/4501c7800c8957a32f6045fb630c403c484fa94a/geometry3Test/test_MeshOps.cs#L86

I hope this helps, Claudio