X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_ProjectionUtils.cxx;h=7760791b5ca38d67a8d1f14b6c5455c8796e595b;hb=382f2cc4abb2ee8553a911aeb27348e96c39d197;hp=1158993db46792c3ca21fbbabc917ab0d91f0e18;hpb=385d4cede5f752d0eec26c306f3b5e14511e2a3d;p=modules%2Fsmesh.git diff --git a/src/StdMeshers/StdMeshers_ProjectionUtils.cxx b/src/StdMeshers/StdMeshers_ProjectionUtils.cxx index 1158993db..7760791b5 100644 --- a/src/StdMeshers/StdMeshers_ProjectionUtils.cxx +++ b/src/StdMeshers/StdMeshers_ProjectionUtils.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -97,7 +97,7 @@ namespace { return max(theMeshDS[0]->ShapeToIndex(S), theMeshDS[1]->ShapeToIndex(S) ); return long(S.TShape().operator->()); } - void show_shape( TopoDS_Shape v, const char* msg ) // debug + void show_shape( TopoDS_Shape v, const char* msg ) // debug // todo: unused in release mode { if ( v.IsNull() ) cout << msg << " NULL SHAPE" << endl; else if (v.ShapeType() == TopAbs_VERTEX) { @@ -106,7 +106,7 @@ namespace { else { cout << msg << " "; TopAbs::Print((v).ShapeType(),cout) <<" "<& l ) // debug + void show_list( const char* msg, const list< TopoDS_Edge >& l ) // debug // todo: unused in release mode { cout << msg << " "; list< TopoDS_Edge >::const_iterator e = l.begin(); @@ -123,15 +123,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"); - if ( !theMeshDS[0] ) { - show_shape( TopoDS_Shape(), "avoid warning: show_shape() defined but not used"); + toShow = !theMeshDS[0]; // no show +#else + toShow = theMeshDS[0]; // no show +#endif + 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 >() ); } -#endif return false; } @@ -538,8 +542,10 @@ 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 // ================================================================================= // 1) Is it the case of associating a group member -> another group? (PAL16202, 16203)