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.
#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>
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
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 {
}
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;
}
}
else
{
- std::cout << "Syntax error at argument '" << theArgVal[anArgIter] << "'.\n";
+ Message::SendFail() << "Syntax error at argument '" << theArgVal[anArgIter] << "'";
return 1;
}
}
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;
}
// 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
{
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;
}
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;
}
{
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
if (!aTool.IsDone())
{
- std::cout << "Error: Failed to perform proximity test" << std::endl;
+ Message::SendFail() << "Error: Failed to perform proximity test";
return 1;
}
{
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;
}
{
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
if (!aTool.IsDone())
{
- std::cout << "Error: Failed to perform proximity test" << std::endl;
+ Message::SendFail() << "Error: Failed to perform proximity test";
return 1;
}
#include <BRepFilletAPI_MakeFillet.hxx>
#include <ChFi3d_FilletShape.hxx>
+#include <Message.hxx>
#include <Precision.hxx>
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);
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;
}
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);
}
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;
}
}
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));
#include <FilletSurf_ErrorTypeStatus.hxx>
#include <TopAbs.hxx>
#include <DrawTrSurf.hxx>
+#include <Message.hxx>
#include <stdio.h>
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;
}
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]);
//
theDSFiller.Perform();
if (theDSFiller.HasErrors()) {
- printf("Check types of the arguments, please\n");
+ Message::SendFail() << "Check types of the arguments, please";
return 1;
}
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;
}
#include <BRepOffset_MakeOffset.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
#include <GeomAdaptor_Curve.hxx>
+#include <Message.hxx>
static
void SampleEdges (const TopoDS_Shape& theShape,
{
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;
}
if (S.IsNull())
{
- std::cout<<"Invalid input shape"<<std::endl;
+ Message::SendFail() << "Invalid input shape";
return 1;
}
#include <BRepPrimAPI_MakeSphere.hxx>
#include <Geom_Plane.hxx>
#include <gp_Pln.hxx>
-
+#include <Message.hxx>
//=======================================================================
// box
}
else
{
- std::cout<<"Syntax error\n";
+ Message::SendFail() << "Syntax error";
return 1;
}
}
#include <BRepBuilderAPI_FastSewing.hxx>
#include <GeomAPI_ProjectPointOnSurf.hxx>
+#include <Message.hxx>
#ifdef _WIN32
//#define strcasecmp strcmp Already defined
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;
}
{
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;
}
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;
}
#include <gp_Vec.hxx>
#include <Geom_Circle.hxx>
#include <gp_Ax2.hxx>
-
+#include <Message.hxx>
//=======================================================================
// prism
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;
}
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";
}
if (Sweep == 0) {
- //std::cout << "You have forgotten the <<mksweep>> command !"<< std::endl;
di << "You have forgotten the <<mksweep>> command !\n";
return 1;
}
}
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;
}
}
else if (!strcmp(a[1], "-CN")) {
if (n != 5) {
- //std::cout << "bad arguments !" << std::endl;
di << "bad arguments !\n";
return 1;
}
}
else if (!strcmp(a[1], "-FX")) {
if ((n != 5) && (n != 8)) {
- //std::cout << "bad arguments !" << std::endl;
di << "bad arguments !\n";
return 1;
}
{
if (n != 5)
{
- //std::cout << "bad arguments !" << std::endl;
di << "bad arguments !\n";
return 1;
}
}
else {
- //std::cout << "The option "<< a[1] << " is unknown !" << std::endl;
di << "The option " << a[1] << " is unknown !\n";
return 1;
}
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";
}
if (Sweep == 0) {
- //std::cout << "You have forgotten the <<mksweep>> command !"<< std::endl;
di << "You have forgotten the <<mksweep>> command !\n";
return 1;
}
(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;
}
// 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;
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;
}
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";
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;
}
// 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";
}
}
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();
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;
}
#include <TopOpeBRepDS_HDataStructure.hxx>
#include <gp.hxx>
#include <gp_Pln.hxx>
+#include <Message.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopExp.hxx>
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;
}
}
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;
}
DBRep::Set(a[1],Half.Solid());
}
else {
- //std::cout << " HalfSpace NotDone" << std::endl;
di << " HalfSpace NotDone\n";
return 1;
}
DBRep::Set(a[1],Half.Solid());
}
else {
- //std::cout << " HalfSpace NotDone" << std::endl;
di << " HalfSpace NotDone\n";
return 1;
}
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();
#include <Draw_Appli.hxx>
#include <Draw_Drawable3D.hxx>
#include <Draw_Interpretor.hxx>
+#include <Message.hxx>
#include <TDF_Label.hxx>
#include <TDF_ChildIterator.hxx>
{
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;
}
}
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
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;
}
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;
}
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;
}
#include <DrawTrSurf.hxx>
#include <DDF.hxx>
+#include <Message.hxx>
#include <TDF_Data.hxx>
#include <TDF_Label.hxx>
}
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<<" ";
#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];
}
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;
}
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);
// Check the value.
if(value < 0 || 255 < value) {
- std::cout << "Bad value = " << value << std::endl;
+ Message::SendFail() << "Bad value = " << value;
return 1;
}
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);
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);
}
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<<" ";
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;
}
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;
}
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();
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;
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();
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();
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;
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();
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)
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();
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();
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]));
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);
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();
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]);
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++) {
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();
#include <DDataStd_DrawPresentation.hxx>
#include <DDataStd_DrawDriver.hxx>
+#include <Message.hxx>
#ifndef _WIN32
extern Draw_Viewer dout;
{
if (nb != 2)
{
- std::cout << "Syntax error: wrong number of arguments\n";
+ Message::SendFail() << "Syntax error: wrong number of arguments";
return 1;
}
}
else
{
- std::cout << "Syntax error: variable '" << arg[1] << "' not found\n";
+ Message::SendFail() << "Syntax error: variable '" << arg[1] << "' not found";
return 1;
}
}
"update the draw viewer",
__FILE__, DDataStd_DrawRepaint, g);
}
-
-
-
-
-
-
-
-
-
-
-
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
#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>
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;
}
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;
{
TCollection_AsciiString entry;
TDF_Tool::Entry(cni.Value()->Label(), entry);
- //std::cout<<entry<<std::endl;
di <<entry<<"\n";
return 0;
}
//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;
}
DDF::ReturnLabel(di, L);
return 0;
}
- std::cout << "DNaming_NewShape : Error" << std::endl;
+ di << "DNaming_NewShape : Error";
return 1;
}
//=======================================================================
#include <BRepTools.hxx>
#include <BRep_Builder.hxx>
#include <gp_Trsf.hxx>
+#include <Message.hxx>
#include <TopAbs.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Shape.hxx>
DDF::ReturnLabel(theDI, anObj->Label());
return 0;
}
- std::cout << "DNaming_AddBox : Error" << std::endl;
+ Message::SendFail() << "DNaming_AddBox : Error";
return 1;
}
return 0;
}
}
- std::cout << "DNaming_BoxDX : Error" << std::endl;
+ Message::SendFail() << "DNaming_BoxDX : Error";
return 1;
}
return 0;
}
}
- std::cout << "DNaming_BoxDY : Error" << std::endl;
+ Message::SendFail() << "DNaming_BoxDY : Error";
return 1;
}
return 0;
}
}
- std::cout << "DNaming_BoxDZ : Error" << std::endl;
+ Message::SendFail() << "DNaming_BoxDZ : Error";
return 1;
}
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
return 0;
}
ERR:
- std::cout << "DNaming_SolveFlatFrom : Error" << std::endl;
+ Message::SendFail() << "DNaming_SolveFlatFrom : Error";
return 1;
}
}
return 0;
}
- std::cout << "DNaming_InitLogBook : Error - No document ==> " <<theNb <<std::endl;
+ Message::SendFail() << "DNaming_InitLogBook : Error - No document ==> " << theNb;
return 1;
}
}
return 0;
}
- std::cout << "DNaming_CheckLogBook : Error - No document ==> " <<theNb <<std::endl;
+ Message::SendFail() << "DNaming_CheckLogBook : Error - No document ==> " << theNb;
return 1;
}
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;
}
}
} //###
}
- std::cout << "DNaming_AttachShape : Error" << std::endl;
+ Message::SendFail() << "DNaming_AttachShape : Error";
return 1;
}
}
}
}
- std::cout << "DNaming_XAttachShape : Error" << std::endl;
+ Message::SendFail() << "DNaming_XAttachShape : Error";
return 1;
}
DDF::ReturnLabel(theDI, anObj->Label());
return 0;
}
- std::cout << "DNaming_AddCylinder : Error" << std::endl;
+ Message::SendFail() << "DNaming_AddCylinder : Error";
return 1;
}
return 0;
}
}
- std::cout << "DNaming_CylRadius : Error" << std::endl;
+ Message::SendFail() << "DNaming_CylRadius : Error";
return 1;
}
DDF::ReturnLabel(theDI, aFun->Label());
return 0;
}
- std::cout << "DModel_AddFuse : Error" << std::endl;
+ Message::SendFail() << "DModel_AddFuse : Error";
return 1;
}
DDF::ReturnLabel(theDI, aFun->Label());
return 0;
}
- std::cout << "DModel_AddCut : Error" << std::endl;
+ Message::SendFail() << "DModel_AddCut : Error";
return 1;
}
DDF::ReturnLabel(theDI, aFun->Label());
return 0;
}
- std::cout << "DModel_AddComm : Error" << std::endl;
+ Message::SendFail() << "DModel_AddComm : Error";
return 1;
}
DDF::ReturnLabel(theDI, aFun->Label());
return 0;
}
- std::cout << "DModel_AddSection : Error" << std::endl;
+ Message::SendFail() << "DModel_AddSection : Error";
return 1;
}
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;
}
DDF::ReturnLabel(di, aFun->Label());
return 0;
}
- std::cout << "DNaming_Translate : Error" << std::endl;
+ Message::SendFail() << "DNaming_Translate : Error";
return 1;
}
//=======================================================================
DDF::ReturnLabel(di, aFun->Label());
return 0;
}
- std::cout << "DNaming_PTranslateAlongLine : Error" << std::endl;
+ Message::SendFail() << "DNaming_PTranslateAlongLine : Error";
return 1;
}
DDF::ReturnLabel(di, aFun->Label());
return 0;
}
- std::cout << "DNaming_PRotateRoundLine : Error" << std::endl;
+ Message::SendFail() << "DNaming_PRotateRoundLine : Error";
return 1;
}
DDF::ReturnLabel(di, aFun->Label());
return 0;
}
- std::cout << "DNaming_PMirrorObject : Error" << std::endl;
+ Message::SendFail() << "DNaming_PMirrorObject : Error";
return 1;
}
//=======================================================================
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;
}
//
}
}
- std::cout << "DNaming_PrismHeight : Error" << std::endl;
+ Message::SendFail() << "DNaming_PrismHeight : Error";
return 1;
}
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;
}
return 0;
}
}
- std::cout << "DNaming_RevolutionAngle : Error" << std::endl;
+ Message::SendFail() << "DNaming_RevolutionAngle : Error";
return 1;
}
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;
}
}
- std::cout << "DNaming_SphRadius : Error" << std::endl;
+ Message::SendFail() << "DNaming_SphRadius : Error";
return 1;
}
//=======================================================================
DDF::ReturnLabel(theDI, anObj->Label());
return 0;
}
- std::cout << "DNaming_AddPoint : Error" << std::endl;
+
+ Message::SendFail() << "DNaming_AddPoint : Error";
return 1;
}
DDF::ReturnLabel(theDI, anObj->Label());
return 0;
}
- std::cout << "DNaming_AddPoint : Error" << std::endl;
+
+ Message::SendFail() << "DNaming_AddPoint : Error";
return 1;
}
return 0;
}
}
- std::cout << "DNaming_PntOffset : Error" << std::endl;
+
+ Message::SendFail() << "DNaming_PntOffset : Error";
return 1;
}
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;
}
}
- std::cout << "DNaming_TestSingle : Error" << std::endl;
+ Message::SendFail() << "DNaming_TestSingle : Error";
return 1;
}
}
}
- std::cout << "DNaming_TestMultiple : Error" << std::endl;
+ Message::SendFail() << "DNaming_TestMultiple : Error";
return 1;
}
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;
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
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) {
{
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;
}
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;
{
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;
}
di.SetDoEcho (Standard_False);
}
else {
- std::cout << "Unrecognized option: " << a[1] << std::endl;
+ Message::SendFail() << "Unrecognized option: " << a[1];
return 1;
}
return 0;
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;
}
}
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);
}
else
{
- std::cout << "Syntax error: unknown argument '" << anArg << "'\n";
+ Message::SendFail() << "Syntax error: unknown argument '" << anArg << "'";
return 1;
}
}
}
else
{
- std::cout << "Syntax error: unknown argument '" << anArg << "'\n";
+ Message::SendFail() << "Syntax error: unknown argument '" << anArg << "'";
return 1;
}
}
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;
}
}
else
{
- std::cout << "Error: unknown gravity '" << theArgVec[1] << "'!\n";
+ Message::SendFail() << "Error: unknown gravity '" << theArgVec[1] << "'";
return 1;
}
}
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;
}
//function : dputs
//purpose :
//==============================================================================
-static int dputs (Draw_Interpretor& ,
+static int dputs (Draw_Interpretor& theDI,
Standard_Integer theArgNb,
const char** theArgVec)
{
}
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);
#include <Draw_ProgressIndicator.hxx>
#include <Draw_Text2D.hxx>
#include <Draw_Text3D.hxx>
+#include <Message.hxx>
#include <Standard_Stream.hxx>
#include <TCollection_AsciiString.hxx>
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]);
// 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>
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);
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
#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
#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
#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;
}
//=======================================================================
//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;
+ //
}
//=======================================================================
}
//=======================================================================
-//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);
+ }
+ }
}
//=======================================================================
//! 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,
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:
{
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;
}
#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>
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]);
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;
}
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;
}
# evaluate test case
set tmp_imagedir 0
+ set anExcep ""
if [catch {
# set variables identifying test case
uplevel set casename [file tail $casefile]
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
#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>
{
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;
}
#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,
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;
}
}
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;
}
}
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;
}
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;
}
}
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;
}
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;
}
}
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;
}
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;
}
}
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;
}
}
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;
}
#include <Approx_CurveOnSurface.hxx>
#include <Precision.hxx>
#include <Geom2dAdaptor.hxx>
-
+#include <Message.hxx>
#include <Precision.hxx>
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);
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);
#include <Geom2dAdaptor_Curve.hxx>
#include <GeometryTest.hxx>
#include <GeometryTest_DrawableQualifiedCurve2d.hxx>
+#include <Message.hxx>
#include <Precision.hxx>
#include <TCollection_AsciiString.hxx>
#include <stdio.h>
{
if (theArgsNb < 5)
{
- std::cout << "Error: wrong number of arguments.\n";
+ Message::SendFail() << "Error: wrong number of argument";
return 1;
}
{
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])),
}
else
{
- std::cout << "Error: wrong command name.\n";
+ Message::SendFail() << "Error: wrong command name";
return 1;
}
{
if (!theCirTan3.IsDone())
{
- std::cout << "GccAna_Circ2d3Tan is not done";
+ Message::SendFail() << "GccAna_Circ2d3Tan is not done";
return 1;
}
{
if (theArgsNb < 5)
{
- std::cout << "Error: wrong number of arguments.\n";
+ Message::SendFail() << "Error: wrong number of arguments";
return 1;
}
{
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);
{
if (!anIsPoint2 || !anIsPoint3)
{
- std::cout << "Error: wrong points definition.\n";
+ Message::SendFail() << "Error: wrong points definition";
return 1;
}
Geom2dAdaptor_Curve anAdaptorCurve1 (aQCurve1->GetCurve());
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;
}
{
if (!anIsPoint3)
{
- std::cout << "Error: wrong point definition.\n";
+ Message::SendFail() << "Error: wrong point definition";
return 1;
}
Geom2dAdaptor_Curve anAdaptorCurve1 (aQCurve1->GetCurve());
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;
}
return solutions (theDI, aCircBuilder, theArgVec[1]);
}
- std::cout << "Error: wrong curve type.\n";
+ Message::SendFail() << "Error: wrong curve type";
return 1;
}
#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;
{
if (n < 2)
{
- std::cout << "2dintana circle circle " << std::endl;
+ Message::SendFail() << "2dintana circle circle";
return 1;
}
{
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;
}
break;
}
default:
- std::cout << a[2] << " is not conic " << std::endl;
+ Message::SendFail() << a[2] << " is not conic";
return 1;
}
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;
}
#include <Geom_BSplineSurface.hxx>
#include <Geom_BoundedCurve.hxx>
#include <Geom_BoundedSurface.hxx>
+#include <Message.hxx>
#ifdef _MSC_VER
#include <stdio.h>
{
if (n < 4 || n > 5)
{
- std::cout << "Wrong parameters" << std::endl;
+ Message::SendFail() << "Syntax error: Wrong parameters";
return 1;
}
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;
}
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;
}
#include <TopoDS_Shape.hxx>
#include <DBRep.hxx>
#include <Geom_Curve.hxx>
+#include <Message.hxx>
#include <stdio.h>
#ifdef _WIN32
{
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;
}
#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>
{
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";
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;
}
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;
}
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;
{
if (theArgc < 3)
{
- std::cerr << "Use: " << theArgv[0] << " result shape [tolerance]" << std::endl;
+ theDI << "Use: " << theArgv[0] << " result shape [tolerance]";
return 1;
}
#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>
{
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;
}
{
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;
}
{
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;
}
{
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;
}
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;
}
}
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;
}
#include <DBRep.hxx>
#include <DDocStd.hxx>
#include <Draw.hxx>
+#include <Message.hxx>
#include <Precision.hxx>
#include <Quantity_Color.hxx>
#include <Quantity_ColorRGBA.hxx>
{
if (argc < 4)
{
- std::cout << "Syntax error: wrong number of arguments\n";
+ Message::SendFail() << "Syntax error: wrong number of arguments";
return 1;
}
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;
}
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;
}
}
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;
}
}
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;
{
if (argc != 3)
{
- std::cout << "Syntax error: wrong number of arguments\n";
+ Message::SendFail() << "Syntax error: wrong number of arguments";
return 1;
}
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;
}
{
if (argc != 3 && argc != 4)
{
- std::cout << "Syntax error: wrong number of arguments\n";
+ Message::SendFail() << "Syntax error: wrong number of arguments";
return 1;
}
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;
}
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;
}
{
if (argc != 2)
{
- std::cout << "Syntax error: wrong number of arguments\n";
+ Message::SendFail() << "Syntax error: wrong number of arguments";
return 1;
}
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;
}
{
if (argc < 3)
{
- std::cout << "Syntax error: wrong number of arguments\n";
+ Message::SendFail() << "Syntax error: wrong number of arguments";
return 1;
}
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;
}
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;
}
{
if (argc != 3)
{
- std::cout << "Syntax error: wrong number of arguments\n";
+ Message::SendFail() << "Syntax error: wrong number of arguments";
return 1;
}
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;
}
{
if (argc < 3)
{
- std::cout << "Syntax error: wrong number of arguments\n";
+ Message::SendFail() << "Syntax error: wrong number of arguments";
return 1;
}
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;
}
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;
}
{
if (argc != 4)
{
- std::cout << "Syntax error: wrong number of arguments\n";
+ Message::SendFail() << "Syntax error: wrong number of arguments";
return 1;
}
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;
}
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);
{
if (argc != 3 && argc != 4)
{
- std::cout << "Syntax error: wrong number of arguments\n";
+ Message::SendFail() << "Syntax error: wrong number of arguments";
return 1;
}
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;
}
}
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;
}
}
else
{
- std::cout << "Syntax error: unknown argument '" << argv[3] << "'\n";
+ Message::SendFail() << "Syntax error: unknown argument '" << argv[3] << "'";
return 1;
}
}
{
if (argc != 3)
{
- std::cout << "Syntax error: wrong number of arguments\n";
+ Message::SendFail() << "Syntax error: wrong number of arguments";
return 1;
}
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;
}
}
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;
}
{
if (argc != 3)
{
- std::cout << "Syntax error: wrong number of arguments\n";
+ Message::SendFail() << "Syntax error: wrong number of arguments";
return 1;
}
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 && argc != 4)
{
- std::cout << "Syntax error: wrong number of arguments\n";
+ Message::SendFail() << "Syntax error: wrong number of arguments";
return 1;
}
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;
}
{
if (argc < 3)
{
- std::cout << "Syntax error: wrong number of arguments\n";
+ Message::SendFail() << "Syntax error: wrong number of arguments";
return 1;
}
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;
}
aColRGBA);
if (aNbParsed == 0)
{
- std::cout << "Syntax error at '" << argv[anArgIter] << "'\n";
+ Message::SendFail() << "Syntax error at '" << argv[anArgIter] << "'";
return 1;
}
anArgIter += aNbParsed - 1;
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;
{
if (theNbArgs != 2 && theNbArgs != 3)
{
- std::cout << "Syntax error: wrong number of arguments\n";
+ Message::SendFail() << "Syntax error: wrong number of arguments";
return 1;
}
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;
}
{
if (theNbArgs != 3)
{
- std::cout << "Syntax error: wrong number of arguments\n";
+ Message::SendFail() << "Syntax error: wrong number of arguments";
return 1;
}
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;
}
}
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;
}
{
if (theNbArgs < 3)
{
- std::cout << "Syntax error: wrong number of arguments\n";
+ Message::SendFail() << "Syntax error: wrong number of arguments";
return 1;
}
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;
}
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;
}
}
else
{
- std::cerr << "Syntax error at '" << anArg << "'\n";
+ Message::SendFail() << "Syntax error at '" << anArg << "'";
return 1;
}
aMat->SetAlphaMode (anAlphaMode, aRealValue);
aColorRGBA);
if (aNbParsed == 0)
{
- std::cout << "Syntax error at '" << theArgVec[anArgIter] << "'\n";
+ Message::SendFail() << "Syntax error at '" << theArgVec[anArgIter] << "'";
return 1;
}
anArgIter += aNbParsed;
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;
}
}
}
else
{
- std::cout << "Syntax error at '" << theArgVec[anArgIter] << "'\n";
+ Message::SendFail() << "Syntax error at '" << theArgVec[anArgIter] << "'";
return 1;
}
}
{
if (theNbArgs != 3)
{
- std::cout << "Syntax error: wrong number of arguments\n";
+ Message::SendFail() << "Syntax error: wrong number of arguments";
return 1;
}
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;
}
{
if (theNbArgs != 3 && theNbArgs != 4)
{
- std::cout << "Syntax error: wrong number of arguments\n";
+ Message::SendFail() << "Syntax error: wrong number of arguments";
return 1;
}
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;
}
}
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;
}
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;
}
}
#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>
}
else
{
- std::cout << "Syntax error at '" << argv[anArgIter] << "'\n";
+ Message::SendFail() << "Syntax error at '" << argv[anArgIter] << "'";
return 1;
}
}
case 'v' : reader.SetPropsMode (mode); break;
default:
{
- std::cout << "Syntax error at '" << aModeStr << "'\n";
+ Message::SendFail() << "Syntax error at '" << aModeStr << "'\n";
return 1;
}
}
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;
}
{
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;
}
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;
}
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;
}
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;
}
{
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;
}
}
}
else
{
- std::cout << "Syntax error at '" << anArgCase << "'\n";
+ Message::SendFail() << "Syntax error at '" << anArgCase << "'";
return 1;
}
}
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;
}
}
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;
}
}
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;
}
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;
}
}
{
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;
}
}
{
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;
}
}
}
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;
}
{
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;
}
}
## 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
## 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
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
-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"
-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}
-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
-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
-#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 "================"
-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
-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
-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
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
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
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
-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
-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
-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
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
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
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
-puts "TODO OCC30808 ALL: \\*\\* Exception \\*\\*.*"
puts "TODO OCC30808 ALL: An exception was caught"
puts "TODO OCC30808 ALL:TEST INCOMPLETE"
puts "TODO OCC12345 ALL: An exception was caught"
-puts "TODO OCC12345 ALL: \\*\\* Exception \\*\\*.*"
puts "================"
puts "BUC60961"
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
# 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
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
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
puts "TODO OCC24156 MacOS: An exception was caught"
puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
-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."
-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."
-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."
-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."
-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."
-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."
-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."
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
puts "TODO OCC24156 MacOS: An exception was caught"
puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
puts "TODO OCC24156 MacOS: An exception was caught"
puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
puts "TODO OCC24156 MacOS: An exception was caught"
puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
puts "TODO OCC24156 MacOS: An exception was caught"
puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
puts "TODO OCC24156 MacOS: An exception was caught"
puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
puts "TODO OCC24156 MacOS: An exception was caught"
puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
puts "TODO OCC24156 MacOS: An exception was caught"
puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
puts "TODO OCC24156 MacOS: An exception was caught"
puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
puts "TODO OCC24156 MacOS: An exception was caught"
puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
puts "TODO OCC24156 MacOS: An exception was caught"
puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
puts "TODO OCC24156 MacOS: An exception was caught"
puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
puts "TODO OCC24156 MacOS: An exception was caught"
puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
-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."
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
puts "TODO OCC24156 MacOS: An exception was caught"
puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
-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_"
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
puts "TODO OCC24156 MacOS: An exception was caught"
puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
puts "TODO OCC24156 MacOS: An exception was caught"
puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
puts "TODO OCC24156 MacOS: An exception was caught"
puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
puts "TODO OCC24156 MacOS: An exception was caught"
puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
-puts "TODO OCC24156 MacOS: \\*\\* Exception \\*\\*.*"
puts "TODO OCC24156 MacOS: An exception was caught"
puts "TODO OCC24156 MacOS: TEST INCOMPLETE"
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
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
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
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
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