X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_ProjectionUtils.cxx;fp=src%2FStdMeshers%2FStdMeshers_ProjectionUtils.cxx;h=bfaf9166af9c2b26e9fb10cf56d96cf1dc0ee16c;hp=a504888d0949f335ece66b0afbe5dd49d7b0fc1b;hb=fa95110a3b64cb8323176103200e3dd17f0ed67e;hpb=9ec3f92f476a3bcae72b418f5d9c0c9ece69a9bc diff --git a/src/StdMeshers/StdMeshers_ProjectionUtils.cxx b/src/StdMeshers/StdMeshers_ProjectionUtils.cxx index a504888d0..bfaf9166a 100644 --- a/src/StdMeshers/StdMeshers_ProjectionUtils.cxx +++ b/src/StdMeshers/StdMeshers_ProjectionUtils.cxx @@ -124,14 +124,19 @@ namespace { bool storeShapeForDebug(const TopoDS_Shape& shape) { bool toShow; -#ifdef _DEBUG_ - const char* type[] ={"COMPOUND","COMPSOLID","SOLID","SHELL","FACE","WIRE","EDGE","VERTEX"}; - BRepTools::Write( shape, SMESH_Comment("/tmp/") << type[shape.ShapeType()] << "_" - << shape.TShape().operator->() << ".brep"); - toShow = !theMeshDS[0]; // no show -#else - toShow = theMeshDS[0]; // no show -#endif + + if (SALOME::VerbosityActivated()) + { + const char* type[] ={"COMPOUND","COMPSOLID","SOLID","SHELL","FACE","WIRE","EDGE","VERTEX"}; + BRepTools::Write( shape, SMESH_Comment("/tmp/") << type[shape.ShapeType()] << "_" + << shape.TShape().operator->() << ".brep"); + toShow = !theMeshDS[0]; // no show + } + else + { + toShow = theMeshDS[0]; // no show + } + if ( toShow ) { show_shape( shape, "avoid warning: show_shape() defined but not used"); show_list( "avoid warning: show_list() defined but not used", list< TopoDS_Edge >() ); @@ -542,10 +547,11 @@ bool StdMeshers_ProjectionUtils::FindSubShapeAssociation(const TopoDS_Shape& the // b) find association of a couple of vertices and recall self. // -#ifdef _DEBUG_ - theMeshDS[0] = theMesh1->GetMeshDS(); // debug - theMeshDS[1] = theMesh2->GetMeshDS(); -#endif + if (SALOME::VerbosityActivated()) + { + theMeshDS[0] = theMesh1->GetMeshDS(); // debug + theMeshDS[1] = theMesh2->GetMeshDS(); + } // ================================================================================= // 1) Is it the case of associating a group member -> another group? (PAL16202, 16203) @@ -2803,10 +2809,10 @@ namespace StdMeshers_ProjectionUtils const double D = M.Determinant(); if ( D < 1e-3 * ( newSrcOrig - _srcOrig ).Modulus() ) { -#ifdef _DEBUG_ - cerr << "TrsfFinder3D::Invert()" + if (SALOME::VerbosityActivated()) + cerr << "TrsfFinder3D::Invert()" << "D " << M.Determinant() << " IsSingular " << M.IsSingular() << endl; -#endif + return false; } gp_Mat Minv = M.Inverted();