X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FTest%2FTestConstraintPerpendicular.py;h=43fa7aaf3de1e6d5ec9d469bf0cdb2ec7ac64d25;hb=256f2a6c7f3d72659a0378be0116c745dfc13dc2;hp=f1d321362471c29050b8f5098e7e5d20ea726366;hpb=5b6031b015602aa07f5a6fc668c13ac3faf7a8a9;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/Test/TestConstraintPerpendicular.py b/src/SketchPlugin/Test/TestConstraintPerpendicular.py index f1d321362..43fa7aaf3 100644 --- a/src/SketchPlugin/Test/TestConstraintPerpendicular.py +++ b/src/SketchPlugin/Test/TestConstraintPerpendicular.py @@ -18,6 +18,8 @@ """ from GeomDataAPI import * from ModelAPI import * +from salome.shaper import model + #========================================================================= # Initialization of the test #========================================================================= @@ -56,6 +58,7 @@ aLineBEndPoint = geomDataAPI_Point2D(aSketchLineB.attribute("EndPoint")) aLineBStartPoint.setValue(25., 40.) aLineBEndPoint.setValue(25., 125.) aSession.finishOperation() +assert (model.dof(aSketchFeature) == 8) #========================================================================= # Make a constraint to keep the length of the line constant # to prevent perpendicular constraint collapsing line to point @@ -79,6 +82,7 @@ assert (aLineBStartPoint.x() == 25) assert (aLineBStartPoint.y() == 40) assert (aLineBEndPoint.x() == 25) assert (aLineBEndPoint.y() == 125) +assert (model.dof(aSketchFeature) == 6) #========================================================================= # Link lines with perpendicular constraint #========================================================================= @@ -94,6 +98,7 @@ refattrA.setObject(aResultA) refattrB.setObject(aResultB) aPerpendicularConstraint.execute() aSession.finishOperation() +assert (model.dof(aSketchFeature) == 5) #========================================================================= # Check values and move one constrainted object #========================================================================= @@ -118,9 +123,9 @@ aLineAEndPoint.setValue(aLineAEndPoint.x() - deltaX, aLineAEndPoint.y() - deltaY aSession.finishOperation() assert (aLineBStartPointPrev != (aLineBStartPoint.x(), aLineBStartPoint.y())) assert (aLineBEndPointPrev != (aLineBEndPoint.x(), aLineBEndPoint.y())) +assert (model.dof(aSketchFeature) == 5) #========================================================================= # End of test #========================================================================= -from salome.shaper import model assert(model.checkPythonDump())