1 // Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // File: CurveCreator_Curve.cxx
21 // Author: Sergey KHROMOV
23 #include "CurveCreator_Curve.hxx"
25 #include "CurveCreator.hxx"
26 #include "CurveCreator_PosPoint.hxx"
27 #include "CurveCreator_Section.hxx"
28 #include "CurveCreator_Displayer.h"
29 #include "CurveCreator_Utils.h"
31 #include <AIS_Shape.hxx>
32 #include <AIS_InteractiveObject.hxx>
33 #include <Geom_CartesianPoint.hxx>
36 #include <TopoDS_Edge.hxx>
37 #include <TopoDS_Face.hxx>
38 #include <TopoDS_Wire.hxx>
42 //=======================================================================
43 // function: Constructor
45 //=======================================================================
46 CurveCreator_Curve::CurveCreator_Curve( const CurveCreator::Dimension theDimension )
48 myDimension (theDimension),
59 //=======================================================================
60 // function: Destructor
62 //=======================================================================
63 CurveCreator_Curve::~CurveCreator_Curve()
65 // Delete all allocated data.
69 //=======================================================================
70 // function: getDimension
72 //=======================================================================
73 CurveCreator::Dimension CurveCreator_Curve::getDimension() const
78 //=======================================================================
79 // function: getUniqSectionName
80 // purpose: return unique section name
81 //=======================================================================
82 std::string CurveCreator_Curve::getUniqSectionName() const
84 for( int i = 0 ; i < 1000000 ; i++ ){
86 sprintf( aBuffer, "Section_%d", i+1 );
87 std::string aName(aBuffer);
89 for( j = 0 ; j < mySections.size() ; j++ ){
90 if( mySections[j]->myName == aName )
93 if( j == mySections.size() )
99 //=======================================================================
100 // function: setDisplayer
101 // purpose: set curve changes Displayer
102 //=======================================================================
103 void CurveCreator_Curve::setDisplayer( CurveCreator_Displayer* theDisplayer )
105 myDisplayer = theDisplayer;
108 //=======================================================================
109 // function: getDisplayer
110 // purpose: get curve changes Displayer
111 //=======================================================================
112 CurveCreator_Displayer* CurveCreator_Curve::getDisplayer()
117 //=======================================================================
118 // function: removeDisplayer
119 // purpose: remove the attached Displayer
120 //=======================================================================
121 void CurveCreator_Curve::removeDisplayer()
126 //=======================================================================
129 //=======================================================================
130 bool CurveCreator_Curve::addEmptyDiff()
132 bool isEnabled = false;
134 if (myUndoDepth != 0) {
135 // Forget all Redos after the current one.
138 myListDiffs.erase(myCurrenPos, myListDiffs.end());
141 if (myUndoDepth == -1 || myNbUndos < myUndoDepth) {
142 // Increase the number of undos.
145 // If there are too many differences, remove the first one.
146 myListDiffs.pop_front();
149 // Add new difference.
150 myListDiffs.push_back(CurveCreator_Diff());
151 myCurrenPos = myListDiffs.end();
158 void CurveCreator_Curve::startOperation()
163 void CurveCreator_Curve::finishOperation()
168 //=======================================================================
169 // function: toICoord
171 //=======================================================================
172 int CurveCreator_Curve::toICoord(const int theIPnt) const
174 return theIPnt * myDimension;
177 //=======================================================================
178 // function: setUndoDepth
180 //=======================================================================
181 void CurveCreator_Curve::setUndoDepth(const int theDepth)
184 // Reset all undo/redo data.
188 myCurrenPos = myListDiffs.end();
190 } else if (theDepth == -1) {
191 // There is nothing to do as the depth become unlimited.
193 } else if (theDepth > 0) {
194 // The new "real" depth is set.
195 if (theDepth < myNbRedos) {
196 // The new depth is less then number of redos. Remove the latest redos.
197 int aShift = (myNbRedos - theDepth);
198 ListDiff::iterator aFromPos = myListDiffs.end();
204 myListDiffs.erase(aFromPos, myListDiffs.end());
205 myNbRedos = theDepth;
208 if (theDepth < myNbUndos + myNbRedos) {
209 // The new depth is less then the total number of differences.
210 // Remove the first undos.
211 int aShift = (myNbUndos + myNbRedos - theDepth);
212 ListDiff::iterator aToPos = myListDiffs.begin();
218 myListDiffs.erase(myListDiffs.begin(), aToPos);
219 myNbUndos = theDepth - myNbRedos;
222 myUndoDepth = theDepth;
226 //=======================================================================
227 // function: getUndoDepth
229 //=======================================================================
230 int CurveCreator_Curve::getUndoDepth() const
235 void CurveCreator_Curve::getCoordinates( int theISection, int theIPoint, double& theX, double& theY, double& theZ ) const
237 CurveCreator::Coordinates aCoords = getPoint( theISection, theIPoint );
241 if( getDimension() == CurveCreator::Dim3d ){
246 void CurveCreator_Curve::redisplayCurve()
249 myDisplayer->eraseAll( false );
252 myDisplayer->display( getAISObject( true ), true );
256 //! For internal use only! Undo/Redo are not used here.
257 bool CurveCreator_Curve::moveSectionInternal(const int theISection,
258 const int theNewIndex)
261 if (theISection != theNewIndex) {
262 CurveCreator_Section *aSection = mySections.at(theISection);
265 CurveCreator::Sections::iterator anIter = mySections.begin() + theISection;
267 mySections.erase(anIter);
270 anIter = mySections.begin() + theNewIndex;
271 mySections.insert(anIter, aSection);
277 //=======================================================================
278 // function: moveSection
280 //=======================================================================
281 bool CurveCreator_Curve::moveSection(const int theISection,
282 const int theNewIndex)
285 // Set the difference.
287 if (addEmptyDiff()) {
288 myListDiffs.back().init(this, CurveCreator_Operation::MoveSection,
289 theISection, theNewIndex);
293 res = moveSectionInternal(theISection, theNewIndex);
298 /************ Implementation of INTERFACE methods ************/
300 /***********************************************/
301 /*** Undo/Redo methods ***/
302 /***********************************************/
304 //! Get number of available undo operations
305 int CurveCreator_Curve::getNbUndo() const
310 //! Undo previous operation
311 bool CurveCreator_Curve::undo()
318 myCurrenPos->applyUndo(this);
324 //! Get number of available redo operations
325 int CurveCreator_Curve::getNbRedo() const
330 //! Redo last previously "undone" operation
331 bool CurveCreator_Curve::redo()
335 myCurrenPos->applyRedo(this);
344 /***********************************************/
345 /*** Section methods ***/
346 /***********************************************/
347 //! For internal use only! Undo/Redo are not used here.
348 bool CurveCreator_Curve::clearInternal()
350 // erase curve from the viewer
352 myDisplayer->eraseAll( true );
355 // Delete all allocated data.
357 const int aNbSections = getNbSections();
359 for (; i < aNbSections; i++) {
360 delete mySections[i];
368 //=======================================================================
371 //=======================================================================
372 bool CurveCreator_Curve::clear()
376 // Set the difference.
377 if (addEmptyDiff()) {
378 myListDiffs.back().init(this, CurveCreator_Operation::Clear);
380 res = clearInternal();
385 //! For internal use only! Undo/Redo are not used here.
386 bool CurveCreator_Curve::joinInternal( const int theISectionTo,
387 const int theISectionFrom )
390 CurveCreator_Section *aSection1 = mySections.at(theISectionTo);
391 CurveCreator_Section *aSection2 = mySections.at(theISectionFrom);
393 aSection1->myPoints.insert(aSection1->myPoints.end(),
394 aSection2->myPoints.begin(),
395 aSection2->myPoints.end());
397 res = removeSectionInternal(theISectionFrom);
402 //! Join range of sections to one section (join all sections if -1 is passed in theISectionFrom argument)
403 bool CurveCreator_Curve::join( const int theISectionTo,
404 const int theISectionFrom )
408 if ( theISectionTo != theISectionFrom ) {
411 myListDiffs.back().init(this, CurveCreator_Operation::Join, theISectionTo, theISectionFrom);
413 res = joinInternal( theISectionTo, theISectionFrom );
420 //! Get number of sections
421 int CurveCreator_Curve::getNbSections() const
423 return mySections.size();
426 //! For internal use only! Undo/Redo are not used here.
427 int CurveCreator_Curve::addSectionInternal
428 (const std::string& theName, const CurveCreator::SectionType theType,
429 const bool theIsClosed, const CurveCreator::Coordinates &thePoints)
431 CurveCreator_Section *aSection = new CurveCreator_Section;
433 std::string aName = theName;
435 aName = getUniqSectionName();
437 aSection->myName = aName;
438 aSection->myType = theType;
439 aSection->myIsClosed = theIsClosed;
440 aSection->myPoints = thePoints;
441 mySections.push_back(aSection);
443 return mySections.size()-1;
446 //=======================================================================
447 // function: addSection
448 // purpose: adds an empty section
449 //=======================================================================
450 int CurveCreator_Curve::addSection
451 (const std::string& theName, const CurveCreator::SectionType theType,
452 const bool theIsClosed)
454 int resISection = -1;
455 // Set the difference.
457 CurveCreator::Coordinates aCoords; //empty list
458 if (addEmptyDiff()) {
459 myListDiffs.back().init(this, CurveCreator_Operation::AddSection,
460 theName, aCoords, theType, theIsClosed);
463 resISection = addSectionInternal(theName, theType, theIsClosed, aCoords);
468 //=======================================================================
469 // function: addSection
470 // purpose: adds a section with the given points
471 //=======================================================================
472 int CurveCreator_Curve::addSection
473 (const std::string& theName, const CurveCreator::SectionType theType,
474 const bool theIsClosed, const CurveCreator::Coordinates &thePoints)
476 int resISection = -1;
477 // Set the difference.
479 if (addEmptyDiff()) {
480 myListDiffs.back().init(this, CurveCreator_Operation::AddSection,
481 theName, thePoints, theType, theIsClosed);
484 resISection = addSectionInternal(theName, theType, theIsClosed, thePoints);
490 //! For internal use only! Undo/Redo are not used here.
491 bool CurveCreator_Curve::removeSectionInternal( const int theISection )
493 if (theISection == -1) {
494 delete mySections.back();
495 mySections.pop_back();
497 CurveCreator::Sections::iterator anIterRm = mySections.begin() + theISection;
500 mySections.erase(anIterRm);
506 //! Removes the given sections.
507 bool CurveCreator_Curve::removeSection( const int theISection )
510 // Set the difference.
513 myListDiffs.back().init(this, CurveCreator_Operation::RemoveSection, theISection);
515 res = removeSectionInternal( theISection );
522 * Get number of points in specified section or (the total number of points
523 * in Curve if theISection is equal to -1).
525 int CurveCreator_Curve::getNbPoints( const int theISection ) const
529 if (theISection == -1) {
531 const int aNbSections = getNbSections();
533 for (; i < aNbSections; i++) {
534 aNbCoords += mySections[i]->myPoints.size();
537 if ( ( theISection >= 0 ) && ( theISection < mySections.size() ) )
538 aNbCoords = mySections.at(theISection)->myPoints.size();
541 return aNbCoords/myDimension;
544 void CurveCreator_Curve::setSkipSorting( const bool theIsToSkip )
546 mySkipSorting = theIsToSkip;
549 bool CurveCreator_Curve::canPointsBeSorted()
555 * Saves points coordinates difference.
556 * \param theOldCoords the old points coordinates
558 void CurveCreator_Curve::saveCoordDiff( const SectionToPointCoordsList &theOldCoords )
560 // Set the difference.
562 if (addEmptyDiff()) {
563 myListDiffs.back().init(this, theOldCoords);
568 //! Get "closed" flag of the specified section
569 bool CurveCreator_Curve::isClosed( const int theISection ) const
571 return mySections.at(theISection)->myIsClosed;
574 //! For internal use only! Undo/Redo are not used here.
575 bool CurveCreator_Curve::setClosedInternal( const int theISection,
576 const bool theIsClosed )
578 if (theISection == -1) {
579 int aSize = mySections.size();
582 for (i = 0; i < aSize; i++) {
583 mySections[i]->myIsClosed = theIsClosed;
587 mySections.at(theISection)->myIsClosed = theIsClosed;
594 * Set "closed" flag of the specified section (all sections if
595 * \a theISection is -1).
597 bool CurveCreator_Curve::setClosed( const int theISection,
598 const bool theIsClosed )
601 // Set the difference.
603 if (addEmptyDiff()) {
604 myListDiffs.back().init(this, CurveCreator_Operation::SetClosed,
605 theIsClosed, theISection);
607 res = setClosedInternal( theISection, theIsClosed );
612 //! Returns specified section name
613 std::string CurveCreator_Curve::getSectionName( const int theISection ) const
615 if( ( theISection >= 0 ) && ( theISection < mySections.size() ))
616 return mySections.at(theISection)->myName;
620 //! For internal use only! Undo/Redo are not used here.
621 bool CurveCreator_Curve::setSectionNameInternal( const int theISection,
622 const std::string& theName )
625 if( ( theISection >= 0 ) && ( theISection < mySections.size() )){
626 mySections.at(theISection)->myName = theName;
632 /** Set name of the specified section */
633 bool CurveCreator_Curve::setSectionName( const int theISection,
634 const std::string& theName )
637 // Set the difference.
639 if (addEmptyDiff()) {
640 myListDiffs.back().init(this, CurveCreator_Operation::RenameSection,
641 theName, theISection);
643 res = setSectionNameInternal( theISection, theName );
648 //! Get type of the specified section
649 CurveCreator::SectionType CurveCreator_Curve::getSectionType
650 ( const int theISection ) const
652 return mySections.at(theISection)->myType;
655 //! For internal use only! Undo/Redo are not used here.
656 bool CurveCreator_Curve::setSectionTypeInternal( const int theISection,
657 const CurveCreator::SectionType theType )
659 if (theISection == -1) {
661 const int aNbSections = getNbSections();
663 for (; i < aNbSections; i++) {
664 mySections[i]->myType = theType;
668 if( mySections.at(theISection)->myType != theType ){
669 mySections.at(theISection)->myType = theType;
677 * Set type of the specified section (or all sections
678 * if \a theISection is -1).
680 bool CurveCreator_Curve::setSectionType( const int theISection,
681 const CurveCreator::SectionType theType )
685 // Set the difference.
686 if (addEmptyDiff()) {
687 myListDiffs.back().init(this, CurveCreator_Operation::SetType,
688 theType, theISection);
691 res = setSectionTypeInternal( theISection, theType );
698 /***********************************************/
699 /*** Point methods ***/
700 /***********************************************/
702 //! For internal use only! Undo/Redo are not used here.
703 bool CurveCreator_Curve::addPointsInternal( const CurveCreator::SectionsMap &theSectionsMap )
706 CurveCreator::SectionsMap::const_iterator anIt = theSectionsMap.begin();
707 CurveCreator_Section *aSection = 0;
708 for ( ; anIt != theSectionsMap.end(); anIt++ ) {
709 int anISection = anIt->first;
710 aSection = mySections.at(anISection);
712 CurveCreator::PosPointsList aSectionPoints = anIt->second;
713 CurveCreator::PosPointsList::const_iterator aPntIt = aSectionPoints.begin();
714 for( ; aPntIt != aSectionPoints.end(); aPntIt++ ){
715 int anIPnt = (*aPntIt)->myID;
716 CurveCreator::Coordinates aCoords = (*aPntIt)->myCoords;
717 CurveCreator::Coordinates::iterator anIterPosition;
719 anIterPosition = aSection->myPoints.end();
721 anIterPosition = aSection->myPoints.begin() + toICoord(anIPnt);
722 CurveCreator::Coordinates::const_iterator aFirstPosition =
724 aSection->myPoints.insert(anIterPosition,
725 aCoords.begin(), aCoords.end());
736 * Add one point to the specified section starting from the given theIPnt index
737 * (or at the end of points if \a theIPnt is -1).
739 bool CurveCreator_Curve::addPoints( const CurveCreator::Coordinates& theCoords,
740 const int theISection,
744 CurveCreator::Coordinates aCoords = theCoords;
745 // Set the difference.
747 if (addEmptyDiff()) {
748 CurveCreator_ICurve::SectionToPointCoordsList aList;
749 aList.push_back(std::make_pair(std::make_pair(theISection, theIPnt), theCoords));
750 myListDiffs.back().init(this, CurveCreator_Operation::InsertPoints,
753 CurveCreator::SectionsMap aSectionsMap;
754 CurveCreator::PosPointsList aPoints;
755 CurveCreator_PosPoint* aPosPoint = new CurveCreator_PosPoint( theIPnt, theCoords );
756 aPoints.push_back( aPosPoint );
757 aSectionsMap[theISection] = aPoints;
759 res = addPointsInternal( aSectionsMap );
765 //! For internal use only! Undo/Redo are not used here.
766 bool CurveCreator_Curve::setPointInternal( const CurveCreator::SectionsMap &theSectionsMap )
770 CurveCreator::SectionsMap::const_iterator anIt = theSectionsMap.begin();
771 CurveCreator_Section *aSection = 0;
772 for ( ; anIt != theSectionsMap.end(); anIt++ ) {
773 int anISection = anIt->first;
774 aSection = mySections.at(anISection);
776 CurveCreator::PosPointsList aSectionPoints = anIt->second;
777 CurveCreator::PosPointsList::const_iterator aPntIt = aSectionPoints.begin();
778 for( ; aPntIt != aSectionPoints.end(); aPntIt++ ){
779 int anIPnt = (*aPntIt)->myID;
780 CurveCreator::Coordinates aCoords = (*aPntIt)->myCoords;
781 for ( int i = 0; i < myDimension; i++)
782 aSection->myPoints.at(toICoord(anIPnt) + i) = aCoords[i];
793 //! Set coordinates of specified point
794 bool CurveCreator_Curve::setPoint( const int theISection,
796 const CurveCreator::Coordinates& theNewCoords )
799 // Set the difference.
801 if (addEmptyDiff()) {
802 CurveCreator_ICurve::SectionToPointCoordsList aList;
803 aList.push_back(std::make_pair(std::make_pair(theISection, theIPnt), theNewCoords));
804 myListDiffs.back().init(this, CurveCreator_Operation::SetCoordinates,
807 CurveCreator::SectionsMap aSectionsMap;
808 CurveCreator::PosPointsList aPoints;
809 CurveCreator_PosPoint* aPosPoint = new CurveCreator_PosPoint( theIPnt, theNewCoords );
810 aPoints.push_back( aPosPoint );
811 aSectionsMap[theISection] = aPoints;
813 int aSize1 = getNbPoints( theISection );
814 res = setPointInternal( aSectionsMap );
815 int aSize2 = getNbPoints( theISection );
822 //! Set coordinates of specified points from different sections
823 bool CurveCreator_Curve::setSeveralPoints( const SectionToPointCoordsList &theSectionToPntCoords,
824 const bool theIsToSaveDiff )
827 // Set the difference.
829 if (theIsToSaveDiff && addEmptyDiff()) {
830 myListDiffs.back().init(this, CurveCreator_Operation::SetCoordinates,
831 theSectionToPntCoords);
833 CurveCreator::SectionsMap aSectionsMap;
834 CurveCreator::PosPointsList aPosPoints;
835 CurveCreator_ICurve::SectionToPointCoordsList::const_iterator anIt =
836 theSectionToPntCoords.begin(), aLast = theSectionToPntCoords.end();
837 int aSectionId, aPointId;
838 for ( ; anIt != aLast; anIt++ ) {
840 aSectionId = anIt->first.first;
841 aPointId = anIt->first.second;
842 CurveCreator::Coordinates aNewCoords = anIt->second;
843 CurveCreator_PosPoint* aPosPoint =
844 new CurveCreator_PosPoint( aPointId, aNewCoords );
845 if( aSectionsMap.find(aSectionId) != aSectionsMap.end() )
846 aPosPoints = aSectionsMap[aSectionId];
847 aPosPoints.push_back( aPosPoint );
848 aSectionsMap[aSectionId] = aPosPoints;
851 res = setPointInternal( aSectionsMap );
857 //! For internal use only! Undo/Redo are not used here.
858 bool CurveCreator_Curve::removePointsInternal( const SectionToPointList &thePoints )
861 std::map<int, std::list<int> > aConvPoints;
862 convert( thePoints, aConvPoints );
863 std::map<int, std::list<int> >::const_iterator anIt = aConvPoints.begin(),
864 aLast = aConvPoints.end();
865 for ( ; anIt != aLast; anIt++ ) {
866 int aSectionId = anIt->first;
867 aRes = removeSectionPoints(aSectionId, anIt->second);
875 //! Remove point with given id
876 bool CurveCreator_Curve::removePoint( const int theISection, const int theIPnt )
879 // Set the difference.
881 if (addEmptyDiff()) {
882 myListDiffs.back().init(this, CurveCreator_Operation::RemovePoints,
883 theISection, theIPnt);
885 SectionToPointList aListOfSectionsToPoints;
886 aListOfSectionsToPoints.push_back(std::make_pair(theISection, theIPnt));
887 res = removePointsInternal( aListOfSectionsToPoints );
892 //! Remove several points from different sections with given ids
893 bool CurveCreator_Curve::removeSeveralPoints( const SectionToPointList &theSectionToPntIDs)
896 // Set the difference.
898 if (addEmptyDiff()) {
899 myListDiffs.back().init(this, CurveCreator_Operation::RemovePoints,
902 res = removePointsInternal( theSectionToPntIDs );
907 //=======================================================================
908 // function: getCoordinates
910 //=======================================================================
911 CurveCreator::Coordinates CurveCreator_Curve::getPoint( const int theISection,
912 const int theIPnt) const
914 CurveCreator_Section *aSection = mySections.at(theISection);
915 CurveCreator::Coordinates::const_iterator
916 anIter = aSection->myPoints.begin() + toICoord(theIPnt);
917 CurveCreator::Coordinates aResult(anIter, anIter + myDimension);
922 //=======================================================================
923 // function: getPoints
925 //=======================================================================
926 CurveCreator::Coordinates CurveCreator_Curve::getPoints( const int theISection ) const
928 CurveCreator::Coordinates aCoords;
929 if ( ( theISection >= 0 ) && ( theISection < mySections.size() ) )
931 aCoords = mySections.at(theISection)->myPoints;
936 void CurveCreator_Curve::constructAISObject()
939 CurveCreator_Utils::constructShape( this, aShape );
941 myAISShape = new AIS_Shape( aShape );
944 Handle(AIS_InteractiveObject) CurveCreator_Curve::getAISObject( const bool theNeedToBuild ) const
946 if ( !myAISShape && theNeedToBuild ) {
947 CurveCreator_Curve* aCurve = (CurveCreator_Curve*)this;
948 aCurve->constructAISObject();
953 bool CurveCreator_Curve::removeSectionPoints( const int theSectionId,
954 const std::list<int>& thePointIds )
958 CurveCreator_Section *aSection = mySections.at( theSectionId );
962 std::list<int> aSectionPoints = thePointIds;
963 aSectionPoints.sort();
964 std::list<int>::const_reverse_iterator aPntIt = aSectionPoints.rbegin();
965 for ( ; aPntIt != aSectionPoints.rend(); aPntIt++ ) {
966 int aPntIndx = *aPntIt;
967 CurveCreator::Coordinates::iterator aFirstPosition;
968 if ( aPntIndx == -1 )
969 aFirstPosition = aSection->myPoints.end() - getDimension();
971 aFirstPosition = aSection->myPoints.begin() + toICoord( aPntIndx );
972 aSection->myPoints.erase( aFirstPosition, aFirstPosition + getDimension() );
978 void CurveCreator_Curve::convert( const SectionToPointList& thePoints,
979 std::map< int, std::list<int> >& theConvPoints )
981 theConvPoints.clear();
983 SectionToPointList::const_iterator anIt = thePoints.begin(), aLast = thePoints.end();
984 std::list<int> aPoints;
985 int aSectionId, aPointId;
986 for ( ; anIt != aLast; anIt++ ) {
987 aSectionId = anIt->first;
988 aPointId = anIt->second;
990 if ( theConvPoints.find( aSectionId ) != theConvPoints.end() )
991 aPoints = theConvPoints[aSectionId];
992 aPoints.push_back( aPointId );
993 theConvPoints[aSectionId] = aPoints;