Salome HOME
Fix bug on test of rotation.
[modules/shaper.git] / src / FeaturesPlugin / Test / TestMultiBoolean.py
index ce9fa673474e020385339392a5cce9c49b08e99a..aa36d86280812bc8b1492249212b0355ba9e5bee 100644 (file)
@@ -170,25 +170,28 @@ aSession.finishOperation()
 
 #=========================================================================
 # Create a boolean cut of cylinders from the box:
-# result of Boolean is the first argument of the next Boolean
 #=========================================================================
 aCurrentResult = modelAPI_ResultBody(aBox.firstResult())
 aSession.startOperation()
-aFactory = ModelAPI_Session.get().validators()
+
+aBooleanFt = aPart.addFeature("Boolean")
+aBooleanFt.selectionList("main_objects").append(aCurrentResult, aCurrentResult.shape())
 for i in xrange(0, N * N):
     anExtrusionResult = modelAPI_ResultBody(anExtrusions[i].firstResult())
-    aBooleanFt = aPart.addFeature("Boolean")
-    aBooleanFt.selectionList("main_objects").append(aCurrentResult, aCurrentResult.shape())
     aBooleanFt.selectionList("tool_objects").append(anExtrusionResult, anExtrusionResult.shape())
-    kBooleanTypeCut = 0
-    aBooleanFt.integer("bool_type").setValue(kBooleanTypeCut)
-    aBooleanFt.execute()
-    assert (aFactory.validate(aBooleanFt))
-    assert (len(aBooleanFt.results()) > 0)
-    aCurrentResult = modelAPI_ResultBody(aBooleanFt.firstResult())
-    assert (aCurrentResult is not None)
+kBooleanTypeCut = 0
+aBooleanFt.integer("bool_type").setValue(kBooleanTypeCut)
+aBooleanFt.execute()
+aFactory = ModelAPI_Session.get().validators()
+assert (aFactory.validate(aBooleanFt))
+assert (len(aBooleanFt.results()) > 0)
+aCurrentResult = modelAPI_ResultBody(aBooleanFt.firstResult())
+assert (aCurrentResult is not None)
 aSession.finishOperation()
 
 #=========================================================================
 # End of test
 #=========================================================================
+
+from salome.shaper import model
+assert(model.checkPythonDump())