0031456: Visualization - move out Dimensions and Relations from package AIS to PrsDims
[occt.git] / src / TPrsStd / TPrsStd_ConstraintTools.cxx
index 17e58e0..a67704e 100644 (file)
 // Purpose:     Update AIS object from a TDataXtd_Constraint.
 // Modified     Mon 30 10:15:43 1998 by SZY
 
-#include <AIS_AngleDimension.hxx>
-#include <AIS_ConcentricRelation.hxx>
-#include <AIS_DiameterDimension.hxx>
-#include <AIS_EqualDistanceRelation.hxx>
-#include <AIS_EqualRadiusRelation.hxx>
-#include <AIS_FixRelation.hxx>
-#include <AIS_IdenticRelation.hxx>
+#include <TPrsStd_ConstraintTools.hxx>
+
 #include <AIS_InteractiveContext.hxx>
 #include <AIS_InteractiveObject.hxx>
-#include <AIS_LengthDimension.hxx>
-#include <AIS_MaxRadiusDimension.hxx>
-#include <AIS_MidPointRelation.hxx>
-#include <AIS_MinRadiusDimension.hxx>
-#include <AIS_OffsetDimension.hxx>
-#include <AIS_ParallelRelation.hxx>
-#include <AIS_PerpendicularRelation.hxx>
-#include <AIS_RadiusDimension.hxx>
-#include <AIS_Relation.hxx>
-#include <AIS_SymmetricRelation.hxx>
-#include <AIS_TangentRelation.hxx>
+#include <PrsDim_AngleDimension.hxx>
+#include <PrsDim_ConcentricRelation.hxx>
+#include <PrsDim_DiameterDimension.hxx>
+#include <PrsDim_EqualDistanceRelation.hxx>
+#include <PrsDim_EqualRadiusRelation.hxx>
+#include <PrsDim_FixRelation.hxx>
+#include <PrsDim_IdenticRelation.hxx>
+#include <PrsDim_LengthDimension.hxx>
+#include <PrsDim_MaxRadiusDimension.hxx>
+#include <PrsDim_MidPointRelation.hxx>
+#include <PrsDim_MinRadiusDimension.hxx>
+#include <PrsDim_OffsetDimension.hxx>
+#include <PrsDim_ParallelRelation.hxx>
+#include <PrsDim_PerpendicularRelation.hxx>
+#include <PrsDim_RadiusDimension.hxx>
+#include <PrsDim_Relation.hxx>
+#include <PrsDim_SymmetricRelation.hxx>
+#include <PrsDim_TangentRelation.hxx>
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepAdaptor_Curve.hxx>
@@ -79,7 +81,6 @@
 #include <TopoDS_Shape.hxx>
 #include <TopoDS_Vertex.hxx>
 #include <TopTools_IndexedMapOfShape.hxx>
-#include <TPrsStd_ConstraintTools.hxx>
 #include <UnitsAPI.hxx>
 
 #include <stdio.h>
@@ -220,7 +221,7 @@ void TPrsStd_ConstraintTools::UpdateOnlyValue(const Handle(TDataXtd_Constraint)&
   Standard_Real val;
   TCollection_ExtendedString txt;
   TPrsStd_ConstraintTools:: ComputeTextAndValue(aConst,val,txt,aConst->GetType() == TDataXtd_ANGLE);
-  Handle(AIS_Relation) rel = Handle(AIS_Relation)::DownCast(anAIS);
+  Handle(PrsDim_Relation) rel = Handle(PrsDim_Relation)::DownCast(anAIS);
   if (!rel.IsNull()) rel->SetText(txt); 
 }
 
@@ -238,7 +239,7 @@ void TPrsStd_ConstraintTools::ComputeDistance (const Handle(TDataXtd_Constraint)
   if (aGeomNum < 1 || aGeomNum > 2)
   {
 #ifdef OCCT_DEBUG
-    cout <<  "TPrsStd_ConstraintTools::ComputeDistance: 1 or 2 geometries are needed" << endl;
+    std::cout <<  "TPrsStd_ConstraintTools::ComputeDistance: 1 or 2 geometries are needed" << std::endl;
 #endif
     NullifyAIS(theAIS);
     return;
@@ -256,7 +257,7 @@ void TPrsStd_ConstraintTools::ComputeDistance (const Handle(TDataXtd_Constraint)
     if (aShape1.IsNull())
     {
       #ifdef OCCT_DEBUG
-      cout << "TPrsStd_ConstraintTools::ComputeDistance : null shape" << endl;
+      std::cout << "TPrsStd_ConstraintTools::ComputeDistance : null shape" << std::endl;
       #endif
       NullifyAIS (theAIS);
       return;
@@ -269,7 +270,7 @@ void TPrsStd_ConstraintTools::ComputeDistance (const Handle(TDataXtd_Constraint)
     if (aShape1.IsNull() || aShape2.IsNull())
     {
       #ifdef OCCT_DEBUG
-      cout << "TPrsStd_ConstraintTools::ComputeDistance : null shape" << endl;
+      std::cout << "TPrsStd_ConstraintTools::ComputeDistance : null shape" << std::endl;
       #endif
       NullifyAIS (theAIS);
       return;
@@ -305,11 +306,11 @@ void TPrsStd_ConstraintTools::ComputeDistance (const Handle(TDataXtd_Constraint)
 
   Standard_Boolean SaveDrw = Standard_False;
   Handle(Prs3d_Drawer) aDrawer;
-  Handle(AIS_LengthDimension) aDim;
+  Handle(PrsDim_LengthDimension) aDim;
 
   if (!theAIS.IsNull())
   {
-    aDim = Handle(AIS_LengthDimension)::DownCast (theAIS);
+    aDim = Handle(PrsDim_LengthDimension)::DownCast (theAIS);
   }
 
   // Check shapes for AIS dimension
@@ -318,7 +319,7 @@ void TPrsStd_ConstraintTools::ComputeDistance (const Handle(TDataXtd_Constraint)
     if (aShape1.ShapeType () != TopAbs_EDGE)
     {
       #ifdef OCCT_DEBUG
-      cout << "TPrsStd_ConstraintTools::ComputeDistance : shape should be edge" << endl;
+      std::cout << "TPrsStd_ConstraintTools::ComputeDistance : shape should be edge" << std::endl;
       #endif
       NullifyAIS (theAIS);
       return;
@@ -406,7 +407,7 @@ void TPrsStd_ConstraintTools::ComputeDistance (const Handle(TDataXtd_Constraint)
   if (isCheckPlane && aPlane.IsNull())
   {
     #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeDistance : null plane" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeDistance : null plane" << std::endl;
     #endif
     NullifyAIS (theAIS);
     return;
@@ -417,15 +418,15 @@ void TPrsStd_ConstraintTools::ComputeDistance (const Handle(TDataXtd_Constraint)
   {
     if (isEdge)
     {
-      aDim = new AIS_LengthDimension (GetEdge (aShape1), aPlane->Pln());
+      aDim = new PrsDim_LengthDimension (GetEdge (aShape1), aPlane->Pln());
     }
     else if (isFaces)
     {
-      aDim = new AIS_LengthDimension (GetFace (aShape1), GetFace (aShape2));
+      aDim = new PrsDim_LengthDimension (GetFace (aShape1), GetFace (aShape2));
     }
     else
     {
-      aDim = new AIS_LengthDimension (aShape1, aShape2, aPlane->Pln());
+      aDim = new PrsDim_LengthDimension (aShape1, aShape2, aPlane->Pln());
     }
 
     if (SaveDrw)
@@ -465,7 +466,7 @@ void TPrsStd_ConstraintTools::ComputePerpendicular(const Handle(TDataXtd_Constra
   Standard_Integer nbgeom = aConst->NbGeometries();
   if (nbgeom < 2) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputePerpendicular: at leat two constraintes are needed" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputePerpendicular: at leat two constraintes are needed" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -479,7 +480,7 @@ void TPrsStd_ConstraintTools::ComputePerpendicular(const Handle(TDataXtd_Constra
   else GetTwoShapes(aConst,shape1,shape2); 
   if (shape1.IsNull() || shape2.IsNull()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputePerpendicular : null shape" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputePerpendicular : null shape" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -487,12 +488,12 @@ void TPrsStd_ConstraintTools::ComputePerpendicular(const Handle(TDataXtd_Constra
   GetGoodShape(shape1);
   GetGoodShape(shape2);
   //  Update de l'AIS
-  Handle(AIS_PerpendicularRelation) ais;
-  if (anAIS.IsNull()) ais = new AIS_PerpendicularRelation(shape1,shape2);
+  Handle(PrsDim_PerpendicularRelation) ais;
+  if (anAIS.IsNull()) ais = new PrsDim_PerpendicularRelation(shape1,shape2);
   else {
-    ais = Handle(AIS_PerpendicularRelation)::DownCast(anAIS);
+    ais = Handle(PrsDim_PerpendicularRelation)::DownCast(anAIS);
     if (ais.IsNull()) {
-      ais = new AIS_PerpendicularRelation(shape1,shape2);
+      ais = new PrsDim_PerpendicularRelation(shape1,shape2);
     }
     else {
       ais->SetFirstShape(shape1);
@@ -504,7 +505,7 @@ void TPrsStd_ConstraintTools::ComputePerpendicular(const Handle(TDataXtd_Constra
     Handle(Geom_Plane) aplane = Handle(Geom_Plane)::DownCast(ageom3);
     if (aplane.IsNull()) {
 #ifdef OCCT_DEBUG
-      cout << "TPrsStd_ConstraintTools::ComputePerpendicular: nul plane" << endl;
+      std::cout << "TPrsStd_ConstraintTools::ComputePerpendicular: nul plane" << std::endl;
 #endif
       NullifyAIS(anAIS);
       return;
@@ -524,7 +525,7 @@ void TPrsStd_ConstraintTools::ComputeParallel(const Handle(TDataXtd_Constraint)&
   Standard_Integer nbgeom = aConst->NbGeometries();
   if (nbgeom < 2) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeParallel: at least 2 constraintes are needed" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeParallel: at least 2 constraintes are needed" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -532,7 +533,7 @@ void TPrsStd_ConstraintTools::ComputeParallel(const Handle(TDataXtd_Constraint)&
   
   if (!aConst->IsPlanar()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeParallel: must be a planar constraint" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeParallel: must be a planar constraint" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -544,7 +545,7 @@ void TPrsStd_ConstraintTools::ComputeParallel(const Handle(TDataXtd_Constraint)&
   GetShapesAndGeom(aConst,shape1,shape2,ageom3);
   if (shape1.IsNull() || shape2.IsNull()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeParallel : null shape" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeParallel : null shape" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -552,7 +553,7 @@ void TPrsStd_ConstraintTools::ComputeParallel(const Handle(TDataXtd_Constraint)&
   Handle(Geom_Plane) aplane = Handle(Geom_Plane)::DownCast(ageom3);
   if (aplane.IsNull()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeParallel: nul plane" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeParallel: nul plane" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -560,12 +561,12 @@ void TPrsStd_ConstraintTools::ComputeParallel(const Handle(TDataXtd_Constraint)&
   //  Update de l'AIS
   GetGoodShape(shape1);
   GetGoodShape(shape2);
-  Handle(AIS_ParallelRelation) ais;
-  if (anAIS.IsNull()) ais = new AIS_ParallelRelation(shape1,shape2,aplane);
+  Handle(PrsDim_ParallelRelation) ais;
+  if (anAIS.IsNull()) ais = new PrsDim_ParallelRelation(shape1,shape2,aplane);
   else { 
-    ais = Handle(AIS_ParallelRelation)::DownCast(anAIS);
+    ais = Handle(PrsDim_ParallelRelation)::DownCast(anAIS);
     if (ais.IsNull()) {
-      ais = new AIS_ParallelRelation(shape1,shape2,aplane);
+      ais = new PrsDim_ParallelRelation(shape1,shape2,aplane);
     }
     else {
       ais->SetFirstShape(shape1);
@@ -585,7 +586,7 @@ void TPrsStd_ConstraintTools::ComputeSymmetry(const Handle(TDataXtd_Constraint)&
   Standard_Integer nbgeom = aConst->NbGeometries();
   if (nbgeom < 3) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeSymmetry: at least 3 constraintes are needed" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeSymmetry: at least 3 constraintes are needed" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -594,7 +595,7 @@ void TPrsStd_ConstraintTools::ComputeSymmetry(const Handle(TDataXtd_Constraint)&
   Standard_Boolean is_planar(aConst->IsPlanar());
   if (!is_planar) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeSymmetry: must be a planar constraint" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeSymmetry: must be a planar constraint" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -606,7 +607,7 @@ void TPrsStd_ConstraintTools::ComputeSymmetry(const Handle(TDataXtd_Constraint)&
 
   if (shape1.IsNull() || shape2.IsNull() || shape3.IsNull()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeSymmetry : null shape" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeSymmetry : null shape" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -617,18 +618,18 @@ void TPrsStd_ConstraintTools::ComputeSymmetry(const Handle(TDataXtd_Constraint)&
   Handle(Geom_Plane) aplane = Handle(Geom_Plane)::DownCast(ageom3);
   if (aplane.IsNull()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeSymmetry: null plane" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeSymmetry: null plane" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
   }
   //  Update de l'AIS
-  Handle(AIS_SymmetricRelation) ais;
-  if (anAIS.IsNull()) ais = new AIS_SymmetricRelation(shape3,shape1,shape2,aplane);
+  Handle(PrsDim_SymmetricRelation) ais;
+  if (anAIS.IsNull()) ais = new PrsDim_SymmetricRelation(shape3,shape1,shape2,aplane);
   else {
-    ais = Handle(AIS_SymmetricRelation)::DownCast(anAIS);
+    ais = Handle(PrsDim_SymmetricRelation)::DownCast(anAIS);
     if (ais.IsNull()) {
-      ais = new AIS_SymmetricRelation(shape3,shape1,shape2,aplane);
+      ais = new PrsDim_SymmetricRelation(shape3,shape1,shape2,aplane);
     }
     else {
       ais->SetFirstShape(shape1);
@@ -651,7 +652,7 @@ void TPrsStd_ConstraintTools::ComputeMidPoint(const Handle(TDataXtd_Constraint)&
   if (nbgeom < 3)
     {
 #ifdef OCCT_DEBUG
-      cout << "TPrsStd_ConstraintTools::ComputeSymmetry: at least 3 constraints are needed" << endl;
+      std::cout << "TPrsStd_ConstraintTools::ComputeSymmetry: at least 3 constraints are needed" << std::endl;
 #endif
       NullifyAIS(anAIS);
       return;
@@ -661,7 +662,7 @@ void TPrsStd_ConstraintTools::ComputeMidPoint(const Handle(TDataXtd_Constraint)&
   if ( !is_planar )
     {
 #ifdef OCCT_DEBUG
-      cout << "TPrsStd_ConstraintTools::ComputeSymmetry: must be a planar constraint" << endl;
+      std::cout << "TPrsStd_ConstraintTools::ComputeSymmetry: must be a planar constraint" << std::endl;
 #endif
       NullifyAIS(anAIS);
       return;
@@ -674,7 +675,7 @@ void TPrsStd_ConstraintTools::ComputeMidPoint(const Handle(TDataXtd_Constraint)&
   if (shape1.IsNull() || shape2.IsNull() || shape3.IsNull())
     {
 #ifdef OCCT_DEBUG
-      cout << "TPrsStd_ConstraintTools::ComputeSymmetry : null shape" << endl;
+      std::cout << "TPrsStd_ConstraintTools::ComputeSymmetry : null shape" << std::endl;
 #endif
       NullifyAIS(anAIS);
       return;
@@ -687,21 +688,21 @@ void TPrsStd_ConstraintTools::ComputeMidPoint(const Handle(TDataXtd_Constraint)&
   if (aplane.IsNull())
     {
 #ifdef OCCT_DEBUG
-      cout << "TPrsStd_ConstraintTools::ComputeSymmetry: null plane" << endl;
+      std::cout << "TPrsStd_ConstraintTools::ComputeSymmetry: null plane" << std::endl;
 #endif
       NullifyAIS(anAIS);
       return;
     }
 
   //  Update de l'AIS
-  Handle(AIS_MidPointRelation) ais;
-  if ( anAIS.IsNull() ) ais = new AIS_MidPointRelation(shape3,shape1,shape2,aplane);
+  Handle(PrsDim_MidPointRelation) ais;
+  if ( anAIS.IsNull() ) ais = new PrsDim_MidPointRelation(shape3,shape1,shape2,aplane);
   else
     {
-      ais = Handle(AIS_MidPointRelation)::DownCast(anAIS);
+      ais = Handle(PrsDim_MidPointRelation)::DownCast(anAIS);
       if (ais.IsNull())
        {
-         ais = new AIS_MidPointRelation(shape3,shape1,shape2,aplane);
+         ais = new PrsDim_MidPointRelation(shape3,shape1,shape2,aplane);
        }
       else
        {
@@ -724,14 +725,14 @@ void TPrsStd_ConstraintTools::ComputeTangent (const Handle(TDataXtd_Constraint)&
   Standard_Integer nbgeom = aConst->NbGeometries();
   if (nbgeom < 2) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeTangent: at leat two constraintes are needed" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeTangent: at leat two constraintes are needed" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
   }
   if (!aConst->IsPlanar()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeTangent: must be a planar constraint" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeTangent: must be a planar constraint" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -742,7 +743,7 @@ void TPrsStd_ConstraintTools::ComputeTangent (const Handle(TDataXtd_Constraint)&
   GetShapesAndGeom(aConst,shape1,shape2,ageom3);
   if (shape1.IsNull() || shape2.IsNull()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeTangent : null shape" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeTangent : null shape" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -752,24 +753,24 @@ void TPrsStd_ConstraintTools::ComputeTangent (const Handle(TDataXtd_Constraint)&
   Handle(Geom_Plane) aplane = Handle(Geom_Plane)::DownCast(ageom3);
   if (aplane.IsNull()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeTangent: nul plane" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeTangent: nul plane" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;    
   }
   //  Update de l'AIS
-  Handle(AIS_TangentRelation) ais;
+  Handle(PrsDim_TangentRelation) ais;
   if (anAIS.IsNull())
     {
-      ais = new AIS_TangentRelation(shape1,shape2,aplane);
+      ais = new PrsDim_TangentRelation(shape1,shape2,aplane);
       ais->SetArrowSize(10000000); // jfa 9/10/2000
     }
   else
     {
-      ais = Handle(AIS_TangentRelation)::DownCast(anAIS);
+      ais = Handle(PrsDim_TangentRelation)::DownCast(anAIS);
       if (ais.IsNull())
        {
-         ais = new AIS_TangentRelation(shape1,shape2,aplane);
+         ais = new PrsDim_TangentRelation(shape1,shape2,aplane);
          ais->SetArrowSize(10000000); // jfa 9/10/2000
        }
       else
@@ -797,7 +798,7 @@ void TPrsStd_ConstraintTools::ComputeAngleForOneFace (const Handle(TDataXtd_Cons
   GetOneShape( aConst, shape ); 
   if (shape.IsNull() ) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeAngleForOneFace : null shape" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeAngleForOneFace : null shape" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -807,13 +808,13 @@ void TPrsStd_ConstraintTools::ComputeAngleForOneFace (const Handle(TDataXtd_Cons
   TCollection_ExtendedString txt;
   TPrsStd_ConstraintTools::ComputeTextAndValue (aConst,val1,txt,Standard_True);  
   
-  Handle(AIS_AngleDimension) ais;
+  Handle(PrsDim_AngleDimension) ais;
   TopoDS_Face face;
   if (!anAIS.IsNull()) {
-    ais = Handle(AIS_AngleDimension)::DownCast(anAIS);
+    ais = Handle(PrsDim_AngleDimension)::DownCast(anAIS);
     if(ais.IsNull()) {
       face = TopoDS::Face( shape );
-      ais =  new AIS_AngleDimension (face);
+      ais =  new PrsDim_AngleDimension (face);
     }
     else {
       ais->SetMeasuredGeometry(TopoDS::Face( shape ));
@@ -821,7 +822,7 @@ void TPrsStd_ConstraintTools::ComputeAngleForOneFace (const Handle(TDataXtd_Cons
   }
   else {
     face = TopoDS::Face (shape);
-    ais =  new AIS_AngleDimension (face);
+    ais =  new PrsDim_AngleDimension (face);
   } 
 
   anAIS = ais;
@@ -847,7 +848,7 @@ static Standard_Boolean CheckIsShapeCompound(TopoDS_Shape& shape, TopoDS_Face& a
       }
   }
 #ifdef OCCT_DEBUG
-  cout << "TPrsStd::Compute angle : Shape is not Compound or is Null" <<endl;
+  std::cout << "TPrsStd::Compute angle : Shape is not Compound or is Null" <<std::endl;
 #endif
   return (Standard_False);
 }
@@ -864,7 +865,7 @@ void TPrsStd_ConstraintTools::ComputeAngle (const Handle(TDataXtd_Constraint)& a
   if (nbgeom < 2) {
     if( nbgeom == 1 ) { ComputeAngleForOneFace( aConst, anAIS ); return; }
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeAngle: at least 2 constraints are needed" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeAngle: at least 2 constraints are needed" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -876,7 +877,7 @@ void TPrsStd_ConstraintTools::ComputeAngle (const Handle(TDataXtd_Constraint)& a
   GetShapesAndGeom (aConst,shape1,shape2,ageom3);
   if (shape1.IsNull() || shape2.IsNull()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeAngle : null shape" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeAngle : null shape" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -900,8 +901,8 @@ void TPrsStd_ConstraintTools::ComputeAngle (const Handle(TDataXtd_Constraint)& a
       else
        if(!CheckIsShapeCompound(shape1, aFace)) {
 #ifdef OCCT_DEBUG
-       cout << "Compute angle : Geom type = " << shape1.ShapeType()
-         << " non traite"<<endl;
+       std::cout << "Compute angle : Geom type = " << shape1.ShapeType()
+         << " non traite"<<std::endl;
 #endif
        NullifyAIS(anAIS);
        return;      
@@ -926,7 +927,7 @@ void TPrsStd_ConstraintTools::ComputeAngle (const Handle(TDataXtd_Constraint)& a
       anax1aFace1 = aTore.Axis();  
     } else {
 #ifdef OCCT_DEBUG
-      cout<<"Compute angle"<<aTypeaFace<<" non traite"<<endl;
+      std::cout<<"Compute angle"<<aTypeaFace<<" non traite"<<std::endl;
 #endif
       NullifyAIS(anAIS);
       return;      
@@ -947,8 +948,8 @@ void TPrsStd_ConstraintTools::ComputeAngle (const Handle(TDataXtd_Constraint)& a
     else  
       if(!CheckIsShapeCompound(shape2, aFace)) {
 #ifdef OCCT_DEBUG
-       cout << "Compute angle : Geom type = " << shape2.ShapeType()
-         << " non traite"<<endl;
+       std::cout << "Compute angle : Geom type = " << shape2.ShapeType()
+         << " non traite"<<std::endl;
 #endif
        NullifyAIS(anAIS);
        return;      
@@ -970,7 +971,7 @@ void TPrsStd_ConstraintTools::ComputeAngle (const Handle(TDataXtd_Constraint)& a
       anax1aFace2 = aTore.Axis();  
     } else {
 #ifdef OCCT_DEBUG
-      cout << "Compute angle " << aTypeaFace << " non traite"<<endl;
+      std::cout << "Compute angle " << aTypeaFace << " non traite"<<std::endl;
 #endif
       NullifyAIS(anAIS);
       return;      
@@ -987,7 +988,7 @@ void TPrsStd_ConstraintTools::ComputeAngle (const Handle(TDataXtd_Constraint)& a
          ageom3 = computedgeom3;
        } else {
 #ifdef OCCT_DEBUG
-         cout<<"Compute angle insertection of planes failed"<<endl;
+         std::cout<<"Compute angle insertection of planes failed"<<std::endl;
 #endif
          NullifyAIS(anAIS);
          return;            
@@ -995,7 +996,7 @@ void TPrsStd_ConstraintTools::ComputeAngle (const Handle(TDataXtd_Constraint)& a
       } else {
        
 #ifdef OCCT_DEBUG
-       cout<<"Compute angle faces are //"<<endl;
+       std::cout<<"Compute angle faces are //"<<std::endl;
 #endif
        NullifyAIS(anAIS);
        return;            
@@ -1014,7 +1015,7 @@ void TPrsStd_ConstraintTools::ComputeAngle (const Handle(TDataXtd_Constraint)& a
     else if (ageom3->IsKind(STANDARD_TYPE(Geom_Line))) isplan = Standard_False;
     else {
 #ifdef OCCT_DEBUG
-      cout << "TPrsStd_ConstraintTools::ComputeAngle: unknown 3rd arg " << endl;
+      std::cout << "TPrsStd_ConstraintTools::ComputeAngle: unknown 3rd arg " << std::endl;
 #endif
       NullifyAIS(anAIS);
       return;
@@ -1027,9 +1028,9 @@ void TPrsStd_ConstraintTools::ComputeAngle (const Handle(TDataXtd_Constraint)& a
   Standard_Boolean toCreate (Standard_True);
   Standard_Boolean isface(shape1.ShapeType()==TopAbs_FACE);
   
-  Handle(AIS_AngleDimension) ais;
+  Handle(PrsDim_AngleDimension) ais;
   if (!anAIS.IsNull()) {
-    ais = Handle(AIS_AngleDimension)::DownCast(anAIS);
+    ais = Handle(PrsDim_AngleDimension)::DownCast(anAIS);
     if( ais.IsNull() ) {
       toCreate = Standard_True;
     }
@@ -1044,17 +1045,17 @@ void TPrsStd_ConstraintTools::ComputeAngle (const Handle(TDataXtd_Constraint)& a
        FindExternalShape(aConst,ExtShape);
        GetGoodShape(shape1);
        GetGoodShape(shape2);
-       ais = new AIS_AngleDimension (TopoDS::Edge(shape1),
+       ais = new PrsDim_AngleDimension (TopoDS::Edge(shape1),
                                      TopoDS::Edge(shape2));
       }
     }
     else { 
       if (isCurvilinear) {
-  ais = new AIS_AngleDimension (TopoDS::Face(shape1),
+  ais = new PrsDim_AngleDimension (TopoDS::Face(shape1),
                                 TopoDS::Face(shape2));
       }
       else if (isface) {
-  ais =  new AIS_AngleDimension (TopoDS::Face(shape1),
+  ais =  new PrsDim_AngleDimension (TopoDS::Face(shape1),
                                  TopoDS::Face(shape2));
       }
     }
@@ -1092,7 +1093,7 @@ void TPrsStd_ConstraintTools::ComputeConcentric(const Handle(TDataXtd_Constraint
   }
   if (!aConst->IsPlanar()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeConcentric: must be a planar constraint" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeConcentric: must be a planar constraint" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -1103,7 +1104,7 @@ void TPrsStd_ConstraintTools::ComputeConcentric(const Handle(TDataXtd_Constraint
   GetShapesAndGeom(aConst,shape1,shape2,ageom3);
   if (shape1.IsNull() || shape2.IsNull()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeConcentric : null shape" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeConcentric : null shape" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -1115,7 +1116,7 @@ void TPrsStd_ConstraintTools::ComputeConcentric(const Handle(TDataXtd_Constraint
 //ota : to allow concentric constraint display between vertex and edge
   if (shape1.ShapeType() != TopAbs_EDGE && shape2.ShapeType() != TopAbs_EDGE) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeConcentric: concentric between two vertexes : NOT DISPLAYED" << endl;;
+    std::cout << "TPrsStd_ConstraintTools::ComputeConcentric: concentric between two vertexes : NOT DISPLAYED" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -1124,17 +1125,17 @@ void TPrsStd_ConstraintTools::ComputeConcentric(const Handle(TDataXtd_Constraint
   Handle(Geom_Plane) aplane = Handle(Geom_Plane)::DownCast(ageom3);
   if (aplane.IsNull()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeConcentric: nul plane" << endl;;
+    std::cout << "TPrsStd_ConstraintTools::ComputeConcentric: nul plane" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
   }
   //  Update de l'AIS
-  Handle(AIS_ConcentricRelation) ais;
+  Handle(PrsDim_ConcentricRelation) ais;
   if (!anAIS.IsNull()) {
-    ais = Handle(AIS_ConcentricRelation)::DownCast(anAIS);
+    ais = Handle(PrsDim_ConcentricRelation)::DownCast(anAIS);
     if (ais.IsNull()) {
-      ais = new AIS_ConcentricRelation (shape1,shape2,aplane);
+      ais = new PrsDim_ConcentricRelation (shape1,shape2,aplane);
     } 
     else {
       ais->SetFirstShape(shape1);
@@ -1143,7 +1144,7 @@ void TPrsStd_ConstraintTools::ComputeConcentric(const Handle(TDataXtd_Constraint
     }
   }
   else {
-    ais = new AIS_ConcentricRelation (shape1,shape2,aplane);
+    ais = new PrsDim_ConcentricRelation (shape1,shape2,aplane);
   }
 
   anAIS = ais;
@@ -1159,7 +1160,7 @@ void TPrsStd_ConstraintTools::ComputeRadius (const Handle(TDataXtd_Constraint)&
   Standard_Integer nbgeom = aConst->NbGeometries();
   if (nbgeom < 1) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeRadius: at least one constrainte is needed" << endl;    
+    std::cout << "TPrsStd_ConstraintTools::ComputeRadius: at least one constrainte is needed" << std::endl;    
 #endif
     NullifyAIS(anAIS);
     return;
@@ -1169,7 +1170,7 @@ void TPrsStd_ConstraintTools::ComputeRadius (const Handle(TDataXtd_Constraint)&
   GetOneShape (aConst,shape1);
   if (shape1.IsNull()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeRadius: null shape" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeRadius: null shape" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -1181,7 +1182,7 @@ void TPrsStd_ConstraintTools::ComputeRadius (const Handle(TDataXtd_Constraint)&
       shape1.ShapeType()==TopAbs_SOLID ||
       shape1.ShapeType()==TopAbs_SHELL ) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeRadius: not good shape" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeRadius: not good shape" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -1198,17 +1199,17 @@ void TPrsStd_ConstraintTools::ComputeRadius (const Handle(TDataXtd_Constraint)&
   Standard_Boolean isplanar(aConst->IsPlanar());
   if (isplanar) GetGoodShape(shape1);
 
-  Handle(AIS_RadiusDimension) ais;
+  Handle(PrsDim_RadiusDimension) ais;
   if (!anAIS.IsNull()) {
-    ais = Handle(AIS_RadiusDimension)::DownCast(anAIS);
+    ais = Handle(PrsDim_RadiusDimension)::DownCast(anAIS);
     if (ais.IsNull()) {
-      ais = new AIS_RadiusDimension (shape1);
+      ais = new PrsDim_RadiusDimension (shape1);
     }
     else {
       ais->SetMeasuredGeometry(shape1);
     }
   }
-  else ais = new AIS_RadiusDimension (shape1);
+  else ais = new PrsDim_RadiusDimension (shape1);
 
   if (isplanar) {
     Handle(Geom_Geometry) ageom2;
@@ -1216,7 +1217,7 @@ void TPrsStd_ConstraintTools::ComputeRadius (const Handle(TDataXtd_Constraint)&
     Handle(Geom_Plane) aplane = Handle(Geom_Plane)::DownCast(ageom2);
     if (aplane.IsNull()) {
 #ifdef OCCT_DEBUG
-      cout << "TPrsStd_ConstraintTools::ComputeRadius: nul plane" << endl;
+      std::cout << "TPrsStd_ConstraintTools::ComputeRadius: nul plane" << std::endl;
 #endif
       NullifyAIS(anAIS);
       return;
@@ -1236,7 +1237,7 @@ void TPrsStd_ConstraintTools::ComputeMinRadius (const Handle(TDataXtd_Constraint
   Standard_Integer nbgeom = aConst->NbGeometries();
   if (nbgeom < 1) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeMinRadius: at least one constrainte is needed" << endl;    
+    std::cout << "TPrsStd_ConstraintTools::ComputeMinRadius: at least one constrainte is needed" << std::endl;    
 #endif
     NullifyAIS(anAIS);
     return;
@@ -1246,7 +1247,7 @@ void TPrsStd_ConstraintTools::ComputeMinRadius (const Handle(TDataXtd_Constraint
   GetOneShape (aConst,shape1);
   if (shape1.IsNull()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeMinradius: null shape" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeMinradius: null shape" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -1258,7 +1259,7 @@ void TPrsStd_ConstraintTools::ComputeMinRadius (const Handle(TDataXtd_Constraint
       shape1.ShapeType()==TopAbs_SOLID ||
       shape1.ShapeType()==TopAbs_SHELL ) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeMinRadius: not good shape" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeMinRadius: not good shape" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -1275,11 +1276,11 @@ void TPrsStd_ConstraintTools::ComputeMinRadius (const Handle(TDataXtd_Constraint
   Standard_Boolean isplanar(aConst->IsPlanar());
   if (isplanar) GetGoodShape(shape1);
 
-  Handle(AIS_MinRadiusDimension) ais;
+  Handle(PrsDim_MinRadiusDimension) ais;
   if (!anAIS.IsNull()) {
-    ais = Handle(AIS_MinRadiusDimension)::DownCast(anAIS);
+    ais = Handle(PrsDim_MinRadiusDimension)::DownCast(anAIS);
     if (ais.IsNull()) {
-      ais = new AIS_MinRadiusDimension (shape1,val1,txt);
+      ais = new PrsDim_MinRadiusDimension (shape1,val1,txt);
     }
     else {
       ais->SetValue(val1);
@@ -1287,7 +1288,7 @@ void TPrsStd_ConstraintTools::ComputeMinRadius (const Handle(TDataXtd_Constraint
       ais->SetText(txt);    
     }
   }
-  else ais = new AIS_MinRadiusDimension (shape1,val1,txt);
+  else ais = new PrsDim_MinRadiusDimension (shape1,val1,txt);
 
   if (isplanar) {
     Handle(Geom_Geometry) ageom2;
@@ -1295,7 +1296,7 @@ void TPrsStd_ConstraintTools::ComputeMinRadius (const Handle(TDataXtd_Constraint
     Handle(Geom_Plane) aplane = Handle(Geom_Plane)::DownCast(ageom2);
     if (aplane.IsNull()) {
 #ifdef OCCT_DEBUG
-      cout << "TPrsStd_ConstraintTools::ComputeMinRadius: nul plane" << endl;
+      std::cout << "TPrsStd_ConstraintTools::ComputeMinRadius: nul plane" << std::endl;
 #endif
       NullifyAIS(anAIS);
       return;
@@ -1315,7 +1316,7 @@ void TPrsStd_ConstraintTools::ComputeMaxRadius (const Handle(TDataXtd_Constraint
   Standard_Integer nbgeom = aConst->NbGeometries();
   if (nbgeom < 1) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeMaxRadius: at least one constrainte is needed" << endl;    
+    std::cout << "TPrsStd_ConstraintTools::ComputeMaxRadius: at least one constrainte is needed" << std::endl;    
 #endif
     NullifyAIS(anAIS);
     return;
@@ -1325,7 +1326,7 @@ void TPrsStd_ConstraintTools::ComputeMaxRadius (const Handle(TDataXtd_Constraint
   GetOneShape (aConst,shape1);
   if (shape1.IsNull()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeMaxradius: null shape" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeMaxradius: null shape" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -1337,7 +1338,7 @@ void TPrsStd_ConstraintTools::ComputeMaxRadius (const Handle(TDataXtd_Constraint
       shape1.ShapeType()==TopAbs_SOLID ||
       shape1.ShapeType()==TopAbs_SHELL ) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeMaxRadius: not good shape" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeMaxRadius: not good shape" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -1354,11 +1355,11 @@ void TPrsStd_ConstraintTools::ComputeMaxRadius (const Handle(TDataXtd_Constraint
   Standard_Boolean isplanar(aConst->IsPlanar());
   if (isplanar) GetGoodShape(shape1);
 
-  Handle(AIS_MaxRadiusDimension) ais;
+  Handle(PrsDim_MaxRadiusDimension) ais;
   if (!anAIS.IsNull()) {
-    ais = Handle(AIS_MaxRadiusDimension)::DownCast(anAIS);
+    ais = Handle(PrsDim_MaxRadiusDimension)::DownCast(anAIS);
     if (ais.IsNull()) {
-      ais = new AIS_MaxRadiusDimension (shape1,val1,txt);
+      ais = new PrsDim_MaxRadiusDimension (shape1,val1,txt);
     }
     else {
       ais->SetValue(val1);
@@ -1366,7 +1367,7 @@ void TPrsStd_ConstraintTools::ComputeMaxRadius (const Handle(TDataXtd_Constraint
       ais->SetText(txt);    
     }
   }
-  else ais = new AIS_MaxRadiusDimension (shape1,val1,txt);
+  else ais = new PrsDim_MaxRadiusDimension (shape1,val1,txt);
 
   if (isplanar) {
     Handle(Geom_Geometry) ageom2;
@@ -1374,7 +1375,7 @@ void TPrsStd_ConstraintTools::ComputeMaxRadius (const Handle(TDataXtd_Constraint
     Handle(Geom_Plane) aplane = Handle(Geom_Plane)::DownCast(ageom2);
     if (aplane.IsNull()) {
 #ifdef OCCT_DEBUG
-      cout << "TPrsStd_ConstraintTools::ComputeMaxRadius: nul plane" << endl;
+      std::cout << "TPrsStd_ConstraintTools::ComputeMaxRadius: nul plane" << std::endl;
 #endif
       NullifyAIS(anAIS);
       return;
@@ -1394,7 +1395,7 @@ void TPrsStd_ConstraintTools::ComputeEqualDistance(const Handle(TDataXtd_Constra
   Standard_Integer nbgeom = aConst->NbGeometries();
   if (nbgeom < 4) {
 #ifdef OCCT_DEBUG
-      cout << "TPrsStd_ConstraintTools::ComputeEqual: at least four geometries are needed" << endl;;
+      std::cout << "TPrsStd_ConstraintTools::ComputeEqual: at least four geometries are needed" << std::endl;
 #endif
       NullifyAIS(anAIS);
       return;
@@ -1405,7 +1406,7 @@ void TPrsStd_ConstraintTools::ComputeEqualDistance(const Handle(TDataXtd_Constra
    if (aShape1.IsNull()||aShape2.IsNull()||
        aShape3.IsNull()||aShape4.IsNull()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeEqualDistance : null shape" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeEqualDistance : null shape" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -1419,7 +1420,7 @@ void TPrsStd_ConstraintTools::ComputeEqualDistance(const Handle(TDataXtd_Constra
   if (!CheckShapesPair(aShape1, aShape2) || 
       !CheckShapesPair(aShape3, aShape4)){
 #ifdef OCCT_DEBUG
-       cout << "TPrsStd_ConstraintTools::ComputeEqualDistance : at least one pair of shapes is incorrect"<<endl;
+       std::cout << "TPrsStd_ConstraintTools::ComputeEqualDistance : at least one pair of shapes is incorrect"<<std::endl;
 #endif
        NullifyAIS(anAIS);
        return;
@@ -1433,20 +1434,20 @@ void TPrsStd_ConstraintTools::ComputeEqualDistance(const Handle(TDataXtd_Constra
   if (!IsPlanar || aPlane.IsNull()) {
     //create the plane
 #ifdef OCCT_DEBUG
-    cout<< "The constraint plane is not assigned "<< endl;
+    std::cout<< "The constraint plane is not assigned "<< std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
   }
   
   //Update AIS
-  Handle(AIS_EqualDistanceRelation) ais; 
+  Handle(PrsDim_EqualDistanceRelation) ais;
   if (!anAIS.IsNull()) {
     {
-      ais = Handle(AIS_EqualDistanceRelation)::DownCast(anAIS);
+      ais = Handle(PrsDim_EqualDistanceRelation)::DownCast(anAIS);
     
       if (ais.IsNull()) 
-       ais = new AIS_EqualDistanceRelation(aShape1, aShape2, aShape3, aShape4, aPlane);
+       ais = new PrsDim_EqualDistanceRelation(aShape1, aShape2, aShape3, aShape4, aPlane);
       
       else {
        ais->SetFirstShape(aShape1);
@@ -1457,7 +1458,7 @@ void TPrsStd_ConstraintTools::ComputeEqualDistance(const Handle(TDataXtd_Constra
       }
     }
   }
-  else ais = new AIS_EqualDistanceRelation(aShape1, aShape2, aShape3, aShape4, aPlane);
+  else ais = new PrsDim_EqualDistanceRelation(aShape1, aShape2, aShape3, aShape4, aPlane);
   
   anAIS = ais;  
 
@@ -1488,7 +1489,7 @@ static Standard_Boolean CheckShapesPair(const TopoDS_Shape& aShape1,
          gp_Dir aDir2 = aCurve2.Line().Direction();
          if (!(aDir1.IsParallel(aDir2, Precision::Confusion()))) {
 #ifdef OCCT_DEBUG
-           cout << " Lines are not parallel"<<endl;
+           std::cout << " Lines are not parallel"<<std::endl;
 #endif
            return Standard_False;
          }
@@ -1499,14 +1500,14 @@ static Standard_Boolean CheckShapesPair(const TopoDS_Shape& aShape1,
          gp_Pnt aCntr2 = aCurve2.Circle().Location(); //get the circle center
          if (!aCntr1.IsEqual(aCntr2,Precision::Confusion())){
 #ifdef OCCT_DEBUG
-           cout << " Circles are not concentric"<<endl;
+           std::cout << " Circles are not concentric"<<std::endl;
 #endif
            return Standard_False;
          }
        }
       else {
 #ifdef OCCT_DEBUG
-       cout << "Incorrect pair of curves "<<endl;
+       std::cout << "Incorrect pair of curves "<<std::endl;
 #endif
        return Standard_False;
       }
@@ -1528,7 +1529,7 @@ static Standard_Boolean CheckShapesPair(const TopoDS_Shape& aShape1,
          gp_Pnt aCntr = aCurve.Circle().Location();
          if (!aCntr.IsEqual(aPnt, Precision::Confusion())){
 #ifdef OCCT_DEBUG
-           cout << " The point doesn't coincide with the circle center"<<endl;
+           std::cout << " The point doesn't coincide with the circle center"<<std::endl;
 #endif
            return Standard_False;
          }
@@ -1547,7 +1548,7 @@ void TPrsStd_ConstraintTools::ComputeEqualRadius(const Handle(TDataXtd_Constrain
   Standard_Integer nbgeom = aConst->NbGeometries();
   if (nbgeom < 2) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeEqualRadius: at least two geometries are needed" << endl;;
+    std::cout << "TPrsStd_ConstraintTools::ComputeEqualRadius: at least two geometries are needed" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -1558,7 +1559,7 @@ void TPrsStd_ConstraintTools::ComputeEqualRadius(const Handle(TDataXtd_Constrain
   GetShapesAndGeom(aConst, shape1, shape2, ageom3);
   if (shape1.IsNull()||shape2.IsNull()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeEqualRadius : null shape" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeEqualRadius : null shape" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -1602,18 +1603,18 @@ void TPrsStd_ConstraintTools::ComputeEqualRadius(const Handle(TDataXtd_Constrain
       aplane = aPlane2;
     else {
 #ifdef OCCT_DEBUG
-      cout << "TPrsStd_ConstraintTools::ComputeRadiusRelation: nul plane" << endl;
+      std::cout << "TPrsStd_ConstraintTools::ComputeRadiusRelation: nul plane" << std::endl;
 #endif
       NullifyAIS(anAIS);
       return;
     }
   }   
-  Handle(AIS_EqualRadiusRelation) ais;
+  Handle(PrsDim_EqualRadiusRelation) ais;
   if (!anAIS.IsNull()) {
-    ais = Handle(AIS_EqualRadiusRelation)::DownCast(anAIS);
+    ais = Handle(PrsDim_EqualRadiusRelation)::DownCast(anAIS);
     
     if (ais.IsNull()) {
-      ais = new AIS_EqualRadiusRelation(edge1, edge2, aplane);
+      ais = new PrsDim_EqualRadiusRelation(edge1, edge2, aplane);
       }
     else {
       ais->SetFirstShape(shape1);
@@ -1622,7 +1623,7 @@ void TPrsStd_ConstraintTools::ComputeEqualRadius(const Handle(TDataXtd_Constrain
     }
   }
   else {
-    ais = new AIS_EqualRadiusRelation(edge1, edge2, aplane);
+    ais = new PrsDim_EqualRadiusRelation(edge1, edge2, aplane);
   }
   
   anAIS = ais;
@@ -1639,7 +1640,7 @@ void TPrsStd_ConstraintTools::ComputeDiameter(const Handle(TDataXtd_Constraint)&
   Standard_Integer nbgeom = aConst->NbGeometries();
   if (nbgeom < 1) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeDiameter: at least one constrainte is needed" << endl;;
+    std::cout << "TPrsStd_ConstraintTools::ComputeDiameter: at least one constrainte is needed" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -1649,7 +1650,7 @@ void TPrsStd_ConstraintTools::ComputeDiameter(const Handle(TDataXtd_Constraint)&
   GetOneShape(aConst,shape1);
   if (shape1.IsNull()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeDiameter : null shape" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeDiameter : null shape" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -1661,17 +1662,17 @@ void TPrsStd_ConstraintTools::ComputeDiameter(const Handle(TDataXtd_Constraint)&
   //  Update de l'AIS
   Standard_Boolean IsPlanar(aConst->IsPlanar());
   if (IsPlanar) GetGoodShape(shape1);
-  Handle(AIS_DiameterDimension) ais;
+  Handle(PrsDim_DiameterDimension) ais;
   if (!anAIS.IsNull()) {
-    ais = Handle(AIS_DiameterDimension)::DownCast(anAIS);
+    ais = Handle(PrsDim_DiameterDimension)::DownCast(anAIS);
     if (ais.IsNull()) {
-      ais = new AIS_DiameterDimension (shape1);
+      ais = new PrsDim_DiameterDimension (shape1);
     }
     else {
       ais->SetMeasuredGeometry(shape1);
     }
   }
-  else ais = new AIS_DiameterDimension (shape1);
+  else ais = new PrsDim_DiameterDimension (shape1);
 
   if (IsPlanar) {
     Handle(Geom_Geometry) ageom2;
@@ -1679,7 +1680,7 @@ void TPrsStd_ConstraintTools::ComputeDiameter(const Handle(TDataXtd_Constraint)&
     Handle(Geom_Plane) aplane = Handle(Geom_Plane)::DownCast(ageom2);
     if (aplane.IsNull()) {
 #ifdef OCCT_DEBUG
-      cout << "TPrsStd_ConstraintTools::ComputeDiameter: nul plane" << endl;
+      std::cout << "TPrsStd_ConstraintTools::ComputeDiameter: nul plane" << std::endl;
 #endif
       NullifyAIS(anAIS);
       return;
@@ -1700,14 +1701,14 @@ void TPrsStd_ConstraintTools::ComputeFix(const Handle(TDataXtd_Constraint)& aCon
   Standard_Integer nbgeom = aConst->NbGeometries();
   if (nbgeom < 1) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeFix: at least one constrainte is needed" << endl;;
+    std::cout << "TPrsStd_ConstraintTools::ComputeFix: at least one constrainte is needed" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
   }
   if (!aConst->IsPlanar()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeFix: must be a planar constraint" << endl;;
+    std::cout << "TPrsStd_ConstraintTools::ComputeFix: must be a planar constraint" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -1719,7 +1720,7 @@ void TPrsStd_ConstraintTools::ComputeFix(const Handle(TDataXtd_Constraint)& aCon
   GetOneShape(aConst,shape1);
   if (shape1.IsNull()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeFix : null shape" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeFix : null shape" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -1729,24 +1730,24 @@ void TPrsStd_ConstraintTools::ComputeFix(const Handle(TDataXtd_Constraint)& aCon
   Handle(Geom_Plane) aplane = Handle(Geom_Plane)::DownCast(ageom2);
   if (aplane.IsNull()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeFix: nul plane" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeFix: nul plane" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
   }
   //  Update de l'AIS
-  Handle(AIS_FixRelation) ais;
+  Handle(PrsDim_FixRelation) ais;
   if (!anAIS.IsNull()) {
-    ais = Handle(AIS_FixRelation)::DownCast(anAIS);
+    ais = Handle(PrsDim_FixRelation)::DownCast(anAIS);
     if (ais.IsNull()) {
-      ais = new AIS_FixRelation (shape1,aplane);
+      ais = new PrsDim_FixRelation (shape1,aplane);
     }
     else {
       ais->SetFirstShape(shape1);
       ais->SetPlane(aplane);
     }
   }
-  else ais = new AIS_FixRelation (shape1,aplane);
+  else ais = new PrsDim_FixRelation (shape1,aplane);
 
   anAIS = ais;
 }
@@ -1767,7 +1768,7 @@ void TPrsStd_ConstraintTools::ComputeOffset (const Handle(TDataXtd_Constraint)&
     aplane = Handle(Geom_Plane)::DownCast (ageom);
     if (aplane.IsNull()) {
 #ifdef OCCT_DEBUG
-      cout << "TPrsStd_ConstraintTools::ComputeOffset: null plane" << endl;
+      std::cout << "TPrsStd_ConstraintTools::ComputeOffset: null plane" << std::endl;
 #endif
       NullifyAIS(anAIS);
       return;
@@ -1794,7 +1795,7 @@ void TPrsStd_ConstraintTools::ComputeOffset (const Handle(TDataXtd_Constraint)&
 
   if (S1.IsNull() || S2.IsNull()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeOffset: null shape" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeOffset: null shape" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -1803,7 +1804,7 @@ void TPrsStd_ConstraintTools::ComputeOffset (const Handle(TDataXtd_Constraint)&
 
   Standard_Real val1;
   TCollection_ExtendedString txt;
-  Handle(AIS_LengthDimension) ais;
+  Handle(PrsDim_LengthDimension) ais;
   //Handle(Prs3d_Drawer) aDrawer;
 
   if (nbgeom == 1)
@@ -1811,14 +1812,14 @@ void TPrsStd_ConstraintTools::ComputeOffset (const Handle(TDataXtd_Constraint)&
     ComputeTextAndValue (aConst,val1,txt,Standard_False);
     if (!anAIS.IsNull())
     {
-      ais = Handle(AIS_LengthDimension)::DownCast(anAIS);
+      ais = Handle(PrsDim_LengthDimension)::DownCast(anAIS);
     }
 
     if (S1.ShapeType() == TopAbs_FACE && S2.ShapeType() == TopAbs_FACE)
     {
       if (ais.IsNull())
       {
-        ais = new AIS_LengthDimension (TopoDS::Face(S1),TopoDS::Face(S2));
+        ais = new PrsDim_LengthDimension (TopoDS::Face(S1),TopoDS::Face(S2));
       }
       else
       {
@@ -1851,7 +1852,7 @@ void TPrsStd_ConstraintTools::ComputeOffset (const Handle(TDataXtd_Constraint)&
        aplane = new Geom_Plane (NLin.Location(),NLin.Direction()^TDir);
 
        if (ais.IsNull()) {
-         ais = new AIS_LengthDimension (S1,S2,aplane->Pln());
+         ais = new PrsDim_LengthDimension (S1,S2,aplane->Pln());
        }
        else {
          ais->SetMeasuredShapes (S1, S2);
@@ -1912,9 +1913,9 @@ void TPrsStd_ConstraintTools::ComputeOffset (const Handle(TDataXtd_Constraint)&
       }
     }
     S2 = nearest;
-    ais = Handle(AIS_LengthDimension)::DownCast(anAIS);
+    ais = Handle(PrsDim_LengthDimension)::DownCast(anAIS);
     if (ais.IsNull()) {
-      ais = new AIS_LengthDimension (S1,S2,aplane->Pln());
+      ais = new PrsDim_LengthDimension (S1,S2,aplane->Pln());
     }
     else {
       ais->SetMeasuredShapes (S1, S2);
@@ -1926,7 +1927,7 @@ void TPrsStd_ConstraintTools::ComputeOffset (const Handle(TDataXtd_Constraint)&
   }
 
 #ifdef OCCT_DEBUG
-  cout << "TPrsStd_ConstraintTools::ComputeOffset: Case not implemented" << endl;
+  std::cout << "TPrsStd_ConstraintTools::ComputeOffset: Case not implemented" << std::endl;
 #endif
   NullifyAIS(anAIS);
 }
@@ -1948,7 +1949,7 @@ void TPrsStd_ConstraintTools::ComputePlacement
   GetTwoShapes(aConst,shape1,shape2);
   if (shape1.IsNull() || shape2.IsNull()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputePlacement: nul shape" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputePlacement: nul shape" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -1960,14 +1961,14 @@ void TPrsStd_ConstraintTools::ComputePlacement
     ComputeTextAndValue(aConst,val1,txt,Standard_False);
   }
   //  Update de l'AIS
-  Handle(AIS_OffsetDimension) ais;
+  Handle(PrsDim_OffsetDimension) ais;
   if (anAIS.IsNull()) {
-    ais = new AIS_OffsetDimension(GetFace(shape1),GetFace(shape2),val1,txt);
+    ais = new PrsDim_OffsetDimension(GetFace(shape1),GetFace(shape2),val1,txt);
     ais->SetArrowSize(val1/20.);
   } else {
-    ais = Handle(AIS_OffsetDimension)::DownCast(anAIS);
+    ais = Handle(PrsDim_OffsetDimension)::DownCast(anAIS);
     if (ais.IsNull()) {
-      ais = new AIS_OffsetDimension(GetFace(shape1),GetFace(shape2),val1,txt);
+      ais = new PrsDim_OffsetDimension(GetFace(shape1),GetFace(shape2),val1,txt);
       ais->SetArrowSize(val1/20.);
     } else {
       ais->SetFirstShape(GetFace(shape1));
@@ -2079,7 +2080,7 @@ void TPrsStd_ConstraintTools::ComputeCoincident(const Handle(TDataXtd_Constraint
   Standard_Integer nbgeom = aConst->NbGeometries();
   if (nbgeom < 2) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeCoincident: at leat two constraintes are needed" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeCoincident: at leat two constraintes are needed" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return; 
@@ -2087,7 +2088,7 @@ void TPrsStd_ConstraintTools::ComputeCoincident(const Handle(TDataXtd_Constraint
   
   if (!aConst->IsPlanar()) { 
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeCoincident: must be a planar constraint" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeCoincident: must be a planar constraint" << std::endl;
 #endif
     anAIS.Nullify() ; 
     return;
@@ -2099,7 +2100,7 @@ void TPrsStd_ConstraintTools::ComputeCoincident(const Handle(TDataXtd_Constraint
   Handle(Geom_Plane) aplane = Handle(Geom_Plane)::DownCast (ageom);
   if (shape1.IsNull() || shape2.IsNull()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeCoincident: nul shape" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeCoincident: nul shape" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -2109,19 +2110,19 @@ void TPrsStd_ConstraintTools::ComputeCoincident(const Handle(TDataXtd_Constraint
   GetGoodShape(shape2);
   if (aplane.IsNull()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeCoincident: nul plane" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeCoincident: nul plane" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
   }
   
   //  Update de l'AIS
-  Handle(AIS_IdenticRelation) ais;
-  if (anAIS.IsNull()) ais = new AIS_IdenticRelation(shape1,shape2,aplane);
+  Handle(PrsDim_IdenticRelation) ais;
+  if (anAIS.IsNull()) ais = new PrsDim_IdenticRelation(shape1,shape2,aplane);
   else {
-    ais = Handle(AIS_IdenticRelation)::DownCast(anAIS);
+    ais = Handle(PrsDim_IdenticRelation)::DownCast(anAIS);
     if (ais.IsNull()) {
-      ais = new AIS_IdenticRelation(shape1,shape2,aplane);
+      ais = new PrsDim_IdenticRelation(shape1,shape2,aplane);
     }
     else {
       ais->SetFirstShape(shape1);
@@ -2142,7 +2143,7 @@ void TPrsStd_ConstraintTools::ComputeRound(const Handle(TDataXtd_Constraint)& aC
   Standard_Integer nbgeom = aConst->NbGeometries();
   if (nbgeom < 1) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputeRound: at leat one geometry is needed" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputeRound: at leat one geometry is needed" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return; 
@@ -2151,7 +2152,7 @@ void TPrsStd_ConstraintTools::ComputeRound(const Handle(TDataXtd_Constraint)& aC
   GetOneShape (aConst,shape1);
   if (shape1.IsNull()) {
 #ifdef OCCT_DEBUG
-    cout << "TPrsStd_ConstraintTools::ComputePlacement: nul shape" << endl;
+    std::cout << "TPrsStd_ConstraintTools::ComputePlacement: nul shape" << std::endl;
 #endif
     NullifyAIS(anAIS);
     return;
@@ -2162,24 +2163,24 @@ void TPrsStd_ConstraintTools::ComputeRound(const Handle(TDataXtd_Constraint)& aC
   ComputeTextAndValue(aConst,val1,txt,Standard_False);
   
   //  Update de l'AIS
-  Handle(AIS_RadiusDimension) ais;
+  Handle(PrsDim_RadiusDimension) ais;
 
   {
    try {
      OCC_CATCH_SIGNALS
      if (anAIS.IsNull()) ais = 
-       new AIS_RadiusDimension(shape1);
+       new PrsDim_RadiusDimension(shape1);
      else {
-       ais = Handle(AIS_RadiusDimension)::DownCast(anAIS);
+       ais = Handle(PrsDim_RadiusDimension)::DownCast(anAIS);
        if (ais.IsNull()) {
-         ais = new AIS_RadiusDimension(shape1);
+         ais = new PrsDim_RadiusDimension(shape1);
        }
        else {
          ais->SetMeasuredGeometry(shape1);
        }
      }
    }
-   catch(Standard_Failure) {
+   catch(Standard_Failure const&) {
      ais.Nullify();
    }
  }
@@ -2196,7 +2197,7 @@ void TPrsStd_ConstraintTools::GetGeom(const Handle(TDataXtd_Constraint)& aConst,
   Handle(TNaming_NamedShape) atgeom = aConst->GetPlane();
   if (atgeom.IsNull()) {
 #ifdef OCCT_DEBUG
-    cout<<"TPrsStd_ConstraintTools::GetGeom : aConst->GetPlane().IsNull()"<<endl;
+    std::cout<<"TPrsStd_ConstraintTools::GetGeom : aConst->GetPlane().IsNull()"<<std::endl;
 #endif
     return;
   }
@@ -2217,7 +2218,7 @@ void TPrsStd_ConstraintTools::GetGeom(const Handle(TDataXtd_Constraint)& aConst,
   else if (TDataXtd_Geometry::Point(label,apoint)) aGeom =  new Geom_CartesianPoint(apoint);
 #ifdef OCCT_DEBUG
   else {
-    cout << "TPrsStd_ConstraintTools::GetGeom no geom on label " << endl;
+    std::cout << "TPrsStd_ConstraintTools::GetGeom no geom on label " << std::endl;
   }
 #endif  
 }