aDocument.removeFeature(aConstraint)
aSession.finishOperation()
aSession.startOperation()
-aLineStartPoint.setValue(50., 0.)
+aLineStartPoint.setValue(70., 0.)
aSession.finishOperation()
assert (anArcEndPoint.x() != aLineStartPoint.x() or anArcEndPoint.y() != aLineStartPoint.y())
# Auxiliary functions
#=========================================================================
def checkMirror(theListInit, theListMirr, theMirrorLine):
+ TOL = 1.e-8
aListSize = theListInit.size()
aLineStartPoint = geomDataAPI_Point2D(theMirrorLine.attribute("StartPoint"))
aDirX = aPointC.x() - aPointB.x()
aDirY = aPointC.y() - aPointB.y()
aDot = aLineDirX * aDirX + aLineDirY * aDirY
- assert(math.fabs(aDot) < 1.e-10)
+ assert math.fabs(aDot) < TOL, "aDot = {0}".format(aDot)
aDirX = aLineEndPoint.x() - 0.5 * (aPointB.x() + aPointC.x())
aDirY = aLineEndPoint.y() - 0.5 * (aPointB.y() + aPointC.y())
aCross = aLineDirX * aDirY - aLineDirY * aDirX
- assert(math.fabs(aCross) < 1.e-10)
+ assert math.fabs(aCross) < TOL, "aCross = {0}".format(aCross)
#=========================================================================