for ( size_t i = 0; i < theNodeFiles.size(); ++i )
{
#ifdef _DEBUG_
- std::cout << "Fichier" << theNodeFiles[i] << std::endl;
+ std::cout << "Input node file:" << theNodeFiles[i] << std::endl;
#endif
if ( !FT_Utils::fileExists( theNodeFiles[i] ))
throw std::invalid_argument( "Input node file does not exist: " + theNodeFiles[i] );
if ( !xao.importXAO( theXaoFileName ) || !xao.getGeometry() )
throw std::invalid_argument( "Failed to read the XAO input file: " + theXaoFileName );
+#ifdef _DEBUG_
+ std::cout << "Conversion en BREP" << std::endl;
+#endif
XAO::BrepGeometry* xaoGeom = dynamic_cast<XAO::BrepGeometry*>( xao.getGeometry() );
if ( !xaoGeom || xaoGeom->getTopoDS_Shape().IsNull() )
throw std::invalid_argument( "Failed to get a BREP shape from the XAO input file" );
#endif
FT_NodeGroups nodeGroups;
nodeGroups.read( theNodeFiles, &xao, nodeCoords );
-
+#ifdef _DEBUG_
+ std::cout << "Nombre de groupes : " << nodeGroups.nbOfGroups() << std::endl;
+#endif
// project nodes to the boundary shapes and change their coordinates
#ifdef _DEBUG_
- std::cout << "Projection des noeuds" << std::endl;
+ std::cout << "Projection des noeuds, theIsParallel=" << theIsParallel << std::endl;
#endif
OSD_Parallel::For( 0, nodeGroups.nbOfGroups(), nodeGroups, !theIsParallel );
// save the modified mesh
+#ifdef _DEBUG_
+ std::cout << "Ecriture du maillage" << std::endl;
+#endif
const int erase = 2;
mfMesh->write( theOutputMedFile, /*mode=*/erase );
{
TopTools_IndexedMapOfShape subShapes;
TopExp::MapShapes( theMainShape, theSubType, subShapes );
+#ifdef _DEBUG_
+ std::cout << ". Nombre de subShapes : " << subShapes.Size() << std::endl;
+#endif
theProjectors.resize( subShapes.Size() );
for ( int i = 1; i <= subShapes.Size(); ++i )
size_t iP, iProjector;
gp_Pnt newXyz;
+#ifdef _DEBUG_
+ std::cout << ".. _projectors.size() = " << _projectors.size() << std::endl;
+ std::cout << ".. _nodesOrder.size() = " << _nodesOrder.size() << std::endl;
+#endif
if ( _projectors.size() > 1 )
{
// the nodes are to be projected onto several boundary shapes;
gp_Pnt xyz = getPoint( nn._nodeToMove );
gp_Pnt xyz1 = getPoint( nn._neighborNodes[0] );
gp_Pnt xyz2 = getPoint( nn._neighborNodes[1] );
+
+// maxDist2 : le quart du carré de la distance entre les deux voisins du noued à bouger
double maxDist2 = xyz1.SquareDistance( xyz2 ) / 4.;
if ( _projectors[ 0 ].project( xyz, maxDist2, newXyz,
nn._params, nn._nearParams ))