Salome HOME
Issue #1916: Fatal error when create sketch on body Remove subshapes
[modules/shaper.git] / src / FeaturesPlugin / Test / TestBooleanCompSolids.py
index 47e6beafe5986e3089d2dce164a7bf612fc4eab2..8d997e60ecb747a8516bf6445d8e63da72d433b4 100644 (file)
@@ -100,6 +100,23 @@ aSession.startOperation()
 aBooleanFt = aPart.addFeature("Boolean")
 aBooleanFt.selectionList("main_objects").append(modelAPI_ResultCompSolid(extrudedObjects[0]).subResult(1), None)
 aBooleanFt.selectionList("tool_objects").append(extrudedObjects[1], None)
+aBooleanType = 0
+aBooleanFt.integer("bool_type").setValue(aBooleanType)
+aBooleanFt.execute()
+aSession.finishOperation()
+
+assert (len(aBooleanFt.results()) > 0)
+aBooleanResult = modelAPI_ResultBody(aBooleanFt.firstResult())
+assert (aBooleanResult is not None)
+aSession.undo()
+
+#=========================================================================
+# Fuse
+#=========================================================================
+aSession.startOperation()
+aBooleanFt = aPart.addFeature("Boolean")
+aBooleanFt.selectionList("main_objects").append(modelAPI_ResultCompSolid(extrudedObjects[0]).subResult(1), None)
+aBooleanFt.selectionList("tool_objects").append(extrudedObjects[1], None)
 aBooleanType = 1
 aBooleanFt.integer("bool_type").setValue(aBooleanType)
 aBooleanFt.execute()
@@ -111,3 +128,6 @@ assert (aBooleanResult is not None)
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())