From 8b7f45e72e2318c3f276def62446dfcaf9862faf Mon Sep 17 00:00:00 2001 From: Jonathan Westhues Date: Sun, 19 Jul 2009 13:30:09 -0800 Subject: [PATCH] That optimization where I display the previous group's mesh or shell when the current group has thisMesh and thisShell empty was broken, since rotate or step and repeat groups don't use those. So force something (doesn't matter what) into thisMesh or thisShell in a step and repeat group, to make sure it always gets recalculated and displayed. Ugly fix though. [git-p4: depot-paths = "//depot/solvespace/": change = 2017] --- groupmesh.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/groupmesh.cpp b/groupmesh.cpp index de717aa..ed24a42 100644 --- a/groupmesh.cpp +++ b/groupmesh.cpp @@ -167,6 +167,11 @@ void Group::GenerateShellAndMesh(void) { SShell *toStep = &(src->thisShell), *prev = &(pg->runningShell); + // This isn't used, but it makes sure the display and calculation + // of our shell doesn't get optimized out because it looks like + // we contribute no solid model. + thisShell.MakeFromCopyOf(toStep); + GenerateForStepAndRepeat (prev, toStep, &runningShell, src->meshCombine); if(meshCombine != COMBINE_AS_ASSEMBLE) { @@ -179,6 +184,8 @@ void Group::GenerateShellAndMesh(void) { prevm.MakeFromCopyOf(&(pg->runningMesh)); pg->runningShell.TriangulateInto(&prevm); + // Setting thisMesh for same reasons as thisShell above. + thisMesh.MakeFromCopyOf(&prevm); stepm.MakeFromCopyOf(&(src->thisMesh)); src->thisShell.TriangulateInto(&stepm);