From 025bb960c049e1b4892b10d12fb43179e0483df1 Mon Sep 17 00:00:00 2001 From: EvilSpirit Date: Fri, 1 Sep 2017 00:42:50 +0700 Subject: [PATCH] Improve performance of mesh-forced assemblies. --- src/groupmesh.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/groupmesh.cpp b/src/groupmesh.cpp index 0321399..19fe18f 100644 --- a/src/groupmesh.cpp +++ b/src/groupmesh.cpp @@ -357,10 +357,14 @@ void Group::GenerateShellAndMesh() { // and corresponding slowdown. outm.RemoveDegenerateTriangles(); - // And make sure that the output mesh is vertex-to-vertex. - SKdNode *root = SKdNode::From(&outm); - root->SnapToMesh(&outm); - root->MakeMeshInto(&runningMesh); + if(srcg->meshCombine != CombineAs::ASSEMBLE) { + // And make sure that the output mesh is vertex-to-vertex. + SKdNode *root = SKdNode::From(&outm); + root->SnapToMesh(&outm); + root->MakeMeshInto(&runningMesh); + } else { + runningMesh.MakeFromCopyOf(&outm); + } outm.Clear(); thism.Clear();