From: azv Date: Tue, 23 Aug 2016 11:23:08 +0000 (+0300) Subject: Fixes for unit tests X-Git-Tag: V_2.5.0~137^2~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7f5dc7b3060b604deee464cde8bd1d25c4749699;p=modules%2Fshaper.git Fixes for unit tests --- diff --git a/src/FeaturesPlugin/Test/TestRecover.py b/src/FeaturesPlugin/Test/TestRecover.py index 867ecc32f..f3afa4106 100644 --- a/src/FeaturesPlugin/Test/TestRecover.py +++ b/src/FeaturesPlugin/Test/TestRecover.py @@ -15,10 +15,12 @@ mypart = model.addPart(mypartset).document() sk1 = model.addSketch(mypart, model.defaultPlane("XOY")) c1 = sk1.addCircle(0, 0, 100) +model.do() bigcyl = model.addExtrusion(mypart, sk1.selectFace(), 100) sk2 = model.addSketch(mypart, model.defaultPlane("XOY")) c2 = sk2.addCircle(20, 30, 30) +model.do() smallcyl = model.addExtrusion(mypart, sk2.selectFace(), 150) cut = model.addCut(mypart, bigcyl.result(), smallcyl.result()) @@ -48,6 +50,7 @@ recover = model.addRecover(mypart, cut, smallcyl.result(), True) assert(mypart.size("Bodies") == 2) sk3 = model.addSketch(mypart, model.defaultPlane("XOY")) c3 = sk3.addCircle(0, 0, 90) +model.do() big2 = model.addExtrusion(mypart, sk3.selectFace(), 110) cut2 = model.addCut(mypart, big2.result(), smallcyl.result()) diff --git a/src/SketchAPI/SketchAPI_Rotation.cpp b/src/SketchAPI/SketchAPI_Rotation.cpp index 1f7624e09..87f7e805b 100644 --- a/src/SketchAPI/SketchAPI_Rotation.cpp +++ b/src/SketchAPI/SketchAPI_Rotation.cpp @@ -33,7 +33,7 @@ SketchAPI_Rotation::SketchAPI_Rotation( fillAttribute(theNumberOfObjects, numberOfObjects()); fillAttribute(theFullValue ? "FullAngle" : "SingleAngle", valueType()); - execute(); + execute(true); } } diff --git a/src/SketchAPI/SketchAPI_Translation.cpp b/src/SketchAPI/SketchAPI_Translation.cpp index efa165087..4fff83bbe 100644 --- a/src/SketchAPI/SketchAPI_Translation.cpp +++ b/src/SketchAPI/SketchAPI_Translation.cpp @@ -33,7 +33,7 @@ SketchAPI_Translation::SketchAPI_Translation( fillAttribute(theNumberOfObjects, numberOfObjects()); fillAttribute(theFullValue ? "FullValue" : "SingleValue", valueType()); - execute(); + execute(true); } } diff --git a/src/SketchSolver/SketchSolver_ConstraintMirror.cpp b/src/SketchSolver/SketchSolver_ConstraintMirror.cpp index fdb181948..63867f1c3 100644 --- a/src/SketchSolver/SketchSolver_ConstraintMirror.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintMirror.cpp @@ -50,7 +50,7 @@ void SketchSolver_ConstraintMirror::getAttributes( } } - if (theBaseEntities.size() > theMirrorEntities.size()) + if (theBaseEntities.size() > theMirrorEntities.size() || aMirroredList.empty()) myErrorMsg = SketchSolver_Error::NOT_INITIALIZED(); }