"""
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");
# 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.)
# 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.)
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()
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())