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
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
}
}
+#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