]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
0023115: [CEA 1545] Regression on KindOfShape method
authorvsr <vsr@opencascade.com>
Wed, 17 Jun 2015 15:13:07 +0000 (18:13 +0300)
committervsr <vsr@opencascade.com>
Wed, 17 Jun 2015 15:14:39 +0000 (18:14 +0300)
src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx

index ff068838bd5d74eac566d94419c90255dc2eb83b..e601505627a3e9521f67e675f570d4689d3b5e16 100644 (file)
@@ -528,35 +528,34 @@ GEOMImpl_IMeasureOperations::ShapeKind GEOMImpl_IMeasureOperations::KindOfShape
           theDoubles->Append(aD.X());
           theDoubles->Append(aD.Y());
           theDoubles->Append(aD.Z());
+
+          if (anInfo.KindOfBounds() != GEOMAlgo_KB_INFINITE)
+          {
+            // (+) geompy.kind.PLANAR  xo yo zo  dx dy dz  nb_edges nb_vertices
+
+            aKind = SK_PLANAR;
+            
+            gp_Pnt aC = anInfo.Location();
+            theDoubles->Append(aC.X());
+            theDoubles->Append(aC.Y());
+            theDoubles->Append(aC.Z());
+            
+            gp_Ax3 anAx3 = anInfo.Position();
+            gp_Dir aD = anAx3.Direction();
+            theDoubles->Append(aD.X());
+            theDoubles->Append(aD.Y());
+            theDoubles->Append(aD.Z());
+            
+            theIntegers->Append(anInfo.NbSubShapes(TopAbs_EDGE));
+            theIntegers->Append(anInfo.NbSubShapes(TopAbs_VERTEX));
+          }
         }
         break;
       default:
-        if (anInfo.KindOfShape() == GEOMAlgo_KS_PLANE) {
-          // (+) geompy.kind.PLANAR  xo yo zo  dx dy dz  nb_edges nb_vertices
-
-          aKind = SK_PLANAR;
-
-          gp_Pnt aC = anInfo.Location();
-          theDoubles->Append(aC.X());
-          theDoubles->Append(aC.Y());
-          theDoubles->Append(aC.Z());
-
-          gp_Ax3 anAx3 = anInfo.Position();
-          gp_Dir aD = anAx3.Direction();
-          theDoubles->Append(aD.X());
-          theDoubles->Append(aD.Y());
-          theDoubles->Append(aD.Z());
-
-          theIntegers->Append(anInfo.NbSubShapes(TopAbs_EDGE));
-          theIntegers->Append(anInfo.NbSubShapes(TopAbs_VERTEX));
-        }
-        else {
-          // ??? geompy.kind.FACE  nb_edges nb_vertices _surface_type_id_
-          // (+) geompy.kind.FACE  nb_edges nb_vertices
-
-          theIntegers->Append(anInfo.NbSubShapes(TopAbs_EDGE));
-          theIntegers->Append(anInfo.NbSubShapes(TopAbs_VERTEX));
-        }
+        // ??? geompy.kind.FACE  nb_edges nb_vertices _surface_type_id_
+        // (+) geompy.kind.FACE  nb_edges nb_vertices
+        theIntegers->Append(anInfo.NbSubShapes(TopAbs_EDGE));
+        theIntegers->Append(anInfo.NbSubShapes(TopAbs_VERTEX));
       }
     }
     break;