0031731: Draw Harness - colorize errors and exception messages
authorkgv <kgv@opencascade.com>
Mon, 24 Aug 2020 16:13:08 +0000 (19:13 +0300)
committerkgv <kgv@opencascade.com>
Tue, 25 Aug 2020 06:44:15 +0000 (09:44 +0300)
Draw_Interpretor, CommandCmd() - catched exceptions and messages put into Tcl string result
before throwing a Tcl exception (return 1) are now print in intense red (using Message::SendFail()).
Duplication of exception message in std::cout and Tcl output has been removed.

Draw Harness plugins have been updated to use either Message::SendFail() or theDI instead of std::cout/std::cerr
for printing colored error message before throwing a Tcl exception.

98 files changed:
src/BRepTest/BRepTest_BasicCommands.cxx
src/BRepTest/BRepTest_ExtremaCommands.cxx
src/BRepTest/BRepTest_FeatureCommands.cxx
src/BRepTest/BRepTest_FilletCommands.cxx
src/BRepTest/BRepTest_OtherCommands.cxx
src/BRepTest/BRepTest_PrimitiveCommands.cxx
src/BRepTest/BRepTest_SurfaceCommands.cxx
src/BRepTest/BRepTest_SweepCommands.cxx
src/BRepTest/BRepTest_TopologyCommands.cxx
src/DDF/DDF_BrowserCommands.cxx
src/DDataStd/DDataStd_BasicCommands.cxx
src/DDataStd/DDataStd_DrawDisplayCommands.cxx
src/DDataStd/DDataStd_NameCommands.cxx
src/DDataStd/DDataStd_TreeCommands.cxx
src/DDocStd/DDocStd_ApplicationCommands.cxx
src/DNaming/DNaming_BasicCommands.cxx
src/DNaming/DNaming_ModelingCommands.cxx
src/Draw/Draw.cxx
src/Draw/Draw_BasicCommands.cxx
src/Draw/Draw_GraphicCommands.cxx
src/Draw/Draw_Interpretor.cxx
src/Draw/Draw_Interpretor.hxx
src/Draw/Draw_PloadCommands.cxx
src/Draw/Draw_VariableCommands.cxx
src/DrawResources/TestCommands.tcl
src/GeometryTest/GeometryTest_APICommands.cxx
src/GeometryTest/GeometryTest_ContinuityCommands.cxx
src/GeometryTest/GeometryTest_CurveCommands.cxx
src/GeometryTest/GeometryTest_CurveTanCommands.cxx
src/GeomliteTest/GeomliteTest_API2dCommands.cxx
src/GeomliteTest/GeomliteTest_ModificationCommands.cxx
src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx
src/MeshTest/MeshTest.cxx
src/SWDRAW/SWDRAW_ShapeFix.cxx
src/SWDRAW/SWDRAW_ShapeUpgrade.cxx
src/XDEDRAW/XDEDRAW_Colors.cxx
src/XDEDRAW/XDEDRAW_Common.cxx
src/XDEDRAW/XDEDRAW_Shapes.cxx
src/XSDRAWSTEP/XSDRAWSTEP.cxx
src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx
tests/blend/complex/F9
tests/blend/complex/G6
tests/bugs/caf/bug669
tests/bugs/fclasses/bug23497
tests/bugs/filling/bug22783
tests/bugs/filling/bug22786
tests/bugs/filling/bug23343
tests/bugs/modalg_2/bug293
tests/bugs/modalg_2/bug426
tests/bugs/modalg_4/bug8842_11
tests/bugs/modalg_4/bug8842_12
tests/bugs/modalg_4/bug8842_2
tests/bugs/modalg_4/bug8842_3
tests/bugs/modalg_4/bug8842_4
tests/bugs/modalg_5/bug23870_1
tests/bugs/modalg_5/bug23870_2
tests/bugs/modalg_5/bug23870_4
tests/bugs/modalg_7/bug25939
tests/bugs/modalg_7/bug26295
tests/bugs/modalg_7/bug26558
tests/bugs/modalg_7/bug30787
tests/bugs/moddata_1/bug103
tests/bugs/moddata_2/bug22910_1
tests/bugs/moddata_2/bug2569_2
tests/bugs/vis/bug346
tests/offset/faces_type_i/D7
tests/offset/faces_type_i/E7
tests/offset/faces_type_i/E8
tests/offset/faces_type_i/E9
tests/offset/faces_type_i/F2
tests/offset/faces_type_i/F3
tests/offset/faces_type_i/F4
tests/offset/faces_type_i/F5
tests/offset/faces_type_i/G5
tests/offset/faces_type_i/L1
tests/offset/faces_type_i/L2
tests/offset/faces_type_i/L3
tests/offset/faces_type_i/L4
tests/offset/faces_type_i/L5
tests/offset/faces_type_i/L6
tests/offset/faces_type_i/L7
tests/offset/faces_type_i/L8
tests/offset/faces_type_i/L9
tests/offset/faces_type_i/M1
tests/offset/faces_type_i/M3
tests/offset/faces_type_i/N1
tests/offset/faces_type_i/N2
tests/offset/shape_type_i/C5
tests/offset/shape_type_i/D6
tests/offset/shape_type_i/D7
tests/offset/shape_type_i/G2
tests/offset/shape_type_i/G3
tests/offset/shape_type_i/G4
tests/pipe/bugs/bug24909_1
tests/pipe/bugs/bug24909_2
tests/pipe/bugs/bug25110
tests/pipe/bugs/bug26088
tests/thrusection/bugs/bug24997

index 3e104a3..d12d9da 100644 (file)
@@ -39,6 +39,7 @@
 #include <BRepBndLib.hxx>
 #include <Bnd_Box.hxx>
 #include <Bnd_Box2d.hxx>
+#include <Message.hxx>
 #include <TopExp_Explorer.hxx>
 #include <TopoDS.hxx>
 #include <BRepTools_WireExplorer.hxx>
@@ -176,7 +177,7 @@ static Standard_Integer transform(Draw_Interpretor& ,Standard_Integer n,const ch
       TopoDS_Shape S = DBRep::Get(a[i]);
       if (S.IsNull())
       {
-        std::cerr << "Error: " << a[i] << " is not a valid shape\n";
+        Message::SendFail() << "Error: " << a[i] << " is not a valid shape";
         return 1;
       }
       else
@@ -188,7 +189,7 @@ static Standard_Integer transform(Draw_Interpretor& ,Standard_Integer n,const ch
     for (Standard_Integer i = 1; i < last; i++) {
       TopoDS_Shape S = DBRep::Get(a[i]);
       if (S.IsNull()) {
-        std::cerr << "Error: " << a[i] << " is not a valid shape\n";
+        Message::SendFail() << "Error: " << a[i] << " is not a valid shape";
         return 1;
       }
       else {
@@ -271,9 +272,9 @@ static Standard_Integer tcopy(Draw_Interpretor& di,Standard_Integer n,const char
   }
 
   if (n < 3 || (n - iFirst) % 2) {
-    std::cout << "Use: " << a[0] << " [-n(ogeom)] [-m(esh)] shape1 copy1 [shape2 copy2 [...]]" << std::endl;
-    std::cout << "Option -n forbids copying of geometry (it will be shared)" << std::endl;
-    std::cout << "Option -m forces copying of mesh (disabled by default)" << std::endl;
+    Message::SendFail() << "Use: " << a[0] << " [-n(ogeom)] [-m(esh)] shape1 copy1 [shape2 copy2 [...]]\n"
+                        << "Option -n forbids copying of geometry (it will be shared)\n"
+                        << "Option -m forces copying of mesh (disabled by default)";
     return 1;
   }
 
@@ -584,7 +585,7 @@ static Standard_Integer BoundBox(Draw_Interpretor& theDI,
     }
     else
     {
-      std::cout << "Syntax error at argument '" << theArgVal[anArgIter] << "'.\n";
+      Message::SendFail() << "Syntax error at argument '" << theArgVal[anArgIter] << "'";
       return 1;
     }
   }
@@ -592,19 +593,19 @@ static Standard_Integer BoundBox(Draw_Interpretor& theDI,
   if (anAABB.IsVoid()
    && aShape.IsNull())
   {
-    std::cout << "Syntax error: input is not specified (neither shape nor coordinates)\n";
+    Message::SendFail() << "Syntax error: input is not specified (neither shape nor coordinates)";
     return 1;
   }
   else if (!anAABB.IsVoid()
         && (isOBB || isOptimal || isTolerUsed))
   {
-    std::cout << "Syntax error: Options -obb, -optimal and -extToler cannot be used for explicitly defined AABB.\n";
+    Message::SendFail() << "Syntax error: Options -obb, -optimal and -extToler cannot be used for explicitly defined AABB";
     return 1;
   }
   else if (isOBB
        && !anOutVars[0].IsEmpty())
   {
-    std::cout << "Error: Option -save works only with axes-aligned boxes.\n";
+    Message::SendFail() << "Error: Option -save works only with axes-aligned boxes";
     return 1;
   }
 
index 135356f..0ca2fa9 100644 (file)
@@ -14,8 +14,6 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
-// modified by mps (juillet 96) : ajout de la commande distmini
-
 #include <DBRep.hxx>
 #include <BRepTest.hxx>
 #include <BRepExtrema_Poly.hxx>
 #include <TopoDS_Builder.hxx>
 #include <TopoDS_Compound.hxx>
 #include <Draw.hxx>
+#include <Message.hxx>
 #include <OSD_Timer.hxx>
 #include <TCollection_AsciiString.hxx>
 #include <TColStd_MapIteratorOfPackedMapOfInteger.hxx>
 #include <Precision.hxx>
 
-
-//#ifdef _MSC_VER
 #include <stdio.h>
-//#endif
 
 //=======================================================================
 //function : distance
@@ -150,9 +146,7 @@ static int ShapeProximity (Draw_Interpretor& theDI, Standard_Integer theNbArgs,
 {
   if (theNbArgs < 3 || theNbArgs > 6)
   {
-    std::cout << "Usage: " << theArgs[0] <<
-      " Shape1 Shape2 [-tol <value>] [-profile]" << std::endl;
-
+    Message::SendFail() << "Usage: " << theArgs[0] << " Shape1 Shape2 [-tol <value>] [-profile]";
     return 1;
   }
 
@@ -161,7 +155,7 @@ static int ShapeProximity (Draw_Interpretor& theDI, Standard_Integer theNbArgs,
 
   if (aShape1.IsNull() || aShape2.IsNull())
   {
-    std::cout << "Error: Failed to find specified shapes" << std::endl;
+    Message::SendFail() << "Error: Failed to find specified shapes";
     return 1;
   }
 
@@ -178,14 +172,14 @@ static int ShapeProximity (Draw_Interpretor& theDI, Standard_Integer theNbArgs,
     {
       if (++anArgIdx >= theNbArgs)
       {
-        std::cout << "Error: wrong syntax at argument '" << aFlag << std::endl;
+        Message::SendFail() << "Error: wrong syntax at argument '" << aFlag;
         return 1;
       }
 
       const Standard_Real aTolerance = Draw::Atof (theArgs[anArgIdx]);
       if (aTolerance < 0.0)
       {
-        std::cout << "Error: Tolerance value should be non-negative" << std::endl;
+        Message::SendFail() << "Error: Tolerance value should be non-negative";
         return 1;
       }
       else
@@ -231,7 +225,7 @@ static int ShapeProximity (Draw_Interpretor& theDI, Standard_Integer theNbArgs,
 
   if (!aTool.IsDone())
   {
-    std::cout << "Error: Failed to perform proximity test" << std::endl;
+    Message::SendFail() << "Error: Failed to perform proximity test";
     return 1;
   }
 
@@ -287,17 +281,14 @@ static int ShapeSelfIntersection (Draw_Interpretor& theDI, Standard_Integer theN
 {
   if (theNbArgs < 2 || theNbArgs > 5)
   {
-    std::cout << "Usage: " << theArgs[0] <<
-      " Shape [-tol <value>] [-profile]" << std::endl;
-
+    Message::SendFail() << "Usage: " << theArgs[0] << " Shape [-tol <value>] [-profile]";
     return 1;
   }
 
   TopoDS_Shape aShape = DBRep::Get (theArgs[1]);
-
   if (aShape.IsNull())
   {
-    std::cout << "Error: Failed to find specified shape" << std::endl;
+    Message::SendFail() << "Error: Failed to find specified shape";
     return 1;
   }
 
@@ -313,14 +304,14 @@ static int ShapeSelfIntersection (Draw_Interpretor& theDI, Standard_Integer theN
     {
       if (++anArgIdx >= theNbArgs)
       {
-        std::cout << "Error: wrong syntax at argument '" << aFlag << std::endl;
+        Message::SendFail() << "Error: wrong syntax at argument '" << aFlag;
         return 1;
       }
 
       const Standard_Real aValue = Draw::Atof (theArgs[anArgIdx]);
       if (aValue < 0.0)
       {
-        std::cout << "Error: Tolerance value should be non-negative" << std::endl;
+        Message::SendFail() << "Error: Tolerance value should be non-negative";
         return 1;
       }
       else
@@ -360,7 +351,7 @@ static int ShapeSelfIntersection (Draw_Interpretor& theDI, Standard_Integer theN
 
   if (!aTool.IsDone())
   {
-    std::cout << "Error: Failed to perform proximity test" << std::endl;
+    Message::SendFail() << "Error: Failed to perform proximity test";
     return 1;
   }
 
index d673ed7..09f3551 100644 (file)
@@ -65,6 +65,7 @@
 
 #include <BRepFilletAPI_MakeFillet.hxx>
 #include <ChFi3d_FilletShape.hxx>
+#include <Message.hxx>
 
 #include <Precision.hxx>
 
@@ -756,16 +757,16 @@ static Standard_Integer SPLS(Draw_Interpretor&,
 
   if (narg < 3)
   {
-    std::cout << "Invalid number of arguments. Should be : splitshape result shape [splitedges] \
-            [face wire/edge/compound [wire/edge/compound ...] \
-            [face wire/edge/compound [wire/edge/compound...] ...] \
-            [@ edgeonshape edgeonwire [edgeonshape edgeonwire...]]" << std::endl;
+    Message::SendFail() << "Invalid number of arguments. Should be : splitshape result shape [splitedges] "
+            "[face wire/edge/compound [wire/edge/compound ...] "
+            "[face wire/edge/compound [wire/edge/compound...] ...] "
+            "[@ edgeonshape edgeonwire [edgeonshape edgeonwire...]]";
     return 1;
   }
   TopoDS_Shape S = DBRep::Get(a[2]);
   if (S.IsNull())
   {
-    std::cout << "Invalid input shape " << a[2] << std::endl;
+    Message::SendFail()  << "Invalid input shape " << a[2];
     return 1;
   }
   BRepFeat_SplitShape Spls(S);
@@ -792,7 +793,7 @@ static Standard_Integer SPLS(Draw_Interpretor&,
     TopoDS_Shape aSh = DBRep::Get(a[i]);
     if (aSh.IsNull())
     {
-      std::cout << "Invalid input shape " << a[i] << std::endl;
+      Message::SendFail()  << "Invalid input shape " << a[i];
       return 1;
     }
 
@@ -871,7 +872,7 @@ static Standard_Integer SPLS(Draw_Interpretor&,
         TopoDS_Shape aSh = DBRep::Get(a[i]);
         if (aSh.IsNull())
         {
-          std::cout << "Invalid input shape " << a[i] << std::endl;
+          Message::SendFail()  << "Invalid input shape " << a[i];
           return 1;
         }
         TopExp_Explorer aExpE(aSh, TopAbs_EDGE, TopAbs_FACE);
@@ -880,10 +881,10 @@ static Standard_Integer SPLS(Draw_Interpretor&,
       }
       else
       {
-        std::cout << "Invalid input arguments. Should be : splitshape result shape [splitedges] \
-            [face wire/edge/compound [wire/edge/compound ...] \
-            [face wire/edge/compound [wire/edge/compound...] ...] \
-            [@ edgeonshape edgeonwire [edgeonshape edgeonwire...]]" << std::endl;
+        Message::SendFail() << "Invalid input arguments. Should be : splitshape result shape [splitedges] "
+            "[face wire/edge/compound [wire/edge/compound ...] "
+            "[face wire/edge/compound [wire/edge/compound...] ...] "
+            "[@ edgeonshape edgeonwire [edgeonshape edgeonwire...]]";
         return 1;
       }
     }
@@ -906,7 +907,7 @@ static Standard_Integer SPLS(Draw_Interpretor&,
     Ew = TopoDS::Edge(aLocalShape);
     //    Ew = TopoDS::Edge(DBRep::Get(a[i+1],TopAbs_EDGE));
     if (Ew.IsNull()) {
-      std::cout << "Invalid input shape " << a[i + 1] << std::endl;
+      Message::SendFail() << "Invalid input shape " << a[i + 1];
       return 1;
     }
     Spls.Add(TopoDS::Edge(Ew), TopoDS::Edge(Es));
index 17559fa..a9af231 100644 (file)
@@ -51,6 +51,7 @@
 #include <FilletSurf_ErrorTypeStatus.hxx>
 #include <TopAbs.hxx>
 #include <DrawTrSurf.hxx>
+#include <Message.hxx>
 
 #include <stdio.h>
 
@@ -333,7 +334,7 @@ Standard_Integer boptopoblend(Draw_Interpretor& di, Standard_Integer narg, const
   printtolblend(di);
   if(narg < 5)
   {
-    std::cout << "Use <command name> result shape1 shape2 radius [-d]" << std::endl;
+    Message::SendFail() << "Use <command name> result shape1 shape2 radius [-d]";
     return 1;
   }
 
@@ -341,7 +342,7 @@ Standard_Integer boptopoblend(Draw_Interpretor& di, Standard_Integer narg, const
   TopoDS_Shape S1 = DBRep::Get(a[2]);
   TopoDS_Shape S2 = DBRep::Get(a[3]);
   if (S1.IsNull() || S2.IsNull()) {
-    printf(" Null shapes are not allowed \n");
+    Message::SendFail() << " Null shapes are not allowed";
     return 1;
   }
   Standard_Real Rad = Draw::Atof(a[4]);
@@ -363,7 +364,7 @@ Standard_Integer boptopoblend(Draw_Interpretor& di, Standard_Integer narg, const
   //
   theDSFiller.Perform();
   if (theDSFiller.HasErrors()) {
-    printf("Check types of the arguments, please\n");
+    Message::SendFail() << "Check types of the arguments, please";
     return 1;
   }
 
@@ -377,7 +378,7 @@ Standard_Integer boptopoblend(Draw_Interpretor& di, Standard_Integer narg, const
   Standard_Boolean anIsDone = pBuilder->IsDone();
   if (!anIsDone)
   {
-    printf("boolean operation not done HasErrors()=%d\n", pBuilder->HasErrors());
+    Message::SendFail() << "boolean operation not done HasErrors()=" << pBuilder->HasErrors();
     return 1;
   }
 
index 1bed4e2..682d724 100644 (file)
@@ -75,6 +75,7 @@
 #include <BRepOffset_MakeOffset.hxx>
 #include <BRepClass3d_SolidClassifier.hxx>
 #include <GeomAdaptor_Curve.hxx>
+#include <Message.hxx>
 
 static 
   void SampleEdges (const TopoDS_Shape&   theShape, 
@@ -277,7 +278,7 @@ Standard_Integer brepintcs(Draw_Interpretor& di, Standard_Integer n, const char*
 {
   if (n <= 2) 
   {
-    std::cout<<"Invalid input arguments. Should be: curve1 [curve2 ...] shape [result] [tol]"<<std::endl;
+    Message::SendFail() << "Invalid input arguments. Should be: curve1 [curve2 ...] shape [result] [tol]";
     return 1;
   }
   Standard_Integer indshape = 2;
@@ -290,7 +291,7 @@ Standard_Integer brepintcs(Draw_Interpretor& di, Standard_Integer n, const char*
   }
   if (S.IsNull()) 
   {
-    std::cout<<"Invalid input shape"<<std::endl;
+    Message::SendFail() << "Invalid input shape";
     return 1;
   }
 
index b7c69c0..065be13 100644 (file)
@@ -32,7 +32,7 @@
 #include <BRepPrimAPI_MakeSphere.hxx>
 #include <Geom_Plane.hxx>
 #include <gp_Pln.hxx>
-
+#include <Message.hxx>
 
 //=======================================================================
 // box
@@ -129,7 +129,7 @@ static Standard_Integer box(Draw_Interpretor& , Standard_Integer n, const char**
       }
       else
       {
-        std::cout<<"Syntax error\n";
+        Message::SendFail() << "Syntax error";
         return 1;
       }
     }
index 8c925cb..735c26f 100644 (file)
@@ -46,6 +46,7 @@
 #include <BRepBuilderAPI_FastSewing.hxx>
 
 #include <GeomAPI_ProjectPointOnSurf.hxx>
+#include <Message.hxx>
 
 #ifdef _WIN32
 //#define strcasecmp strcmp Already defined
@@ -75,7 +76,7 @@ static Standard_Integer mkface(Draw_Interpretor& , Standard_Integer n, const cha
   
   Handle(Geom_Surface) S = DrawTrSurf::GetSurface(a[2]);
   if (S.IsNull()) {
-    std::cout << a[2] << " is not a surface" << std::endl;
+    Message::SendFail() << a[2] << " is not a surface";
     return 1;
   }
   
@@ -580,7 +581,7 @@ static Standard_Integer getedgeregul
 {
   if( argc < 3)
   {
-    std::cout<<"Invalid number of arguments. Should be: checkedgeregularity edge face1 [face2]"<<std::endl;
+    Message::SendFail() << "Invalid number of arguments. Should be: checkedgeregularity edge face1 [face2]";
     return 1;
   }
   
@@ -589,7 +590,7 @@ static Standard_Integer getedgeregul
   TopoDS_Shape aFace2 = (argc > 3  ? DBRep::Get(argv[3],TopAbs_FACE) : aFace1);
   if( anEdge.IsNull() || aFace1.IsNull() || aFace2.IsNull())
   {
-    std::cout<<"Invalid number of arguments. Should be: getedgeregularity edge face1 [face2]"<<std::endl;
+    Message::SendFail() << "Invalid number of arguments. Should be: getedgeregularity edge face1 [face2]";
     return 1;
   }
  
index 0593cdf..6ce85a0 100644 (file)
@@ -59,7 +59,7 @@ static BRepOffsetAPI_ThruSections* Generator = 0;
 #include <gp_Vec.hxx>
 #include <Geom_Circle.hxx>
 #include <gp_Ax2.hxx>
-
+#include <Message.hxx>
 
 //=======================================================================
 // prism
@@ -244,7 +244,7 @@ static Standard_Integer geompipe(Draw_Interpretor&,
   aPipe.Perform(Standard_True);
   if (!aPipe.IsDone())
   {
-    std::cout << "GeomFill_Pipe cannot make a surface" << std::endl;
+    Message::SendFail() << "GeomFill_Pipe cannot make a surface";
     return 1;
   }
 
@@ -550,16 +550,6 @@ static Standard_Integer setsweep(Draw_Interpretor& di,
   Standard_Integer n, const char** a)
 {
   if (n == 1) {
-    //std::cout << "setsweep options [arg1 [arg2 [...]]] : options are :" << std::endl;
-    //std::cout << "   -FR : Tangent and Normal are given by Frenet trihedron" <<std::endl;
-    //std::cout << "   -CF : Tangente is given by Frenet," << std::endl;
-    //std::cout << "         the Normal is computed to minimize the torsion " << std::endl;
-    //std::cout << "   -DX Surf : Tangent and Normal are given by Darboux trihedron,"
-    //  <<std::endl;     
-    //std::cout << "       Surf have to be a shell or a face" <<std::endl;
-    //std::cout << "   -CN dx dy dz : BiNormal is given by dx dy dz" << std::endl;
-    //std::cout << "   -FX Tx Ty TZ [Nx Ny Nz] : Tangent and Normal are fixed" <<std::endl;
-    //std::cout << "   -G guide  0|1(ACR|Plan)  0|1(contact|no contact) : with guide"<<std::endl;
     di << "setsweep options [arg1 [arg2 [...]]] : options are :\n";
     di << "   -FR : Tangent and Normal are given by Frenet trihedron\n";
     di << "   -CF : Tangente is given by Frenet,\n";
@@ -574,7 +564,6 @@ static Standard_Integer setsweep(Draw_Interpretor& di,
   }
 
   if (Sweep == 0) {
-    //std::cout << "You have forgotten the <<mksweep>> command  !"<< std::endl;
     di << "You have forgotten the <<mksweep>> command  !\n";
     return 1;
   }
@@ -589,14 +578,12 @@ static Standard_Integer setsweep(Draw_Interpretor& di,
   }
   else if (!strcmp(a[1], "-DX")) {
     if (n != 3) {
-      //std::cout << "bad arguments !" << std::endl;
       di << "bad arguments !\n";
       return 1;
     }
     TopoDS_Shape Surf;
     Surf = DBRep::Get(a[2], TopAbs_SHAPE);
     if (Surf.IsNull()) {
-      //std::cout << a[2] <<"is not a shape !" << std::endl;
       di << a[2] << "is not a shape !\n";
       return 1;
     }
@@ -604,7 +591,6 @@ static Standard_Integer setsweep(Draw_Interpretor& di,
   }
   else if (!strcmp(a[1], "-CN")) {
     if (n != 5) {
-      //std::cout << "bad arguments !" << std::endl;
       di << "bad arguments !\n";
       return 1;
     }
@@ -613,7 +599,6 @@ static Standard_Integer setsweep(Draw_Interpretor& di,
   }
   else if (!strcmp(a[1], "-FX")) {
     if ((n != 5) && (n != 8)) {
-      //std::cout << "bad arguments !" << std::endl;
       di << "bad arguments !\n";
       return 1;
     }
@@ -632,7 +617,6 @@ static Standard_Integer setsweep(Draw_Interpretor& di,
   {
     if (n != 5)
     {
-      //std::cout << "bad arguments !" << std::endl;
       di << "bad arguments !\n";
       return 1;
     }
@@ -648,7 +632,6 @@ static Standard_Integer setsweep(Draw_Interpretor& di,
   }
 
   else {
-    //std::cout << "The option "<< a[1] << " is unknown !" << std::endl;
     di << "The option " << a[1] << " is unknown !\n";
     return 1;
   }
@@ -663,11 +646,6 @@ static Standard_Integer addsweep(Draw_Interpretor& di,
   Standard_Integer n, const char** a)
 {
   if (n == 1) {
-    //std::cout << "addsweep wire/vertex [Vertex] [-T] [-R] [u0 v0 u1 v1 [...[uN vN]]] : options are :" << std::endl;
-    //std::cout << "   -T : the wire/vertex have to be translated to assume contact"<< std::endl;
-    //std::cout << "        with the spine" <<std::endl;
-    //std::cout << "   -R : the wire have to be rotated to assume orthogonality"<<std::endl;
-    //std::cout << "        with the spine's tangent" << std::endl;
     di << "addsweep wire/vertex [Vertex] [-T] [-R] [u0 v0 u1 v1 [...[uN vN]]] : options are :\n";
     di << "   -T : the wire/vertex have to be translated to assume contact\n";
     di << "        with the spine\n";
@@ -677,7 +655,6 @@ static Standard_Integer addsweep(Draw_Interpretor& di,
   }
 
   if (Sweep == 0) {
-    //std::cout << "You have forgotten the <<mksweep>> command  !"<< std::endl;
     di << "You have forgotten the <<mksweep>> command  !\n";
     return 1;
   }
@@ -691,7 +668,6 @@ static Standard_Integer addsweep(Draw_Interpretor& di,
     (Section.ShapeType() != TopAbs_WIRE &&
     Section.ShapeType() != TopAbs_VERTEX))
   {
-    //std::cout << a[1] <<"is not a wire and is not a vertex!" << std::endl;
     di << a[1] << " is not a wire and is not a vertex!\n";
     return 1;
   }
@@ -705,7 +681,6 @@ static Standard_Integer addsweep(Draw_Interpretor& di,
     // Reading of Vertex
     TopoDS_Shape InputVertex(DBRep::Get(a[cur], TopAbs_VERTEX));
     Vertex = TopoDS::Vertex(InputVertex);
-    //    Vertex = TopoDS::Vertex(DBRep::Get(a[cur],TopAbs_VERTEX));
     if (!Vertex.IsNull()) {
       cur++;
       HasVertex = Standard_True;
@@ -768,15 +743,12 @@ static Standard_Integer deletesweep(Draw_Interpretor& di,
   TopoDS_Wire Section;
   TopoDS_Shape InputShape(DBRep::Get(a[1], TopAbs_SHAPE));
   Section = TopoDS::Wire(InputShape);
-  //  Section = TopoDS::Wire(DBRep::Get(a[1],TopAbs_SHAPE));
   if (Section.IsNull()) {
-    //std::cout << a[1] <<"is not a wire !" << std::endl;
     di << a[1] << "is not a wire !\n";
     return 1;
   }
 
   Sweep->Delete(Section);
-
   return 0;
 }
 
@@ -787,14 +759,6 @@ static Standard_Integer buildsweep(Draw_Interpretor& di,
   Standard_Integer n, const char** a)
 {
   if (n == 1) {
-    //std::cout << "build sweep result [-M/-C/-R] [-S] [tol] : options are" << std::endl;
-    //std::cout << "   -M : Discontinuities are treated by Modfication of"<< std::endl; 
-    //std::cout << "        the sweeping mode : it is the default" <<std::endl;
-    //std::cout << "   -C : Discontinuities are treated like Right Corner" << std::endl;
-    //std::cout << "        Treatement is Extent && Intersect" << std::endl;
-    //std::cout << "   -R : Discontinuities are treated like Round Corner" << std::endl;
-    //std::cout << "        Treatement is Intersect and Fill" << std::endl;
-    //std::cout << "   -S : To build a Solid" << std::endl;
     di << "build sweep result [-M/-C/-R] [-S] [tol] : options are\n";
     di << "   -M : Discontinuities are treated by Modfication of\n";
     di << "        the sweeping mode : it is the default\n";
@@ -808,13 +772,11 @@ static Standard_Integer buildsweep(Draw_Interpretor& di,
 
   Standard_Boolean mksolid = Standard_False;
   if (Sweep == 0) {
-    //std::cout << "You have forgotten the <<mksweep>> command  !"<< std::endl;
     di << "You have forgotten the <<mksweep>> command  !\n";
     return 1;
   }
 
   if (!Sweep->IsReady()) {
-    //std::cout << "You have forgotten the <<addsweep>> command  !"<< std::endl;
     di << "You have forgotten the <<addsweep>> command  !\n";
     return 1;
   }
@@ -841,15 +803,12 @@ static Standard_Integer buildsweep(Draw_Interpretor& di,
   // Calcul le resultat
   Sweep->Build();
   if (!Sweep->IsDone()) {
-    //std::cout << "Buildsweep : Not Done" << std::endl;
     di << "Buildsweep : Not Done\n";
     BRepBuilderAPI_PipeError Stat = Sweep->GetStatus();
     if (Stat == BRepBuilderAPI_PlaneNotIntersectGuide) {
-      //std::cout << "Buildsweep : One Plane not intersect the guide" << std::endl;
       di << "Buildsweep : One Plane not intersect the guide\n";
     }
     if (Stat == BRepBuilderAPI_ImpossibleContact) {
-      //std::cout << "BuildSweep : One section can not be in contact with the guide" << std::endl;
       di << "BuildSweep : One section can not be in contact with the guide\n";
     }
   }
@@ -857,7 +816,6 @@ static Standard_Integer buildsweep(Draw_Interpretor& di,
     if (mksolid) {
       Standard_Boolean B;
       B = Sweep->MakeSolid();
-      //if (!B) std::cout << " BuildSweep : It is impossible to make a solid !" << std::endl;
       if (!B) di << " BuildSweep : It is impossible to make a solid !\n";
     }
     result = Sweep->Shape();
@@ -903,13 +861,11 @@ static Standard_Integer simulsweep(Draw_Interpretor& di,
   if ((n != 3) && (n != 4)) return 1;
 
   if (Sweep == 0) {
-    //std::cout << "You have forgotten the <<mksweep>> command  !"<< std::endl;
     di << "You have forgotten the <<mksweep>> command  !\n";
     return 1;
   }
 
   if (!Sweep->IsReady()) {
-    //std::cout << "You have forgotten the <<addsweep>> command  !"<< std::endl;
     di << "You have forgotten the <<addsweep>> command  !\n";
     return 1;
   }
index 6465b83..7016f9a 100644 (file)
@@ -42,6 +42,7 @@
 #include <TopOpeBRepDS_HDataStructure.hxx>
 #include <gp.hxx>
 #include <gp_Pln.hxx>
+#include <Message.hxx>
 #include <TopTools_IndexedMapOfShape.hxx>
 #include <TopExp.hxx>
 
@@ -118,7 +119,7 @@ static Standard_Integer section(Draw_Interpretor& , Standard_Integer n, const ch
       Sec.Approximation(Standard_True);
     else if (strcasecmp(a[i], "-p"))
     {
-      std::cout << "Unknown option: " << a[i] << std::endl;
+      Message::SendFail() << "Unknown option: " << a[i];
       return 1;
     }
   }
@@ -170,7 +171,6 @@ static Standard_Integer halfspace(Draw_Interpretor& di,
   if ( Face.IsNull()) {
     TopoDS_Shape Shell  = DBRep::Get(a[2],TopAbs_SHELL);
     if (Shell.IsNull()) {
-      //std::cout << a[2] << " must be a face or a shell" << std::endl;
       di << a[2] << " must be a face or a shell\n";
       return 1;
     }
@@ -180,7 +180,6 @@ static Standard_Integer halfspace(Draw_Interpretor& di,
        DBRep::Set(a[1],Half.Solid());
       }
       else {
-       //std::cout << " HalfSpace NotDone" << std::endl;
        di << " HalfSpace NotDone\n";
        return 1;
       }
@@ -192,7 +191,6 @@ static Standard_Integer halfspace(Draw_Interpretor& di,
       DBRep::Set(a[1],Half.Solid());
     }
     else {
-      //std::cout << " HalfSpace NotDone" << std::endl;
       di << " HalfSpace NotDone\n";
       return 1;
     }
@@ -211,14 +209,12 @@ static Standard_Integer buildfaces(Draw_Interpretor& , Standard_Integer narg, co
   
   TopoDS_Shape InputShape(DBRep::Get( a[2] ,TopAbs_FACE));
   TopoDS_Face F = TopoDS::Face(InputShape);
-//  TopoDS_Face F = TopoDS::Face(DBRep::Get(a[2],TopAbs_FACE));
   BRepAlgo_FaceRestrictor FR;
   FR.Init(F);
   
   for (Standard_Integer i = 3 ; i < narg ; i++) {
     TopoDS_Shape InputWire(DBRep::Get(a[i],TopAbs_WIRE));
     TopoDS_Wire W = TopoDS::Wire(InputWire);
-//    TopoDS_Wire W = TopoDS::Wire(DBRep::Get(a[i],TopAbs_WIRE));
     FR.Add(W);
   }
   FR.Perform();
index e4c027b..83e187f 100644 (file)
@@ -23,6 +23,7 @@
 #include <Draw_Appli.hxx>
 #include <Draw_Drawable3D.hxx>
 #include <Draw_Interpretor.hxx>
+#include <Message.hxx>
 
 #include <TDF_Label.hxx>
 #include <TDF_ChildIterator.hxx>
@@ -50,14 +51,14 @@ static Standard_Integer DFBrowse (Draw_Interpretor& di,
 {
   if (n<2)
   {
-    std::cout << "Use: " << a[0] << " document [brower_name]" << std::endl;
+    Message::SendFail() << "Use: " << a[0] << " document [brower_name]";
     return 1;
   }
   
   Handle(TDF_Data) DF;
   if (!DDF::GetDF (a[1], DF)) 
   {
-    std::cout << "Error: document " << a[1] << " is not found" << std::endl;
+    Message::SendFail() << "Error: document " << a[1] << " is not found";
     return 1;
   }
 
@@ -78,8 +79,8 @@ static Standard_Integer DFBrowse (Draw_Interpretor& di,
   }
   else
   {
-    std::cout << "Error: Could not load script " << aTclScript << std::endl;
-    std::cout << "Check environment variable CSF_DrawPluginDefaults" << std::endl;
+    Message::SendFail() << "Error: Could not load script " << aTclScript << "\n"
+                        << "Check environment variable CSF_DrawPluginDefaults";
   }
 
   // Call command dftree defined in dftree.tcl
@@ -106,7 +107,7 @@ static Standard_Integer DFOpenLabel (Draw_Interpretor& di,
   Handle(DDF_Browser) browser = Handle(DDF_Browser)::DownCast (Draw::GetExisting (a[1]));
   if (browser.IsNull())
   {
-    std::cout << "Syntax error: browser '" << a[1] << "' not found\n";
+    Message::SendFail() << "Syntax error: browser '" << a[1] << "' not found";
     return 1;
   }
 
@@ -135,7 +136,7 @@ static Standard_Integer DFOpenAttributeList(Draw_Interpretor& di,
   Handle(DDF_Browser) browser = Handle(DDF_Browser)::DownCast (Draw::GetExisting (a[1]));
   if (browser.IsNull())
   {
-    std::cout << "Syntax error: browser '" << a[1] << "' not found\n";
+    Message::SendFail() << "Syntax error: browser '" << a[1] << "' not found";
     return 1;
   }
 
@@ -168,7 +169,7 @@ static Standard_Integer DFOpenAttribute (Draw_Interpretor& di,
   Handle(DDF_Browser) browser = Handle(DDF_Browser)::DownCast (Draw::GetExisting (a[1]));
   if (browser.IsNull())
   {
-    std::cout << "Syntax error: browser '" << a[1] << "' not found\n";
+    Message::SendFail() << "Syntax error: browser '" << a[1] << "' not found";
     return 1;
   }
 
index 36245ed..69476a3 100644 (file)
@@ -24,6 +24,7 @@
 #include <DrawTrSurf.hxx>
 
 #include <DDF.hxx>
+#include <Message.hxx>
 
 #include <TDF_Data.hxx>
 #include <TDF_Label.hxx>
@@ -614,7 +615,6 @@ static Standard_Integer DDataStd_GetIntArray (Draw_Interpretor& di,
     }
 
     for(Standard_Integer i = A->Lower(); i<=A->Upper(); i++){
-      //std::cout <<  A->Value(i)   << std::endl;
       di  <<  A->Value(i);
       if(i<A->Upper())  
         di<<" ";
@@ -1425,7 +1425,7 @@ static Standard_Integer DDataStd_KeepUTF (Draw_Interpretor& di,
 #endif
     if (!anIS) {
       // Can not open file
-      std::cout << "Error: can't open file " << aFileName <<std::endl;
+      Message::SendFail() << "Error: can't open file " << aFileName;
       return 1;
     }
     char buf[1024];
@@ -1484,7 +1484,7 @@ static Standard_Integer DDataStd_GetUTFtoFile (Draw_Interpretor& di,
     }
 
     if(!aES.Length()) {
-      std::cout << "Data is not found in the Document" <<std::endl;
+      Message::SendFail() << "Data is not found in the Document";
       return 1;
     }
 
@@ -1560,7 +1560,7 @@ static Standard_Integer DDataStd_SetByteArray (Draw_Interpretor& di,
       for(Standard_Integer i = From; i<=To; ++i) {
         Standard_Integer ival = Draw::Atoi(arg[j]);
         if(ival < 0 || 255 < ival) {
-          std::cout << "Bad value = " << ival<< std::endl;
+          Message::SendFail() << "Bad value = " << ival;
           return 1;
         }
         A->SetValue(i, (Standard_Byte)ival); 
@@ -1596,7 +1596,7 @@ static Standard_Integer DDataStd_SetByteArrayValue (Draw_Interpretor&,
 
   // Check the value.
   if(value < 0 || 255 < value) {
-    std::cout << "Bad value = " << value << std::endl;
+    Message::SendFail() << "Bad value = " << value;
     return 1;
   }
 
@@ -1661,7 +1661,7 @@ static Standard_Integer DDataStd_SetBooleanArray (Draw_Interpretor& di,
         Standard_Integer ival = Draw::Atoi(arg[j]);
         if(ival > 1) 
         {
-          std::cout << "Bad value (" <<i <<") = " << ival<< ". 0 or 1 is expected." << std::endl;
+          Message::SendFail() << "Bad value (" <<i <<") = " << ival<< ". 0 or 1 is expected.";
           return 1;
         }
         A->SetValue(i, ival != 0); 
@@ -1856,7 +1856,7 @@ static Standard_Integer DDataStd_SetBooleanList (Draw_Interpretor& di,
       Standard_Integer ival = Draw::Atoi(arg[i]);
       if(ival > 1) 
       {
-        std::cout << "Bad value = " << ival<< ". 0 or 1 is expected." << std::endl;
+        Message::SendFail() << "Bad value = " << ival<< ". 0 or 1 is expected.";
         return 1;
       }
       A->Append (ival != 0);
@@ -2479,7 +2479,6 @@ static Standard_Integer DDataStd_GetByteArray (Draw_Interpretor& di,
     }
 
     for(Standard_Integer i = A->Lower(); i<=A->Upper(); i++){
-      //std::cout <<  A->Value(i)   << std::endl;
       di  <<  A->Value(i);
       if(i<A->Upper())  
         di<<" ";
@@ -3242,7 +3241,7 @@ static Standard_Integer DDataStd_SetNDataIntAr2 (Draw_Interpretor& di,
     if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
       anAtt = TDataStd_NamedData::Set(aLabel);
     if(anAtt.IsNull()) {
-      std::cout<< "NamedData attribute is not found or not set"  << std::endl;
+      Message::SendFail() << "NamedData attribute is not found or not set";
       return 1;}
   
     j = 15;
@@ -3322,7 +3321,7 @@ static Standard_Integer DDataStd_GetAsciiString (Draw_Interpretor& di,
     }
     Handle(TDataStd_AsciiString) anAtt;
     if( !aLabel.FindAttribute(aGuid, anAtt) ) {
-      std::cout << "AsciiString attribute is not found or not set"  << std::endl;
+      Message::SendFail() << "AsciiString attribute is not found or not set";
       return 1;
     }
 
@@ -3399,9 +3398,12 @@ static Standard_Integer DDataStd_GetNDIntegers (Draw_Interpretor& di,
  
 
     Handle(TDataStd_NamedData) anAtt;
-    if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt)) {
-      std::cout << "NamedData attribute is not found or not set"  << std::endl;
-      return 1;}
+    if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
+    {
+      Message::SendFail() << "NamedData attribute is not found or not set";
+      return 1;
+    }
+
     std::cout <<std::endl;
     std::cout <<"NamedData attribute at Label = " << arg[2] <<std::endl;
     anAtt->LoadDeferredData();
@@ -3436,9 +3438,11 @@ static Standard_Integer DDataStd_GetNDInteger (Draw_Interpretor& di,
  
 
     Handle(TDataStd_NamedData) anAtt;
-    if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt)) {
-      std::cout << "NamedData attribute is not found or not set"  << std::endl;
-      return 1;}
+    if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
+    {
+      Message::SendFail() << "NamedData attribute is not found or not set";
+      return 1;
+    }
 
     std::cout <<std::endl;
     std::cout <<"NamedData attribute at Label = " << arg[2] <<std::endl;    
@@ -3477,9 +3481,11 @@ static Standard_Integer DDataStd_SetNDataReals (Draw_Interpretor& di,
     Handle(TDataStd_NamedData) anAtt;
     if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
       anAtt = TDataStd_NamedData::Set(aLabel);
-    if(anAtt.IsNull()) {
-      std::cout << "NamedData attribute is not found or not set"  << std::endl;
-      return 1;}
+    if(anAtt.IsNull())
+    {
+      Message::SendFail() << "NamedData attribute is not found or not set";
+      return 1;
+    }
   
     j = 4;
     anAtt->LoadDeferredData();
@@ -3512,9 +3518,11 @@ static Standard_Integer DDataStd_GetNDReals (Draw_Interpretor& di,
     std::cout <<std::endl;
     std::cout <<"NamedData attribute at Label = " << arg[2] <<std::endl;
     Handle(TDataStd_NamedData) anAtt;
-    if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt)) {
-      std::cout << "NamedData attribute is not found or not set"  << std::endl;
-      return 1;}
+    if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
+    {
+      Message::SendFail() << "NamedData attribute is not found or not set";
+      return 1;
+    }
     
     anAtt->LoadDeferredData();
     const TDataStd_DataMapOfStringReal& aMap = anAtt->GetRealsContainer();
@@ -3547,15 +3555,17 @@ static Standard_Integer DDataStd_GetNDReal (Draw_Interpretor& di,
  
 
     Handle(TDataStd_NamedData) anAtt;
-    if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt)) {
-      std::cout << "NamedData attribute is not found or not set"  << std::endl;
-      return 1;}
+    if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
+    {
+      Message::SendFail() << "NamedData attribute is not found or not set";
+      return 1;
+    }
 
     std::cout <<std::endl;
     std::cout <<"NamedData attribute at Label = " << arg[2] <<std::endl;    
     anAtt->LoadDeferredData();
     if(!anAtt->HasReal(arg[3])) {
-      std::cout << "There is no data specified by Key = "<< arg[3]  << std::endl;
+      Message::SendFail() << "There is no data specified by Key = " << arg[3];
       return 1;
     } else {
       std::cout << "Key = "  << arg[3]  << " Value = " <<anAtt->GetReal(arg[3])<<std::endl;
@@ -3635,9 +3645,12 @@ static Standard_Integer DDataStd_GetNDStrings (Draw_Interpretor& di,
  
 
     Handle(TDataStd_NamedData) anAtt;
-    if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt)) {
-      std::cout << "NamedData attribute is not found or not set"  << std::endl;
-      return 1;}
+    if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
+    {
+      Message::SendFail() << "NamedData attribute is not found or not set";
+      return 1;
+    }
+
     std::cout <<std::endl;
     std::cout <<"NamedData attribute at Label = " << arg[2] <<std::endl;    
     anAtt->LoadDeferredData();
@@ -3684,10 +3697,13 @@ static Standard_Integer DDataStd_GetNDString (Draw_Interpretor& di,
     std::cout <<std::endl;
     std::cout <<"NamedData attribute at Label = " << arg[2] <<std::endl;    
     anAtt->LoadDeferredData();
-    if(!anAtt->HasString(arg[3])) {
-      std::cout << "There is no data specified by Key = "<< arg[3]  << std::endl;
+    if (!anAtt->HasString(arg[3]))
+    {
+      Message::SendFail() << "There is no data specified by Key = " << arg[3];
       return 1;
-    } else {
+    }
+    else
+    {
       TCollection_AsciiString aValue (anAtt->GetString(arg[3]), '?');
       std::cout << "Key = "  << arg[3]  << " Value = " << aValue.ToCString() << std::endl;
       if(nb == 5) 
@@ -3719,9 +3735,11 @@ static Standard_Integer DDataStd_SetNDataBytes (Draw_Interpretor& di,
     Handle(TDataStd_NamedData) anAtt;
     if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
       anAtt = TDataStd_NamedData::Set(aLabel);
-    if(anAtt.IsNull()) {
-      std::cout << "NamedData attribute is not found or not set"  << std::endl;
-      return 1;}
+    if(anAtt.IsNull())
+    {
+      Message::SendFail() << "NamedData attribute is not found or not set";
+      return 1;
+    }
   
     j = 4;
     anAtt->LoadDeferredData();
@@ -3753,9 +3771,12 @@ static Standard_Integer DDataStd_GetNDBytes (Draw_Interpretor& di,
  
 
     Handle(TDataStd_NamedData) anAtt;
-    if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt)) {
-      std::cout << "NamedData attribute is not found or not set"  << std::endl;
-      return 1;}
+    if (!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
+    {
+      Message::SendFail() << "NamedData attribute is not found or not set";
+      return 1;
+    }
+
     std::cout <<std::endl;
     std::cout <<"NamedData attribute at Label = " << arg[2] <<std::endl;      
     anAtt->LoadDeferredData();
@@ -3789,17 +3810,22 @@ static Standard_Integer DDataStd_GetNDByte (Draw_Interpretor& di,
  
 
     Handle(TDataStd_NamedData) anAtt;
-    if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt)) {
-      std::cout << "NamedData attribute is not found or not set"  << std::endl;
-      return 1;}
+    if (!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
+    {
+      Message::SendFail() << "NamedData attribute is not found or not set";
+      return 1;
+    }
 
     std::cout <<std::endl;
     std::cout <<"NamedData attribute at Label = " << arg[2] <<std::endl;      
     anAtt->LoadDeferredData();
-    if(!anAtt->HasByte(arg[3])) {
-      std::cout << "There is no data specified by Key = "<< arg[3]  << std::endl;
+    if (!anAtt->HasByte(arg[3]))
+    {
+      Message::SendFail() << "There is no data specified by Key = " << arg[3];
       return 1;
-    } else {
+    }
+    else
+    {
       std::cout << "Key = "  << arg[3]  << " Value = " <<anAtt->GetByte(arg[3])<< std::endl;
       if(nb == 5) 
         Draw::Set(arg[4], anAtt->GetByte(arg[3]));
@@ -3832,9 +3858,11 @@ static Standard_Integer DDataStd_SetNDataIntAr (Draw_Interpretor& di,
     Handle(TDataStd_NamedData) anAtt;
     if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
       anAtt = TDataStd_NamedData::Set(aLabel);
-    if(anAtt.IsNull()) {
-      std::cout<< "NamedData attribute is not found or not set"  << std::endl;
-      return 1;}
+    if (anAtt.IsNull())
+    {
+      Message::SendFail() << "NamedData attribute is not found or not set";
+      return 1;
+    }
   
     j = 5;
     Handle(TColStd_HArray1OfInteger) anArr =  new TColStd_HArray1OfInteger(1, aNum);
@@ -3868,9 +3896,12 @@ static Standard_Integer DDataStd_GetNDIntArrays (Draw_Interpretor& di,
     
     
     Handle(TDataStd_NamedData) anAtt;
-    if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt)) {
-      std::cout << "NamedData attribute is not found or not set"  << std::endl;
-      return 1;}
+    if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
+    {
+      Message::SendFail() << "NamedData attribute is not found or not set";
+      return 1;
+    }
+
     std::cout <<std::endl;
     std::cout <<"NamedData attribute at Label = " << arg[2] <<std::endl;      
     anAtt->LoadDeferredData();
@@ -3913,17 +3944,22 @@ static Standard_Integer DDataStd_GetNDIntArray (Draw_Interpretor& di,
  
 
     Handle(TDataStd_NamedData) anAtt;
-    if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt)) {
-      std::cout << "NamedData attribute is not found or not set"  << std::endl;
-      return 1;}
+    if (!aLabel.FindAttribute (TDataStd_NamedData::GetID(), anAtt))
+    {
+      Message::SendFail() << "NamedData attribute is not found or not set";
+      return 1;
+    }
 
     std::cout <<std::endl;
     std::cout <<"NamedData attribute at Label = " << arg[2] <<std::endl;      
     anAtt->LoadDeferredData();
-    if(!anAtt->HasArrayOfIntegers(arg[3])) {
-      std::cout << "There is no data specified by Key = "<< arg[3]  << std::endl;
+    if (!anAtt->HasArrayOfIntegers(arg[3]))
+    {
+      Message::SendFail() << "There is no data specified by Key = " << arg[3];
       return 1;
-    } else {
+    }
+    else
+    {
       std::cout << "Key = "  << arg[3] <<std::endl;
 
       Handle(TColStd_HArray1OfInteger) anArrValue = anAtt->GetArrayOfIntegers(arg[3]);      
@@ -3965,10 +4001,12 @@ static Standard_Integer DDataStd_SetNDataRealAr (Draw_Interpretor& di,
     Handle(TDataStd_NamedData) anAtt;
     if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
       anAtt = TDataStd_NamedData::Set(aLabel);
-    if(anAtt.IsNull()) {
-      std::cout << "NamedData attribute is not found or not set"  << std::endl;
-      return 1;}
-  
+    if (anAtt.IsNull())
+    {
+      Message::SendFail() << "NamedData attribute is not found or not set";
+      return 1;
+    }
+
     j = 5;
     Handle(TColStd_HArray1OfReal) anArr =  new TColStd_HArray1OfReal(1, aNum);
     for(Standard_Integer i = 1; i<=aNum; i++) {
@@ -4001,9 +4039,12 @@ static Standard_Integer DDataStd_GetNDRealArrays (Draw_Interpretor& di,
     
     
     Handle(TDataStd_NamedData) anAtt;
-    if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt)) {
-      std::cout << "NamedData attribute is not found or not set"  << std::endl;
-      return 1;}
+    if (!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
+    {
+      Message::SendFail() << "NamedData attribute is not found or not set";
+      return 1;
+    }
+
     std::cout <<std::endl;
     std::cout <<"NamedData attribute at Label = " << arg[2] <<std::endl;      
     anAtt->LoadDeferredData();
index 5086445..9fff964 100644 (file)
@@ -51,6 +51,7 @@
 
 #include <DDataStd_DrawPresentation.hxx>
 #include <DDataStd_DrawDriver.hxx>
+#include <Message.hxx>
 
 #ifndef _WIN32
 extern Draw_Viewer dout;
@@ -92,7 +93,7 @@ static Standard_Integer DDataStd_Rmdraw (Draw_Interpretor& ,
 {
   if (nb != 2)
   {
-    std::cout << "Syntax error: wrong number of arguments\n";
+    Message::SendFail() << "Syntax error: wrong number of arguments";
     return 1;
   }
 
@@ -103,7 +104,7 @@ static Standard_Integer DDataStd_Rmdraw (Draw_Interpretor& ,
   }
   else
   {
-    std::cout << "Syntax error: variable '" << arg[1] << "' not found\n";
+    Message::SendFail() << "Syntax error: variable '" << arg[1] << "' not found";
     return 1;
   }
 }
@@ -291,14 +292,3 @@ void DDataStd::DrawDisplayCommands (Draw_Interpretor& theCommands)
                    "update the draw viewer",
                   __FILE__, DDataStd_DrawRepaint, g);    
 }
-
-
-
-
-
-
-
-
-
-
-
index 17dd1bc..8142867 100644 (file)
@@ -97,8 +97,9 @@ static Standard_Integer DDataStd_GetName (Draw_Interpretor& di,
          aGuid = Standard_GUID(arg[3]);
        }
        Handle(TDataStd_Name) N;          
-       if( !L.FindAttribute(aGuid, N) ) {
-      std::cout << "Name attribute is not found or not set"  << std::endl;
+       if( !L.FindAttribute(aGuid, N) )
+  {
+    di << "Name attribute is not found or not set";
          return 1;
        }
 #ifdef DEB_DDataStd
index 1619ca4..14c15fd 100644 (file)
@@ -22,6 +22,7 @@
 #include <Draw_Appli.hxx>
 #include <Draw_Drawable3D.hxx>
 #include <Draw_Interpretor.hxx>
+#include <Message.hxx>
 #include <Standard_GUID.hxx>
 #include <TCollection_AsciiString.hxx>
 #include <TCollection_ExtendedString.hxx>
@@ -350,7 +351,7 @@ static Standard_Integer DDataStd_OpenNode (Draw_Interpretor& di,
   Handle(DDataStd_TreeBrowser) browser = Handle(DDataStd_TreeBrowser)::DownCast (Draw::GetExisting (a[1]));
   if (browser.IsNull())
   {
-    std::cout << "Syntax error: browser '" << a[1] << "' not found\n";
+    Message::SendFail() << "Syntax error: browser '" << a[1] << "' not found";
     return 1;
   }
 
@@ -461,11 +462,9 @@ static Standard_Integer DDataStd_ChildNodeMore (Draw_Interpretor& di,
                                                const char**            /*a*/)
 {
   if (cni.More()) {
-    //std::cout<<"TRUE"<<std::endl;
     di<<"TRUE\n";
   }
   else {
-    //std::cout<<"FALSE"<<std::endl;
     di<<"FALSE\n";  
   }
   return 0;
@@ -508,7 +507,6 @@ static Standard_Integer DDataStd_ChildNodeValue (Draw_Interpretor& di,
 {
   TCollection_AsciiString entry;
   TDF_Tool::Entry(cni.Value()->Label(), entry);
-  //std::cout<<entry<<std::endl;
   di  <<entry<<"\n";
   return 0;
 }  
index ba16f2c..ed27ac2 100644 (file)
@@ -326,13 +326,13 @@ static Standard_Integer DDocStd_SaveAs (Draw_Interpretor& di,
 //purpose  : 
 //=======================================================================
 
-static Standard_Integer DDocStd_Close (Draw_Interpretor& /*theDI*/,
+static Standard_Integer DDocStd_Close (Draw_Interpretor& theDI,
                                        Standard_Integer  theArgNb,
                                        const char**      theArgVec)
 {   
   if (theArgNb != 2)
   {
-    std::cout << "DDocStd_Close : Error\n";
+    theDI << "DDocStd_Close : Error\n";
     return 1;
   }
 
index 68fcad9..1ea4b8a 100644 (file)
@@ -461,7 +461,7 @@ static Standard_Integer DNaming_ImportShape (Draw_Interpretor& di,
     DDF::ReturnLabel(di, L);
     return 0;
   }
-  std::cout << "DNaming_NewShape : Error" << std::endl;
+  di << "DNaming_NewShape : Error";
   return 1;  
 }
 //=======================================================================
index b2315d3..43791f6 100644 (file)
@@ -22,6 +22,7 @@
 #include <BRepTools.hxx>
 #include <BRep_Builder.hxx>
 #include <gp_Trsf.hxx>
+#include <Message.hxx>
 #include <TopAbs.hxx>
 #include <TopoDS.hxx>
 #include <TopoDS_Shape.hxx>
@@ -333,7 +334,7 @@ static Standard_Integer DNaming_AddBox (Draw_Interpretor& theDI,
     DDF::ReturnLabel(theDI, anObj->Label());
     return 0;
   }
-  std::cout << "DNaming_AddBox : Error" << std::endl;
+  Message::SendFail() << "DNaming_AddBox : Error";
   return 1;  
 }
 
@@ -385,7 +386,7 @@ static Standard_Integer DNaming_BoxDX (Draw_Interpretor& theDI,
       return 0;
     }
   }
-  std::cout << "DNaming_BoxDX : Error" << std::endl;
+  Message::SendFail() << "DNaming_BoxDX : Error";
   return 1;  
 }
 
@@ -418,7 +419,7 @@ static Standard_Integer DNaming_BoxDY (Draw_Interpretor& theDI,
       return 0;
     }
   }
-  std::cout << "DNaming_BoxDY : Error" << std::endl;
+  Message::SendFail() << "DNaming_BoxDY : Error";
   return 1;  
 }
 
@@ -451,7 +452,7 @@ static Standard_Integer DNaming_BoxDZ (Draw_Interpretor& theDI,
       return 0;
     }
   }
-  std::cout << "DNaming_BoxDZ : Error" << std::endl;
+  Message::SendFail() << "DNaming_BoxDZ : Error";
   return 1;  
 }
 
@@ -525,7 +526,7 @@ static Standard_Integer DNaming_SolveFlatFrom (Draw_Interpretor& /*theDI*/,
       logbook->Clear();
          Standard_Integer aRes = ComputeFunction(aFun, logbook);
          if(aRes != 0) {
-           std::cout << "DNaming_SolveFlatFrom: Driver failed at label = " << entry << std::endl;
+      Message::SendFail() << "DNaming_SolveFlatFrom: Driver failed at label = " << entry;
            return 1;
          }
 #ifdef OCCT_DEBUG
@@ -539,7 +540,7 @@ static Standard_Integer DNaming_SolveFlatFrom (Draw_Interpretor& /*theDI*/,
     return 0;
   }   
  ERR:
-  std::cout << "DNaming_SolveFlatFrom : Error" << std::endl;
+  Message::SendFail() << "DNaming_SolveFlatFrom : Error";
   return 1;  
 }
 
@@ -569,7 +570,7 @@ static Standard_Integer DNaming_InitLogBook (Draw_Interpretor& /*theDI*/,
     }
     return 0;
   }
-  std::cout << "DNaming_InitLogBook : Error - No document ==> " <<theNb <<std::endl;
+  Message::SendFail() << "DNaming_InitLogBook : Error - No document ==> " << theNb;
   return 1;  
 }
 
@@ -600,7 +601,7 @@ static Standard_Integer DNaming_CheckLogBook (Draw_Interpretor& /*theDI*/,
     }
     return 0;
   }
-  std::cout << "DNaming_CheckLogBook : Error - No document ==> " <<theNb <<std::endl;
+  Message::SendFail() << "DNaming_CheckLogBook : Error - No document ==> " << theNb;
   return 1;  
 }
 
@@ -625,17 +626,18 @@ static Standard_Integer DNaming_ComputeFun (Draw_Interpretor& /*theDI*/,
     if(!aFun.IsNull()) {
       Handle(TFunction_Logbook) logbook = TFunction_Logbook::Set(funLabel);
       Standard_Integer aRes = ComputeFunction(aFun, logbook);
-      if(aRes != 0) {
-        std::cout << "DNaming_ComputeFun : No Driver or Driver failed" << std::endl;
-        return 1;
-       }
+      if(aRes != 0)
+      {
+        Message::SendFail() << "DNaming_ComputeFun : No Driver or Driver failed";
+        return 1;
+      }
 #ifdef OCCT_DEBUG
       std::cout <<"DNaming_ComputeFun : function from label " << theArg[2] << " is recomputed" << std::endl;
 #endif
       return 0;
     }
   }
-  std::cout << "DNaming_ComputeFun : Error" << std::endl;
+  Message::SendFail() << "DNaming_ComputeFun : Error";
   return 1;  
 }
 
@@ -723,7 +725,7 @@ static Standard_Integer DNaming_AttachShape (Draw_Interpretor& di,
       }
     } //###
   }
-  std::cout << "DNaming_AttachShape : Error" << std::endl;
+  Message::SendFail() << "DNaming_AttachShape : Error";
   return 1;  
 }
 
@@ -788,7 +790,7 @@ static Standard_Integer DNaming_XAttachShape (Draw_Interpretor& di,
       }
     }
   }
-  std::cout << "DNaming_XAttachShape : Error" << std::endl;
+  Message::SendFail() << "DNaming_XAttachShape : Error";
   return 1;  
 }
 
@@ -829,7 +831,7 @@ static Standard_Integer DNaming_AddCylinder (Draw_Interpretor& theDI,
     DDF::ReturnLabel(theDI, anObj->Label());
     return 0;
   }
-  std::cout << "DNaming_AddCylinder : Error" << std::endl;
+  Message::SendFail() << "DNaming_AddCylinder : Error";
   return 1;  
 }
 
@@ -862,7 +864,7 @@ static Standard_Integer DNaming_CylRad (Draw_Interpretor& theDI,
       return 0;
     }
   }
-  std::cout << "DNaming_CylRadius : Error" << std::endl;
+  Message::SendFail() << "DNaming_CylRadius : Error";
   return 1;  
 }
 
@@ -895,7 +897,7 @@ static Standard_Integer DNaming_CylRad (Draw_Interpretor& theDI,
     DDF::ReturnLabel(theDI, aFun->Label());
     return 0;
   }
-   std::cout << "DModel_AddFuse : Error" << std::endl;
+   Message::SendFail() << "DModel_AddFuse : Error";
    return 1;  
  }
 
@@ -929,7 +931,7 @@ static Standard_Integer DNaming_CylRad (Draw_Interpretor& theDI,
     DDF::ReturnLabel(theDI, aFun->Label());
     return 0;
   }
-   std::cout << "DModel_AddCut : Error" << std::endl;
+   Message::SendFail() << "DModel_AddCut : Error";
    return 1;  
  }
 
@@ -962,7 +964,7 @@ static Standard_Integer DNaming_CylRad (Draw_Interpretor& theDI,
     DDF::ReturnLabel(theDI, aFun->Label());
     return 0;
   }
-   std::cout << "DModel_AddComm : Error" << std::endl;
+   Message::SendFail() << "DModel_AddComm : Error";
    return 1;  
  }
 
@@ -994,7 +996,7 @@ static Standard_Integer DNaming_CylRad (Draw_Interpretor& theDI,
     DDF::ReturnLabel(theDI, aFun->Label());
     return 0;
   }
-   std::cout << "DModel_AddSection : Error" << std::endl;
+   Message::SendFail() << "DModel_AddSection : Error";
    return 1;  
  }
 
@@ -1007,7 +1009,7 @@ static Standard_Integer DNaming_AddFillet (Draw_Interpretor& theDI,
                                           const char** theArg)
 {
   if (theNb < 5) {
-    std::cout<<"DNaming_AddFillet(): Wrong number of arguments"<<std::endl;
+    Message::SendFail() << "DNaming_AddFillet(): Wrong number of arguments";
     return 1;
   }
 
@@ -1079,7 +1081,7 @@ static Standard_Integer DNaming_PTranslateDXYZ (Draw_Interpretor& di,
     DDF::ReturnLabel(di, aFun->Label());
     return 0;
   }
-  std::cout << "DNaming_Translate : Error" << std::endl;
+  Message::SendFail() << "DNaming_Translate : Error";
   return 1;  
 }
 //=======================================================================
@@ -1118,7 +1120,7 @@ static Standard_Integer DNaming_PTranslateLine (Draw_Interpretor& di,
     DDF::ReturnLabel(di, aFun->Label());
     return 0;
   }
-  std::cout << "DNaming_PTranslateAlongLine : Error" << std::endl;
+  Message::SendFail() << "DNaming_PTranslateAlongLine : Error";
   return 1;  
 }
 
@@ -1157,7 +1159,7 @@ static Standard_Integer DNaming_PRotateLine(Draw_Interpretor& di,
     DDF::ReturnLabel(di, aFun->Label());
     return 0;    
   }
-  std::cout << "DNaming_PRotateRoundLine : Error" << std::endl;
+  Message::SendFail() << "DNaming_PRotateRoundLine : Error";
   return 1;  
 }
 
@@ -1190,7 +1192,7 @@ static Standard_Integer DNaming_PMirrorObject(Draw_Interpretor& di,
     DDF::ReturnLabel(di, aFun->Label());
     return 0;
   }
-  std::cout << "DNaming_PMirrorObject : Error" << std::endl;
+  Message::SendFail() << "DNaming_PMirrorObject : Error";
   return 1;  
 }
 //=======================================================================
@@ -1202,7 +1204,7 @@ static Standard_Integer DNaming_AddPrism (Draw_Interpretor& theDI,
                                         const char** theArg)
 {
   if (theNb < 5 ) {
-    std::cout<<"DNaming_AddPrism(): Wrong number of arguments"<<std::endl;
+    Message::SendFail() << "DNaming_AddPrism(): Wrong number of arguments";
     return 1;
   }
 //
@@ -1260,7 +1262,7 @@ static Standard_Integer DNaming_PrismHeight (Draw_Interpretor& theDI,
     }
     
   }
-  std::cout << "DNaming_PrismHeight : Error" << std::endl;
+  Message::SendFail() << "DNaming_PrismHeight : Error";
   return 1;  
 }
 
@@ -1275,7 +1277,7 @@ static Standard_Integer DNaming_AddRevol (Draw_Interpretor& theDI,
                                          const char** theArg)
 {
   if (theNb < 4 ) {
-    std::cout<<"DNaming_AddRevol(): Wrong number of arguments"<<std::endl;
+    Message::SendFail() << "DNaming_AddRevol(): Wrong number of arguments";
     return 1;
   }
 
@@ -1352,7 +1354,7 @@ static Standard_Integer DNaming_RevolutionAngle (Draw_Interpretor& theDI,
       return 0;
     }    
   }
-  std::cout << "DNaming_RevolutionAngle : Error" << std::endl;
+  Message::SendFail() << "DNaming_RevolutionAngle : Error";
   return 1;  
 }
 
@@ -1365,7 +1367,7 @@ static Standard_Integer DNaming_AddSphere (Draw_Interpretor& theDI,
                                          const char** theArg)
 {
   if (theNb != 4) {
-    std::cout<<"DNaming_AddSphere(): Wrong number of arguments"<<std::endl;
+    Message::SendFail() << "DNaming_AddSphere(): Wrong number of arguments";
     return 1;
   }
   Handle(TDocStd_Document) aDocument;   
@@ -1421,7 +1423,7 @@ static Standard_Integer DNaming_SphereRadius (Draw_Interpretor& theDI,
     }
   }
 
-  std::cout << "DNaming_SphRadius : Error" << std::endl;
+  Message::SendFail() << "DNaming_SphRadius : Error";
   return 1;  
 }
 //=======================================================================
@@ -1459,7 +1461,8 @@ static Standard_Integer DNaming_AddPoint (Draw_Interpretor& theDI,
     DDF::ReturnLabel(theDI, anObj->Label());
     return 0;
   }
-  std::cout << "DNaming_AddPoint : Error" << std::endl;
+
+  Message::SendFail() << "DNaming_AddPoint : Error";
   return 1;  
 }
 
@@ -1504,7 +1507,8 @@ static Standard_Integer DNaming_AddPointRlt (Draw_Interpretor& theDI,
     DDF::ReturnLabel(theDI, anObj->Label());
     return 0;
   }
-  std::cout << "DNaming_AddPoint : Error" << std::endl;
+
+  Message::SendFail() << "DNaming_AddPoint : Error";
   return 1;  
 }
 
@@ -1558,7 +1562,8 @@ static Standard_Integer DNaming_PntOffset (Draw_Interpretor& theDI,
       return 0;
     }
   }
-  std::cout << "DNaming_PntOffset : Error" << std::endl;
+
+  Message::SendFail() << "DNaming_PntOffset : Error";
   return 1;  
 }
 
@@ -1572,7 +1577,7 @@ static Standard_Integer DNaming_Line3D (Draw_Interpretor& theDI,
                                          const char** theArg)
 {
   if (theNb < 5) {
-    std::cout<<"DNaming_AddLine3D: Wrong number of arguments"<<std::endl;
+    Message::SendFail() << "DNaming_AddLine3D: Wrong number of arguments";
     return 1;
   }
   Handle(TDocStd_Document) aDocument;   
@@ -1992,7 +1997,7 @@ static Standard_Integer DNaming_TestSingle (Draw_Interpretor& theDI,
     }
   }
 
-  std::cout << "DNaming_TestSingle : Error" << std::endl;
+  Message::SendFail() << "DNaming_TestSingle : Error";
   return 1;  
 }
 
@@ -2118,7 +2123,7 @@ static Standard_Integer DNaming_Multiple (Draw_Interpretor& theDI,
     }
   }
 
-  std::cout << "DNaming_TestMultiple : Error" << std::endl;
+  Message::SendFail() << "DNaming_TestMultiple : Error";
   return 1;  
 }
 
index ae06332..04f098a 100644 (file)
@@ -59,7 +59,7 @@ extern Standard_Boolean Draw_ParseFailed;
 
 Standard_EXPORT Draw_Viewer dout;
 Standard_EXPORT Draw_Interpretor theCommands;
-Standard_EXPORT Standard_Boolean Draw_Batch;
+Standard_EXPORT Standard_Boolean Draw_Batch = Standard_False;
 Standard_EXPORT Standard_Boolean Draw_Spying = Standard_False;
 Standard_EXPORT Standard_Boolean Draw_Chrono = Standard_False;
 Standard_EXPORT Standard_Boolean Draw_VirtualWindows = Standard_False;
@@ -504,14 +504,7 @@ void Draw_Appli(int argc, char** argv, const FDraw_InitAppli Draw_InitAppli)
     if (!isInteractiveForced)
     {
       // disable console messages colorization to avoid spoiling log with color codes
-      for (Message_SequenceOfPrinters::Iterator aPrinterIter (Message::DefaultMessenger()->Printers());
-           aPrinterIter.More(); aPrinterIter.Next())
-      {
-        if (Handle(Message_PrinterOStream) aPrinter = Handle(Message_PrinterOStream)::DownCast (aPrinterIter.Value()))
-        {
-          aPrinter->SetToColorize (Standard_False);
-        }
-      }
+      theCommands.SetToColorize (Standard_False);
     }
     ReadInitFile (aRunFile);
     // provide a clean exit, this is useful for some analysis tools
@@ -637,7 +630,15 @@ Standard_Boolean Draw_Interprete(const char* com)
 
   if (*theCommands.Result())
   {
+    if (c > 0 && theCommands.ToColorize())
+    {
+      Message_PrinterOStream::SetConsoleTextColor (&std::cout, Message_ConsoleColor_Red, true);
+    }
     std::cout << theCommands.Result() << std::endl;
+    if (c > 0 && theCommands.ToColorize())
+    {
+      Message_PrinterOStream::SetConsoleTextColor (&std::cout, Message_ConsoleColor_Default, false);
+    }
   }
 
   if (Draw_Chrono && hadchrono) {
index c2ef187..98d793a 100644 (file)
@@ -259,9 +259,9 @@ static Standard_Integer dlog(Draw_Interpretor& di, Standard_Integer n, const cha
 {
   if (n != 2 && n != 3)
   {
-    std::cout << "Enable or disable logging: " << a[0] << " {on|off}" << std::endl;
-    std::cout << "Reset log: " << a[0] << " reset" << std::endl;
-    std::cout << "Get log content: " << a[0] << " get" << std::endl;
+    Message::SendFail() << "Enable or disable logging: " << a[0] << " {on|off}\n"
+                        << "Reset log: " << a[0] << " reset\n"
+                        << "Get log content: " << a[0] << " get";
     return 1;
   }
 
@@ -292,7 +292,7 @@ static Standard_Integer dlog(Draw_Interpretor& di, Standard_Integer n, const cha
     di << (di.GetDoLog() ? "on" : "off");
   }
   else {
-    std::cout << "Unrecognized option(s): " << a[1] << std::endl;
+    Message::SendFail() << "Unrecognized option(s): " << a[1];
     return 1;
   }
   return 0;
@@ -302,7 +302,7 @@ static Standard_Integer decho(Draw_Interpretor& di, Standard_Integer n, const ch
 {
   if (n != 2)
   {
-    std::cout << "Enable or disable echoing: " << a[0] << " {on|off}" << std::endl;
+    Message::SendFail() << "Enable or disable echoing: " << a[0] << " {on|off}";
     return 1;
   }
 
@@ -315,7 +315,7 @@ static Standard_Integer decho(Draw_Interpretor& di, Standard_Integer n, const ch
     di.SetDoEcho (Standard_False);
   }
   else {
-    std::cout << "Unrecognized option: " << a[1] << std::endl;
+    Message::SendFail() << "Unrecognized option: " << a[1];
     return 1;
   }
   return 0;
@@ -762,7 +762,7 @@ static int dlocale (Draw_Interpretor& di, Standard_Integer n, const char** argv)
     else if ( ! strcmp (cat, "LC_TIME") ) category = LC_TIME;
     else 
     {
-      std::cout << "Error: cannot recognize argument " << cat << " as one of LC_ macros" << std::endl;
+      Message::SendFail() << "Error: cannot recognize argument " << cat << " as one of LC_ macros";
       return 1;
     }
   }
@@ -884,7 +884,7 @@ static int dparallel (Draw_Interpretor& theDI,
       const Standard_Integer aVal = Draw::Atoi (theArgVec[++anIter]);
       if (aVal <= 0 || aVal > aDefPool->NbThreads())
       {
-        std::cout << "Syntax error: maximum number of threads to use should be <= of threads in the pool\n";
+        Message::SendFail() << "Syntax error: maximum number of threads to use should be <= of threads in the pool";
         return 1;
       }
       aDefPool->SetNbDefaultThreadsToLaunch (aVal);
@@ -915,7 +915,7 @@ static int dparallel (Draw_Interpretor& theDI,
     }
     else
     {
-      std::cout << "Syntax error: unknown argument '" << anArg << "'\n";
+      Message::SendFail() << "Syntax error: unknown argument '" << anArg << "'";
       return 1;
     }
   }
@@ -989,7 +989,7 @@ static int dsetsignal (Draw_Interpretor& theDI, Standard_Integer theArgNb, const
     }
     else
     {
-      std::cout << "Syntax error: unknown argument '" << anArg << "'\n";
+      Message::SendFail() << "Syntax error: unknown argument '" << anArg << "'";
       return 1;
     }
   }
@@ -1023,7 +1023,7 @@ static int dtracelevel (Draw_Interpretor& theDI,
   Message_Gravity aLevel = Message_Info;
   if (theArgNb < 1 || theArgNb > 2)
   {
-    std::cout << "Error: wrong number of arguments! See usage:\n";
+    Message::SendFail() << "Error: wrong number of arguments! See usage:";
     theDI.PrintHelp (theArgVec[0]);
     return 1;
   }
@@ -1054,7 +1054,7 @@ static int dtracelevel (Draw_Interpretor& theDI,
     }
     else
     {
-      std::cout << "Error: unknown gravity '" << theArgVec[1] << "'!\n";
+      Message::SendFail() << "Error: unknown gravity '" << theArgVec[1] << "'";
       return 1;
     }
   }
@@ -1062,14 +1062,14 @@ static int dtracelevel (Draw_Interpretor& theDI,
   Handle(Message_Messenger) aMessenger = Message::DefaultMessenger();
   if (aMessenger.IsNull())
   {
-    std::cout << "Error: default messenger is unavailable!\n";
+    Message::SendFail() << "Error: default messenger is unavailable";
     return 1;
   }
 
   Message_SequenceOfPrinters& aPrinters = aMessenger->ChangePrinters();
   if (aPrinters.Length() < 1)
   {
-    std::cout << "Error: no printers registered in default Messenger!\n";
+    Message::SendFail() << "Error: no printers registered in default Messenger";
     return 0;
   }
 
@@ -1108,7 +1108,7 @@ static int dtracelevel (Draw_Interpretor& theDI,
 //function : dputs
 //purpose  :
 //==============================================================================
-static int dputs (Draw_Interpretor& ,
+static int dputs (Draw_Interpretor& theDI,
                   Standard_Integer theArgNb,
                   const char** theArgVec)
 {
@@ -1169,6 +1169,11 @@ static int dputs (Draw_Interpretor& ,
     }
     else if (anArgIter + 1 == theArgNb)
     {
+      if (!theDI.ToColorize())
+      {
+        toIntense = false;
+        aColor = Message_ConsoleColor_Default;
+      }
       if (toIntense || aColor != Message_ConsoleColor_Default)
       {
         Message_PrinterOStream::SetConsoleTextColor (aStream, aColor, toIntense);
index 4a0aa4c..d7b7b1b 100644 (file)
@@ -25,6 +25,7 @@
 #include <Draw_ProgressIndicator.hxx>
 #include <Draw_Text2D.hxx>
 #include <Draw_Text3D.hxx>
+#include <Message.hxx>
 #include <Standard_Stream.hxx>
 #include <TCollection_AsciiString.hxx>
 
@@ -195,12 +196,12 @@ static Standard_Integer wzoom(Draw_Interpretor& di, Standard_Integer argc, const
     id = atoi(argv[1]); 
     if ((id < 0) || (id >= MAXVIEW)) 
     {
-      std::cout << "Incorrect view-id, must be in 0.."<<MAXVIEW-1<<std::endl;
+      Message::SendFail() << "Incorrect view-id, must be in 0.." << (MAXVIEW-1);
       return 1;
     }
     if (!dout.HasView(id))
     {
-      std::cout <<"View "<<id<<" does not exist."<<std::endl;
+      Message::SendFail() << "View " << id << " does not exist";
       return 1;
     }
     X1 = atoi (argv [2]);
index e8cfe0c..53f42be 100644 (file)
 // commercial license or contractual agreement.
 
 #include <Draw_Interpretor.hxx>
+
 #include <Draw_Appli.hxx>
+#include <Message.hxx>
+#include <Message_PrinterOStream.hxx>
+#include <OSD.hxx>
+#include <OSD_File.hxx>
+#include <OSD_Path.hxx>
+#include <OSD_Process.hxx>
 #include <Standard_SStream.hxx>
 #include <Standard_RangeError.hxx>
 #include <Standard_ErrorHandler.hxx>
 #include <Standard_Macro.hxx>
-
 #include <TCollection_AsciiString.hxx>
 #include <TCollection_ExtendedString.hxx>
-#include <OSD_Process.hxx>
-#include <OSD_Path.hxx>
-#include <OSD.hxx>
-#include <OSD_File.hxx>
 
 #include <string.h>
 #include <tcl.h>
@@ -114,8 +116,7 @@ namespace {
 
 static Standard_Integer CommandCmd (ClientData theClientData, Tcl_Interp* interp, Standard_Integer argc, const char* argv[])
 {
-  static Standard_Integer code;
-  code = TCL_OK;
+  Standard_Integer code = TCL_OK;
   Draw_Interpretor::CallBackData* aCallback = (Draw_Interpretor::CallBackData* )theClientData;
   Draw_Interpretor& di = *(aCallback->myDI);
 
@@ -143,24 +144,26 @@ static Standard_Integer CommandCmd (ClientData theClientData, Tcl_Interp* interp
     dumpArgs (std::cout, argc, argv);
 
   // run command
-  try {
+  try
+  {
     OCC_CATCH_SIGNALS
 
     // get exception if control-break has been pressed 
     OSD::ControlBreak();
 
-    // OCC680: Transfer UTF-8 directly to OCC commands without locale usage
-      
     Standard_Integer fres = aCallback->Invoke ( di, argc, argv /*anArgs.GetArgv()*/ );
-    if (fres != 0) 
+    if (fres != 0)
+    {
       code = TCL_ERROR;
+    }
   }
-  catch (Standard_Failure const& anException) {
+  catch (Standard_Failure const& anException)
+  {
     // fail if Draw_ExitOnCatch is set
-    std::cout << "An exception was caught " << anException << std::endl;
     const char* toExitOnCatch = Tcl_GetVar (interp, "Draw_ExitOnCatch", TCL_GLOBAL_ONLY);
     if (toExitOnCatch != NULL && Draw::Atoi (toExitOnCatch))
     {
+      Message::SendFail() << "An exception was caught " << anException;
 #ifdef _WIN32
       Tcl_Exit(0);
 #else      
@@ -168,18 +171,17 @@ static Standard_Integer CommandCmd (ClientData theClientData, Tcl_Interp* interp
 #endif
     }
 
-    // get the error message
     Standard_SStream ss;
-    ss << "** Exception ** " << anException << std::ends;
+    ss << "An exception was caught " << anException << std::ends;
     Tcl_SetResult(interp,(char*)(ss.str().c_str()),TCL_VOLATILE);
     code = TCL_ERROR;
   }
   catch (std::exception const& theStdException)
   {
-    std::cout << "An exception was caught " << theStdException.what() << " [" << typeid(theStdException).name() << "]" << std::endl;
     const char* toExitOnCatch = Tcl_GetVar (interp, "Draw_ExitOnCatch", TCL_GLOBAL_ONLY);
     if (toExitOnCatch != NULL && Draw::Atoi (toExitOnCatch))
     {
+      Message::SendFail() << "An exception was caught " << theStdException.what() << " [" << typeid(theStdException).name() << "]";
     #ifdef _WIN32
       Tcl_Exit (0);
     #else
@@ -187,18 +189,17 @@ static Standard_Integer CommandCmd (ClientData theClientData, Tcl_Interp* interp
     #endif
     }
 
-    // get the error message
     Standard_SStream ss;
-    ss << "** Exception ** " << theStdException.what() << " [" << typeid(theStdException).name() << "]" << std::ends;
-    Tcl_SetResult (interp, (char*)(ss.str().c_str()), TCL_VOLATILE);
+    ss << "An exception was caught " << theStdException.what() << " [" << typeid(theStdException).name() << "]" << std::ends;
+    Tcl_SetResult(interp,(char*)(ss.str().c_str()),TCL_VOLATILE);
     code = TCL_ERROR;
   }
   catch (...)
   {
-    std::cout << "UNKNOWN exception was caught " << std::endl;
     const char* toExitOnCatch = Tcl_GetVar (interp, "Draw_ExitOnCatch", TCL_GLOBAL_ONLY);
     if (toExitOnCatch != NULL && Draw::Atoi (toExitOnCatch))
     {
+      Message::SendFail() << "UNKNOWN exception was caught ";
     #ifdef _WIN32
       Tcl_Exit (0);
     #else
@@ -206,10 +207,9 @@ static Standard_Integer CommandCmd (ClientData theClientData, Tcl_Interp* interp
     #endif
     }
 
-    // get the error message
     Standard_SStream ss;
-    ss << "** Exception ** UNKNOWN" << std::ends;
-    Tcl_SetResult (interp, (char* )(ss.str().c_str()), TCL_VOLATILE);
+    ss << "UNKNOWN exception was caught " << std::ends;
+    Tcl_SetResult(interp,(char*)(ss.str().c_str()),TCL_VOLATILE);
     code = TCL_ERROR;
   }
 
@@ -244,15 +244,34 @@ static void CommandDelete (ClientData theClientData)
 
 //=======================================================================
 //function : Draw_Interpretor
-//purpose  : 
+//purpose  :
 //=======================================================================
+Draw_Interpretor::Draw_Interpretor()
+: // the tcl interpreter is not created immediately as it is kept
+  // by a global variable and created and deleted before the main()
+  myInterp (NULL),
+  isAllocated (Standard_False),
+  myDoLog (Standard_False),
+  myDoEcho (Standard_False),
+  myToColorize (Standard_True),
+  myFDLog (-1)
+{
+  //
+}
 
-Draw_Interpretor::Draw_Interpretor() :
-  isAllocated(Standard_False), myDoLog(Standard_False), myDoEcho(Standard_False), myFDLog(-1)
+//=======================================================================
+//function : Draw_Interpretor
+//purpose  :
+//=======================================================================
+Draw_Interpretor::Draw_Interpretor (const Draw_PInterp& theInterp)
+: myInterp (theInterp),
+  isAllocated (Standard_False),
+  myDoLog (Standard_False),
+  myDoEcho (Standard_False),
+  myToColorize (Standard_True),
+  myFDLog (-1)
 {
-// The tcl interpreter is not created immediately as it is kept 
-// by a global variable and created and deleted before the main().
-  myInterp  = NULL;
+  //
 }
 
 //=======================================================================
@@ -269,17 +288,20 @@ void Draw_Interpretor::Init()
 }
 
 //=======================================================================
-//function : Draw_Interpretor
-//purpose  : 
+//function : SetToColorize
+//purpose  :
 //=======================================================================
-
-Draw_Interpretor::Draw_Interpretor(const Draw_PInterp& p) :
-  isAllocated(Standard_False),
-  myInterp(p),
-  myDoLog(Standard_False),
-  myDoEcho(Standard_False),
-  myFDLog(-1)
+void Draw_Interpretor::SetToColorize (Standard_Boolean theToColorize)
 {
+  myToColorize = theToColorize;
+  for (Message_SequenceOfPrinters::Iterator aPrinterIter (Message::DefaultMessenger()->Printers());
+       aPrinterIter.More(); aPrinterIter.Next())
+  {
+    if (Handle(Message_PrinterOStream) aPrinter = Handle(Message_PrinterOStream)::DownCast (aPrinterIter.Value()))
+    {
+      aPrinter->SetToColorize (Standard_False);
+    }
+  }
 }
 
 //=======================================================================
index 579f6f9..aa707f9 100644 (file)
@@ -251,6 +251,12 @@ public:
   //! Returns current value of the log file descriptor
   Standard_Integer GetLogFileDescriptor() { return myFDLog; }
 
+  //! Return TRUE if console output should be colorized; TRUE by default.
+  Standard_Boolean ToColorize() const { return myToColorize; }
+
+  //! Set if console output should be colorized.
+  Standard_EXPORT void SetToColorize (Standard_Boolean theToColorize);
+
 protected:
 
   Standard_EXPORT void add (Standard_CString theCommandName,
@@ -261,10 +267,11 @@ protected:
 
 private:
 
-  Standard_Boolean isAllocated;
   Draw_PInterp     myInterp;
+  Standard_Boolean isAllocated;
   Standard_Boolean myDoLog;
   Standard_Boolean myDoEcho;
+  Standard_Boolean myToColorize;
   Standard_Integer myFDLog;          //!< file descriptor of log file 
 
 public:
index 0f99a97..e34b916 100644 (file)
@@ -258,7 +258,7 @@ static Standard_Integer dtryload (Draw_Interpretor& di, Standard_Integer n, cons
 {
   if (n != 2)
   {
-    std::cout << "Error: specify path to library to be loaded" << std::endl;
+    Message::SendFail() << "Error: specify path to library to be loaded";
     return 1;
   }
 
index f7ea808..9b50b2c 100644 (file)
@@ -25,6 +25,7 @@
 #include <Draw_Number.hxx>
 #include <Draw_ProgressIndicator.hxx>
 #include <Draw_SequenceOfDrawable3D.hxx>
+#include <Message.hxx>
 #include <NCollection_Map.hxx>
 #include <Standard_SStream.hxx>
 #include <Standard_Stream.hxx>
@@ -388,7 +389,7 @@ static Standard_Integer draw(Draw_Interpretor& , Standard_Integer n, const char*
   if (n < 3) return 1;
   Standard_Integer id = Draw::Atoi(a[1]);
   if (!dout.HasView(id)) {
-    std::cout << "bad view number in draw"<<std::endl;
+    Message::SendFail() << "bad view number in draw";
     return 1;
   }
   Standard_Integer mo = Draw::Atoi(a[2]);
@@ -587,7 +588,7 @@ static Standard_Integer set(Draw_Interpretor& di, Standard_Integer n, const char
 static Standard_Integer dsetenv(Draw_Interpretor& /*di*/, Standard_Integer argc, const char** argv)
 {
   if (argc < 2) {
-    std::cout << "Use: " << argv[0] << " {varname} [value]" << std::endl;
+    Message::SendFail() << "Use: " << argv[0] << " {varname} [value]";
     return 1;
   }
 
@@ -610,7 +611,7 @@ static Standard_Integer dsetenv(Draw_Interpretor& /*di*/, Standard_Integer argc,
 static Standard_Integer dgetenv(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
 {
   if (argc < 2) {
-    std::cout << "Use: " << argv[0] << " {varname}" << std::endl;
+    Message::SendFail() << "Use: " << argv[0] << " {varname}";
     return 1;
   }
 
index f12c8c4..b46828f 100644 (file)
@@ -1319,6 +1319,7 @@ proc _run_test {scriptsdir group gridname casefile echo} {
 
     # evaluate test case 
     set tmp_imagedir 0
+    set anExcep ""
     if [catch {
         # set variables identifying test case
         uplevel set casename [file tail $casefile]
@@ -1368,13 +1369,15 @@ proc _run_test {scriptsdir group gridname casefile echo} {
             uplevel source -encoding utf-8 $scriptsdir/$group/end
         }
     } res] {
-        puts "Tcl Exception: $res"
+        set anExcep $res
+        if { "$res" == "" } { set anExcep "EMPTY" }
     }
 
     # stop logging
     if { $dlog_exists } {
         if { $echo } {
             decho off
+            if { "$anExcep" != "" } { dputs -red -intense "Tcl Exception: $res" }
         } else {
             rename puts {}
             rename puts-saved puts
index 0121875..0731991 100644 (file)
@@ -35,6 +35,7 @@
 #include <Draw_Marker3D.hxx>
 #include <Draw_Color.hxx>
 #include <Draw_MarkerShape.hxx>
+#include <Message.hxx>
 #include <TColgp_Array1OfPnt.hxx>
 #include <TColgp_Array2OfPnt.hxx>
 #include <TColStd_Array2OfReal.hxx>
@@ -90,7 +91,7 @@ static Standard_Integer proj (Draw_Interpretor& di, Standard_Integer n, const ch
 {
   if ( n < 5)
   {
-    std::cout << " Use proj curve/surf x y z [{extrema algo: g(grad)/t(tree)}|{u v}]" << std::endl;
+    Message::SendFail() << " Use proj curve/surf x y z [{extrema algo: g(grad)/t(tree)}|{u v}]";
     return 1;
   }
 
index 0cf62d6..36782bb 100644 (file)
@@ -27,6 +27,7 @@
 #include <Draw_Appli.hxx>
 #include <Draw.hxx>
 #include <Draw_Interpretor.hxx>
+#include <Message.hxx>
 
 /*********************************************************************************/
 void  InitEpsSurf(Standard_Real& epsnl,Standard_Real& epsdis, Standard_Real& epsangk1, 
@@ -106,7 +107,7 @@ static Standard_Integer surfaceCcontinuity (Draw_Interpretor& di, Standard_Integ
         Standard_FALLTHROUGH
       case 8 : break;
       default : 
-        std::cerr << "Error: invalid number of arguments: expected to get 8 - 10 parameters" << std::endl;
+        Message::SendFail() << "Error: invalid number of arguments: expected to get 8 - 10 parameters";
         return 1;
       } 
     } 
@@ -125,7 +126,7 @@ static Standard_Integer surfaceCcontinuity (Draw_Interpretor& di, Standard_Integ
         Standard_FALLTHROUGH
       case 8  : break;
       default : 
-        std::cerr << "Error: invalid number of arguments: expected to get 8 - 11 parameters" << std::endl;
+        Message::SendFail() << "Error: invalid number of arguments: expected to get 8 - 11 parameters";
         return 1;
       } 
     } 
@@ -146,13 +147,13 @@ static Standard_Integer surfaceCcontinuity (Draw_Interpretor& di, Standard_Integ
         Standard_FALLTHROUGH
       case 8  : break;
       default : 
-        std::cerr << "Error: invalid number of arguments: expected to get 8 - 12 parameters" << std::endl;
+        Message::SendFail() << "Error: invalid number of arguments: expected to get 8 - 12 parameters";
         return 1;
       } 
     }
     break;
   default:
-    std::cerr << "Error: invalid value of parameter 1 (" << a[1] << "): should be 0, 1, or 2" << std::endl;
+    Message::SendFail() << "Error: invalid value of parameter 1 (" << a[1] << "): should be 0, 1, or 2";
     return 1;
   }
 
@@ -217,7 +218,7 @@ static Standard_Integer surfaceGcontinuity (Draw_Interpretor& di, Standard_Integ
         Standard_FALLTHROUGH
       case 8  : break;
       default : 
-        std::cerr << "Error: invalid number of arguments: expected to get 8 - 11 parameters" << std::endl;
+        Message::SendFail() << "Error: invalid number of arguments: expected to get 8 - 11 parameters";
         return 1;
       } 
     } 
@@ -240,13 +241,13 @@ static Standard_Integer surfaceGcontinuity (Draw_Interpretor& di, Standard_Integ
         Standard_FALLTHROUGH
       case 8  : break;
       default : 
-        std::cerr << "Error: invalid number of arguments: expected to get 8 - 13 parameters" << std::endl;
+        Message::SendFail() << "Error: invalid number of arguments: expected to get 8 - 13 parameters";
         return 1;
       } 
     }
     break;
   default:
-    std::cerr << "Error: invalid value of parameter 1 (" << a[1] << "): should be 1 or 2" << std::endl;
+    Message::SendFail() << "Error: invalid value of parameter 1 (" << a[1] << "): should be 1 or 2";
     return 1;
   }
   
@@ -306,7 +307,7 @@ static Standard_Integer curveGcontinuity(Draw_Interpretor& di, Standard_Integer
         Standard_FALLTHROUGH
       case 6  : break;
       default : 
-        std::cerr << "Error: invalid number of arguments: expected to get 6 - 8 parameters" << std::endl;
+        Message::SendFail() << "Error: invalid number of arguments: expected to get 6 - 8 parameters";
         return 1;
       }                         
     } 
@@ -330,14 +331,14 @@ static Standard_Integer curveGcontinuity(Draw_Interpretor& di, Standard_Integer
         Standard_FALLTHROUGH
       case 6  : break;
       default : 
-        std::cerr << "Error: invalid number of arguments: expected to get 6 - 12 parameters" << std::endl;
+        Message::SendFail() << "Error: invalid number of arguments: expected to get 6 - 12 parameters";
         return 1;
       } 
     }
     break; 
 
   default:
-    std::cerr << "Error: invalid value of parameter 1 (" << a[1] << "): should be 1 or 2" << std::endl;
+    Message::SendFail() << "Error: invalid value of parameter 1 (" << a[1] << "): should be 1 or 2";
     return 1;
   }
 
@@ -395,7 +396,7 @@ static Standard_Integer curveCcontinuity(Draw_Interpretor& di, Standard_Integer
         Standard_FALLTHROUGH
       case 6  : break;
       default : 
-        std::cerr << "Error: invalid number of arguments: expected to get 6 - 8 parameters" << std::endl;
+        Message::SendFail() << "Error: invalid number of arguments: expected to get 6 - 8 parameters";
         return 1;
       }
     }  
@@ -413,7 +414,7 @@ static Standard_Integer curveCcontinuity(Draw_Interpretor& di, Standard_Integer
         Standard_FALLTHROUGH
       case 6 : break;
       default : 
-        std::cerr << "Error: invalid number of arguments: expected to get 6 - 9 parameters" << std::endl;
+        Message::SendFail() << "Error: invalid number of arguments: expected to get 6 - 9 parameters";
         return 1;
       }                          
     } 
@@ -434,14 +435,14 @@ static Standard_Integer curveCcontinuity(Draw_Interpretor& di, Standard_Integer
         Standard_FALLTHROUGH
       case 6  : break;
       default : 
-        std::cerr << "Error: invalid number of arguments: expected to get 6 - 10 parameters" << std::endl;
+        Message::SendFail() << "Error: invalid number of arguments: expected to get 6 - 10 parameters";
         return 1;
       } 
     }
     break; 
 
   default:
-    std::cerr << "Error: invalid value of parameter 1 (" << a[1] << "): should be 0, 1, or 2" << std::endl;
+    Message::SendFail() << "Error: invalid value of parameter 1 (" << a[1] << "): should be 0, 1, or 2";
     return 1;
   }
 
index 3aa06fb..4a48303 100644 (file)
@@ -98,7 +98,7 @@
 #include <Approx_CurveOnSurface.hxx>
 #include <Precision.hxx>
 #include <Geom2dAdaptor.hxx>
-
+#include <Message.hxx>
 
 #include <Precision.hxx>
 
@@ -944,7 +944,7 @@ static Standard_Integer crvpoints (Draw_Interpretor& di, Standard_Integer /*n*/,
     TopoDS_Wire aWire = TopoDS::Wire(DBRep::Get(a[2], TopAbs_WIRE));
     if (aWire.IsNull())
     {
-      std::cout << "cannot evaluate the argument " << a[2] << " as a curve" << std::endl;
+      Message::SendFail() << "cannot evaluate the argument " << a[2] << " as a curve";
       return 1;
     }
     BRepAdaptor_CompCurve aCompCurve(aWire);
@@ -1018,7 +1018,7 @@ static Standard_Integer crvtpoints (Draw_Interpretor& di, Standard_Integer n, co
     TopoDS_Wire aWire = TopoDS::Wire(DBRep::Get(a[2], TopAbs_WIRE));
     if (aWire.IsNull())
     {
-      std::cout << "cannot evaluate the argument " << a[2] << " as a curve" << std::endl;
+      Message::SendFail() << "cannot evaluate the argument " << a[2] << " as a curve";
       return 1;
     }
     BRepAdaptor_CompCurve aCompCurve(aWire);
index 5871aeb..3a0205c 100644 (file)
@@ -25,6 +25,7 @@
 #include <Geom2dAdaptor_Curve.hxx>
 #include <GeometryTest.hxx>
 #include <GeometryTest_DrawableQualifiedCurve2d.hxx>
+#include <Message.hxx>
 #include <Precision.hxx>
 #include <TCollection_AsciiString.hxx>
 #include <stdio.h>
@@ -37,7 +38,7 @@ static Standard_Integer qcurve (Draw_Interpretor&, Standard_Integer theArgsNb, c
 {
   if (theArgsNb < 5)
   {
-    std::cout << "Error: wrong number of arguments.\n";
+    Message::SendFail() << "Error: wrong number of argument";
     return 1;
   }
 
@@ -61,7 +62,7 @@ static Standard_Integer qcurve (Draw_Interpretor&, Standard_Integer theArgsNb, c
   {
     if (theArgsNb < 6)
     {
-      std::cout << "Error: wrong number of arguments.\n";
+      Message::SendFail() << "Error: wrong number of arguments";
       return 1;
     }
     aResult2d = new Geom2d_Line (gp_Pnt2d (Draw::Atof (theArgVec[2]), Draw::Atof (theArgVec[3])),
@@ -71,7 +72,7 @@ static Standard_Integer qcurve (Draw_Interpretor&, Standard_Integer theArgsNb, c
   }
   else
   {
-    std::cout << "Error: wrong command name.\n";
+    Message::SendFail() << "Error: wrong command name";
     return 1;
   }
 
@@ -95,7 +96,7 @@ static Standard_Integer solutions (Draw_Interpretor& theDI, GccAna_Circ2d3Tan& t
 {
   if (!theCirTan3.IsDone())
   {
-    std::cout << "GccAna_Circ2d3Tan is not done";
+    Message::SendFail() << "GccAna_Circ2d3Tan is not done";
     return 1;
   }
 
@@ -159,7 +160,7 @@ static Standard_Integer circ2d3Tan (Draw_Interpretor& theDI, Standard_Integer th
 {
   if (theArgsNb < 5)
   {
-    std::cout << "Error: wrong number of arguments.\n";
+    Message::SendFail() << "Error: wrong number of arguments";
     return 1;
   }
 
@@ -183,7 +184,7 @@ static Standard_Integer circ2d3Tan (Draw_Interpretor& theDI, Standard_Integer th
   {
     if (!anIsPoint1 || !anIsPoint2 || !anIsPoint3)
     {
-      std::cout << "Error: wrong points definition.\n";
+      Message::SendFail() << "Error: wrong points definition";
       return 1;
     }
     GccAna_Circ2d3Tan aCircBuilder (aPoint1, aPoint2, aPoint3, aTolerance);
@@ -195,7 +196,7 @@ static Standard_Integer circ2d3Tan (Draw_Interpretor& theDI, Standard_Integer th
   {
     if (!anIsPoint2 || !anIsPoint3)
     {
-      std::cout << "Error: wrong points definition.\n";
+      Message::SendFail() << "Error: wrong points definition";
       return 1;
     }
     Geom2dAdaptor_Curve anAdaptorCurve1 (aQCurve1->GetCurve());
@@ -211,7 +212,7 @@ static Standard_Integer circ2d3Tan (Draw_Interpretor& theDI, Standard_Integer th
       GccAna_Circ2d3Tan aCircBuilder (aQualifiedLin1, aPoint2, aPoint3, aTolerance);
       return solutions (theDI, aCircBuilder, theArgVec[1]);
     }
-    std::cout << "Error: wrong curve type.\n";
+    Message::SendFail() << "Error: wrong curve type";
     return 1;
   }
 
@@ -220,7 +221,7 @@ static Standard_Integer circ2d3Tan (Draw_Interpretor& theDI, Standard_Integer th
   {
     if (!anIsPoint3)
     {
-      std::cout << "Error: wrong point definition.\n";
+      Message::SendFail() << "Error: wrong point definition";
       return 1;
     }
     Geom2dAdaptor_Curve anAdaptorCurve1 (aQCurve1->GetCurve());
@@ -246,7 +247,7 @@ static Standard_Integer circ2d3Tan (Draw_Interpretor& theDI, Standard_Integer th
       GccAna_Circ2d3Tan aCircBuilder (aQualifiedLin1, aQualifiedLin2, aPoint3, aTolerance);
       return solutions (theDI, aCircBuilder, theArgVec[1]);
     }
-    std::cout << "Error: wrong curve type.\n";
+    Message::SendFail() << "Error: wrong curve type";
     return 1;
   }
 
@@ -292,7 +293,7 @@ static Standard_Integer circ2d3Tan (Draw_Interpretor& theDI, Standard_Integer th
     return solutions (theDI, aCircBuilder, theArgVec[1]);
   }
 
-  std::cout << "Error: wrong curve type.\n";
+  Message::SendFail() << "Error: wrong curve type";
   return 1;
 }
 
index 8c0a304..a0a69ca 100644 (file)
@@ -45,8 +45,9 @@
 #include <IntAna2d_Conic.hxx>
 #include <IntRes2d_IntersectionPoint.hxx>
 #include <Geom2dAdaptor_GHCurve.hxx>
-#include <memory>
+#include <Message.hxx>
 
+#include <memory>
 #include <stdio.h>
 #ifdef _WIN32
 Standard_IMPORT Draw_Viewer dout;
@@ -442,7 +443,7 @@ static Standard_Integer intersect_ana(Draw_Interpretor& di, Standard_Integer n,
 {
   if (n < 2)
   {
-    std::cout << "2dintana circle circle " << std::endl;
+    Message::SendFail() << "2dintana circle circle";
     return 1;
   }
 
@@ -483,21 +484,21 @@ static Standard_Integer intconcon(Draw_Interpretor& di, Standard_Integer n, cons
 {
   if( n < 2) 
   {
-    std::cout<< "intconcon con1 con2 "<<std::endl;
+    Message::SendFail() << "intconcon con1 con2";
     return 1;
   }
   
   Handle(Geom2d_Curve) C1 = DrawTrSurf::GetCurve2d(a[1]);
   if (C1.IsNull())
   {
-    std::cout << a[1] << " is Null " << std::endl;
+    Message::SendFail() << a[1] << " is Null";
     return 1;
   }
 
   Handle(Geom2d_Curve) C2 = DrawTrSurf::GetCurve2d(a[2]);
   if (C2.IsNull())
   {
-    std::cout << a[2] << " is Null " << std::endl;
+    Message::SendFail() << a[2] << " is Null";
     return 1;
   }
 
@@ -536,7 +537,7 @@ static Standard_Integer intconcon(Draw_Interpretor& di, Standard_Integer n, cons
     break;
   }
   default:
-    std::cout << a[2] << " is not conic " << std::endl;
+    Message::SendFail() << a[2] << " is not conic";
     return 1;
   }
 
@@ -559,7 +560,7 @@ static Standard_Integer intconcon(Draw_Interpretor& di, Standard_Integer n, cons
     Intersector.Perform(AC1.Parabola(), *pCon);
     break;
   default:
-    std::cout << a[1] << " is not conic " << std::endl;
+    Message::SendFail() << a[1] << " is not conic";
     return 1;
   }
   
index 1c649ca..4b96e55 100644 (file)
@@ -32,6 +32,7 @@
 #include <Geom_BSplineSurface.hxx>
 #include <Geom_BoundedCurve.hxx>
 #include <Geom_BoundedSurface.hxx>
+#include <Message.hxx>
 
 #ifdef _MSC_VER
 #include <stdio.h>
@@ -143,7 +144,7 @@ static Standard_Integer setweight(Draw_Interpretor& /*di*/, Standard_Integer n,
 {
   if (n < 4 || n > 5)
   {
-    std::cout << "Wrong parameters" << std::endl;
+    Message::SendFail() << "Syntax error: Wrong parameters";
     return 1;
   }
 
@@ -183,7 +184,7 @@ static Standard_Integer setweight(Draw_Interpretor& /*di*/, Standard_Integer n,
   Handle(Geom_BezierSurface) aBezSurf = DrawTrSurf::GetBezierSurface(a[1]);
   if (n != 5 && (!aBSplSurf.IsNull() || !aBezSurf.IsNull()))
   {
-    std::cout << "Incorrect parameters" << std::endl;
+    Message::SendFail() << "Syntax error: Incorrect parameters";
     return 1;
   }
 
@@ -199,7 +200,7 @@ static Standard_Integer setweight(Draw_Interpretor& /*di*/, Standard_Integer n,
     return 0;
   }
 
-  std::cout << a[1] << " is not a B-spline nor a Bezier curve/surface" << std::endl;
+  Message::SendFail() << a[1] << " is not a B-spline nor a Bezier curve/surface";
   return 1;
 }
 
index 8e76d21..be942fb 100644 (file)
@@ -81,6 +81,7 @@
 #include <TopoDS_Shape.hxx>
 #include <DBRep.hxx>
 #include <Geom_Curve.hxx>
+#include <Message.hxx>
 
 #include <stdio.h>
 #ifdef _WIN32
@@ -1381,14 +1382,14 @@ static Standard_Integer compBsplSur (Draw_Interpretor& , Standard_Integer n, con
 {
   if (n < 2) 
   {
-    std::cout<<"Invalid number of parameters"<<std::endl;
+    Message::SendFail() << "Syntax error: Invalid number of parameters";
     return 1;
   }
 
   Handle(Geom_BSplineSurface) GBs1 = DrawTrSurf::GetBSplineSurface(a[1]);
   Handle(Geom_BSplineSurface) GBs2 = DrawTrSurf::GetBSplineSurface(a[2]);
   if (GBs1.IsNull() || GBs2.IsNull()) {
-    std::cout<<"Invalid surface"<<std::endl;
+    Message::SendFail() << "Syntax error: Invalid surface";
     return 1;
   }
    
index 3624575..bfb0c5c 100644 (file)
@@ -36,6 +36,7 @@
 #include <DrawTrSurf.hxx>
 #include <GeometryTest.hxx>
 #include <IMeshData_Status.hxx>
+#include <Message.hxx>
 #include <Poly_Connect.hxx>
 #include <TopExp_Explorer.hxx>
 #include <TopTools_MapIteratorOfMapOfShape.hxx>
@@ -217,7 +218,7 @@ static Standard_Integer tessellate (Draw_Interpretor& /*di*/, Standard_Integer n
 {
   if (nbarg != 5)
   {
-    std::cerr << "Builds regular triangulation with specified number of triangles\n"
+    Message::SendFail() << "Builds regular triangulation with specified number of triangles\n"
                  "    Usage: tessellate result {surface|face} nbu nbv\n"
                  "    Triangulation is put into the face with natural bounds (result);\n"
                  "    it will have 2*nbu*nbv triangles and (nbu+1)*(nbv+1) nodes";
@@ -231,7 +232,7 @@ static Standard_Integer tessellate (Draw_Interpretor& /*di*/, Standard_Integer n
 
   if (aNbU <= 0 || aNbV <= 0)
   {
-    std::cerr << "Error: Arguments nbu and nbv must be both greater than 0\n";
+    Message::SendFail() << "Error: Arguments nbu and nbv must be both greater than 0";
     return 1;
   }
 
@@ -246,14 +247,14 @@ static Standard_Integer tessellate (Draw_Interpretor& /*di*/, Standard_Integer n
     TopoDS_Shape aShape = DBRep::Get(aSrcName);
     if (aShape.IsNull() || aShape.ShapeType() != TopAbs_FACE)
     {
-      std::cerr << "Error: " << aSrcName << " is not a face\n";
+      Message::SendFail() << "Error: " << aSrcName << " is not a face";
       return 1;
     }
     TopoDS_Face aFace = TopoDS::Face (aShape);
     aSurf = BRep_Tool::Surface (aFace);
     if (aSurf.IsNull())
     {
-      std::cerr << "Error: Face " << aSrcName << " has no surface\n";
+      Message::SendFail() << "Error: Face " << aSrcName << " has no surface";
       return 1;
     }
 
@@ -262,14 +263,14 @@ static Standard_Integer tessellate (Draw_Interpretor& /*di*/, Standard_Integer n
   if (Precision::IsInfinite (aUMin) || Precision::IsInfinite (aUMax) || 
       Precision::IsInfinite (aVMin) || Precision::IsInfinite (aVMax))
   {
-    std::cerr << "Error: surface has infinite parametric range, aborting\n";
+    Message::SendFail() << "Error: surface has infinite parametric range, aborting";
     return 1;
   }
 
   BRepBuilderAPI_MakeFace aFaceMaker (aSurf, aUMin, aUMax, aVMin, aVMax, Precision::Confusion());
   if (! aFaceMaker.IsDone())
   {
-    std::cerr << "Error: cannot build face with natural bounds, aborting\n";
+    Message::SendFail() << "Error: cannot build face with natural bounds, aborting";
     return 1;
   }
   TopoDS_Face aFace = aFaceMaker;
index faf0c01..5a79e2e 100644 (file)
@@ -643,7 +643,7 @@ Standard_Integer fixsmallfaces (Draw_Interpretor& theDI, Standard_Integer theArg
 {
   if (theArgc < 3)
   {
-    std::cerr << "Use: " << theArgv[0] << " result shape [tolerance]" << std::endl;
+    theDI << "Use: " << theArgv[0] << " result shape [tolerance]";
     return 1;
   }
   
index 291728b..5deb94b 100644 (file)
@@ -36,6 +36,7 @@
 #include <Geom_Plane.hxx>
 #include <Geom_RectangularTrimmedSurface.hxx>
 #include <Geom_Surface.hxx>
+#include <Message.hxx>
 #include <Precision.hxx>
 #include <ShapeBuild_ReShape.hxx>
 #include <ShapeCustom.hxx>
@@ -1401,14 +1402,14 @@ static Standard_Integer reshape(Draw_Interpretor& /*theDI*/,
 {
   if ( theArgc < 4 )
   {
-    std::cout << "Error: wrong number of arguments. Type 'help " << theArgv[0] << "'\n";
+    Message::SendFail() << "Error: wrong number of arguments. Type 'help " << theArgv[0] << "'";
     return 1;
   }
 
   TopoDS_Shape aSource = DBRep::Get(theArgv[2]);
   if ( aSource.IsNull() )
   {
-    std::cout << "Error: source shape ('" << theArgv[2] << "') is null\n";
+    Message::SendFail() << "Error: source shape ('" << theArgv[2] << "') is null";
     return 1;
   }
 
@@ -1427,21 +1428,21 @@ static Standard_Integer reshape(Draw_Interpretor& /*theDI*/,
     {
       if ( theArgc - i < 3 )
       {
-        std::cout << "Error: not enough arguments for replacement\n";
+        Message::SendFail() << "Error: not enough arguments for replacement";
         return 1;
       }
 
       TopoDS_Shape aWhat = DBRep::Get(theArgv[++i]);
       if ( aWhat.IsNull() )
       {
-        std::cout << "Error: argument shape ('" << theArgv[i] << "') is null\n";
+        Message::SendFail() << "Error: argument shape ('" << theArgv[i] << "') is null";
         return 1;
       }
 
       TopoDS_Shape aWith = DBRep::Get(theArgv[++i]);
       if ( aWith.IsNull() )
       {
-        std::cout << "Error: replacement shape ('" << theArgv[i] << "') is null\n";
+        Message::SendFail() << "Error: replacement shape ('" << theArgv[i] << "') is null";
         return 1;
       }
 
@@ -1451,14 +1452,14 @@ static Standard_Integer reshape(Draw_Interpretor& /*theDI*/,
     {
       if ( theArgc - i < 2 )
       {
-        std::cout << "Error: not enough arguments for removal\n";
+        Message::SendFail() << "Error: not enough arguments for removal";
         return 1;
       }
 
       TopoDS_Shape aWhat = DBRep::Get(theArgv[++i]);
       if ( aWhat.IsNull() )
       {
-        std::cout << "Error: shape to remove ('" << theArgv[i] << "') is null\n";
+        Message::SendFail() << "Error: shape to remove ('" << theArgv[i] << "') is null";
         return 1;
       }
 
@@ -1468,7 +1469,7 @@ static Standard_Integer reshape(Draw_Interpretor& /*theDI*/,
     {
       if (theArgc - i < 2)
       {
-        std::cout << "Error: not enough arguments for level specification\n";
+        Message::SendFail() << "Error: not enough arguments for level specification";
         return 1;
       }
 
@@ -1504,13 +1505,13 @@ static Standard_Integer reshape(Draw_Interpretor& /*theDI*/,
         aShapeLevel = TopAbs_SHAPE;
       else
       {
-        std::cout << "Error: unknown shape type '" << theArgv[i] << "'\n";
+        Message::SendFail() << "Error: unknown shape type '" << theArgv[i] << "'";
         return 1;
       }
     }
     else
     {
-      std::cout << "Error: invalid syntax at " << anOpt << "\n" ;
+      Message::SendFail() << "Error: invalid syntax at " << anOpt;
       return 1;
     }
   }
@@ -1519,7 +1520,7 @@ static Standard_Integer reshape(Draw_Interpretor& /*theDI*/,
   TopoDS_Shape aResult = aReShaper->Apply(aSource, aShapeLevel);
   if ( aResult.IsNull() )
   {
-    std::cout << "Error: result shape is null\n";
+    Message::SendFail() << "Error: result shape is null";
     return 1;
   }
 
index 3efa23b..1baa41b 100644 (file)
@@ -17,6 +17,7 @@
 #include <DBRep.hxx>
 #include <DDocStd.hxx>
 #include <Draw.hxx>
+#include <Message.hxx>
 #include <Precision.hxx>
 #include <Quantity_Color.hxx>
 #include <Quantity_ColorRGBA.hxx>
@@ -167,7 +168,7 @@ static Standard_Integer setColor (Draw_Interpretor& , Standard_Integer argc, con
 {
   if (argc < 4)
   {
-    std::cout << "Syntax error: wrong number of arguments\n";
+    Message::SendFail() << "Syntax error: wrong number of arguments";
     return 1;
   }
 
@@ -175,7 +176,7 @@ static Standard_Integer setColor (Draw_Interpretor& , Standard_Integer argc, con
   DDocStd::GetDocument (argv[1], aDoc);
   if (aDoc.IsNull())
   {
-    std::cout << "Syntax error: " << argv[1] << " is not a document\n";
+    Message::SendFail() << "Syntax error: " << argv[1] << " is not a document";
     return 1;
   }
 
@@ -187,7 +188,7 @@ static Standard_Integer setColor (Draw_Interpretor& , Standard_Integer argc, con
     aShape = DBRep::Get (argv[2]);
     if (aShape.IsNull())
     {
-      std::cout << "Syntax error: " << argv[2] << " is not a label nor shape\n";
+      Message::SendFail() << "Syntax error: " << argv[2] << " is not a label nor shape";
       return 1;
     }
   }
@@ -209,20 +210,20 @@ static Standard_Integer setColor (Draw_Interpretor& , Standard_Integer argc, con
                                                      aColor);
       if (aNbParsed == 0)
       {
-        std::cout << "Syntax error at '" << argv[anArgIter] << "'\n";
+        Message::SendFail() << "Syntax error at '" << argv[anArgIter] << "'";
         return 1;
       }
       anArgIter += aNbParsed - 1;
     }
     else
     {
-      std::cout << "Syntax error at '" << argv[anArgIter] << "'\n";
+      Message::SendFail() << "Syntax error at '" << argv[anArgIter] << "'";
       return 1;
     }
   }
   if (!isColorDefined)
   {
-    std::cout << "Syntax error: wrong number of arguments\n";
+    Message::SendFail() << "Syntax error: wrong number of arguments";
     return 1;
   }
 
@@ -233,7 +234,7 @@ static Standard_Integer setColor (Draw_Interpretor& , Standard_Integer argc, con
   }
   else if (!aColorTool->SetColor (aShape, aColor, aColType))
   {
-    std::cout << "Syntax error: " << argv[2] << " is not a label nor shape\n";
+    Message::SendFail() << "Syntax error: " << argv[2] << " is not a label nor shape";
     return 1;
   }
   return 0;
@@ -243,7 +244,7 @@ static Standard_Integer getColor (Draw_Interpretor& di, Standard_Integer argc, c
 {
   if (argc != 3)
   {
-    std::cout << "Syntax error: wrong number of arguments\n";
+    Message::SendFail() << "Syntax error: wrong number of arguments";
     return 1;
   }
 
@@ -251,7 +252,7 @@ static Standard_Integer getColor (Draw_Interpretor& di, Standard_Integer argc, c
   DDocStd::GetDocument (argv[1], aDoc);
   if (aDoc.IsNull())
   {
-    std::cout << "Syntax error: " << argv[1] << " is not a document\n";
+    Message::SendFail() << "Syntax error: " << argv[1] << " is not a document";
     return 1;
   }
 
@@ -279,7 +280,7 @@ static Standard_Integer getShapeColor (Draw_Interpretor& di, Standard_Integer ar
 {
   if (argc != 3 && argc != 4)
   {
-    std::cout << "Syntax error: wrong number of arguments\n";
+    Message::SendFail() << "Syntax error: wrong number of arguments";
     return 1;
   }
 
@@ -287,7 +288,7 @@ static Standard_Integer getShapeColor (Draw_Interpretor& di, Standard_Integer ar
   DDocStd::GetDocument (argv[1], aDoc);
   if (aDoc.IsNull())
   {
-    std::cout << "Syntax error: " << argv[1] << " is not a document\n";
+    Message::SendFail() << "Syntax error: " << argv[1] << " is not a document";
     return 1;
   }
 
@@ -295,7 +296,7 @@ static Standard_Integer getShapeColor (Draw_Interpretor& di, Standard_Integer ar
   TDF_Tool::Label (aDoc->GetData(), argv[2], aLabel);
   if (aLabel.IsNull())
   {
-    std::cout << "Syntax error: '" << argv[2] << "' label is not found in the document\n";
+    Message::SendFail() << "Syntax error: '" << argv[2] << "' label is not found in the document";
     return 1;
   }
 
@@ -303,7 +304,7 @@ static Standard_Integer getShapeColor (Draw_Interpretor& di, Standard_Integer ar
   XCAFDoc_ColorType aColType = XCAFDoc_ColorGen;
   if (argc > 3 && !parseXDocColorType (argv[3], aColType))
   {
-    std::cout << "Syntax error: unknown color type '" << argv[3] << "'\n";
+    Message::SendFail() << "Syntax error: unknown color type '" << argv[3] << "'";
     return 1;
   }
 
@@ -329,7 +330,7 @@ static Standard_Integer getAllColors (Draw_Interpretor& di, Standard_Integer arg
 {
   if (argc != 2)
   {
-    std::cout << "Syntax error: wrong number of arguments\n";
+    Message::SendFail() << "Syntax error: wrong number of arguments";
     return 1;
   }
 
@@ -337,7 +338,7 @@ static Standard_Integer getAllColors (Draw_Interpretor& di, Standard_Integer arg
   DDocStd::GetDocument (argv[1], aDoc);
   if (aDoc.IsNull())
   {
-    std::cout << "Syntax error: " << argv[1] << " is not a document\n";
+    Message::SendFail() << "Syntax error: " << argv[1] << " is not a document";
     return 1;
   }
 
@@ -371,7 +372,7 @@ static Standard_Integer addColor (Draw_Interpretor& di, Standard_Integer argc, c
 {
   if (argc < 3)
   {
-    std::cout << "Syntax error: wrong number of arguments\n";
+    Message::SendFail() << "Syntax error: wrong number of arguments";
     return 1;
   }
 
@@ -379,7 +380,7 @@ static Standard_Integer addColor (Draw_Interpretor& di, Standard_Integer argc, c
   DDocStd::GetDocument (argv[1], aDoc);
   if (aDoc.IsNull())
   {
-    std::cout << "Syntax error: " << argv[1] << " is not a document\n";
+    Message::SendFail() << "Syntax error: " << argv[1] << " is not a document";
     return 1;
   }
 
@@ -387,7 +388,7 @@ static Standard_Integer addColor (Draw_Interpretor& di, Standard_Integer argc, c
   Standard_Integer aNbParsed = Draw::ParseColor (argc - 2, argv + 2, aColRGBA);
   if (aNbParsed != argc - 2)
   {
-    std::cout << "Syntax error at '" << argv[2] << "'\n";
+    Message::SendFail() << "Syntax error at '" << argv[2] << "'";
     return 1;
   }
 
@@ -403,7 +404,7 @@ static Standard_Integer removeColor (Draw_Interpretor& , Standard_Integer argc,
 {
   if (argc != 3)
   {
-    std::cout << "Syntax error: wrong number of arguments\n";
+    Message::SendFail() << "Syntax error: wrong number of arguments";
     return 1;
   }
 
@@ -412,13 +413,13 @@ static Standard_Integer removeColor (Draw_Interpretor& , Standard_Integer argc,
   DDocStd::GetDocument (argv[1], aDoc);
   if (aDoc.IsNull())
   {
-    std::cout << "Syntax error: " << argv[1] << " is not a document\n";
+    Message::SendFail() << "Syntax error: " << argv[1] << " is not a document";
     return 1;
   }
   TDF_Tool::Label (aDoc->GetData(), argv[2], aLabel);
   if (aLabel.IsNull())
   {
-    std::cout << "Syntax error: " << argv[2] << " label is not found in the document\n";
+    Message::SendFail() << "Syntax error: " << argv[2] << " label is not found in the document";
     return 1;
   }
 
@@ -431,7 +432,7 @@ static Standard_Integer findColor (Draw_Interpretor& di, Standard_Integer argc,
 {
   if (argc < 3)
   {
-    std::cout << "Syntax error: wrong number of arguments\n";
+    Message::SendFail() << "Syntax error: wrong number of arguments";
     return 1;
   }
 
@@ -439,7 +440,7 @@ static Standard_Integer findColor (Draw_Interpretor& di, Standard_Integer argc,
   DDocStd::GetDocument (argv[1], aDoc);
   if (aDoc.IsNull())
   {
-    std::cout << "Syntax error: " << argv[1] << " is not a document\n";
+    Message::SendFail() << "Syntax error: " << argv[1] << " is not a document";
     return 1;
   }
 
@@ -447,7 +448,7 @@ static Standard_Integer findColor (Draw_Interpretor& di, Standard_Integer argc,
   Standard_Integer aNbParsed = Draw::ParseColor (argc - 2, argv + 2, aColRGBA);
   if (aNbParsed != argc - 2)
   {
-    std::cout << "Syntax error at '" << argv[2] << "'\n";
+    Message::SendFail() << "Syntax error at '" << argv[2] << "'";
     return 1;
   }
 
@@ -462,7 +463,7 @@ static Standard_Integer unsetColor (Draw_Interpretor& , Standard_Integer argc, c
 {
   if (argc != 4)
   {
-    std::cout << "Syntax error: wrong number of arguments\n";
+    Message::SendFail() << "Syntax error: wrong number of arguments";
     return 1;
   }
 
@@ -470,14 +471,14 @@ static Standard_Integer unsetColor (Draw_Interpretor& , Standard_Integer argc, c
   DDocStd::GetDocument (argv[1], aDoc);
   if (aDoc.IsNull())
   {
-    std::cout << "Syntax error: " << argv[1] << " is not a document\n";
+    Message::SendFail() << "Syntax error: " << argv[1] << " is not a document";
     return 1;
   }
 
   XCAFDoc_ColorType aColType = XCAFDoc_ColorGen;
   if (!parseXDocColorType (argv[3], aColType))
   {
-    std::cout << "Syntax error: unknown color type '" << argv[3] << "'\n";
+    Message::SendFail() << "Syntax error: unknown color type '" << argv[3] << "'";
     return 1;
   }
 
@@ -493,7 +494,7 @@ static Standard_Integer unsetColor (Draw_Interpretor& , Standard_Integer argc, c
   TopoDS_Shape aShape = DBRep::Get (argv[2]);
   if (aShape.IsNull())
   {
-    std::cout << "Syntax error: " << argv[2] << " is not a label nor shape\n";
+    Message::SendFail() << "Syntax error: " << argv[2] << " is not a label nor shape";
     return 1;
   }
   myColors->UnSetColor (aShape, aColType);
@@ -504,7 +505,7 @@ static Standard_Integer setVisibility (Draw_Interpretor& , Standard_Integer argc
 {
   if (argc != 3 && argc != 4)
   {
-    std::cout << "Syntax error: wrong number of arguments\n";
+    Message::SendFail() << "Syntax error: wrong number of arguments";
     return 1;
   }
 
@@ -513,7 +514,7 @@ static Standard_Integer setVisibility (Draw_Interpretor& , Standard_Integer argc
   DDocStd::GetDocument (argv[1], aDoc);
   if (aDoc.IsNull())
   {
-    std::cout << "Syntax error: " << argv[1] << " is not a document\n";
+    Message::SendFail() << "Syntax error: " << argv[1] << " is not a document";
     return 1;
   }
 
@@ -530,7 +531,7 @@ static Standard_Integer setVisibility (Draw_Interpretor& , Standard_Integer argc
   }
   if (aLabel.IsNull())
   {
-    std::cout << "Syntax error: " << argv[2] << " is not a label not shape\n";
+    Message::SendFail() << "Syntax error: " << argv[2] << " is not a label not shape";
     return 1;
   }
 
@@ -548,7 +549,7 @@ static Standard_Integer setVisibility (Draw_Interpretor& , Standard_Integer argc
     }
     else
     {
-      std::cout << "Syntax error: unknown argument '" << argv[3] << "'\n";
+      Message::SendFail() << "Syntax error: unknown argument '" << argv[3] << "'";
       return 1;
     }
   }
@@ -560,7 +561,7 @@ static Standard_Integer getVisibility (Draw_Interpretor& di, Standard_Integer ar
 {
   if (argc != 3)
   {
-    std::cout << "Syntax error: wrong number of arguments\n";
+    Message::SendFail() << "Syntax error: wrong number of arguments";
     return 1;
   }
 
@@ -568,7 +569,7 @@ static Standard_Integer getVisibility (Draw_Interpretor& di, Standard_Integer ar
   DDocStd::GetDocument (argv[1], aDoc);
   if (aDoc.IsNull())
   {
-    std::cout << "Syntax error: " << argv[1] << " is not a document\n";
+    Message::SendFail() << "Syntax error: " << argv[1] << " is not a document";
     return 1;
   }
 
@@ -586,7 +587,7 @@ static Standard_Integer getVisibility (Draw_Interpretor& di, Standard_Integer ar
   }
   if (aLabel.IsNull())
   {
-    std::cout << "Syntax error: " << argv[2] << " is not a label not shape\n";
+    Message::SendFail() << "Syntax error: " << argv[2] << " is not a label not shape";
     return 1;
   }
 
@@ -598,7 +599,7 @@ static Standard_Integer getStyledVisibility (Draw_Interpretor& di, Standard_Inte
 {
   if (argc != 3)
   {
-    std::cout << "Syntax error: wrong number of arguments\n";
+    Message::SendFail() << "Syntax error: wrong number of arguments";
     return 1;
   }
 
@@ -607,12 +608,12 @@ static Standard_Integer getStyledVisibility (Draw_Interpretor& di, Standard_Inte
   TopoDS_Shape aShape = DBRep::Get(argv[2]);
   if (aDoc.IsNull())
   {
-    std::cout << "Syntax error: " << argv[1] << " is not a document\n";
+    Message::SendFail() << "Syntax error: " << argv[1] << " is not a document";
     return 1;
   }
   if (aShape.IsNull())
   {
-    std::cout << "Syntax error: " << argv[2] << " is not a shape\n";
+    Message::SendFail() << "Syntax error: " << argv[2] << " is not a shape";
     return 1;
   }
 
@@ -625,7 +626,7 @@ static Standard_Integer getStyledcolor (Draw_Interpretor& di, Standard_Integer a
 {
   if (argc != 3 && argc != 4)
   {
-    std::cout << "Syntax error: wrong number of arguments\n";
+    Message::SendFail() << "Syntax error: wrong number of arguments";
     return 1;
   }
 
@@ -635,17 +636,17 @@ static Standard_Integer getStyledcolor (Draw_Interpretor& di, Standard_Integer a
   TopoDS_Shape aShape = DBRep::Get (argv[2]);
   if (aDoc.IsNull())
   {
-    std::cout << "Syntax error: " << argv[1] << " is not a document\n";
+    Message::SendFail() << "Syntax error: " << argv[1] << " is not a document";
     return 1;
   }
   if (aShape.IsNull())
   {
-    std::cout << "Syntax error: " << argv[2] << " is not a shape\n";
+    Message::SendFail() << "Syntax error: " << argv[2] << " is not a shape";
     return 1;
   }
   if (argc > 3 && !parseXDocColorType (argv[3], aColType))
   {
-    std::cout << "Syntax error: unknown color type '" << argv[3] << "'\n";
+    Message::SendFail() << "Syntax error: unknown color type '" << argv[3] << "'";
     return 1;
   }
 
@@ -669,7 +670,7 @@ static Standard_Integer setStyledcolor (Draw_Interpretor& , Standard_Integer arg
 {
   if (argc < 3)
   {
-    std::cout << "Syntax error: wrong number of arguments\n";
+    Message::SendFail() << "Syntax error: wrong number of arguments";
     return 1;
   }
 
@@ -677,14 +678,14 @@ static Standard_Integer setStyledcolor (Draw_Interpretor& , Standard_Integer arg
   DDocStd::GetDocument (argv[1], aDoc);
   if (aDoc.IsNull())
   {
-    std::cout << "Syntax error: " << argv[1] << " is not a document\n";
+    Message::SendFail() << "Syntax error: " << argv[1] << " is not a document";
     return 1;
   }
 
   TopoDS_Shape aShape = DBRep::Get (argv[2]);
   if (aShape.IsNull())
   {
-    std::cout << "Syntax error: " << argv[2] << " is not a shape\n";
+    Message::SendFail() << "Syntax error: " << argv[2] << " is not a shape";
     return 1;
   }
 
@@ -703,7 +704,7 @@ static Standard_Integer setStyledcolor (Draw_Interpretor& , Standard_Integer arg
                                                      aColRGBA);
       if (aNbParsed == 0)
       {
-        std::cout << "Syntax error at '" << argv[anArgIter] << "'\n";
+        Message::SendFail() << "Syntax error at '" << argv[anArgIter] << "'";
         return 1;
       }
       anArgIter += aNbParsed - 1;
@@ -713,7 +714,7 @@ static Standard_Integer setStyledcolor (Draw_Interpretor& , Standard_Integer arg
   Handle(XCAFDoc_ColorTool) aColorTool = XCAFDoc_DocumentTool::ColorTool (aDoc->Main());
   if (!aColorTool->SetInstanceColor (aShape, aColorType, aColRGBA))
   {
-    std::cout << "Error: cannot set color for the indicated component\n";
+    Message::SendFail() << "Error: cannot set color for the indicated component";
     return 1;
   }
   return 0;
@@ -727,7 +728,7 @@ static Standard_Integer XGetAllVisMaterials (Draw_Interpretor& theDI, Standard_I
 {
   if (theNbArgs != 2 && theNbArgs != 3)
   {
-    std::cout << "Syntax error: wrong number of arguments\n";
+    Message::SendFail() << "Syntax error: wrong number of arguments";
     return 1;
   }
 
@@ -735,7 +736,7 @@ static Standard_Integer XGetAllVisMaterials (Draw_Interpretor& theDI, Standard_I
   DDocStd::GetDocument (theArgVec[1], aDoc);
   if (aDoc.IsNull())
   {
-    std::cout << "Syntax error: " << theArgVec[1] << " is not a document\n";
+    Message::SendFail() << "Syntax error: " << theArgVec[1] << " is not a document";
     return 1;
   }
 
@@ -791,7 +792,7 @@ static Standard_Integer XGetVisMaterial (Draw_Interpretor& theDI, Standard_Integ
 {
   if (theNbArgs != 3)
   {
-    std::cout << "Syntax error: wrong number of arguments\n";
+    Message::SendFail() << "Syntax error: wrong number of arguments";
     return 1;
   }
 
@@ -799,7 +800,7 @@ static Standard_Integer XGetVisMaterial (Draw_Interpretor& theDI, Standard_Integ
   DDocStd::GetDocument (theArgVec[1], aDoc);
   if (aDoc.IsNull())
   {
-    std::cout << "Syntax error: " << theArgVec[1] << " is not a document\n";
+    Message::SendFail() << "Syntax error: " << theArgVec[1] << " is not a document";
     return 1;
   }
 
@@ -829,7 +830,7 @@ static Standard_Integer XGetVisMaterial (Draw_Interpretor& theDI, Standard_Integ
     }
     if (aShapeLab.IsNull())
     {
-      std::cout << "Syntax error: " << theArgVec[2] << " is not material nor shape\n";
+      Message::SendFail() << "Syntax error: " << theArgVec[2] << " is not material nor shape";
       return 1;
     }
 
@@ -914,7 +915,7 @@ static Standard_Integer XAddVisMaterial (Draw_Interpretor& , Standard_Integer th
 {
   if (theNbArgs < 3)
   {
-    std::cout << "Syntax error: wrong number of arguments\n";
+    Message::SendFail() << "Syntax error: wrong number of arguments";
     return 1;
   }
 
@@ -922,7 +923,7 @@ static Standard_Integer XAddVisMaterial (Draw_Interpretor& , Standard_Integer th
   DDocStd::GetDocument (theArgVec[1], aDoc);
   if (aDoc.IsNull())
   {
-    std::cout << "Syntax error: " << theArgVec[1] << " is not a document\n";
+    Message::SendFail() << "Syntax error: " << theArgVec[1] << " is not a document";
     return 1;
   }
 
@@ -959,7 +960,7 @@ static Standard_Integer XAddVisMaterial (Draw_Interpretor& , Standard_Integer th
       aMatPbr.RefractionIndex = (Standard_ShortReal )Draw::Atof (theArgVec[anArgIter + 1]);
       if (aMatPbr.RefractionIndex < 1.0f || aMatPbr.RefractionIndex > 3.0f)
       {
-        std::cout << "Syntax error at '" << anArg << "'\n";
+        Message::SendFail() << "Syntax error at '" << anArg << "'";
         return 1;
       }
 
@@ -991,7 +992,7 @@ static Standard_Integer XAddVisMaterial (Draw_Interpretor& , Standard_Integer th
       }
       else
       {
-        std::cerr << "Syntax error at '" << anArg << "'\n";
+        Message::SendFail() << "Syntax error at '" << anArg << "'";
         return 1;
       }
       aMat->SetAlphaMode (anAlphaMode, aRealValue);
@@ -1007,7 +1008,7 @@ static Standard_Integer XAddVisMaterial (Draw_Interpretor& , Standard_Integer th
                                                      aColorRGBA);
       if (aNbParsed == 0)
       {
-        std::cout << "Syntax error at '" << theArgVec[anArgIter] << "'\n";
+        Message::SendFail() << "Syntax error at '" << theArgVec[anArgIter] << "'";
         return 1;
       }
       anArgIter += aNbParsed;
@@ -1059,7 +1060,7 @@ static Standard_Integer XAddVisMaterial (Draw_Interpretor& , Standard_Integer th
       aMatCom.Shininess = (float )Draw::Atof (theArgVec[++anArgIter]);
       if (aMatCom.Shininess < 0.0f || aMatCom.Shininess > 1.0f)
       {
-        std::cout << "Syntax error at '" << anArg << "'\n";
+        Message::SendFail() << "Syntax error at '" << anArg << "'";
         return 1;
       }
     }
@@ -1141,7 +1142,7 @@ static Standard_Integer XAddVisMaterial (Draw_Interpretor& , Standard_Integer th
     }
     else
     {
-      std::cout << "Syntax error at '" << theArgVec[anArgIter] << "'\n";
+      Message::SendFail() << "Syntax error at '" << theArgVec[anArgIter] << "'";
       return 1;
     }
   }
@@ -1159,7 +1160,7 @@ static Standard_Integer XRemoveVisMaterial (Draw_Interpretor& , Standard_Integer
 {
   if (theNbArgs != 3)
   {
-    std::cout << "Syntax error: wrong number of arguments\n";
+    Message::SendFail() << "Syntax error: wrong number of arguments";
     return 1;
   }
 
@@ -1167,14 +1168,14 @@ static Standard_Integer XRemoveVisMaterial (Draw_Interpretor& , Standard_Integer
   DDocStd::GetDocument (theArgVec[1], aDoc);
   if (aDoc.IsNull())
   {
-    std::cout << "Syntax error: " << theArgVec[1] << " is not a document\n";
+    Message::SendFail() << "Syntax error: " << theArgVec[1] << " is not a document";
     return 1;
   }
 
   TDF_Label aMatLab = findVisMaterial (aDoc, theArgVec[2]);
   if (aMatLab.IsNull())
   {
-    std::cout << "Syntax error: " << theArgVec[2] << " is not a material\n";
+    Message::SendFail() << "Syntax error: " << theArgVec[2] << " is not a material";
     return 1;
   }
 
@@ -1191,7 +1192,7 @@ static Standard_Integer XSetVisMaterial (Draw_Interpretor& , Standard_Integer th
 {
   if (theNbArgs != 3 && theNbArgs != 4)
   {
-    std::cout << "Syntax error: wrong number of arguments\n";
+    Message::SendFail() << "Syntax error: wrong number of arguments";
     return 1;
   }
 
@@ -1200,7 +1201,7 @@ static Standard_Integer XSetVisMaterial (Draw_Interpretor& , Standard_Integer th
   DDocStd::GetDocument (theArgVec[1], aDoc);
   if (aDoc.IsNull())
   {
-    std::cout << "Syntax error: " << theArgVec[1] << " is not a document\n";
+    Message::SendFail() << "Syntax error: " << theArgVec[1] << " is not a document";
     return 1;
   }
 
@@ -1217,7 +1218,7 @@ static Standard_Integer XSetVisMaterial (Draw_Interpretor& , Standard_Integer th
   }
   if (aShapeLab.IsNull())
   {
-    std::cout << "Syntax error: " << theArgVec[2] << " is not a label not shape\n";
+    Message::SendFail() << "Syntax error: " << theArgVec[2] << " is not a label not shape";
     return 1;
   }
 
@@ -1227,7 +1228,7 @@ static Standard_Integer XSetVisMaterial (Draw_Interpretor& , Standard_Integer th
     aMatLab = findVisMaterial (aDoc, theArgVec[3]);
     if (aMatLab.IsNull())
     {
-      std::cout << "Syntax error: " << theArgVec[3] << " is not a material\n";
+      Message::SendFail() << "Syntax error: " << theArgVec[3] << " is not a material";
       return 1;
     }
   }
index 07d71d1..a84d439 100644 (file)
@@ -18,6 +18,7 @@
 #include <DDocStd_DrawDocument.hxx>
 #include <Draw.hxx>
 #include <Draw_Interpretor.hxx>
+#include <Message.hxx>
 #include <IFSelect_SessionPilot.hxx>
 #include <IGESCAFControl_Reader.hxx>
 #include <IGESCAFControl_Writer.hxx>
@@ -330,7 +331,7 @@ static Standard_Integer ReadStep (Draw_Interpretor& di, Standard_Integer argc, c
     }
     else
     {
-      std::cout << "Syntax error at '" << argv[anArgIter] << "'\n";
+      Message::SendFail() << "Syntax error at '" << argv[anArgIter] << "'";
       return 1;
     }
   }
@@ -357,7 +358,7 @@ static Standard_Integer ReadStep (Draw_Interpretor& di, Standard_Integer argc, c
         case 'v' : reader.SetPropsMode (mode); break;
         default:
         {
-          std::cout << "Syntax error at '" << aModeStr << "'\n";
+          Message::SendFail() << "Syntax error at '" << aModeStr << "'\n";
           return 1;
         }
       }
index b68dcbf..a1351b2 100644 (file)
@@ -52,7 +52,7 @@ static Standard_Integer addShape (Draw_Interpretor& di, Standard_Integer argc, c
   TopoDS_Shape aShape = DBRep::Get(argv[2]);
   if (aShape.IsNull())
   {
-    std::cout << "Syntax error: shape '" << argv[2] << "' is undefined\n";
+    di << "Syntax error: shape '" << argv[2] << "' is undefined\n";
     return 1;
   }
 
@@ -932,7 +932,7 @@ static Standard_Integer XGetProperties(Draw_Interpretor& di, Standard_Integer ar
 {
   if (argc != 3)
   {
-    std::cout << "Syntax error: wrong number of arguments\nUse: " << argv[0] << " Doc Label\n";
+    di << "Syntax error: wrong number of arguments\nUse: " << argv[0] << " Doc Label\n";
     return 1;
   }
 
@@ -940,7 +940,7 @@ static Standard_Integer XGetProperties(Draw_Interpretor& di, Standard_Integer ar
   DDocStd::GetDocument(argv[1], aDoc);
   if (aDoc.IsNull())
   {
-    std::cout << "Syntax error: " << argv[1] << " is not a document\n";
+    di << "Syntax error: " << argv[1] << " is not a document\n";
     return 1;
   }
 
index bd80097..b4faf08 100644 (file)
@@ -502,7 +502,7 @@ static Standard_Integer stepfileunits (Draw_Interpretor& di, Standard_Integer ar
 
   if(  argc < 2)
   {
-    std::cout<<"Error: Invalid number of parameters. Should be: getfileunits name_file"<<std::endl;
+    di << "Error: Invalid number of parameters. Should be: getfileunits name_file\n";
     return 1;
   }
   STEPControl_Reader aStepReader;
index 7562e0d..3ba85b2 100644 (file)
@@ -144,13 +144,13 @@ static Standard_Integer ReadGltf (Draw_Interpretor& theDI,
     }
     else
     {
-      std::cout << "Syntax error at '" << theArgVec[anArgIter] << "'\n";
+      Message::SendFail() << "Syntax error at '" << theArgVec[anArgIter] << "'";
       return 1;
     }
   }
   if (aFilePath.IsEmpty())
   {
-    std::cout << "Syntax error: wrong number of arguments\n";
+    Message::SendFail() << "Syntax error: wrong number of arguments";
     return 1;
   }
 
@@ -166,14 +166,14 @@ static Standard_Integer ReadGltf (Draw_Interpretor& theDI,
     {
       if (toUseExistingDoc)
       {
-        std::cout << "Error: document with name " << aDestName << " does not exist\n";
+        Message::SendFail() << "Error: document with name " << aDestName << " does not exist";
         return 1;
       }
       anApp->NewDocument (TCollection_ExtendedString ("BinXCAF"), aDoc);
     }
     else if (!toUseExistingDoc)
     {
-      std::cout << "Error: document with name " << aDestName << " already exists\n";
+      Message::SendFail() << "Error: document with name " << aDestName << " already exists";
       return 1;
     }
   }
@@ -265,7 +265,7 @@ static Standard_Integer WriteGltf (Draw_Interpretor& theDI,
       }
       else
       {
-        std::cout << "Syntax error at '" << anArgCase << "'\n";
+        Message::SendFail() << "Syntax error at '" << anArgCase << "'";
         return 1;
       }
     }
@@ -278,7 +278,7 @@ static Standard_Integer WriteGltf (Draw_Interpretor& theDI,
         TopoDS_Shape aShape = DBRep::Get (aNameVar);
         if (aShape.IsNull())
         {
-          std::cout << "Syntax error: '" << aNameVar << "' is not a shape nor document\n";
+          Message::SendFail() << "Syntax error: '" << aNameVar << "' is not a shape nor document";
           return 1;
         }
 
@@ -293,13 +293,13 @@ static Standard_Integer WriteGltf (Draw_Interpretor& theDI,
     }
     else
     {
-      std::cout << "Syntax error at '" << theArgVec[anArgIter] << "'\n";
+      Message::SendFail() << "Syntax error at '" << theArgVec[anArgIter] << "'";
       return 1;
     }
   }
   if (aGltfFilePath.IsEmpty())
   {
-    std::cout << "Syntax error: wrong number of arguments\n";
+    Message::SendFail() << "Syntax error: wrong number of arguments";
     return 1;
   }
 
@@ -374,13 +374,13 @@ static Standard_Integer readstl(Draw_Interpretor& theDI,
     }
     else
     {
-      std::cout << "Syntax error: unknown argument '" << theArgv[anArgIter] << "'\n";
+      Message::SendFail() << "Syntax error: unknown argument '" << theArgv[anArgIter] << "'";
       return 1;
     }
   }
   if (aFilePath.IsEmpty())
   {
-    std::cout << "Syntax error: not enough arguments\n";
+    Message::SendFail() << "Syntax error: not enough arguments";
     return 1;
   }
 
@@ -456,7 +456,7 @@ static Standard_Integer ReadObj (Draw_Interpretor& theDI,
       aFileUnitFactor = UnitsAPI::AnyToSI (1.0, aUnitStr.ToCString());
       if (aFileUnitFactor <= 0.0)
       {
-        std::cout << "Syntax error: wrong length unit '" << aUnitStr << "'\n";
+        Message::SendFail() << "Syntax error: wrong length unit '" << aUnitStr << "'";
         return 1;
       }
     }
@@ -467,7 +467,7 @@ static Standard_Integer ReadObj (Draw_Interpretor& theDI,
     {
       if (!parseCoordinateSystem (theArgVec[++anArgIter], aFileCoordSys))
       {
-        std::cout << "Syntax error: unknown coordinate system '" << theArgVec[anArgIter] << "'\n";
+        Message::SendFail() << "Syntax error: unknown coordinate system '" << theArgVec[anArgIter] << "'";
         return 1;
       }
     }
@@ -479,7 +479,7 @@ static Standard_Integer ReadObj (Draw_Interpretor& theDI,
     {
       if (!parseCoordinateSystem (theArgVec[++anArgIter], aResultCoordSys))
       {
-        std::cout << "Syntax error: unknown coordinate system '" << theArgVec[anArgIter] << "'\n";
+        Message::SendFail() << "Syntax error: unknown coordinate system '" << theArgVec[anArgIter] << "'";
         return 1;
       }
     }
@@ -528,13 +528,13 @@ static Standard_Integer ReadObj (Draw_Interpretor& theDI,
     }
     else
     {
-      std::cout << "Syntax error at '" << theArgVec[anArgIter] << "'\n";
+      Message::SendFail() << "Syntax error at '" << theArgVec[anArgIter] << "'";
       return 1;
     }
   }
   if (aFilePath.IsEmpty())
   {
-    std::cout << "Syntax error: wrong number of arguments\n";
+    Message::SendFail() << "Syntax error: wrong number of arguments";
     return 1;
   }
 
@@ -550,14 +550,14 @@ static Standard_Integer ReadObj (Draw_Interpretor& theDI,
     {
       if (toUseExistingDoc)
       {
-        std::cout << "Error: document with name " << aDestName << " does not exist\n";
+        Message::SendFail() << "Error: document with name " << aDestName << " does not exist";
         return 1;
       }
       anApp->NewDocument (TCollection_ExtendedString ("BinXCAF"), aDoc);
     }
     else if (!toUseExistingDoc)
     {
-      std::cout << "Error: document with name " << aDestName << " already exists\n";
+      Message::SendFail() << "Error: document with name " << aDestName << " already exists";
       return 1;
     }
   }
index 841346b..997456c 100644 (file)
@@ -4,7 +4,6 @@
 ## Comment : from pro13893
 ## ====================================
 puts "TODO OCC22817 All:exception.+There are no suitable edges"
-puts "TODO OCC22817 All:\\*\\* Exception \\*\\*"
 puts "TODO OCC22817 All:TEST INCOMPLETE"
 
 restore [locate_data_file pro13893.rle] a
index 6f6f697..3af44d2 100644 (file)
@@ -4,7 +4,6 @@
 ## Comment : from cts21363
 ## ====================================
 puts "TODO OCC22817 All:exception.+There are no suitable edges"
-puts "TODO OCC22817 All:\\*\\* Exception \\*\\*"
 puts "TODO OCC22817 All:TEST INCOMPLETE"
 
 restore [locate_data_file cts21363.rle] a
index 4851cae..253f40a 100755 (executable)
@@ -1,14 +1,10 @@
 puts "All exceptions is OK"
 puts "TODO OCC12345 ALL: An exception was caught"
-puts "TODO OCC12345 ALL: \\*\\* Exception \\*\\*.*"
 
 puts "========"
-puts "OCC669"
+puts "0000669: Standard_GUID(HoleFeature) cause stack overwrite"
 puts "========"
 puts ""
-#########################################
-## Standard_GUID("HoleFeature") cause stack overwrite
-#########################################
 
 pload QAcommands
 
index 524a538..64b68c9 100644 (file)
@@ -1,13 +1,9 @@
-puts "TODO OCC23497 ALL: Exception"
 puts "TODO OCC23497 ALL: exception"
 
 puts "============"
-puts "OCC23497"
+puts "0023497: Units package raises e x c e p t i o n for composite units"
 puts "============"
 puts ""
-#######################################################################
-# Units package raises exception for composite units
-#######################################################################
 
 set UnitString "sq.km"
 
index ad4fdaf..fdb5cd4 100644 (file)
@@ -1,14 +1,10 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
 puts "==========="
-puts "OCC22783"
+puts "0022783: Improvement of BRepOffsetAPI_MakeFilling: keep old and new boundary edges with all pcurves"
 puts "==========="
 puts ""
-#######################################################################
-#  Improvement of BRepOffsetAPI_MakeFilling: keep old and new boundary edges with all pcurves
-#######################################################################
 
 catch {pload XDE}
 
index 569348d..af33d02 100644 (file)
@@ -1,14 +1,10 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
 puts "============"
-puts "OCC22786"
+puts "0022786: 64bit issue in AdvApp2Var"
 puts "============"
 puts ""
-#######################################################################
-# 64bit issue in AdvApp2Var
-#######################################################################
 
 set BugNumber OCC22786
 
index 8b3f495..7a749d5 100644 (file)
@@ -1,14 +1,10 @@
-puts "TODO OCC23343 ALL: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC23343 ALL: An exception was caught"
 puts "TODO OCC23343 ALL: Faulty OCC23343"
 
 puts "============"
-puts "OCC23343"
+puts "0023343: Crash (A C C E S S  V I O L A T I O N) in GeomPlate_BuildPlateSurface / MakeApprox if init Surface is set"
 puts "============"
 puts ""
-#######################################################################
-# Crash (ACCESS VIOLATION) in GeomPlate_BuildPlateSurface / MakeApprox if init Surface is set
-#######################################################################
 
 restore [locate_data_file bug23343_initFace.brep] initFace
 restore [locate_data_file bug23343_edge_constraint.brep] edge_constraint
index 11c43f3..07744e7 100755 (executable)
@@ -1,8 +1,3 @@
-#by apn on master-master 03.12.2012
-#puts "TODO OCC12345 ALL: An exception was caught"
-#puts "TODO OCC12345 ALL: \\*\\* Exception *\\*\\*.*"
-#puts "TODO OCC12345 ALL: TEST INCOMPLETE"
-
 puts "================"
 puts "OCC293"
 puts "================"
index 447701c..3828591 100755 (executable)
@@ -1,18 +1,12 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
 pload QAcommands
 
 puts "========"
-puts "OCC426"
-puts "OCC50"
+puts "0000426: The result of fuse operation is invalid"
+puts "0000050: BRepFilletAPI_MakeFillet presents a bug on fillet computation (build())"
 puts "========"
-#############################################################################
-## The result of fuse operation is invalid
-#############################################################################
-## BRepFilletAPI_MakeFillet presents a bug on fillet computation (build())
-#############################################################################
 
 OCC426 result rs1 rs2 rs3 fuse32 fuse321 fuseUnif
 
index d7a1fb4..55fb718 100755 (executable)
@@ -1,15 +1,10 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: OCC8842: Faulty"
 
-
 puts "============"
-puts "OCC8842"
+puts "00008842: E r r o r s in Offset Shape algorithm working with bspline and surface of revolution"
 puts "============"
 puts ""
-#######################################################################
-# Errors in Offset Shape algorithm working with bspline and surface of revolution
-#######################################################################
 
 set BugNumber OCC8842
 
index fba22ab..0852f3a 100755 (executable)
@@ -1,14 +1,10 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: OCC8842: Faulty"
 
 puts "============"
-puts "OCC8842"
+puts "00008842: E r r o r s in Offset Shape algorithm working with bspline and surface of revolution"
 puts "============"
 puts ""
-#######################################################################
-# Errors in Offset Shape algorithm working with bspline and surface of revolution
-#######################################################################
 
 set BugNumber OCC8842
 
index e6c89f1..29a054a 100755 (executable)
@@ -1,14 +1,10 @@
 puts "TODO OCC25913 ALL: OCC8842: Faulty"
-puts "TODO OCC25913 ALL: \\*\\* Exception"
 puts "TODO OCC25913 ALL: An exception was caught"
 
 puts "============"
-puts "OCC8842"
+puts "00008842: E r r o r s in Offset Shape algorithm working with bspline and surface of revolution"
 puts "============"
 puts ""
-#######################################################################
-# Errors in Offset Shape algorithm working with bspline and surface of revolution
-#######################################################################
 
 set BugNumber OCC8842
 
index 0154bdd..b21c170 100755 (executable)
@@ -1,16 +1,12 @@
 puts "TODO OCC25913 ALL: Error :  is WRONG because number of"
 puts "TODO OCC25913 ALL: Error : The area of result shape is"
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: OCC8842: Faulty"
 
 puts "============"
-puts "OCC8842"
+puts "00008842: E r r o r s in Offset Shape algorithm working with bspline and surface of revolution"
 puts "============"
 puts ""
-#######################################################################
-# Errors in Offset Shape algorithm working with bspline and surface of revolution
-#######################################################################
 
 set BugNumber OCC8842
 
index e0312cf..f315de1 100755 (executable)
@@ -1,14 +1,10 @@
 puts "TODO OCC25913 ALL: OCC8842: Faulty"
-puts "TODO OCC25913 ALL: \\*\\* Exception"
 puts "TODO OCC25913 ALL: An exception was caught"
 
 puts "============"
-puts "OCC8842"
+puts "00008842: E r r o r s in Offset Shape algorithm working with bspline and surface of revolution"
 puts "============"
 puts ""
-#######################################################################
-# Errors in Offset Shape algorithm working with bspline and surface of revolution
-#######################################################################
 
 set BugNumber OCC8842
 
index affc5dc..de36367 100755 (executable)
@@ -1,14 +1,10 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
 puts "============"
-puts "OCC23870"
+puts "0023870: Integration of new options of sweeping into BRepOffsetAPI_MakePipe algorithm"
 puts "============"
 puts ""
-#######################################################################
-# Integration of new options of sweeping into BRepOffsetAPI_MakePipe algorithm.
-#######################################################################
 
 set BugNumber OCC23870
 
index 8b35a04..aedc90b 100755 (executable)
@@ -1,14 +1,10 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
 puts "============"
-puts "OCC23870"
+puts "0023870: Integration of new options of sweeping into BRepOffsetAPI_MakePipe algorithm"
 puts "============"
 puts ""
-#######################################################################
-# Integration of new options of sweeping into BRepOffsetAPI_MakePipe algorithm.
-#######################################################################
 
 set BugNumber OCC23870
 
index 7f25f1f..84e6107 100755 (executable)
@@ -1,14 +1,10 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
 puts "============"
-puts "OCC23870"
+puts "0023870: Integration of new options of sweeping into BRepOffsetAPI_MakePipe algorithm"
 puts "============"
 puts ""
-#######################################################################
-# Integration of new options of sweeping into BRepOffsetAPI_MakePipe algorithm.
-#######################################################################
 
 set BugNumber OCC23870
 
index 56befd7..e32651d 100755 (executable)
@@ -1,13 +1,9 @@
 puts "TODO OCC25939 ALL: An exception was caught"
-puts "TODO OCC25939 ALL: \\*\\* Exception \\*\\*.*"
 
 puts "============"
-puts "OCC25939"
+puts "0025939: S I G S E G V in MakeThickSolid"
 puts "============"
 puts ""
-######################################################
-# SIGSEGV in MakeThickSolid
-######################################################
 
 psphere Sphere 5
 pcylinder Cylinder 83 100
index bc9ba13..683dfb6 100644 (file)
@@ -1,14 +1,10 @@
 puts "TODO OCC26295 ALL: An exception was caught"
-puts "TODO OCC26295 ALL: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC26295 ALL: TEST INCOMPLETE"
 
 puts "========"
-puts "OCC26295"
+puts "0026295: Sweep fails with BRepFill_ContactOnBorder"
 puts "========"
 puts ""
-#############################################
-# Sweep fails with BRepFill_ContactOnBorder
-#############################################
 
 restore [locate_data_file bug26295_section.brep] section
 restore [locate_data_file bug26295_profile1.brep] profile1
index ec64c72..82b7257 100644 (file)
@@ -1,14 +1,10 @@
 puts "TODO OCC26558 ALL: An exception was caught"
-puts "TODO OCC26558 ALL: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC26558 ALL: TEST INCOMPLETE"
 
 puts "========"
-puts "OCC26558"
+puts "0026558: Failing to build isoline for offset surface"
 puts "========"
 puts ""
-###############################################
-# Failing to build isoline for offset surface
-###############################################
 
 restore [locate_data_file bug26558_s.brep] s
 
index 1fc401c..6014d09 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC30808 ALL: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC30808 ALL: An exception was caught"
 puts "TODO OCC30808 ALL:TEST INCOMPLETE"
 
index c35c1f6..44283a7 100755 (executable)
@@ -1,5 +1,4 @@
 puts "TODO OCC12345 ALL: An exception was caught"
-puts "TODO OCC12345 ALL: \\*\\* Exception \\*\\*.*"
 
 puts "================"
 puts "BUC60961"
index 109c39f..0e48422 100755 (executable)
@@ -1,15 +1,11 @@
 puts "TODO OCC11111 ALL: An exception was caught"
-puts "TODO OCC11111 ALL: \\*\\* Exception"
 puts "TODO OCC11111 ALL: Faulty OCC22910"
 puts "TODO OCC11111 ALL: Error: The command cannot be built"
 
 puts "================"
-puts "OCC22910"
+puts "0022910: F a i l u r e to compute iso-line for NURBS surface"
 puts "================"
 puts ""
-#######################################################################################
-# Failure to compute iso-line for NURBS surface
-######################################################################################
 
 set BugNumber OCC22910
 
index 6c99684..7bef991 100755 (executable)
@@ -1,19 +1,15 @@
 # Incompleted behavior of test case is OK.
 # Exception should be thrown.
 
-puts "TODO OCC11111 ALL: \\*\\* Exception"
 puts "TODO OCC11111 ALL: An exception was caught"
 
 pload QAcommands
 
 puts "============"
-puts "OCC2569"
+puts "0002569: If it is not possible to create the bezier curve, it should throw an e x c e p t i o n."
 puts "============"
 puts ""
-######################################################
-# If it is not possible to create the bezier curve, 
-# it should throw an exception.
-######################################################
+
 cpulimit 60
 vinit
 
index 9aea57c..6f704c9 100755 (executable)
@@ -1,13 +1,9 @@
 puts "TODO OCC12345 ALL: An exception was caught"
-puts "TODO OCC12345 ALL: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC12345 ALL: TEST INCOMPLETE"
 puts "================"
-puts "OCC346"
+puts "0000346: Avoiding e x c e p t i o n when the 2 vertices of the edge are the same"
 puts "================"
 puts ""
-#####################################################
-## Avoiding exception when the 2 vertices of the edge are the same.
-#####################################################
 
 set x 10
 set y 10
index 237836c..dd9383a 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
index 7a80a1f..0be2810 100755 (executable)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done."
index 3f87e04..a11a388 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done."
index bd5e045..ec53073 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done."
index 6637066..0d23b75 100755 (executable)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done."
index 727afa9..6243913 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done."
index 7e26ded..8fcbf2b 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done."
index b643d5c..8441586 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done."
index 74da621..1a7f05e 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
index c88fd2c..37e058c 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
index 8eeaa61..fdae0a4 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
index 60bc01e..337e9f0 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
index b06c2d8..8ab2418 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
index 010e6a8..7741b82 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
index eb2de9f..1d9941a 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
index 66ad0d8..700bf53 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
index 6ef4dbd..8393f94 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
index 5ef0777..f902f4c 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
index 21fc508..5678bbb 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
index fdfcb20..a196f13 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
index c1d6e5c..da57c56 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done."
index de34b7b..ba67fa8 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
index 551b6a5..36129be 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 puts "TODO OCC23068 ALL: Faulty shapes in variables faulty_1 to faulty_"
index 86411c5..3bf8a67 100755 (executable)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
index 237836c..dd9383a 100755 (executable)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
index 84334ed..bc83d05 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
index c5cdcf7..8c6c29b 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
index 8b3b931..05427f1 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24156 MacOS: An exception was caught"
 puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
 
index de4e431..204ee56 100755 (executable)
@@ -1,15 +1,11 @@
 puts "TODO ?OCC24909 ALL: An exception was caught"
-puts "TODO ?OCC24909 ALL: \\*\\* Exception \\*\\*.*"
 puts "TODO ?OCC24909 ALL: TEST INCOMPLETE"
 puts "TODO ?OCC24909 ALL: Tcl Exception: Buildsweep : Not Done"
 
 puts "========"
-puts "OCC24909"
+puts "0024909: S I G S E G V in buildsweep"
 puts "========"
 puts ""
-##################################
-# 0024909: SIGSEGV in buildsweep
-##################################
 
 restore [locate_data_file bug24909_sweep3-draw-Sweep-0-spine.brep] Sweep-0-spine
 
index 25784a1..215b253 100755 (executable)
@@ -1,15 +1,11 @@
 puts "TODO ?OCC24909 ALL: An exception was caught"
-puts "TODO ?OCC24909 ALL: \\*\\* Exception \\*\\*.*"
 puts "TODO ?OCC24909 ALL: TEST INCOMPLETE"
 puts "TODO ?OCC24909 ALL: Tcl Exception: Buildsweep : Not Done"
 
 puts "========"
-puts "OCC24909"
+puts "0024909: S I G S E G V in buildsweep"
 puts "========"
 puts ""
-##################################
-# 0024909: SIGSEGV in buildsweep
-##################################
 
 circle c1 0 0 0 40
 mkedge e1 c1
index ea49e84..1e18beb 100755 (executable)
@@ -1,14 +1,10 @@
 puts "TODO OCC25110 ALL: An exception was caught"
-puts "TODO OCC25110 ALL: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC25110 ALL: TEST INCOMPLETE"
 
 puts "========"
-puts "OCC25110"
+puts "0025110: TCollection_IndexedDataMap::FindFromKey e r r o r when sweeping circle along BezierCurve"
 puts "========"
 puts ""
-########################################################################################
-# TCollection_IndexedDataMap::FindFromKey error when sweeping circle along BezierCurve
-########################################################################################
 
 restore [locate_data_file bug25110_unsweepable1-draw-Sweep-0-spine.brep] Sweep-0-spine
 restore [locate_data_file bug25110_unsweepable1-draw-Sweep-0-section-00-Circle.brep] Sweep-0-section-00-Circle
index d8358a8..20dffdf 100755 (executable)
@@ -1,14 +1,10 @@
 puts "TODO OCC26088 ALL: An exception was caught"
-puts "TODO OCC26088 ALL: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC26088 ALL: TEST INCOMPLETE"
 
 puts "========"
-puts "OCC26088"
+puts "0026088: E x c e p t i o n in pipe algorithm"
 puts "========"
 puts ""
-###############################
-# Exception in pipe algorithm
-###############################
 
 restore [locate_data_file bug26088_path0.brep] p
 restore [locate_data_file bug26088_profile0.brep] pr
index 5a8bb5f..e859880 100755 (executable)
@@ -1,14 +1,10 @@
 puts "TODO OCC24997 ALL: An exception was caught"
-puts "TODO OCC24997 ALL: \\*\\* Exception \\*\\*.*"
 puts "TODO OCC24997 ALL: TEST INCOMPLETE"
 
 puts "========"
-puts "OCC24997"
+puts "0024997: S I G S E G V in BRepOffsetAPI_ThruSections"
 puts "========"
 puts ""
-#########################################
-# SIGSEGV in BRepOffsetAPI_ThruSections
-#########################################
 
 restore [locate_data_file bug24997_loft3-draw-Loft-00-section.brep] Loft-00-section
 restore [locate_data_file bug24997_loft3-draw-Loft-01-section.brep] Loft-01-section