From 2f7a6bb61d992eb203101637ce97c02411afe16a Mon Sep 17 00:00:00 2001 From: Jonathan Westhues Date: Sat, 6 Jun 2009 00:21:03 -0800 Subject: [PATCH] Don't merge coincident surfaces when combining two shells as "assemble". And don't show "naked" (not occuring in anti-parallel pairs) edges when just testing for interference. [git-p4: depot-paths = "//depot/solvespace/": change = 1967] --- groupmesh.cpp | 13 ++++++++++--- solvespace.cpp | 4 ++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/groupmesh.cpp b/groupmesh.cpp index 25306d47..2bffa93e 100644 --- a/groupmesh.cpp +++ b/groupmesh.cpp @@ -168,7 +168,9 @@ void Group::GenerateShellAndMesh(void) { GenerateForStepAndRepeat (prev, toStep, &runningShell, src->meshCombine); - runningShell.MergeCoincidentSurfaces(); + if(meshCombine != COMBINE_AS_ASSEMBLE) { + runningShell.MergeCoincidentSurfaces(); + } } else { SMesh prevm, stepm; ZERO(&prevm); @@ -288,7 +290,9 @@ void Group::GenerateShellAndMesh(void) { thisShell.RemapFaces(this, 0); } - thisShell.MergeCoincidentSurfaces(); + if(meshCombine != COMBINE_AS_ASSEMBLE) { + thisShell.MergeCoincidentSurfaces(); + } // So now we've got the mesh or shell for this group. Combine it with // the previous group's mesh or shell with the requested Boolean, and @@ -298,7 +302,10 @@ void Group::GenerateShellAndMesh(void) { if(pg->runningMesh.IsEmpty() && thisMesh.IsEmpty() && !forceToMesh) { SShell *prevs = &(pg->runningShell); GenerateForBoolean(prevs, &thisShell, &runningShell); - runningShell.MergeCoincidentSurfaces(); + + if(meshCombine != COMBINE_AS_ASSEMBLE) { + runningShell.MergeCoincidentSurfaces(); + } // If the Boolean failed, then we should note that in the text screen // for this group. diff --git a/solvespace.cpp b/solvespace.cpp index 59e2542a..67958e0e 100644 --- a/solvespace.cpp +++ b/solvespace.cpp @@ -466,6 +466,10 @@ void SolveSpace::MenuAnalyze(int id) { Error("%d edges interfere with other triangles, bad.", SS.nakedEdges.l.n); } else { + // MakeCertainEdgesInto also reports "naked" edges, which + // will include some types of coincident geometry that are + // not errors. + SS.nakedEdges.Clear(); Message("The assembly does not interfere, good."); } break;