]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fixes for unit tests
authorazv <azv@opencascade.com>
Tue, 23 Aug 2016 11:23:08 +0000 (14:23 +0300)
committerazv <azv@opencascade.com>
Tue, 23 Aug 2016 11:23:08 +0000 (14:23 +0300)
src/FeaturesPlugin/Test/TestRecover.py
src/SketchAPI/SketchAPI_Rotation.cpp
src/SketchAPI/SketchAPI_Translation.cpp
src/SketchSolver/SketchSolver_ConstraintMirror.cpp

index 867ecc32fb8c9fd2e6976719303f3a3068f22381..f3afa4106e83ef0b8fed2eb3062303f4dd459808 100644 (file)
@@ -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())
index 1f7624e09e7a0c716da8e8a8cc070f0f685ca2d9..87f7e805b366a896c91dcd5d52ce0811ed030fb1 100644 (file)
@@ -33,7 +33,7 @@ SketchAPI_Rotation::SketchAPI_Rotation(
     fillAttribute(theNumberOfObjects, numberOfObjects());
     fillAttribute(theFullValue ? "FullAngle" : "SingleAngle", valueType());
 
-    execute();
+    execute(true);
   }
 }
 
index efa16508783246a5ab92300855c52571b213e8e0..4fff83bbeb4f2b5b281d5fd4e7bc6b12f25b68f3 100644 (file)
@@ -33,7 +33,7 @@ SketchAPI_Translation::SketchAPI_Translation(
     fillAttribute(theNumberOfObjects, numberOfObjects());
     fillAttribute(theFullValue ? "FullValue" : "SingleValue", valueType());
 
-    execute();
+    execute(true);
   }
 }
 
index fdb181948a6649c6d11f454ecca509c53ba450b1..63867f1c3bd7c6c7eaf3171d301a650745dbaf81 100644 (file)
@@ -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();
 }