+ thePoints.clear();
+
+ int aPointId = -1;
+ for ( int i = 0, aNb = myCurve->getNbSections(); i < aNb; i++ ) {
+ aPointId = findLocalPointIndex( i, theX, theY );
+ if ( aPointId < 0 )
+ continue;
+ SectionToPoint aPoint = std::make_pair( i, aPointId );
+ if ( !contains( thePoints, aPoint ) )
+ thePoints.push_back( aPoint );
+ }
+}
+
+void CurveCreator_Widget::convert( const SectionToPointList& thePoints,
+ QMap<int, QList<int> >& theConvPoints )
+{
+ theConvPoints.clear();
+
+ SectionToPointList::const_iterator anIt = thePoints.begin(), aLast = thePoints.end();
+ QList<int> aPoints;
+ int aSectionId, aPointId;
+ for ( ; anIt != aLast; anIt++ ) {
+ aSectionId = anIt->first;
+ aPointId = anIt->second;
+ aPoints.clear();
+ if ( theConvPoints.contains( aSectionId ) )
+ aPoints = theConvPoints[aSectionId];
+ if ( aPoints.contains( aPointId ) )
+ continue;
+ aPoints.append( aPointId );
+ theConvPoints[aSectionId] = aPoints;
+ }