// 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;
}