X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FSketchPlugin%2FTest%2FTestFilletInteracting.py;h=60783ed527bff4b6f0af2ba9c270341a679160df;hb=a94fc319f2aa64b43c9a73b5ff7063923648faec;hp=04160ace6312d62e5c7a2d6c9a121c93fa864b94;hpb=a55f66ec2fca6f0bddfbc3f1db3842159bed1ed2;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/Test/TestFilletInteracting.py b/src/SketchPlugin/Test/TestFilletInteracting.py index 04160ace6..60783ed52 100644 --- a/src/SketchPlugin/Test/TestFilletInteracting.py +++ b/src/SketchPlugin/Test/TestFilletInteracting.py @@ -35,7 +35,7 @@ __updated__ = "2017-03-06" def isArcLineSmooth(theArc, theLine, theTolerance): aCenter = geomDataAPI_Point2D(theArc.attribute("center_point")) - aDistance = distancePointLine(aCenter, theLine) + aDistance = model.distancePointLine(aCenter, theLine) aRadius = arcRadius(theArc) return math.fabs(aRadius - aDistance) < theTolerance @@ -54,15 +54,6 @@ def arcRadius(theArc): aStart = geomDataAPI_Point2D(theArc.attribute("start_point")) return model.distancePointPoint(aCenter, aStart) -def distancePointLine(thePoint, theLine): - aLineStart = geomDataAPI_Point2D(theLine.attribute("StartPoint")) - aLineEnd = geomDataAPI_Point2D(theLine.attribute("EndPoint")) - aLength = model.distancePointPoint(aLineStart, aLineEnd) - aDir1x, aDir1y = aLineEnd.x() - aLineStart.x(), aLineEnd.y() - aLineStart.y() - aDir2x, aDir2y = thePoint.x() - aLineStart.x(), thePoint.y() - aLineStart.y() - aCross = aDir1x * aDir2y - aDir1y * aDir2x - return math.fabs(aCross) / aLength - class TestFilletInteracting(unittest.TestCase):