- double par = ( u_n->first - f ) / range;
- vector<const SMDS_MeshNode*>& nCol = theParam2ColumnMap[ par ];
- nCol.resize( nbRows );
- nCol[0] = u_n->second;
+ map< double, const SMDS_MeshNode*> sortedBaseNodes;
+ SMESH_Algo::GetSortedNodesOnEdge( theMesh, *edge,/*noMedium=*/true, sortedBaseNodes);
+ if ( sortedBaseNodes.empty() ) continue;
+
+ double f, l;
+ BRep_Tool::Range( *edge, f, l );
+ if ( edge->Orientation() == TopAbs_REVERSED ) std::swap( f, l );
+ const double coeff = 1. / ( l - f ) / length[iE] / fullLen;
+ const double prevPar = theParam2ColumnMap.empty() ? 0 : theParam2ColumnMap.rbegin()->first;
+ map< double, const SMDS_MeshNode*>::iterator u_n = sortedBaseNodes.begin();
+ for ( ; u_n != sortedBaseNodes.end(); u_n++ )
+ {
+ double par = prevPar + coeff * ( u_n->first - f );
+ TParam2ColumnMap::iterator u2nn =
+ theParam2ColumnMap.insert( theParam2ColumnMap.end(), make_pair( par, TNodeColumn()));
+ u2nn->second.push_back( u_n->second );
+ }