From: vsv Date: Thu, 7 Jul 2022 14:37:12 +0000 (+0300) Subject: Test correction X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=621065c3d1b42120e7a9920bc0045740d798e03f;p=modules%2Fshaper.git Test correction --- diff --git a/src/PythonAPI/Test/TestCR.py b/src/PythonAPI/Test/TestCR.py index 1530ad34a..8952537c9 100644 --- a/src/PythonAPI/Test/TestCR.py +++ b/src/PythonAPI/Test/TestCR.py @@ -14,6 +14,10 @@ from salome.shaper import model, geom def GetShapeType(theShape): CR = geom.CanonicalRecognition() if CR.isPlane(theShape, 0.1)[0]: + if CR.isCircle(theShape, 0.1)[0]: + return ("Plane","Circle") + if CR.isEllipse(theShape, 0.1)[0]: + return ("Plane","Ellipse") return "Plane" if CR.isSphere(theShape, 0.1)[0]: return "Sphere" @@ -23,10 +27,6 @@ def GetShapeType(theShape): return "Cylinder" if CR.isLine(theShape, 0.1)[0]: return "Line" - if CR.isCircle(theShape, 0.1)[0]: - return "Circle" - if CR.isEllipse(theShape, 0.1)[0]: - return "Ellipse" return "Not defined" @@ -97,9 +97,9 @@ aEllipseShape = EllipseWire_1.defaultResult().shape() ### Check shapes types assert (GetShapeType(aPlaneShape) == "Plane") -assert (GetShapeType(aCircleShape) == "Circle") +assert (GetShapeType(aCircleShape)[1] == "Circle") assert (GetShapeType(aLineShape) == "Line") assert (GetShapeType(aCylinderShape) == "Cylinder") assert (GetShapeType(aSphereShape) == "Sphere") assert (GetShapeType(aConeShape) == "Cone") -assert (GetShapeType(aEllipseShape) == "Ellipse") +assert (GetShapeType(aEllipseShape)[1] == "Ellipse")