From 93d724558de678c013b976d220bc758779591239 Mon Sep 17 00:00:00 2001 From: vsv Date: Thu, 7 Jul 2022 17:36:36 +0300 Subject: [PATCH] Test correction --- src/GEOM_SWIG/GEOM_TestCR.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/GEOM_SWIG/GEOM_TestCR.py b/src/GEOM_SWIG/GEOM_TestCR.py index 8dec2a4cc..4661e1855 100644 --- a/src/GEOM_SWIG/GEOM_TestCR.py +++ b/src/GEOM_SWIG/GEOM_TestCR.py @@ -35,6 +35,10 @@ geompy = geomBuilder.New() def GetShapeType(theShape): CR = geompy.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" @@ -44,10 +48,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" O = geompy.MakeVertex(0, 0, 0) @@ -74,7 +74,7 @@ Partition_1 = geompy.MakePartition([Cylinder_2], [Rotation_1], [], [], geompy.Sh assert GetShapeType(Face_1) == "Plane" assert GetShapeType(Face_2) == "Cylinder" assert GetShapeType(Edge_3) == "Line" -assert GetShapeType(Edge_2) == "Circle" +assert GetShapeType(Edge_2)[1] == "Circle" assert GetShapeType(Shell_1) == "Sphere" assert GetShapeType(Shell_2) == "Cone" -assert GetShapeType(Edge_5) == "Ellipse" +assert GetShapeType(Edge_5)[1] == "Ellipse" -- 2.39.2