mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-09-01 15:57:56 +08:00
Coding - Clean up the trace debug files (#1487)
Some *trace* old debug classes existed for long time. Their purpose is accumulte some trace logic for TopOpe or BRepFeat packages. The problem is that that functionality is no longer used by active developers. And the functionality in some cases changes behavior and make more complicated to debug. Lack of documentation how to work with and impact on behavior and usage of global/static variables make these classes heavy legacy.
This commit is contained in:
@@ -22,9 +22,6 @@
|
||||
#include <TopOpeBRepBuild_ShapeSet.hxx>
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
extern bool TopOpeBRepBuild_GettraceCHK();
|
||||
extern bool TopOpeBRepBuild_GettraceCHKOK();
|
||||
extern bool TopOpeBRepBuild_GettraceCHKNOK();
|
||||
|
||||
Standard_EXPORT void debaddss() {}
|
||||
|
||||
@@ -338,14 +335,6 @@ int TopOpeBRepBuild_ShapeSet::MaxNumberSubShape(const TopoDS_Shape& Shape)
|
||||
void TopOpeBRepBuild_ShapeSet::CheckShape(const bool checkshape)
|
||||
{
|
||||
myCheckShape = checkshape;
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
if (TopOpeBRepBuild_GettraceCHK() && !myCheckShape)
|
||||
{
|
||||
DumpName(std::cout, "no checkshape set on ");
|
||||
std::cout << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
@@ -396,32 +385,6 @@ void TopOpeBRepBuild_ShapeSet::DumpCheck(Standard_OStream&,
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
TopAbs_ShapeEnum t = S.ShapeType();
|
||||
if (!chk)
|
||||
{
|
||||
if (TopOpeBRepBuild_GettraceCHK() || TopOpeBRepBuild_GettraceCHKNOK())
|
||||
{
|
||||
DumpName(OS, "*********************** ");
|
||||
OS << str << " ";
|
||||
TopAbs::Print(t, OS);
|
||||
OS << " : incorrect" << std::endl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (TopOpeBRepBuild_GettraceCHK() || TopOpeBRepBuild_GettraceCHKOK())
|
||||
{
|
||||
DumpName(OS, "");
|
||||
OS << str << " ";
|
||||
TopAbs::Print(t, OS);
|
||||
OS << " : correct" << std::endl;
|
||||
}
|
||||
}
|
||||
if (!chk)
|
||||
debaddss();
|
||||
#endif
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
Reference in New Issue
Block a user