Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Issue #2027 Sketcher Trim Feature: coincidence unit test case
[modules/shaper.git]
/
src
/
SketchPlugin
/
Test
/
TestConstraintVertical.py
diff --git
a/src/SketchPlugin/Test/TestConstraintVertical.py
b/src/SketchPlugin/Test/TestConstraintVertical.py
index 8bbc541cd94b15fc4e32e04668dcfc36a0acee3b..1fe6af2722b3759595e30bf056f4f6eab329a8d1 100644
(file)
--- a/
src/SketchPlugin/Test/TestConstraintVertical.py
+++ b/
src/SketchPlugin/Test/TestConstraintVertical.py
@@
-9,6
+9,8
@@
"""
from GeomDataAPI import *
from ModelAPI import *
"""
from GeomDataAPI import *
from ModelAPI import *
+from salome.shaper import model
+
#=========================================================================
# Initialization of the test
#=========================================================================
#=========================================================================
# Initialization of the test
#=========================================================================
@@
-40,6
+42,7
@@
aLineEndPoint = geomDataAPI_Point2D(aSketchLine.attribute("EndPoint"))
aLineStartPoint.setValue(0., 15.)
aLineEndPoint.setValue(20., 25.)
aSession.finishOperation()
aLineStartPoint.setValue(0., 15.)
aLineEndPoint.setValue(20., 25.)
aSession.finishOperation()
+assert (model.dof(aSketchFeature) == 4)
#=========================================================================
# Assign vertical constraint for a line
#=========================================================================
#=========================================================================
# Assign vertical constraint for a line
#=========================================================================
@@
-52,6
+55,7
@@
refattrA.setObject(aResult)
aVerticalConstraint.execute()
aSession.finishOperation()
assert(aLineStartPoint.x() == aLineEndPoint.x())
aVerticalConstraint.execute()
aSession.finishOperation()
assert(aLineStartPoint.x() == aLineEndPoint.x())
+assert (model.dof(aSketchFeature) == 3)
#=========================================================================
# Move one of boundary points of a line
#=========================================================================
#=========================================================================
# Move one of boundary points of a line
#=========================================================================
@@
-61,6
+65,7
@@
aLineStartPoint.setValue(aLineStartPoint.x() + deltaX,
aLineStartPoint.y() + deltaY)
aSession.finishOperation()
assert(aLineStartPoint.x() == aLineEndPoint.x())
aLineStartPoint.y() + deltaY)
aSession.finishOperation()
assert(aLineStartPoint.x() == aLineEndPoint.x())
+assert (model.dof(aSketchFeature) == 3)
#=========================================================================
# Move other boundary point of a line
#=========================================================================
#=========================================================================
# Move other boundary point of a line
#=========================================================================
@@
-71,9
+76,9
@@
aLineEndPoint.setValue(aLineEndPoint.x() + deltaX,
aLineEndPoint.y() + deltaY)
aSession.finishOperation()
assert(aLineStartPoint.x() == aLineEndPoint.x())
aLineEndPoint.y() + deltaY)
aSession.finishOperation()
assert(aLineStartPoint.x() == aLineEndPoint.x())
+assert (model.dof(aSketchFeature) == 3)
#=========================================================================
# End of test
#=========================================================================
#=========================================================================
# End of test
#=========================================================================
-from salome.shaper import model
assert(model.checkPythonDump())
assert(model.checkPythonDump())