+ if (( isShortPrev[0] && isShortPrev[1] ) || // option 2) -> remove a too close projection
+ ( isShortNext[0] && isShortNext[1] ))
+ {
+ u2NPClose = isShortPrev[0] ? u2NPPrev : u2NPNext;
+ NodePoint& npProj = get( u2NP->second, iNode ); // NP of VERTEX projection
+ NodePoint npCloseN = get( u2NPClose->second, iNode); // NP close to npProj
+ NodePoint npCloseV = get( u2NPClose->second, iVertex); // NP close to VERTEX
+ if ( !npCloseV._node )
+ {
+ npProj = npCloseN;
+ thePointsOnE.erase( isShortPrev[0] ? u2NPPrev : u2NPNext );
+ continue;
+ }
+ else
+ {
+ // can't remove the neighbor projection as it is also from VERTEX, -> option 1)
+ }
+ }
+ // else option 1) - wide enough -> "duplicate" existing node
+ {
+ u2NPClose = isShortPrev[ iNode ] ? u2NPPrev : u2NPNext;
+ NodePoint& npProj = get( u2NP->second, iNode ); // NP of VERTEX projection
+ NodePoint& npCloseN = get( u2NPClose->second, iNode ); // NP close to npProj
+ // npProj._edgeInd = npCloseN._edgeInd;
+ // npProj._u = npCloseN._u + 1e-3 * Abs( get( u2NPPrev->second, iNode )._u -
+ // get( u2NPNext->second, iNode )._u );
+ gp_Pnt p = npProj.Point( theCurves );
+ npProj._node = meshDS->AddNode( p.X(), p.Y(), p.Z() );
+ meshDS->SetNodeOnEdge( npProj._node, theSinuEdges[ npProj._edgeInd ], npProj._u );
+
+ theNodes2Merge[ npCloseN._node ].push_back( npProj._node );
+ }