X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_ProjectionUtils.cxx;h=9284c91adad61a57fdf3a6567d6a44c2dc6ce0c4;hb=3b570ddfbea2964cea7fe285a5722c45bf0675ee;hp=3ab3d55a3fca87a2713bf64c7bf2489b73a6a69e;hpb=665d037f93371114bf4b00bf11b0f95be418fb77;p=modules%2Fsmesh.git diff --git a/src/StdMeshers/StdMeshers_ProjectionUtils.cxx b/src/StdMeshers/StdMeshers_ProjectionUtils.cxx index 3ab3d55a3..9284c91ad 100644 --- a/src/StdMeshers/StdMeshers_ProjectionUtils.cxx +++ b/src/StdMeshers/StdMeshers_ProjectionUtils.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -123,17 +123,24 @@ namespace { bool storeShapeForDebug(const TopoDS_Shape& shape) { -#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"); - if ( !theMeshDS[0] ) { - show_shape( TopoDS_Shape(), "avoid warning: show_shape() defined but not used"); + bool toShow; + + 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 >() ); } -#else - (void)shape; // unused in release mode -#endif return false; } @@ -540,8 +547,11 @@ bool StdMeshers_ProjectionUtils::FindSubShapeAssociation(const TopoDS_Shape& the // b) find association of a couple of vertices and recall self. // - theMeshDS[0] = theMesh1->GetMeshDS(); // debug - theMeshDS[1] = theMesh2->GetMeshDS(); + 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) @@ -2799,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(); @@ -2869,7 +2879,7 @@ namespace StdMeshers_ProjectionUtils const SMDS_MeshNode *srcNode, *tgtNode; // un-mark internal src nodes in order iterate them using _delaunay - int nbSrcNodes = 0; + smIdType nbSrcNodes = 0; SMDS_NodeIteratorPtr nIt = _srcSubMesh->GetSubMeshDS()->GetNodes(); if ( !nIt || !nIt->more() ) return true; if ( moveAll )