IPAL 18631 Remove Extra Messages from the Terminal in case of Release Mode

This commit is contained in:
dmv 2008-06-19 10:33:52 +00:00
parent 607c254121
commit e48a1779f1
15 changed files with 100 additions and 94 deletions

View File

@ -582,7 +582,7 @@ void aptrte( Z nutysu, R aretmx,
mnarcf3 = new Z[mxarcf];
if( mnarcf3 == NULL )
{
cout << "aptrte: MC saturee mnarcf3=" << mnarcf3 << endl;
MESSAGE ( "aptrte: MC saturee mnarcf3=" << mnarcf3 );
goto ERREUR;
}
teamqt( nutysu, aretmx, airemx,

View File

@ -70,7 +70,7 @@ int SMDS_Mesh::CheckMemory(const bool doNotRaise) throw (std::bad_alloc)
else
limit = int( limit * 1.5 );
#ifdef _DEBUG_
cout << "SMDS_Mesh::CheckMemory() memory limit = " << limit << " MB" << endl;
MESSAGE ( "SMDS_Mesh::CheckMemory() memory limit = " << limit << " MB" );
#endif
}
@ -86,7 +86,7 @@ int SMDS_Mesh::CheckMemory(const bool doNotRaise) throw (std::bad_alloc)
if ( doNotRaise )
return 0;
#ifdef _DEBUG_
cout<<"SMDS_Mesh::CheckMemory() throws as free memory too low: " << freeMb <<" MB" << endl;
MESSAGE ("SMDS_Mesh::CheckMemory() throws as free memory too low: " << freeMb <<" MB" );
#endif
throw std::bad_alloc();
#else

View File

@ -495,7 +495,7 @@ Standard_Boolean SMESH_Block::Values(const math_Vector& theXYZ,
return true;
}
#ifdef DEBUG_PARAM_COMPUTE
cout << "PARAM GUESS: " << params.X() << " "<< params.Y() << " "<< params.X() << endl;
MESSAGE ( "PARAM GUESS: " << params.X() << " "<< params.Y() << " "<< params.X() );
myNbIterations++; // how many times call ShellPoint()
#endif
ShellPoint( params, P );
@ -556,8 +556,7 @@ Standard_Boolean SMESH_Block::Values(const math_Vector& theXYZ,
#endif
}
#ifdef DEBUG_PARAM_COMPUTE
cout << "F = " << theFxyz(1) <<
" DRV: " << theDf(1,1) << " " << theDf(1,2) << " " << theDf(1,3) << endl;
MESSAGE ( "F = " << theFxyz(1) << " DRV: " << theDf(1,1) << " " << theDf(1,2) << " " << theDf(1,3) );
myNbIterations +=3; // how many times call ShellPoint()
#endif
@ -613,9 +612,9 @@ bool SMESH_Block::computeParameters(const gp_Pnt& thePoint,
}
#ifdef DEBUG_PARAM_COMPUTE
mySumDist += distance();
cout << " ------ SOLUTION: ( "<< myParam.X() <<" "<< myParam.Y() <<" "<< myParam.Z() <<" )"<<endl
<< " ------ DIST : " << distance() << "\t Tol=" << myTolerance << "\t Nb LOOPS=" << nbLoops << endl
<< " ------ NB IT: " << myNbIterations << ", SUM DIST: " << mySumDist << endl;
MESSAGE ( " ------ SOLUTION: ( "<< myParam.X() <<" "<< myParam.Y() <<" "<< myParam.Z() <<" )"<<endl
<< " ------ DIST : " << distance() << "\t Tol=" << myTolerance << "\t Nb LOOPS=" << nbLoops << endl
<< " ------ NB IT: " << myNbIterations << ", SUM DIST: " << mySumDist );
#endif
theParams = myParam;
@ -741,7 +740,7 @@ bool SMESH_Block::ComputeParameters(const gp_Pnt& thePoint,
}
#ifdef DEBUG_PARAM_COMPUTE
cout << " #### POINT " <<thePoint.X()<<" "<<thePoint.Y()<<" "<<thePoint.Z()<<" ####"<< endl;
MESSAGE ( " #### POINT " <<thePoint.X()<<" "<<thePoint.Y()<<" "<<thePoint.Z()<<" ####" );
#endif
if ( myTolerance < 0 ) myTolerance = 1e-6;
@ -766,8 +765,8 @@ bool SMESH_Block::ComputeParameters(const gp_Pnt& thePoint,
return computeParameters( thePoint, theParams, solution );
}
#ifdef DEBUG_PARAM_COMPUTE
cout << "PARAMS: ( " << params.X() <<" "<< params.Y() <<" "<< params.Z() <<" )"<< endl;
cout << "DIST: " << sqrt( sqDist ) << endl;
MESSAGE ( "PARAMS: ( " << params.X() <<" "<< params.Y() <<" "<< params.Z() <<" )" );
MESSAGE ( "DIST: " << sqrt( sqDist ) );
#endif
if ( sqDist < sqDistance ) { // get better
@ -813,9 +812,9 @@ bool SMESH_Block::ComputeParameters(const gp_Pnt& thePoint,
#ifdef DEBUG_PARAM_COMPUTE
myNbIterations += nbLoops*4; // how many times ShellPoint called
mySumDist += sqrt( sqDistance );
cout << " ------ SOLUTION: ( "<<solution.X()<<" "<<solution.Y()<<" "<<solution.Z()<<" )"<<endl
<< " ------ DIST : " << sqrt( sqDistance ) << "\t Tol=" << myTolerance << "\t Nb LOOPS=" << nbLoops << endl
<< " ------ NB IT: " << myNbIterations << ", SUM DIST: " << mySumDist << endl;
MESSAGE ( " ------ SOLUTION: ( "<<solution.X()<<" "<<solution.Y()<<" "<<solution.Z()<<" )"<< std::endl
<< " ------ DIST : " << sqrt( sqDistance ) << "\t Tol=" << myTolerance << "\t Nb LOOPS=" << nbLoops << std::endl
<< " ------ NB IT: " << myNbIterations << ", SUM DIST: " << mySumDist );
#endif
theParams = solution;
@ -1024,10 +1023,10 @@ int SMESH_Block::GetOrderedEdges (const TopoDS_Face& theFace,
if ( iE++ > theNbVertexInWires.back() ) {
#ifdef _DEBUG_
gp_Pnt p = BRep_Tool::Pnt( theFirstVertex );
cout << " : Warning : vertex "<< theFirstVertex.TShape().operator->()
<< " ( " << p.X() << " " << p.Y() << " " << p.Z() << " )"
<< " not found in outer wire of face "<< theFace.TShape().operator->()
<< " with vertices: " << endl;
MESSAGE ( " : Warning : vertex "<< theFirstVertex.TShape().operator->()
<< " ( " << p.X() << " " << p.Y() << " " << p.Z() << " )"
<< " not found in outer wire of face "<< theFace.TShape().operator->()
<< " with vertices: " );
wExp.Init( *wlIt, theFace );
for ( int i = 0; wExp.More(); wExp.Next(), i++ )
{
@ -1035,8 +1034,8 @@ int SMESH_Block::GetOrderedEdges (const TopoDS_Face& theFace,
edge = TopoDS::Edge( edge.Oriented( wExp.Orientation() ));
TopoDS_Vertex v = TopExp::FirstVertex( edge, true );
gp_Pnt p = BRep_Tool::Pnt( v );
cout << i << " " << v.TShape().operator->() << " "
<< p.X() << " " << p.Y() << " " << p.Z() << " " << endl;
MESSAGE_ADD ( i << " " << v.TShape().operator->() << " "
<< p.X() << " " << p.Y() << " " << p.Z() << " " << std::endl );
}
#endif
break; // break infinite loop

View File

@ -7633,10 +7633,9 @@ SMESH_MeshEditor::FindMatchingNodes(set<const SMDS_MeshElement*>& theSide1,
return SEW_TOPO_DIFF_SETS_OF_ELEMENTS;
}
#ifdef DEBUG_MATCHING_NODES
cout << " Link 1: " << link[0].first->GetID() <<" "<< link[0].second->GetID()
<< " F 1: " << face[0];
cout << "| Link 2: " << link[1].first->GetID() <<" "<< link[1].second->GetID()
<< " F 2: " << face[1] << " | Bind: "<<endl ;
MESSAGE ( " Link 1: " << link[0].first->GetID() <<" "<< link[0].second->GetID()
<< " F 1: " << face[0] << "| Link 2: " << link[1].first->GetID() <<" "
<< link[1].second->GetID() << " F 2: " << face[1] << " | Bind: " ) ;
#endif
int nbN = nbNodes[0];
{
@ -7644,7 +7643,7 @@ SMESH_MeshEditor::FindMatchingNodes(set<const SMDS_MeshElement*>& theSide1,
list<const SMDS_MeshNode*>::iterator n2 = notLinkNodes[1].begin();
for ( int i = 0 ; i < nbN - 2; ++i ) {
#ifdef DEBUG_MATCHING_NODES
cout << (*n1)->GetID() << " to " << (*n2)->GetID() << endl;
MESSAGE ( (*n1)->GetID() << " to " << (*n2)->GetID() );
#endif
nReplaceMap.insert( make_pair( *(n1++), *(n2++) ));
}
@ -7666,8 +7665,8 @@ SMESH_MeshEditor::FindMatchingNodes(set<const SMDS_MeshElement*>& theSide1,
else // new in set == encountered for the first time: add
{
#ifdef DEBUG_MATCHING_NODES
cout << "Add link 1: " << n1->GetID() << " " << n2->GetID() << " ";
cout << " | link 2: " << nReplaceMap[n1]->GetID() << " " << nReplaceMap[n2]->GetID() << " " << endl;
MESSAGE ( "Add link 1: " << n1->GetID() << " " << n2->GetID() << " "
<< " | link 2: " << nReplaceMap[n1]->GetID() << " " << nReplaceMap[n2]->GetID() << " " );
#endif
linkList[0].push_back ( NLink( n1, n2 ));
linkList[1].push_back ( NLink( nReplaceMap[n1], nReplaceMap[n2] ));

View File

@ -337,8 +337,8 @@ gp_XY SMESH_MesherHelper::GetNodeUV(const TopoDS_Face& F,
ok = ( V == vert.Current() );
if ( !ok ) {
#ifdef _DEBUG_
cout << "SMESH_MesherHelper::GetNodeUV(); Vertex " << vertexID
<< " not in face " << GetMeshDS()->ShapeToIndex( F ) << endl;
MESSAGE ( "SMESH_MesherHelper::GetNodeUV(); Vertex " << vertexID
<< " not in face " << GetMeshDS()->ShapeToIndex( F ) );
#endif
// get UV of a vertex closest to the node
double dist = 1e100;

View File

@ -2114,8 +2114,8 @@ double SMESH_Pattern::setFirstEdge (list< TopoDS_Edge > & theWire, int theFirstE
bndBox.Get( minPar[0], minPar[1], maxPar[0], maxPar[1] );
eBndBox.Get( eMinPar[0], eMinPar[1], eMaxPar[0], eMaxPar[1] );
#ifdef DBG_SETFIRSTEDGE
cout << "EDGES: X: " << eMinPar[0] << " - " << eMaxPar[0] << " Y: "
<< eMinPar[1] << " - " << eMaxPar[1] << endl;
MESSAGE ( "EDGES: X: " << eMinPar[0] << " - " << eMaxPar[0] << " Y: "
<< eMinPar[1] << " - " << eMaxPar[1] );
#endif
for ( int iC = 1, i = 0; i < 2; iC++, i++ ) // loop on 2 coordinates
{
@ -2141,7 +2141,7 @@ double SMESH_Pattern::setFirstEdge (list< TopoDS_Edge > & theWire, int theFirstE
for ( iE = 0 ; iE < nbEdges; iE++ )
{
#ifdef DBG_SETFIRSTEDGE
cout << " VARIANT " << iE << endl;
MESSAGE ( " VARIANT " << iE );
#endif
// evaluate the distance between UV computed by the 2 methods:
// by isos intersection ( myXYZ ) and by edge p-curves ( myUV )
@ -2155,13 +2155,13 @@ double SMESH_Pattern::setFirstEdge (list< TopoDS_Edge > & theWire, int theFirstE
TPoint* p = (*pIt);
dist += ( p->myUV - gp_XY( p->myXYZ.X(), p->myXYZ.Y() )).SquareModulus();
#ifdef DBG_SETFIRSTEDGE
cout << " ISO : ( " << p->myXYZ.X() << ", "<< p->myXYZ.Y() << " ) PCURVE : ( " <<
p->myUV.X() << ", " << p->myUV.Y() << ") " << endl;
MESSAGE ( " ISO : ( " << p->myXYZ.X() << ", "<< p->myXYZ.Y() << " ) PCURVE : ( " <<
p->myUV.X() << ", " << p->myUV.Y() << ") " );
#endif
}
}
#ifdef DBG_SETFIRSTEDGE
cout << "dist -- " << dist << endl;
MESSAGE ( "dist -- " << dist );
#endif
if ( dist < minDist ) {
minDist = dist;
@ -4655,7 +4655,7 @@ void SMESH_Pattern::DumpPoints() const
#ifdef _DEBUG_
vector< TPoint >::const_iterator pVecIt = myPoints.begin();
for ( int i = 0; pVecIt != myPoints.end(); pVecIt++, i++ )
cout << i << ": " << *pVecIt;
MESSAGE_ADD ( std::endl << i << ": " << *pVecIt );
#endif
}

View File

@ -1361,7 +1361,7 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
_computeError = algo->GetComputeError();
}
catch ( std::bad_alloc& exc ) {
printf("std::bad_alloc thrown inside algo->Compute()\n");
MESSAGE("std::bad_alloc thrown inside algo->Compute()");
if ( _computeError ) {
_computeError->myName = COMPERR_MEMORY_PB;
//_computeError->myComment = exc.what();
@ -1370,7 +1370,7 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
throw exc;
}
catch ( Standard_OutOfMemory& exc ) {
printf("Standard_OutOfMemory thrown inside algo->Compute()\n");
MESSAGE("Standard_OutOfMemory thrown inside algo->Compute()");
if ( _computeError ) {
_computeError->myName = COMPERR_MEMORY_PB;
//_computeError->myComment = exc.what();
@ -1622,15 +1622,15 @@ bool SMESH_subMesh::CheckComputeError(SMESH_Algo* theAlgo, const TopoDS_Shape& t
text << " \"" << _computeError->myComment << "\"";
#ifdef _DEBUG_
cout << text << endl;
MESSAGE_BEGIN ( text );
// Show vertices location of a failed shape
TopTools_IndexedMapOfShape vMap;
TopExp::MapShapes( _subShape, TopAbs_VERTEX, vMap );
cout << "Subshape vertices " << ( vMap.Extent()>10 ? "(first 10):" : ":") << endl;
MESSAGE_ADD ( "Subshape vertices " << ( vMap.Extent()>10 ? "(first 10):" : ":") );
for ( int iv = 1; iv <= vMap.Extent() && iv < 11; ++iv ) {
gp_Pnt P( BRep_Tool::Pnt( TopoDS::Vertex( vMap( iv ) )));
cout << "#" << _father->GetMeshDS()->ShapeToIndex( vMap( iv )) << " ";
cout << P.X() << " " << P.Y() << " " << P.Z() << " " << endl;
MESSAGE_ADD ( "#" << _father->GetMeshDS()->ShapeToIndex( vMap( iv )) << " "
<< P.X() << " " << P.Y() << " " << P.Z() << " " );
}
#else
INFOS( text );

View File

@ -623,9 +623,11 @@ SMESH_Client::SMESH_Client(CORBA::ORB_ptr theORB,
// just set client mesh pointer to server mesh pointer
//SMESH_Mesh* aMesh = reinterpret_cast<SMESH_Mesh*>(theMesh->GetMeshPtr());
CORBA::LongLong pointeur = theMesh->GetMeshPtr();
cerr <<"SMESH_Client::SMESH_Client pointeur " << pointeur << endl;
if( MYDEBUG )
MESSAGE("SMESH_Client::SMESH_Client pointeur "<<pointeur);
SMESH_Mesh* aMesh = reinterpret_cast<SMESH_Mesh*> (pointeur);
cerr <<"SMESH_Client::SMESH_Client aMesh " << aMesh << endl;
if ( MYDEBUG )
MESSAGE("SMESH_Client::SMESH_Client aMesh "<<aMesh);
if(aMesh->GetMeshDS()->IsEmbeddedMode()){
mySMESHDSMesh = aMesh->GetMeshDS();
mySMDSMesh = mySMESHDSMesh;

View File

@ -877,7 +877,7 @@ void SMESHGUI_ComputeOp::startOperation()
}
catch (...) {
#ifdef _DEBUG_
cout << "Exception thrown during mesh visualization" << endl;
MESSAGE ( "Exception thrown during mesh visualization" );
#endif
if ( SMDS_Mesh::CheckMemory(true) ) { // has memory to show warning?
SMESH::OnVisuException();

View File

@ -230,8 +230,8 @@ namespace SMESH {
QObject::tr("SMESH_BUT_OK"));
} catch (...) {
// no more memory at all: last resort
cout<< "SMESHGUI_VTKUtils::OnVisuException(), exception even at showing a message!!!" <<endl;
cout<< "Try to remove all visual data..." <<endl;
MESSAGE_BEGIN ( "SMESHGUI_VTKUtils::OnVisuException(), exception even at showing a message!!!" <<
std::endl << "Try to remove all visual data..." );
if (theVISU_MemoryReserve) {
delete theVISU_MemoryReserve;
theVISU_MemoryReserve = 0;
@ -240,7 +240,7 @@ namespace SMESH {
SUIT_MessageBox::warn1 (SMESHGUI::desktop(), QObject::tr("SMESH_WRN_WARNING"),
QObject::tr("SMESH_VISU_PROBLEM_CLEAR"),
QObject::tr("SMESH_BUT_OK"));
cout<< "...done" << endl;
MESSAGE_END ( "...done" );
}
}
//================================================================================
@ -327,7 +327,7 @@ namespace SMESH {
}
catch (...) {
#ifdef _DEBUG_
cout << "Exception in SMESHGUI_VTKUtils::GetVisualObj()" << endl;
MESSAGE ( "Exception in SMESHGUI_VTKUtils::GetVisualObj()" );
#endif
RemoveVisualObjectWithActors( theEntry ); // remove this object
OnVisuException();
@ -344,8 +344,8 @@ namespace SMESH {
int usedMB = aVisualObj->GetUnstructuredGrid()->GetActualMemorySize() / 1024;
if ( freeMB > 0 && usedMB * 30 > freeMB ) {
#ifdef _DEBUG_
cout << "SMESHGUI_VTKUtils::GetVisualObj(), freeMB=" << freeMB
<< ", usedMB=" << usedMB<< endl;
MESSAGE ( "SMESHGUI_VTKUtils::GetVisualObj(), freeMB=" << freeMB
<< ", usedMB=" << usedMB );
#endif
int continu = 0;
if ( usedMB * 10 > freeMB )
@ -453,7 +453,7 @@ namespace SMESH {
}
catch (...) {
#ifdef _DEBUG_
cout << "Exception in SMESHGUI_VTKUtils::RepaintCurrentView()" << endl;
MESSAGE ( "Exception in SMESHGUI_VTKUtils::RepaintCurrentView()" );
#endif
OnVisuException();
}
@ -471,7 +471,7 @@ namespace SMESH {
}
catch (...) {
#ifdef _DEBUG_
cout << "Exception in SMESHGUI_VTKUtils::RepaintViewWindow(SVTK_ViewWindow)" << endl;
MESSAGE ( "Exception in SMESHGUI_VTKUtils::RepaintViewWindow(SVTK_ViewWindow)" );
#endif
OnVisuException();
}
@ -488,7 +488,7 @@ namespace SMESH {
}
catch (...) {
#ifdef _DEBUG_
cout << "Exception in SMESHGUI_VTKUtils::RenderViewWindow(SVTK_ViewWindow)" << endl;
MESSAGE ( "Exception in SMESHGUI_VTKUtils::RenderViewWindow(SVTK_ViewWindow)" );
#endif
OnVisuException();
}
@ -505,7 +505,7 @@ namespace SMESH {
}
catch (...) {
#ifdef _DEBUG_
cout << "Exception in SMESHGUI_VTKUtils::FitAll()" << endl;
MESSAGE ( "Exception in SMESHGUI_VTKUtils::FitAll()" );
#endif
OnVisuException();
}
@ -611,7 +611,7 @@ namespace SMESH {
}
catch (...) {
#ifdef _DEBUG_
cout << "Exception in SMESHGUI_VTKUtils::DisplayActor()" << endl;
MESSAGE ( "Exception in SMESHGUI_VTKUtils::DisplayActor()" );
#endif
OnVisuException();
}

View File

@ -136,7 +136,7 @@ SMESH_2smeshpy::ConvertScript(const TCollection_AsciiString& theScript,
// finish conversion
theGen->Flush();
#ifdef DUMP_CONVERSION
cout << endl << " ######## RESULT ######## " << endl<< endl;
MESSAGE_BEGIN ( std::endl << " ######## RESULT ######## " << std::endl<< std::endl );
#endif
// reorder commands after conversion
list< Handle(_pyCommand) >::iterator cmd;
@ -153,7 +153,7 @@ SMESH_2smeshpy::ConvertScript(const TCollection_AsciiString& theScript,
for ( cmd = theGen->GetCommands().begin(); cmd != theGen->GetCommands().end(); ++cmd )
{
#ifdef DUMP_CONVERSION
cout << "## COM " << (*cmd)->GetOrderNb() << ": "<< (*cmd)->GetString() << endl;
MESSAGE_ADD ( "## COM " << (*cmd)->GetOrderNb() << ": "<< (*cmd)->GetString() << std::endl );
#endif
if ( !(*cmd)->IsEmpty() ) {
aScript += "\n";
@ -208,7 +208,7 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand
Handle(_pyCommand) aCommand = myCommands.back();
#ifdef DUMP_CONVERSION
cout << "## COM " << myNbCommands << ": "<< aCommand->GetString() << endl;
MESSAGE ( "## COM " << myNbCommands << ": "<< aCommand->GetString() );
#endif
_pyID objID = aCommand->GetObject();

View File

@ -672,12 +672,11 @@ void SMESH_MeshEditor_i::SetNodeOnFace(CORBA::Long NodeID, CORBA::Long FaceID,
if ( isOut ) {
#ifdef _DEBUG_
cout << "FACE " << FaceID << " (" << u << "," << v << ") out of "
<< " u( " << surf.FirstUParameter()
<< "," << surf.LastUParameter()
<< ") v( " << surf.FirstVParameter()
<< "," << surf.LastVParameter()
<< ")" << endl;
MESSAGE ( "FACE " << FaceID << " (" << u << "," << v << ") out of "
<< " u( " << surf.FirstUParameter()
<< "," << surf.LastUParameter()
<< ") v( " << surf.FirstVParameter()
<< "," << surf.LastVParameter() << ")" );
#endif
THROW_SALOME_CORBA_EXCEPTION("Invalid UV", SALOME::BAD_PARAM);
}

View File

@ -2045,7 +2045,8 @@ SMESH::ElementType SMESH_Mesh_i::GetSubMeshElementType(const CORBA::Long ShapeID
CORBA::LongLong SMESH_Mesh_i::GetMeshPtr()
{
CORBA::LongLong pointeur = CORBA::LongLong(_impl);
cerr << "CORBA::LongLong SMESH_Mesh_i::GetMeshPtr() " << pointeur << endl;
if ( MYDEBUG )
MESSAGE("CORBA::LongLong SMESH_Mesh_i::GetMeshPtr() "<<pointeur);
return pointeur;
}

View File

@ -217,9 +217,9 @@ const vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool isXConst,
#ifdef _DEBUG_
if ( normPar > 1 || normPar < 0) {
dump("DEBUG");
cout << "WRONG normPar: "<<normPar<< " prevNormPar="<<prevNormPar
<< " u="<<u << " myFirst[i]="<<myFirst[i]<< " myLast[i]="<<myLast[i]
<< " paramSize="<<paramSize<<endl;
MESSAGE ( "WRONG normPar: "<<normPar<< " prevNormPar="<<prevNormPar
<< " u="<<u << " myFirst[i]="<<myFirst[i]<< " myLast[i]="<<myLast[i]
<< " paramSize="<<paramSize );
}
#endif
u2node.insert( make_pair( normPar, node ));
@ -251,10 +251,10 @@ const vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool isXConst,
#ifdef _DEBUG_
if ( EdgeIndex >= myEdge.size() ) {
dump("DEBUG");
cout << "WRONg EdgeIndex " << 1+EdgeIndex
<< " myNormPar.size()="<<myNormPar.size()
<< " myNormPar["<< EdgeIndex<<"]="<< myNormPar[ EdgeIndex ]
<< " uvPt.normParam="<<uvPt.normParam <<endl;
MESSAGE ( "WRONg EdgeIndex " << 1+EdgeIndex
<< " myNormPar.size()="<<myNormPar.size()
<< " myNormPar["<< EdgeIndex<<"]="<< myNormPar[ EdgeIndex ]
<< " uvPt.normParam="<<uvPt.normParam );
}
#endif
paramSize = myNormPar[ EdgeIndex ] - prevNormPar;
@ -382,26 +382,32 @@ void StdMeshers_FaceSide::Reverse()
void StdMeshers_FaceSide::dump(const char* msg) const
{
#ifdef _DEBUG_
cout << endl;
if (msg) cout << msg <<endl;
cout<<"NB EDGES: "<< myEdge.size() <<endl;
cout << "nbPoints: "<<myNbPonits<<" vecSize: " << myPoints.size()<<" "<<myFalsePoints.size() <<endl;
if (msg) MESSAGE ( std::endl << msg );
MESSAGE_BEGIN ("NB EDGES: "<< myEdge.size() );
MESSAGE_ADD ( "nbPoints: "<<myNbPonits<<" vecSize: " << myPoints.size()<<" "<<myFalsePoints.size() );
for ( int i=0; i<myEdge.size(); ++i)
{
cout << "\t"<<i+1<<endl;
cout << "\tEDGE: ";
if (myEdge[i].IsNull())
cout<<"NULL"<<endl;
MESSAGE_ADD ( "\t"<<i+1 );
MESSAGE_ADD ( "\tEDGE: " );
if (myEdge[i].IsNull()) {
MESSAGE_ADD ( "NULL" );
}
else {
TopAbs::Print(myEdge[i].Orientation(),cout)<<" "<<myEdge[i].TShape().operator->()<<endl;
cout << "\tV1: " << TopExp::FirstVertex( myEdge[i], 1).TShape().operator->()
<< " V2: " << TopExp::LastVertex( myEdge[i], 1).TShape().operator->() << endl;
MESSAGE_ADD ( "\tV1: " << TopExp::FirstVertex( myEdge[i], 1).TShape().operator->()
<< " V2: " << TopExp::LastVertex( myEdge[i], 1).TShape().operator->() );
}
cout << "\tC2d: ";
if (myC2d[i].IsNull()) cout<<"NULL"<<endl;
else cout << myC2d[i].operator->()<<endl;
cout << "\tF: "<<myFirst[i]<< " L: "<< myLast[i]<<endl;
cout << "\tnormPar: "<<myNormPar[i]<<endl;
MESSAGE_ADD ( "\tC2d: ");
if (myC2d[i].IsNull()) {
MESSAGE_ADD ( "NULL" );
}
else {
MESSAGE_ADD ( myC2d[i].operator->() );
}
MESSAGE_ADD ( "\tF: "<<myFirst[i]<< " L: "<< myLast[i] );
MESSAGE_END ( "\tnormPar: "<<myNormPar[i]<<endl );
}
#endif
}

View File

@ -610,14 +610,14 @@ FaceQuadStruct* StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh & aMes
}
if (nbSides != 4) {
#ifdef _DEBUG_
cout << endl << "StdMeshers_Quadrangle_2D. Edge IDs of " << nbSides << " sides:";
MESSAGE ( "StdMeshers_Quadrangle_2D. Edge IDs of " << nbSides << " sides:\n" );
for ( int i = 0; i < nbSides; ++i ) {
cout << " ( ";
MESSAGE ( " ( " );
for ( int e = 0; e < quad->side[i]->NbEdges(); ++e )
cout << myTool->GetMeshDS()->ShapeToIndex( quad->side[i]->Edge( e )) << " ";
cout << ")";
MESSAGE ( myTool->GetMeshDS()->ShapeToIndex( quad->side[i]->Edge( e )) << " " );
MESSAGE ( ")\n" );
}
cout << endl;
//cout << endl;
#endif
if ( !nbSides )
nbSides = nbEdgesInWire.front();