From: eap Date: Wed, 20 Feb 2013 16:09:46 +0000 (+0000) Subject: 0022130: EDF 2579 SMESH: Issue with Viscous Layer X-Git-Tag: V6_main_FINAL~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=830d56f45bb01dc9e03bf49b7deafb0c46eafe9e;p=plugins%2Fnetgenplugin.git 0022130: EDF 2579 SMESH: Issue with Viscous Layer Improve DUMP_SEGMENTS to see actual segments --- diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx index 5ded920..e430ad8 100644 --- a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx @@ -1544,6 +1544,7 @@ NETGENPlugin_Mesher::AddSegmentsToMesh(netgen::Mesh& ngMesh, int edgeID = 1, posID = -2; bool isInternalWire = false; double vertexNormPar = 0; + const int prevNbNGSeg = ngMesh.GetNSeg(); for ( int i = 0; i < nbSegments; ++i ) // loop on segments { // Add the first point of a segment @@ -1626,26 +1627,12 @@ NETGENPlugin_Mesher::AddSegmentsToMesh(netgen::Mesh& ngMesh, RestrictLocalSize( ngMesh, 0.5*(np1+np2), avgH ); } -#ifdef DUMP_SEGMENTS - cout << "Segment: " << seg.edgenr << endl - << "\tp1: " << seg[0] << endl - << "\tp2: " << seg[1] << endl - << "\tp0 param: " << seg.epgeominfo[ 0 ].dist << endl - << "\tp0 uv: " << seg.epgeominfo[ 0 ].u <<", "<< seg.epgeominfo[ 0 ].v << endl - << "\tp0 edge: " << seg.epgeominfo[ 0 ].edgenr << endl - << "\tp1 param: " << seg.epgeominfo[ 1 ].dist << endl - << "\tp1 uv: " << seg.epgeominfo[ 1 ].u <<", "<< seg.epgeominfo[ 1 ].v << endl - << "\tp1 edge: " << seg.epgeominfo[ 1 ].edgenr << endl; -#endif if ( isInternalWire ) { swap (seg[0], seg[1]); swap( seg.epgeominfo[0], seg.epgeominfo[1] ); seg.edgenr = ngMesh.GetNSeg() + 1; // segment id ngMesh.AddSegment (seg); -#ifdef DUMP_SEGMENTS - cout << "Segment: " << seg.edgenr << endl << "\tis REVRESE of the previous one" << endl; -#endif } } // loop on segments on a wire @@ -1668,6 +1655,32 @@ NETGENPlugin_Mesher::AddSegmentsToMesh(netgen::Mesh& ngMesh, } } +#ifdef DUMP_SEGMENTS + cout << "BEGIN WIRE " << iW << endl; + for ( int i = prevNbNGSeg+1; i <= ngMesh.GetNSeg(); ++i ) + { + netgen::Segment& seg = ngMesh.LineSegment( i ); + if ( i > 1 ) { + netgen::Segment& prevSeg = ngMesh.LineSegment( i-1 ); + if ( seg[0] == prevSeg[1] && seg[1] == prevSeg[0] ) + { + cout << "Segment: " << seg.edgenr << endl << "\tis REVRESE of the previous one" << endl; + continue; + } + } + cout << "Segment: " << seg.edgenr << endl + << "\tp1: " << seg[0] << endl + << "\tp2: " << seg[1] << endl + << "\tp0 param: " << seg.epgeominfo[ 0 ].dist << endl + << "\tp0 uv: " << seg.epgeominfo[ 0 ].u <<", "<< seg.epgeominfo[ 0 ].v << endl + << "\tp0 edge: " << seg.epgeominfo[ 0 ].edgenr << endl + << "\tp1 param: " << seg.epgeominfo[ 1 ].dist << endl + << "\tp1 uv: " << seg.epgeominfo[ 1 ].u <<", "<< seg.epgeominfo[ 1 ].v << endl + << "\tp1 edge: " << seg.epgeominfo[ 1 ].edgenr << endl; + } + cout << "--END WIRE " << iW << endl; +#endif + } // loop on WIREs of a FACE // add a segment instead of an internal vertex