+//! For internal use only! Undo/Redo are not used here.
+bool CurveCreator_Curve::addPointsInternal( const CurveCreator::Coordinates& theCoords,
+ const std::vector<int> &theISections,
+ const std::vector<int> &theIPnts )
+{
+ bool res = false;
+ if( (theCoords.size()/getDimension()) == theISections.size() == theIPnts.size() ) {
+ for( int ind = 0; ind < theISections.size(); ind++ ) {
+ int anISection = theISections.at(ind);
+ CurveCreator_Section *aSection =
+ (anISection == -1 ? mySections.back() : mySections.at(anISection));
+
+ if( aSection ) {
+ int anIPnt = theIPnts.at(ind);
+ CurveCreator::Coordinates::iterator anIterPosition;
+ if(anIPnt == -1)
+ anIterPosition = aSection->myPoints.end();
+ else
+ anIterPosition = aSection->myPoints.begin() + toICoord(anIPnt);
+ CurveCreator::Coordinates::const_iterator aFirstPosition =
+ theCoords.begin() + toICoord(ind);
+ aSection->myPoints.insert(anIterPosition,
+ aFirstPosition,
+ aFirstPosition + getDimension());
+ res = true;
+ }
+ }
+ if(res)
+ redisplayCurve();
+ }
+ return res;
+}
+