#=========================================================================
# Initialization of the test
#=========================================================================
#=========================================================================
# Initialization of the test
#=========================================================================
aLineBStartPoint.setValue(25., 40.)
aLineBEndPoint.setValue(25., 125.)
aSession.finishOperation()
aLineBStartPoint.setValue(25., 40.)
aLineBEndPoint.setValue(25., 125.)
aSession.finishOperation()
#=========================================================================
# Make a constraint to keep the length of the line constant
# to prevent perpendicular constraint collapsing line to point
#=========================================================================
# Make a constraint to keep the length of the line constant
# to prevent perpendicular constraint collapsing line to point
assert (aLineBStartPoint.y() == 40)
assert (aLineBEndPoint.x() == 25)
assert (aLineBEndPoint.y() == 125)
assert (aLineBStartPoint.y() == 40)
assert (aLineBEndPoint.x() == 25)
assert (aLineBEndPoint.y() == 125)
#=========================================================================
# Link lines with perpendicular constraint
#=========================================================================
#=========================================================================
# Link lines with perpendicular constraint
#=========================================================================
refattrB.setObject(aResultB)
aPerpendicularConstraint.execute()
aSession.finishOperation()
refattrB.setObject(aResultB)
aPerpendicularConstraint.execute()
aSession.finishOperation()
#=========================================================================
# Check values and move one constrainted object
#=========================================================================
#=========================================================================
# Check values and move one constrainted object
#=========================================================================
aSession.finishOperation()
assert (aLineBStartPointPrev != (aLineBStartPoint.x(), aLineBStartPoint.y()))
assert (aLineBEndPointPrev != (aLineBEndPoint.x(), aLineBEndPoint.y()))
aSession.finishOperation()
assert (aLineBStartPointPrev != (aLineBStartPoint.x(), aLineBStartPoint.y()))
assert (aLineBEndPointPrev != (aLineBEndPoint.x(), aLineBEndPoint.y()))
#=========================================================================
# End of test
#=========================================================================
#=========================================================================
# End of test
#=========================================================================