X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_BodyBuilder.cpp;fp=src%2FModel%2FModel_BodyBuilder.cpp;h=9a9fc1454bc590d2d3dafc32b93fd038a2a93fab;hb=c8c7a421b7640fa35bcb024244a82a86fbb20f8d;hp=d397d0a9b3f4176d8a862af9d6d89d1b81a4c46e;hpb=b1885170db797c5af476c74cdc0aacf034331024;p=modules%2Fshaper.git diff --git a/src/Model/Model_BodyBuilder.cpp b/src/Model/Model_BodyBuilder.cpp index d397d0a9b..9a9fc1454 100644 --- a/src/Model/Model_BodyBuilder.cpp +++ b/src/Model/Model_BodyBuilder.cpp @@ -626,7 +626,8 @@ void Model_BodyBuilder::loadModifiedShapes(const GeomMakeShapePtr& theAlgo, { GeomShapePtr aResultShape = shape(); GeomShapePtr aShapeToExplore = theOldShape; - if (theAlgo->isNewShapesCollected(theOldShape, theShapeTypeToExplore)) { + bool isAlgoHistoryCollected = theAlgo->isNewShapesCollected(theOldShape, theShapeTypeToExplore); + if (isAlgoHistoryCollected) { // use optimized set of old shapes for this GeomShapePtr aCompound = theAlgo->oldShapesForNew(theOldShape, aResultShape, @@ -664,7 +665,12 @@ void Model_BodyBuilder::loadModifiedShapes(const GeomMakeShapePtr& theAlgo, // Get new shapes. ListOfShape aNewShapes; - theAlgo->modified(anOldSubShape, aNewShapes); + if (isAlgoHistoryCollected) { + theAlgo->modifiedCached(anOldSubShape, aNewShapes); + } + else { + theAlgo->modified(anOldSubShape, aNewShapes); + } for (ListOfShape::const_iterator aNewShapesIt = aNewShapes.cbegin(); aNewShapesIt != aNewShapes.cend(); ++aNewShapesIt)