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

Merge to meshes to together #142

Open petrasvestartas opened 4 years ago

petrasvestartas commented 4 years ago

Hi,

I have a simple question about merging multiple meshes together. I use g3.DMesh3(); as a point list container.

If I have two meshes with already some vertices inside: var mesh0 = g3.DMesh3(); var mesh1 = g3.DMesh3();

how can I add mesh1 to mesh0. Essentially I'm just searching how to add vertices from one mesh to the other. If possible without looping.

rms80 commented 4 years ago

It's not possible to do without looping because internally DMesh3 uses blocked storage, you have to append one-by-one. MeshEditor.Append() is the simplest way.