From d4ecb9014534a88a2680bbfc874dd38a5ea5122f Mon Sep 17 00:00:00 2001 From: san Date: Wed, 2 Feb 2005 11:58:25 +0000 Subject: [PATCH] PAL6487 --- src/ShHealOper/ShHealOper_ShapeProcess.cxx | 25 +++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/ShHealOper/ShHealOper_ShapeProcess.cxx b/src/ShHealOper/ShHealOper_ShapeProcess.cxx index 56503fbb4..061d8811e 100644 --- a/src/ShHealOper/ShHealOper_ShapeProcess.cxx +++ b/src/ShHealOper/ShHealOper_ShapeProcess.cxx @@ -29,6 +29,13 @@ #include #include #include +#include +#include +#include +#include +#include +#include + //======================================================================= //function : ShHealOper_ShapeProcess() //purpose : Constructor @@ -73,11 +80,23 @@ void ShHealOper_ShapeProcess::Perform(const TopoDS_Shape& theOldShape, //ShapeProcessAPI_ApplySequence aOperations(myResource,myPrefix.ToCString()); //myDone = Standard_False; myOperations.ClearMap(); - - theNewShape = myOperations.PrepareShape(theOldShape,mySaveHistoryMode,myLevel); + ShapeAnalysis_ShapeTolerance aSatol; + Standard_Real ainitTol = aSatol.Tolerance(theOldShape,0); + + // PAL6487: san -- preserve the original shape from being modified + TopoDS_Shape anOldShape; + TColStd_IndexedDataMapOfTransientTransient aMap; + TNaming_CopyShape::CopyTool(theOldShape, aMap, anOldShape); + // PAL6487: san -- preserve the original shape from being modified + + theNewShape = myOperations.PrepareShape(anOldShape,mySaveHistoryMode,myLevel); if(mySaveHistoryMode) myMapModifications = myOperations.Map(); - myDone = !theOldShape.IsSame(theNewShape); + myDone = !anOldShape.IsSame(theNewShape); + if(!myDone) { + Standard_Real aendTol =aSatol.Tolerance(theNewShape,0); + myDone = (fabs(ainitTol - aendTol) > Precision::Confusion()); + } } //======================================================================= //function : SetOperators