Salome HOME
Fix valgrind error: Mismatched free() / delete / delete []
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_ShapeInfo.cxx
index e34a909fd341791bfa3a05b132462048546bd650..6eaf087dc8acac4a01e645f497fc1861ddd13445 100644 (file)
@@ -1,63 +1,62 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
 //
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of the GNU Lesser General Public
-//  License as published by the Free Software Foundation; either
-//  version 2.1 of the License.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
 //
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-#include <GEOMAlgo_ShapeInfo.ixx>
 
+#include <GEOMAlgo_ShapeInfo.hxx>
 
 static
   Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType);
 static
   void DumpKindOfShape(const GEOMAlgo_KindOfShape aKS);
 static
-  void DumpKindOfClosed(const GEOMAlgo_KindOfClosed aKC); 
+  void DumpKindOfClosed(const GEOMAlgo_KindOfClosed aKC);
 static
   void DumpKindOfBounds(const GEOMAlgo_KindOfBounds aKB);
 static
   void DumpKindOfName(const GEOMAlgo_KindOfName aKS);
 static
-  void DumpPosition(const gp_Ax3& aAx3); 
+  void DumpKindOfDef(const GEOMAlgo_KindOfDef aKD);
+static
+  void DumpPosition(const gp_Ax3& aAx3);
 static
   void DumpLocation(const gp_Pnt& aP);
 static
   void DumpDirection(const gp_Dir& aD);
 //=======================================================================
-//function : 
-//purpose  : 
+//function :
+//purpose  :
 //=======================================================================
-  GEOMAlgo_ShapeInfo::GEOMAlgo_ShapeInfo()
+GEOMAlgo_ShapeInfo::GEOMAlgo_ShapeInfo()
 {
   Reset();
 }
 //=======================================================================
 //function : ~
-//purpose  : 
+//purpose  :
 //=======================================================================
-  GEOMAlgo_ShapeInfo::~GEOMAlgo_ShapeInfo()
+GEOMAlgo_ShapeInfo::~GEOMAlgo_ShapeInfo()
 {
 }
 //=======================================================================
 //function : Reset
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::Reset()
+void GEOMAlgo_ShapeInfo::Reset()
 {
   Standard_Integer i;
   //
@@ -72,6 +71,7 @@ static
   myKindOfBounds=GEOMAlgo_KB_UNKNOWN;
   myKindOfClosed=GEOMAlgo_KC_UNKNOWN;
   myKindOfName=GEOMAlgo_KN_UNKNOWN;
+  myKindOfDef=GEOMAlgo_KD_UNKNOWN;
   //
   myLocation.SetCoord(99., 99., 99.);
   myDirection.SetCoord(1.,0.,0.);
@@ -84,29 +84,29 @@ static
 }
 //=======================================================================
 //function : SetType
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::SetType(const TopAbs_ShapeEnum aType) 
+void GEOMAlgo_ShapeInfo::SetType(const TopAbs_ShapeEnum aType)
 {
   myType=aType;
 }
 //=======================================================================
 //function : Type
-//purpose  : 
+//purpose  :
 //=======================================================================
-  TopAbs_ShapeEnum GEOMAlgo_ShapeInfo::Type() const
+TopAbs_ShapeEnum GEOMAlgo_ShapeInfo::Type() const
 {
   return myType;
 }
 //=======================================================================
 //function : SetNbSubShapes
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::SetNbSubShapes(const TopAbs_ShapeEnum aType,
-                                         const Standard_Integer aNb) 
+void GEOMAlgo_ShapeInfo::SetNbSubShapes(const TopAbs_ShapeEnum aType,
+                                        const Standard_Integer aNb)
 {
   Standard_Integer iN;
-  
+
   iN=TypeToInteger(aType);
   if (iN>=0 && iN<myNbTypes) {
     myNbSubShapes[iN]=aNb;
@@ -114,12 +114,13 @@ static
 }
 //=======================================================================
 //function : NbSubShapes
-//purpose  : 
+//purpose  :
 //=======================================================================
-  Standard_Integer GEOMAlgo_ShapeInfo::NbSubShapes(const TopAbs_ShapeEnum aType) const
+Standard_Integer GEOMAlgo_ShapeInfo::NbSubShapes
+  (const TopAbs_ShapeEnum aType) const
 {
   Standard_Integer iN;
-  
+
   iN=TypeToInteger(aType);
   if (iN>=0 && iN<myNbTypes) {
     return myNbSubShapes[iN];
@@ -128,241 +129,257 @@ static
 }
 //=======================================================================
 //function : SetKindOfShape
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::SetKindOfShape(const GEOMAlgo_KindOfShape aT) 
+void GEOMAlgo_ShapeInfo::SetKindOfShape(const GEOMAlgo_KindOfShape aT)
 {
   myKindOfShape=aT;
 }
 //=======================================================================
 //function : KindOfShape
-//purpose  : 
+//purpose  :
 //=======================================================================
-  GEOMAlgo_KindOfShape GEOMAlgo_ShapeInfo::KindOfShape() const
+GEOMAlgo_KindOfShape GEOMAlgo_ShapeInfo::KindOfShape() const
 {
   return myKindOfShape;
 }
 //=======================================================================
 //function : SetKindOfName
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::SetKindOfName(const GEOMAlgo_KindOfName aT) 
+void GEOMAlgo_ShapeInfo::SetKindOfName(const GEOMAlgo_KindOfName aT)
 {
   myKindOfName=aT;
 }
 //=======================================================================
 //function : KindOfName
-//purpose  : 
+//purpose  :
 //=======================================================================
-  GEOMAlgo_KindOfName GEOMAlgo_ShapeInfo::KindOfName() const
+GEOMAlgo_KindOfName GEOMAlgo_ShapeInfo::KindOfName() const
 {
   return myKindOfName;
 }
 //=======================================================================
 //function : SetKindOfBounds
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::SetKindOfBounds(const GEOMAlgo_KindOfBounds aT) 
+void GEOMAlgo_ShapeInfo::SetKindOfBounds(const GEOMAlgo_KindOfBounds aT)
 {
   myKindOfBounds=aT;
 }
 //=======================================================================
 //function : KindOfBounds
-//purpose  : 
+//purpose  :
 //=======================================================================
-  GEOMAlgo_KindOfBounds GEOMAlgo_ShapeInfo::KindOfBounds() const
+GEOMAlgo_KindOfBounds GEOMAlgo_ShapeInfo::KindOfBounds() const
 {
   return myKindOfBounds;
 }
 //=======================================================================
 //function : SetKindOfClosed
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::SetKindOfClosed(const GEOMAlgo_KindOfClosed aT) 
+void GEOMAlgo_ShapeInfo::SetKindOfClosed(const GEOMAlgo_KindOfClosed aT)
 {
   myKindOfClosed=aT;
 }
 //=======================================================================
 //function : KindOfClosed
-//purpose  : 
+//purpose  :
 //=======================================================================
-  GEOMAlgo_KindOfClosed GEOMAlgo_ShapeInfo::KindOfClosed() const
+GEOMAlgo_KindOfClosed GEOMAlgo_ShapeInfo::KindOfClosed() const
 {
   return myKindOfClosed;
 }
 //=======================================================================
+//function : SetKindOfDef
+//purpose  :
+//=======================================================================
+void GEOMAlgo_ShapeInfo::SetKindOfDef(const GEOMAlgo_KindOfDef aT)
+{
+  myKindOfDef=aT;
+}
+//=======================================================================
+//function : KindOfDef
+//purpose  :
+//=======================================================================
+GEOMAlgo_KindOfDef GEOMAlgo_ShapeInfo::KindOfDef() const
+{
+  return myKindOfDef;
+}
+//=======================================================================
 //function : SetLocation
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::SetLocation(const gp_Pnt& aP) 
+void GEOMAlgo_ShapeInfo::SetLocation(const gp_Pnt& aP)
 {
   myLocation=aP;
 }
 //=======================================================================
 //function : Location
-//purpose  : 
+//purpose  :
 //=======================================================================
-  const gp_Pnt& GEOMAlgo_ShapeInfo::Location() const
+const gp_Pnt& GEOMAlgo_ShapeInfo::Location() const
 {
   return myLocation;
 }
 //=======================================================================
 //function : SetDirection
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::SetDirection(const gp_Dir& aD) 
+void GEOMAlgo_ShapeInfo::SetDirection(const gp_Dir& aD)
 {
   myDirection=aD;
 }
 //=======================================================================
 //function : Direction
-//purpose  : 
+//purpose  :
 //=======================================================================
-  const gp_Dir& GEOMAlgo_ShapeInfo::Direction() const
+const gp_Dir& GEOMAlgo_ShapeInfo::Direction() const
 {
   return myDirection;
 }
 //=======================================================================
 //function : SetPosition
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::SetPosition(const gp_Ax2& aAx2) 
+void GEOMAlgo_ShapeInfo::SetPosition(const gp_Ax2& aAx2)
 {
   gp_Ax3 aAx3(aAx2);
   SetPosition(aAx3);
 }
 //=======================================================================
 //function : SetPosition
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::SetPosition(const gp_Ax3& aAx3) 
+void GEOMAlgo_ShapeInfo::SetPosition(const gp_Ax3& aAx3)
 {
   myPosition=aAx3;
 }
 //=======================================================================
 //function : Position
-//purpose  : 
+//purpose  :
 //=======================================================================
-  const gp_Ax3& GEOMAlgo_ShapeInfo::Position() const
+const gp_Ax3& GEOMAlgo_ShapeInfo::Position() const
 {
   return myPosition;
 }
 
 //=======================================================================
 //function : SetPnt1
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::SetPnt1(const gp_Pnt& aP) 
+void GEOMAlgo_ShapeInfo::SetPnt1(const gp_Pnt& aP)
 {
   myPnt1=aP;
 }
 //=======================================================================
 //function : Pnt1
-//purpose  : 
+//purpose  :
 //=======================================================================
-  const gp_Pnt& GEOMAlgo_ShapeInfo::Pnt1() const
+const gp_Pnt& GEOMAlgo_ShapeInfo::Pnt1() const
 {
   return myPnt1;
 }
 //=======================================================================
 //function : SetPnt2
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::SetPnt2(const gp_Pnt& aP) 
+void GEOMAlgo_ShapeInfo::SetPnt2(const gp_Pnt& aP)
 {
   myPnt2=aP;
 }
 //=======================================================================
 //function : Pnt2
-//purpose  : 
+//purpose  :
 //=======================================================================
-  const gp_Pnt& GEOMAlgo_ShapeInfo::Pnt2() const
+const gp_Pnt& GEOMAlgo_ShapeInfo::Pnt2() const
 {
   return myPnt2;
 }
 //=======================================================================
 //function : SetRadius1
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::SetRadius1(const Standard_Real aR) 
+void GEOMAlgo_ShapeInfo::SetRadius1(const Standard_Real aR)
 {
   myRadius1=aR;
 }
 //=======================================================================
 //function : Radius1
-//purpose  : 
+//purpose  :
 //=======================================================================
-  Standard_Real GEOMAlgo_ShapeInfo::Radius1() const
+Standard_Real GEOMAlgo_ShapeInfo::Radius1() const
 {
   return myRadius1;
 }
 //=======================================================================
 //function : SetRadius2
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::SetRadius2(const Standard_Real aR) 
+void GEOMAlgo_ShapeInfo::SetRadius2(const Standard_Real aR)
 {
   myRadius2=aR;
 }
 //=======================================================================
 //function : Radius2
-//purpose  : 
+//purpose  :
 //=======================================================================
-  Standard_Real GEOMAlgo_ShapeInfo::Radius2() const
+Standard_Real GEOMAlgo_ShapeInfo::Radius2() const
 {
   return myRadius2;
 }
 //=======================================================================
 //function : SetLength
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::SetLength(const Standard_Real aL) 
+void GEOMAlgo_ShapeInfo::SetLength(const Standard_Real aL)
 {
   myLength=aL;
 }
 //=======================================================================
 //function : Length
-//purpose  : 
+//purpose  :
 //=======================================================================
-  Standard_Real GEOMAlgo_ShapeInfo::Length() const
+Standard_Real GEOMAlgo_ShapeInfo::Length() const
 {
   return myLength;
 }
 //=======================================================================
 //function : SetWidth
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::SetWidth(const Standard_Real aW) 
+void GEOMAlgo_ShapeInfo::SetWidth(const Standard_Real aW)
 {
   myWidth=aW;
 }
 //=======================================================================
 //function : Width
-//purpose  : 
+//purpose  :
 //=======================================================================
-  Standard_Real GEOMAlgo_ShapeInfo::Width() const
+Standard_Real GEOMAlgo_ShapeInfo::Width() const
 {
   return myWidth;
 }
 //=======================================================================
 //function : SetHeight
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::SetHeight(const Standard_Real aH) 
+void GEOMAlgo_ShapeInfo::SetHeight(const Standard_Real aH)
 {
   myHeight=aH;
 }
 //=======================================================================
 //function : Height
-//purpose  : 
+//purpose  :
 //=======================================================================
-  Standard_Real GEOMAlgo_ShapeInfo::Height() const
+Standard_Real GEOMAlgo_ShapeInfo::Height() const
 {
   return myHeight;
 }
 //=======================================================================
 //function : TypeToInteger
-//purpose  : 
+//purpose  :
 //=======================================================================
 Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType)
 {
@@ -373,9 +390,9 @@ Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType)
 }
 //=======================================================================
 //function : Dump
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::Dump()const
+void GEOMAlgo_ShapeInfo::Dump()const
 {
   switch (myType) {
     //
@@ -418,9 +435,9 @@ Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType)
 }
 //=======================================================================
 //function : DumpCompound
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::DumpCompound()const
+void GEOMAlgo_ShapeInfo::DumpCompound()const
 {
   Standard_Integer aNbV, aNbE, aNbF, aNbS, aNbC, aNbP;
   GEOMAlgo_KindOfShape aKS;
@@ -453,9 +470,9 @@ Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType)
 }
 //=======================================================================
 //function : DumpCompSolid
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::DumpCompSolid()const
+void GEOMAlgo_ShapeInfo::DumpCompSolid()const
 {
   Standard_Integer aNbV, aNbE, aNbF, aNbS;
   GEOMAlgo_KindOfShape aKS;
@@ -482,12 +499,11 @@ Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType)
   DumpKindOfBounds(aKB);
   DumpKindOfClosed(aKC);
 }
-
 //=======================================================================
 //function : DumpSolid
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::DumpSolid()const
+void GEOMAlgo_ShapeInfo::DumpSolid()const
 {
   Standard_Integer aNbV, aNbE, aNbF;
   GEOMAlgo_KindOfShape aKS;
@@ -542,24 +558,24 @@ Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType)
   }
   else if (aKN==GEOMAlgo_KN_BOX) {
     DumpLocation (myLocation);
-    DumpPosition (myPosition); 
+    DumpPosition (myPosition);
     printf("  Length    : %.3lf\n", myLength);
     printf("  Width     : %.3lf\n", myWidth);
     printf("  Height    : %.3lf\n", myHeight);
   }
 }
-
 //=======================================================================
 //function : DumpFace
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::DumpFace()const
+void GEOMAlgo_ShapeInfo::DumpFace()const
 {
   Standard_Integer aNbV, aNbE;
   GEOMAlgo_KindOfShape aKS;
   GEOMAlgo_KindOfName aKN;
   GEOMAlgo_KindOfBounds aKB;
   GEOMAlgo_KindOfClosed aKC;
+  GEOMAlgo_KindOfDef aKD;
   //
   aNbV=NbSubShapes(TopAbs_VERTEX);
   aNbE=NbSubShapes(TopAbs_EDGE);
@@ -567,6 +583,7 @@ Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType)
   aKN=KindOfName();
   aKB=KindOfBounds();
   aKC=KindOfClosed();
+  aKD=KindOfDef();
   //
   printf(" *FACE\n");
   printf("  number of vertices: %d\n", aNbV);
@@ -575,6 +592,7 @@ Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType)
   DumpKindOfName (aKN);
   DumpKindOfBounds(aKB);
   DumpKindOfClosed(aKC);
+  DumpKindOfDef(aKD);
   //
   // PLANE
   if (aKN==GEOMAlgo_KN_PLANE) {
@@ -599,8 +617,8 @@ Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType)
     printf("  Width     : %.3lf\n", myWidth);
   }
   else if (aKN==GEOMAlgo_KN_TRIANGLE ||
-          aKN==GEOMAlgo_KN_QUADRANGLE||
-          aKN==GEOMAlgo_KN_POLYGON) {
+           aKN==GEOMAlgo_KN_QUADRANGLE||
+           aKN==GEOMAlgo_KN_POLYGON) {
     DumpLocation (myLocation);
     DumpPosition (myPosition);
   }
@@ -636,15 +654,15 @@ Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType)
     printf("  Radius1   : %.3lf\n", myRadius1);
     printf("  Radius2   : %.3lf\n", myRadius2);
   }
-  
+
 
   printf("\n");
 }
 //=======================================================================
 //function : DumpShell
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::DumpShell()const
+void GEOMAlgo_ShapeInfo::DumpShell()const
 {
   Standard_Integer aNbV, aNbE, aNbF;
   GEOMAlgo_KindOfClosed aKC;
@@ -663,9 +681,9 @@ Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType)
 }
 //=======================================================================
 //function : DumpWire
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::DumpWire()const
+void GEOMAlgo_ShapeInfo::DumpWire()const
 {
   Standard_Integer aNbV, aNbE;
   GEOMAlgo_KindOfClosed aKC;
@@ -683,9 +701,9 @@ Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType)
 }
 //=======================================================================
 //function : DumpEdge
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::DumpEdge()const
+void GEOMAlgo_ShapeInfo::DumpEdge()const
 {
   Standard_Integer aNbV;
   Standard_Real aX, aY, aZ;
@@ -720,7 +738,7 @@ Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType)
     printf("  Pnt1 : %.3lf %.3lf %.3lf\n", aX, aY, aZ);
     myPnt2.Coord(aX, aY, aZ);
     printf("  Pnt2 : %.3lf %.3lf %.3lf\n", aX, aY, aZ);
-    
+
   }
   else if (aKN==GEOMAlgo_KN_CIRCLE) {
     DumpLocation (myLocation);
@@ -756,18 +774,18 @@ Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType)
 }
 //=======================================================================
 //function : DumpVertex
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_ShapeInfo::DumpVertex()const
+void GEOMAlgo_ShapeInfo::DumpVertex()const
 {
   printf(" *VERTEX\n");
   DumpLocation(myLocation);
 }
 //=======================================================================
 //function : DumpLocation
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void DumpLocation(const gp_Pnt& aP)
+void DumpLocation(const gp_Pnt& aP)
 {
   Standard_Real aX, aY, aZ;
   //
@@ -776,9 +794,9 @@ Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType)
 }
 //=======================================================================
 //function : DumpDirection
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void DumpDirection(const gp_Dir& aD)
+void DumpDirection(const gp_Dir& aD)
 {
   Standard_Real aX, aY, aZ;
   //
@@ -787,9 +805,9 @@ Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType)
 }
 //=======================================================================
 //function : DumpPosition
-//purpose  : 
+//purpose  :
 //=======================================================================
-void DumpPosition(const gp_Ax3& aAx3) 
+void DumpPosition(const gp_Ax3& aAx3)
 {
   const gp_Dir& aDZ=aAx3.Axis().Direction();
   const gp_Dir& aDX=aAx3.XDirection();
@@ -798,49 +816,49 @@ void DumpPosition(const gp_Ax3& aAx3)
   printf("  Axis: %.3lf %.3lf %.3lf \n", aDZ.X(), aDZ.Y(), aDZ.Z());
   printf("  X   : %.3lf %.3lf %.3lf \n", aDX.X(), aDX.Y(), aDX.Z());
   printf("  Y   : %.3lf %.3lf %.3lf \n", aDY.X(), aDY.Y(), aDY.Z());
-} 
+}
 //=======================================================================
 //function : DumpKindOfBounds
-//purpose  : 
+//purpose  :
 //=======================================================================
 void DumpKindOfBounds(const GEOMAlgo_KindOfBounds aKB)
 {
-  char *pStr[]={
-    "KB_UNKNOWN", 
-    "KB_TRIMMED", 
+  const char *pStr[]={
+    "KB_UNKNOWN",
+    "KB_TRIMMED",
     "KB_INFINITE"
   };
   int i;
   //
   i=(Standard_Integer)aKB;
   printf(" KindOfBounds: %s\n", pStr[i]);
-  
+
 }
 //=======================================================================
 //function : DumpKindOfClosed
-//purpose  : 
+//purpose  :
 //=======================================================================
 void DumpKindOfClosed(const GEOMAlgo_KindOfClosed aKC)
 {
-  char *pStr[]={
-    "KC_UNKNOWN", 
-    "KC_CLOSED", 
+  const char *pStr[]={
+    "KC_UNKNOWN",
+    "KC_CLOSED",
     "KC_NOTCLOSED"
   };
   int i;
   //
   i=(Standard_Integer)aKC;
   printf(" KindOfClosed: %s\n", pStr[i]);
-  
+
 }
 //=======================================================================
 //function : DumpKindOfShape
-//purpose  : 
+//purpose  :
 //=======================================================================
 void DumpKindOfShape(const GEOMAlgo_KindOfShape aKS)
 {
-  char *pStr[]={
-    "KS_UNKNOWN", 
+  const char *pStr[]={
+    "KS_UNKNOWN",
     "KS_SPHERE",
     "KS_CYLINDER",
     "KS_BOX",
@@ -848,9 +866,10 @@ void DumpKindOfShape(const GEOMAlgo_KindOfShape aKS)
     "KS_CONE",
     "KS_ELLIPSE",
     "KS_PLANE",
-    "KS_CIRCLE", 
-    "KS_LINE", 
-    "KS_DEGENERATED" 
+    "KS_CIRCLE",
+    "KS_LINE",
+    "KS_DEGENERATED",
+    "KS_BSPLINE"
     };
   int i;
   //
@@ -859,12 +878,12 @@ void DumpKindOfShape(const GEOMAlgo_KindOfShape aKS)
 }
 //=======================================================================
 //function : DumpKindOfName
-//purpose  : 
+//purpose  :
 //=======================================================================
 void DumpKindOfName(const GEOMAlgo_KindOfName aKS)
 {
-  char *pStr[]={
-    "KN_UNKNOWN", 
+  const char *pStr[]={
+    "KN_UNKNOWN",
     "KN_SPHERE",
     "KN_CYLINDER",
     "KN_TORUS",
@@ -872,21 +891,38 @@ void DumpKindOfName(const GEOMAlgo_KindOfName aKS)
     "KN_ELLIPSE",
     "KN_CIRCLE",
     "KN_PLANE",
-    "KN_LINE", 
-    "KN_BOX", 
-    "KN_SEGMENT", 
-    "KN_ARCCIRCLE", 
-    "KN_POLYGON", 
+    "KN_LINE",
+    "KN_BOX",
+    "KN_SEGMENT",
+    "KN_ARCCIRCLE",
+    "KN_POLYGON",
     "KN_POLYHEDRON",
     "KN_DISKCIRCLE",
     "KN_DISKELLIPSE",
     "KN_RECTANGLE",
     "KN_TRIANGLE",
-    "KN_QUADRANGLE", 
-    "KN_ARCELLIPSE" 
+    "KN_QUADRANGLE",
+    "KN_ARCELLIPSE",
+    "KN_SOLID"
     };
   int i;
   //
   i=(Standard_Integer)aKS;
   printf(" KindOfName  : %s\n", pStr[i]);
 }
+//=======================================================================
+//function : DumpKindOfDef
+//purpose  :
+//=======================================================================
+void DumpKindOfDef(const GEOMAlgo_KindOfDef aKD)
+{
+  const char *pStr[]={
+    "KD_UNKNOWN",
+    "KD_SPECIFIED",
+    "KB_ARBITRARY"
+  };
+  int i;
+  //
+  i=(Standard_Integer)aKD;
+  printf(" KindOfDef: %s\n", pStr[i]);
+}