"""
from GeomDataAPI import *
from ModelAPI import *
+from salome.shaper import model
#=========================================================================
# Auxiliary functions
aSession.startOperation()
aFeaturesList = createSketch(aSketchFeature)
aSession.finishOperation()
+assert(model.dof(aSketchFeature) == 5)
#=========================================================================
# Global variables
#=========================================================================
aTransLineStartPoint.setValue(START_X, START_Y)
aTransLineEndPoint.setValue(START_X + DELTA_X, START_Y + DELTA_Y)
aSession.finishOperation()
+assert(model.dof(aSketchFeature) == 9)
#=========================================================================
# Create the Translation constraint
#=========================================================================
aNbCopies.setValue(2)
aMultiTranslation.execute()
aSession.finishOperation()
+assert(model.dof(aSketchFeature) == 9)
#=========================================================================
# Verify the objects are moved for the specified distance
#=========================================================================
aSession.finishOperation()
aTranslated = aMultiTranslation.reflist("ConstraintEntityB")
checkTranslation(aTranslated, aNbCopies.value(), DELTA_X, DELTA_Y)
+assert(model.dof(aSketchFeature) == 9)
#=========================================================================
# Create new feature and add it into the Rotation
aTransList.append(aResult)
aSession.finishOperation()
checkTranslation(aTranslated, aNbCopies.value(), DELTA_X, DELTA_Y)
+assert(model.dof(aSketchFeature) == 13)
#=========================================================================
# Move line and check the copies are moved too
#=========================================================================
aStartPoint.setValue(12., 5.)
aSession.finishOperation()
checkTranslation(aTranslated, aNbCopies.value(), DELTA_X, DELTA_Y)
+assert(model.dof(aSketchFeature) == 13)
#=========================================================================
# Change number of copies and verify Rotation
#=========================================================================
aNbCopies.setValue(2)
aSession.finishOperation()
checkTranslation(aTranslated, aNbCopies.value(), DELTA_X, DELTA_Y)
+assert(model.dof(aSketchFeature) == 13)
#=========================================================================
# Remove a feature from the Rotation
aTransList.remove(aRemoveIt)
aSession.finishOperation()
checkTranslation(aTranslated, aNbCopies.value(), DELTA_X, DELTA_Y)
+assert(model.dof(aSketchFeature) == 13)
#=========================================================================
# Clear the list of rotated features
aTransList.append(aResult)
aSession.finishOperation()
checkTranslation(aTranslated, aNbCopies.value(), DELTA_X, DELTA_Y)
+assert(model.dof(aSketchFeature) == 13)
#=========================================================================
# End of test
#=========================================================================
-import model
assert(model.checkPythonDump())