Salome HOME
Issue #1916: Fatal error when create sketch on body Remove subshapes
[modules/shaper.git] / src / FeaturesPlugin / Test / TestExtrusion.py
index b6122f30a498db5b9f2022b2126d54e838c5081a..ea08653101f30fea67d00aea923fa2fa2bd51b52 100644 (file)
@@ -1,7 +1,7 @@
 """
       TestExtrusion.py
       Unit test of FeaturesPlugin_Extrusion class
-      
+
       class FeaturesPlugin_Extrusion : public ModelAPI_Feature
         static const std::string MY_EXTRUSION_ID("Extrusion");
         static const std::string LIST_ID("base");
@@ -103,7 +103,8 @@ assert (anExtrusionResult is not None)
 # Create from plane
 aSession.startOperation()
 aFromPlaneFeature = aPart.addFeature("Plane")
-aFromPlaneFeature.string("CreationMethod").setValue("PlaneByGeneralEquation")
+aFromPlaneFeature.string("creation_method").setValue("by_general_equation")
+aFromPlaneFeature.string("by_other_plane_option").setValue("by_distance_from_other") # TODO: remove
 aFromPlaneFeature.real("A").setValue(0.)
 aFromPlaneFeature.real("B").setValue(0.)
 aFromPlaneFeature.real("C").setValue(1.)
@@ -113,7 +114,8 @@ aSession.finishOperation()
 # Create to plane
 aSession.startOperation()
 aToPlaneFeature = aPart.addFeature("Plane")
-aToPlaneFeature.string("CreationMethod").setValue("PlaneByGeneralEquation")
+aToPlaneFeature.string("creation_method").setValue("by_general_equation")
+aToPlaneFeature.string("by_other_plane_option").setValue("by_distance_from_other") # TODO: remove
 aToPlaneFeature.real("A").setValue(0.)
 aToPlaneFeature.real("B").setValue(0.)
 aToPlaneFeature.real("C").setValue(1.)
@@ -228,9 +230,9 @@ anExtrusionFt.selectionList("base").append(
 anExtrusionFt.string("CreationMethod").setValue("ByPlanesAndOffsets")
 anExtrusionFt.real("to_size").setValue(0) #TODO: remove
 anExtrusionFt.real("from_size").setValue(0) #TODO: remove
-anExtrusionFt.selection("to_object").selectSubShape("face", "Extrusion_3_1/LateralFace_2")
+anExtrusionFt.selection("to_object").selectSubShape("face", "Extrusion_3_1/Generated_Face_2")
 anExtrusionFt.real("to_offset").setValue(0)
-anExtrusionFt.selection("from_object").selectSubShape("face", "Extrusion_3_1/LateralFace_1")
+anExtrusionFt.selection("from_object").selectSubShape("face", "Extrusion_3_1/Generated_Face_1")
 anExtrusionFt.real("from_offset").setValue(0)
 anExtrusionFt.execute()
 aSession.finishOperation()
@@ -243,3 +245,6 @@ assert (anExtrusionResult is not None)
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())