-// Copyright (C) 2007-2022 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
vecRef = du ^ dv;
if ( ++nbLoops > 10 )
{
-#ifdef _DEBUG_
MESSAGE("SMESH_MesherHelper::GetAngle(): Captured in a singularity");
-#endif
return angle;
}
}
mutable vector< const QLink* > _sides;
mutable bool _sideIsAdded[4]; // added in chain of links
gp_Vec _normal;
-#ifdef _DEBUG_
mutable const SMDS_MeshElement* _face;
-#endif
QFace( const vector< const QLink*>& links, const SMDS_MeshElement* face=0 );
else
_normal.SetCoord(1e-33,0,0);
-#ifdef _DEBUG_
- _face = face;
-#else
- (void)face; // unused in release mode
-#endif
+ if (SALOME::VerbosityActivated())
+ _face = face;
}
//================================================================================
/*!
if ( !myMesh->HasShapeToMesh() ) return;
SetSubShape( myMesh->GetShapeToMesh() );
-#ifdef _DEBUG_
int nbSolids = 0;
TopTools_IndexedMapOfShape solids;
TopExp::MapShapes(myShape,TopAbs_SOLID,solids);
nbSolids = solids.Extent();
-#endif
+
TopTools_MapOfShape faces; // faces not in solid or in not meshed solid
for ( TopExp_Explorer f(myShape,TopAbs_FACE,TopAbs_SOLID); f.More(); f.Next() ) {
faces.Add( f.Current() ); // not in solid
faces.Add( f.Current() ); // in not meshed solid
}
else { // fix nodes in the solid and its faces
-#ifdef _DEBUG_
MSG("FIX SOLID " << nbSolids-- << " #" << GetMeshDS()->ShapeToIndex(s.Current()));
-#endif
+
SMESH_MesherHelper h(*myMesh);
h.SetSubShape( s.Current() );
h.ToFixNodeParameters(true);
}
}
// fix nodes on geom faces
-#ifdef _DEBUG_
- int nbfaces = nbSolids;
- nbfaces = faces.Extent(); /*avoid "unused varianbles": */ nbfaces++, nbfaces--;
-#endif
+
+ int nbfaces = faces.Extent();
+
for ( TopTools_MapIteratorOfMapOfShape fIt( faces ); fIt.More(); fIt.Next() ) {
MESSAGE("FIX FACE " << nbfaces-- << " #" << GetMeshDS()->ShapeToIndex(fIt.Key()));
MSG("FIX FACE " << nbfaces-- << " #" << GetMeshDS()->ShapeToIndex(fIt.Key()));
// hasRectFaces = hasRectFaces ||
// ( volTool.GetVolumeType() == SMDS_VolumeTool::QUAD_HEXA ||
// volTool.GetVolumeType() == SMDS_VolumeTool::QUAD_PENTA );
-#ifdef _DEBUG_
- if ( nbN == 6 )
- pFace->_face = GetMeshDS()->FindFace(faceNodes[0],faceNodes[2],faceNodes[4]);
- else
- pFace->_face = GetMeshDS()->FindFace(faceNodes[0],faceNodes[2],
- faceNodes[4],faceNodes[6] );
-#endif
+
+ if (SALOME::VerbosityActivated())
+ {
+ if ( nbN == 6 )
+ pFace->_face = GetMeshDS()->FindFace(faceNodes[0],faceNodes[2],faceNodes[4]);
+ else
+ pFace->_face = GetMeshDS()->FindFace(faceNodes[0],faceNodes[2],
+ faceNodes[4],faceNodes[6] );
+ }
}
// collect pyramid apexes for further correction
if ( vol->NbCornerNodes() == 5 )
move = gp_Vec( XYZ((*link1)->_mediumNode), newPnt.Transformed(loc) );
if ( SMDS_FacePositionPtr nPos = (*link1)->_mediumNode->GetPosition())
nPos->SetParameters( newUV.X(), newUV.Y() );
-#ifdef _DEBUG_
- if ( (XYZ((*link1)->node1()) - XYZ((*link1)->node2())).SquareModulus() <
- move.SquareMagnitude())
+
+ if (SALOME::VerbosityActivated())
{
- gp_XY uv0 = faceHlp.GetNodeUV( face, (*link0)->_mediumNode, 0, &checkUV );
- gp_XY uv2 = faceHlp.GetNodeUV( face, (*link2)->_mediumNode, 0, &checkUV );
- MSG( "TOO LONG MOVE \t" <<
- "uv0: "<<uv0.X()<<", "<<uv0.Y()<<" \t" <<
- "uv2: "<<uv2.X()<<", "<<uv2.Y()<<" \t" <<
- "uvOld: "<<oldUV.X()<<", "<<oldUV.Y()<<" \t" <<
- "newUV: "<<newUV.X()<<", "<<newUV.Y()<<" \t");
- uv0.SetX( uv2.X() ); // avoid warning: variable set but not used
+ if ( (XYZ((*link1)->node1()) - XYZ((*link1)->node2())).SquareModulus() <
+ move.SquareMagnitude())
+ {
+ gp_XY uv0 = faceHlp.GetNodeUV( face, (*link0)->_mediumNode, 0, &checkUV );
+ gp_XY uv2 = faceHlp.GetNodeUV( face, (*link2)->_mediumNode, 0, &checkUV );
+ MSG( "TOO LONG MOVE \t" <<
+ "uv0: "<<uv0.X()<<", "<<uv0.Y()<<" \t" <<
+ "uv2: "<<uv2.X()<<", "<<uv2.Y()<<" \t" <<
+ "uvOld: "<<oldUV.X()<<", "<<oldUV.Y()<<" \t" <<
+ "newUV: "<<newUV.X()<<", "<<newUV.Y()<<" \t");
+ uv0.SetX( uv2.X() ); // avoid warning: variable set but not used
+ }
}
-#endif
(*link1)->Move( move, /*sum=*/false, /*is2dFixed=*/true );
}
MSG( "Move " << (*link1)->_mediumNode->GetID() << " following "
{
const char* name = "/tmp/shape.brep";
BRepTools::Write( s, name );
+ MESSAGE(name);
}