+ const SMESH_MAT2d::Branch& branch = *theMA.getBranch(0);
+
+ // fill a map holding NodePoint's of ends of theSinuEdges
+ map< double, pair< NodePoint, NodePoint > > extremaNP;
+ map< double, pair< NodePoint, NodePoint > >::iterator u2NP0, u2NP1;
+ if ( !branch.getBoundaryPoints( 0., bp[0], bp[1] ) ||
+ !theMA.getBoundary().moveToClosestEdgeEnd( bp[0] ) ||
+ !theMA.getBoundary().moveToClosestEdgeEnd( bp[1] )) return false;
+ u2NP0 = extremaNP.insert
+ ( make_pair( 0., make_pair( NodePoint( bp[0]), NodePoint( bp[1])))).first;
+ if ( !branch.getBoundaryPoints( 1., bp[0], bp[1] ) ||
+ !theMA.getBoundary().moveToClosestEdgeEnd( bp[0] ) ||
+ !theMA.getBoundary().moveToClosestEdgeEnd( bp[1] )) return false;
+ u2NP1 = extremaNP.insert
+ ( make_pair( 1., make_pair( NodePoint( bp[0]), NodePoint( bp[1])))).first;
+
+ // project theDivPoints