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 <Geom_CartesianPoint.hxx>
35 #include <TopoDS_Edge.hxx>
36 #include <TopoDS_Face.hxx>
37 #include <TopoDS_Wire.hxx>
41 //#define AIS_CURVE_DISPLAY
43 //=======================================================================
44 // function: Constructor
46 //=======================================================================
47 CurveCreator_Curve::CurveCreator_Curve( const CurveCreator::Dimension theDimension )
49 myDimension (theDimension),
56 #ifdef AIS_CURVE_DISPLAY
57 myAISCurve = new CurveCreator_AISCurve( this );
61 //=======================================================================
62 // function: Destructor
64 //=======================================================================
65 CurveCreator_Curve::~CurveCreator_Curve()
67 // Delete all allocated data.
71 //=======================================================================
72 // function: getDimension
74 //=======================================================================
75 CurveCreator::Dimension CurveCreator_Curve::getDimension() const
80 //=======================================================================
81 // function: getUniqSectionName
82 // purpose: return unique section name
83 //=======================================================================
84 std::string CurveCreator_Curve::getUniqSectionName() const
86 for( int i = 0 ; i < 1000000 ; i++ ){
88 sprintf( aBuffer, "Section_%d", i+1 );
89 std::string aName(aBuffer);
91 for( j = 0 ; j < mySections.size() ; j++ ){
92 if( mySections[j]->myName == aName )
95 if( j == mySections.size() )
101 //=======================================================================
102 // function: setDisplayer
103 // purpose: set curve changes Displayer
104 //=======================================================================
105 void CurveCreator_Curve::setDisplayer( CurveCreator_Displayer* theDisplayer )
107 myDisplayer = theDisplayer;
109 #ifdef AIS_CURVE_DISPLAY
110 myDisplayer->displayAIS( myAISCurve, false );
114 //=======================================================================
115 // function: getDisplayer
116 // purpose: get curve changes Displayer
117 //=======================================================================
118 CurveCreator_Displayer* CurveCreator_Curve::getDisplayer()
123 //=======================================================================
124 // function: removeDisplayer
125 // purpose: remove the attached Displayer
126 //=======================================================================
127 void CurveCreator_Curve::removeDisplayer()
132 //=======================================================================
135 //=======================================================================
136 bool CurveCreator_Curve::addEmptyDiff()
138 bool isEnabled = false;
140 if (myUndoDepth != 0) {
141 // Forget all Redos after the current one.
144 myListDiffs.erase(myCurrenPos, myListDiffs.end());
147 if (myUndoDepth == -1 || myNbUndos < myUndoDepth) {
148 // Increase the number of undos.
151 // If there are too many differences, remove the first one.
152 myListDiffs.pop_front();
155 // Add new difference.
156 myListDiffs.push_back(CurveCreator_Diff());
157 myCurrenPos = myListDiffs.end();
164 void CurveCreator_Curve::startOperation()
169 void CurveCreator_Curve::finishOperation()
174 //=======================================================================
175 // function: toICoord
177 //=======================================================================
178 int CurveCreator_Curve::toICoord(const int theIPnt) const
180 return theIPnt * myDimension;
183 //=======================================================================
184 // function: setUndoDepth
186 //=======================================================================
187 void CurveCreator_Curve::setUndoDepth(const int theDepth)
190 // Reset all undo/redo data.
194 myCurrenPos = myListDiffs.end();
196 } else if (theDepth == -1) {
197 // There is nothing to do as the depth become unlimited.
199 } else if (theDepth > 0) {
200 // The new "real" depth is set.
201 if (theDepth < myNbRedos) {
202 // The new depth is less then number of redos. Remove the latest redos.
203 int aShift = (myNbRedos - theDepth);
204 ListDiff::iterator aFromPos = myListDiffs.end();
210 myListDiffs.erase(aFromPos, myListDiffs.end());
211 myNbRedos = theDepth;
214 if (theDepth < myNbUndos + myNbRedos) {
215 // The new depth is less then the total number of differences.
216 // Remove the first undos.
217 int aShift = (myNbUndos + myNbRedos - theDepth);
218 ListDiff::iterator aToPos = myListDiffs.begin();
224 myListDiffs.erase(myListDiffs.begin(), aToPos);
225 myNbUndos = theDepth - myNbRedos;
228 myUndoDepth = theDepth;
232 //=======================================================================
233 // function: getUndoDepth
235 //=======================================================================
236 int CurveCreator_Curve::getUndoDepth() const
241 void CurveCreator_Curve::getCoordinates( int theISection, int theIPoint, double& theX, double& theY, double& theZ ) const
243 CurveCreator::Coordinates aCoords = getPoint( theISection, theIPoint );
247 if( getDimension() == CurveCreator::Dim3d ){
252 //#define USE_COMPOUND
253 void CurveCreator_Curve::redisplayCurve()
256 #ifdef AIS_CURVE_DISPLAY
257 myDisplayer->redisplayAIS(myAISCurve, false);
259 myDisplayer->erase( false );
260 //#ifndef USE_COMPOUND
261 myDisplayer->display( constructWire(), true );
263 /*std::vector<Handle_AIS_InteractiveObject> anAISObjects = constructWire();
264 int aSelMode = AIS_Shape::SelectionMode( (TopAbs_ShapeEnum)TopAbs_VERTEX );
265 Handle(AIS_InteractiveContext) aContext = myDisplayer->getAISContext();
266 for( int i = 0 ; i < anAISObjects.size() ; i++ ){
267 Handle_AIS_InteractiveObject anAISObject = anAISObjects[i];
268 //anAISObject->SetSelectionMode( aSelMode );
269 aContext->Display( anAISObject, Standard_False );
270 //aContext->Display( anAISObject, 0, aSelMode, Standard_False, Standard_True );
272 aContext->UpdateCurrentViewer();
279 //! For internal use only! Undo/Redo are not used here.
280 bool CurveCreator_Curve::moveSectionInternal(const int theISection,
281 const int theNewIndex)
284 if (theISection != theNewIndex) {
285 CurveCreator_Section *aSection = mySections.at(theISection);
288 CurveCreator::Sections::iterator anIter = mySections.begin() + theISection;
290 mySections.erase(anIter);
293 anIter = mySections.begin() + theNewIndex;
294 mySections.insert(anIter, aSection);
300 //=======================================================================
301 // function: moveSection
303 //=======================================================================
304 bool CurveCreator_Curve::moveSection(const int theISection,
305 const int theNewIndex)
308 // Set the difference.
310 if (addEmptyDiff()) {
311 myListDiffs.back().init(this, CurveCreator_Operation::MoveSection,
312 theISection, theNewIndex);
316 res = moveSectionInternal(theISection, theNewIndex);
321 void CurveCreator_Curve::convert( const SectionToPointList& thePoints,
322 std::map< int, std::list<int> >& theConvPoints )
324 theConvPoints.clear();
326 SectionToPointList::const_iterator anIt = thePoints.begin(), aLast = thePoints.end();
327 std::list<int> aPoints;
328 int aSectionId, aPointId;
329 for ( ; anIt != aLast; anIt++ ) {
330 aSectionId = anIt->first;
331 aPointId = anIt->second;
333 if ( theConvPoints.find( aSectionId ) != theConvPoints.end() )
334 aPoints = theConvPoints[aSectionId];
335 aPoints.push_back( aPointId );
336 theConvPoints[aSectionId] = aPoints;
340 /************ Implementation of INTERFACE methods ************/
342 /***********************************************/
343 /*** Undo/Redo methods ***/
344 /***********************************************/
346 //! Get number of available undo operations
347 int CurveCreator_Curve::getNbUndo() const
352 //! Undo previous operation
353 bool CurveCreator_Curve::undo()
360 myCurrenPos->applyUndo(this);
366 //! Get number of available redo operations
367 int CurveCreator_Curve::getNbRedo() const
372 //! Redo last previously "undone" operation
373 bool CurveCreator_Curve::redo()
377 myCurrenPos->applyRedo(this);
386 /***********************************************/
387 /*** Section methods ***/
388 /***********************************************/
389 //! For internal use only! Undo/Redo are not used here.
390 bool CurveCreator_Curve::clearInternal()
392 // erase curve from the viewer
394 myDisplayer->erase( true );
395 // Delete all allocated data.
397 const int aNbSections = getNbSections();
399 for (; i < aNbSections; i++) {
400 delete mySections[i];
408 //=======================================================================
411 //=======================================================================
412 bool CurveCreator_Curve::clear()
416 // Set the difference.
417 if (addEmptyDiff()) {
418 myListDiffs.back().init(this, CurveCreator_Operation::Clear);
420 res = clearInternal();
425 //! For internal use only! Undo/Redo are not used here.
426 bool CurveCreator_Curve::joinInternal( const int theISectionTo,
427 const int theISectionFrom )
430 CurveCreator_Section *aSection1 = mySections.at(theISectionTo);
431 CurveCreator_Section *aSection2 = mySections.at(theISectionFrom);
433 aSection1->myPoints.insert(aSection1->myPoints.end(),
434 aSection2->myPoints.begin(),
435 aSection2->myPoints.end());
437 res = removeSection(theISectionFrom);
442 //! Join range of sections to one section (join all sections if -1 is passed in theISectionFrom argument)
443 bool CurveCreator_Curve::join( const int theISectionTo,
444 const int theISectionFrom )
448 if ( theISectionTo != theISectionFrom ) {
451 myListDiffs.back().init(this, CurveCreator_Operation::Join, theISectionTo, theISectionFrom);
453 res = joinInternal( theISectionTo, theISectionFrom );
460 //! Get number of sections
461 int CurveCreator_Curve::getNbSections() const
463 return mySections.size();
466 //! For internal use only! Undo/Redo are not used here.
467 int CurveCreator_Curve::addSectionInternal
468 (const std::string& theName, const CurveCreator::SectionType theType,
469 const bool theIsClosed, const CurveCreator::Coordinates &thePoints)
471 CurveCreator_Section *aSection = new CurveCreator_Section;
473 std::string aName = theName;
475 aName = getUniqSectionName();
477 aSection->myName = aName;
478 aSection->myType = theType;
479 aSection->myIsClosed = theIsClosed;
480 aSection->myPoints = thePoints;
481 mySections.push_back(aSection);
483 return mySections.size()-1;
486 //=======================================================================
487 // function: addSection
488 // purpose: adds an empty section
489 //=======================================================================
490 int CurveCreator_Curve::addSection
491 (const std::string& theName, const CurveCreator::SectionType theType,
492 const bool theIsClosed)
494 int resISection = -1;
495 // Set the difference.
497 CurveCreator::Coordinates aCoords; //empty list
498 if (addEmptyDiff()) {
499 myListDiffs.back().init(this, CurveCreator_Operation::AddSection,
500 theName, aCoords, theType, theIsClosed);
503 resISection = addSectionInternal(theName, theType, theIsClosed, aCoords);
508 //=======================================================================
509 // function: addSection
510 // purpose: adds a section with the given points
511 //=======================================================================
512 int CurveCreator_Curve::addSection
513 (const std::string& theName, const CurveCreator::SectionType theType,
514 const bool theIsClosed, const CurveCreator::Coordinates &thePoints)
516 int resISection = -1;
517 // Set the difference.
519 if (addEmptyDiff()) {
520 myListDiffs.back().init(this, CurveCreator_Operation::AddSection,
521 theName, thePoints, theType, theIsClosed);
524 resISection = addSectionInternal(theName, theType, theIsClosed, thePoints);
530 //! For internal use only! Undo/Redo are not used here.
531 bool CurveCreator_Curve::removeSectionInternal( const int theISection )
533 if (theISection == -1) {
534 delete mySections.back();
535 mySections.pop_back();
537 CurveCreator::Sections::iterator anIterRm = mySections.begin() + theISection;
540 mySections.erase(anIterRm);
546 //! Removes the given sections.
547 bool CurveCreator_Curve::removeSection( const int theISection )
550 // Set the difference.
553 myListDiffs.back().init(this, CurveCreator_Operation::RemoveSection, theISection);
555 res = removeSectionInternal( theISection );
562 * Get number of points in specified section or (the total number of points
563 * in Curve if theISection is equal to -1).
565 int CurveCreator_Curve::getNbPoints( const int theISection ) const
569 if (theISection == -1) {
571 const int aNbSections = getNbSections();
573 for (; i < aNbSections; i++) {
574 aNbCoords += mySections[i]->myPoints.size();
577 if ( ( theISection >= 0 ) && ( theISection < mySections.size() ) )
578 aNbCoords = mySections.at(theISection)->myPoints.size();
581 return aNbCoords/myDimension;
584 //! Get "closed" flag of the specified section
585 bool CurveCreator_Curve::isClosed( const int theISection ) const
587 return mySections.at(theISection)->myIsClosed;
590 //! For internal use only! Undo/Redo are not used here.
591 bool CurveCreator_Curve::setClosedInternal( const int theISection,
592 const bool theIsClosed )
594 if (theISection == -1) {
595 int aSize = mySections.size();
598 for (i = 0; i < aSize; i++) {
599 mySections[i]->myIsClosed = theIsClosed;
603 mySections.at(theISection)->myIsClosed = theIsClosed;
610 * Set "closed" flag of the specified section (all sections if
611 * \a theISection is -1).
613 bool CurveCreator_Curve::setClosed( const int theISection,
614 const bool theIsClosed )
617 // Set the difference.
619 if (addEmptyDiff()) {
620 myListDiffs.back().init(this, CurveCreator_Operation::SetClosed,
621 theIsClosed, theISection);
623 res = setClosedInternal( theISection, theIsClosed );
628 //! Returns specified section name
629 std::string CurveCreator_Curve::getSectionName( const int theISection ) const
631 if( ( theISection >= 0 ) && ( theISection < mySections.size() ))
632 return mySections.at(theISection)->myName;
636 //! For internal use only! Undo/Redo are not used here.
637 bool CurveCreator_Curve::setSectionNameInternal( const int theISection,
638 const std::string& theName )
641 if( ( theISection >= 0 ) && ( theISection < mySections.size() )){
642 mySections.at(theISection)->myName = theName;
648 /** Set name of the specified section */
649 bool CurveCreator_Curve::setSectionName( const int theISection,
650 const std::string& theName )
653 // Set the difference.
655 if (addEmptyDiff()) {
656 myListDiffs.back().init(this, CurveCreator_Operation::RenameSection,
657 theName, theISection);
659 res = setSectionNameInternal( theISection, theName );
664 //! Get type of the specified section
665 CurveCreator::SectionType CurveCreator_Curve::getSectionType
666 ( const int theISection ) const
668 return mySections.at(theISection)->myType;
671 //! For internal use only! Undo/Redo are not used here.
672 bool CurveCreator_Curve::setSectionTypeInternal( const int theISection,
673 const CurveCreator::SectionType theType )
675 if (theISection == -1) {
677 const int aNbSections = getNbSections();
679 for (; i < aNbSections; i++) {
680 mySections[i]->myType = theType;
684 if( mySections.at(theISection)->myType != theType ){
685 mySections.at(theISection)->myType = theType;
693 * Set type of the specified section (or all sections
694 * if \a theISection is -1).
696 bool CurveCreator_Curve::setSectionType( const int theISection,
697 const CurveCreator::SectionType theType )
701 // Set the difference.
702 if (addEmptyDiff()) {
703 myListDiffs.back().init(this, CurveCreator_Operation::SetType,
704 theType, theISection);
707 res = setSectionTypeInternal( theISection, theType );
714 /***********************************************/
715 /*** Point methods ***/
716 /***********************************************/
718 //! For internal use only! Undo/Redo are not used here.
719 bool CurveCreator_Curve::addPointsInternal( const CurveCreator::SectionsMap &theSectionsMap )
722 CurveCreator::SectionsMap::const_iterator anIt = theSectionsMap.begin();
723 CurveCreator_Section *aSection = 0;
724 for ( ; anIt != theSectionsMap.end(); anIt++ ) {
725 int anISection = anIt->first;
726 aSection = mySections.at(anISection);
728 CurveCreator::PosPointsList aSectionPoints = anIt->second;
729 CurveCreator::PosPointsList::const_iterator aPntIt = aSectionPoints.begin();
730 for( ; aPntIt != aSectionPoints.end(); aPntIt++ ){
731 int anIPnt = (*aPntIt)->myID;
732 CurveCreator::Coordinates aCoords = (*aPntIt)->myCoords;
733 CurveCreator::Coordinates::iterator anIterPosition;
735 anIterPosition = aSection->myPoints.end();
737 anIterPosition = aSection->myPoints.begin() + toICoord(anIPnt);
738 CurveCreator::Coordinates::const_iterator aFirstPosition =
740 aSection->myPoints.insert(anIterPosition,
741 aCoords.begin(), aCoords.end());
752 * Add one point to the specified section starting from the given theIPnt index
753 * (or at the end of points if \a theIPnt is -1).
755 bool CurveCreator_Curve::addPoints( const CurveCreator::Coordinates& theCoords,
756 const int theISection,
760 CurveCreator::Coordinates aCoords = theCoords;
761 // Set the difference.
763 if (addEmptyDiff()) {
764 CurveCreator_ICurve::SectionToPointCoordsList aList;
765 aList.push_back(std::make_pair(std::make_pair(theISection, theIPnt), theCoords));
766 myListDiffs.back().init(this, CurveCreator_Operation::InsertPoints,
769 CurveCreator::SectionsMap aSectionsMap;
770 CurveCreator::PosPointsList aPoints;
771 CurveCreator_PosPoint* aPosPoint = new CurveCreator_PosPoint( theIPnt, theCoords );
772 aPoints.push_back( aPosPoint );
773 aSectionsMap[theISection] = aPoints;
775 res = addPointsInternal( aSectionsMap );
781 //! For internal use only! Undo/Redo are not used here.
782 bool CurveCreator_Curve::setPointInternal( const CurveCreator::SectionsMap &theSectionsMap )
786 CurveCreator::SectionsMap::const_iterator anIt = theSectionsMap.begin();
787 CurveCreator_Section *aSection = 0;
788 for ( ; anIt != theSectionsMap.end(); anIt++ ) {
789 int anISection = anIt->first;
790 aSection = mySections.at(anISection);
792 CurveCreator::PosPointsList aSectionPoints = anIt->second;
793 CurveCreator::PosPointsList::const_iterator aPntIt = aSectionPoints.begin();
794 for( ; aPntIt != aSectionPoints.end(); aPntIt++ ){
795 int anIPnt = (*aPntIt)->myID;
796 CurveCreator::Coordinates aCoords = (*aPntIt)->myCoords;
797 for ( int i = 0; i < myDimension; i++)
798 aSection->myPoints.at(toICoord(anIPnt) + i) = aCoords[i];
809 //! Set coordinates of specified point
810 bool CurveCreator_Curve::setPoint( const int theISection,
812 const CurveCreator::Coordinates& theNewCoords )
815 // Set the difference.
817 if (addEmptyDiff()) {
818 CurveCreator_ICurve::SectionToPointCoordsList aList;
819 aList.push_back(std::make_pair(std::make_pair(theISection, theIPnt), theNewCoords));
820 myListDiffs.back().init(this, CurveCreator_Operation::SetCoordinates,
823 CurveCreator::SectionsMap aSectionsMap;
824 CurveCreator::PosPointsList aPoints;
825 CurveCreator_PosPoint* aPosPoint = new CurveCreator_PosPoint( theIPnt, theNewCoords );
826 aPoints.push_back( aPosPoint );
827 aSectionsMap[theISection] = aPoints;
829 int aSize1 = getNbPoints( theISection );
830 res = setPointInternal( aSectionsMap );
831 int aSize2 = getNbPoints( theISection );
838 //! Set coordinates of specified points from different sections
839 bool CurveCreator_Curve::setSeveralPoints( const SectionToPointCoordsList &theSectionToPntCoords)
842 // Set the difference.
844 if (addEmptyDiff()) {
845 myListDiffs.back().init(this, CurveCreator_Operation::SetCoordinates,
846 theSectionToPntCoords);
848 CurveCreator::SectionsMap aSectionsMap;
849 CurveCreator::PosPointsList aPosPoints;
850 CurveCreator_ICurve::SectionToPointCoordsList::const_iterator anIt =
851 theSectionToPntCoords.begin(), aLast = theSectionToPntCoords.end();
852 int aSectionId, aPointId;
853 for ( ; anIt != aLast; anIt++ ) {
855 aSectionId = anIt->first.first;
856 aPointId = anIt->first.second;
857 CurveCreator::Coordinates aNewCoords = anIt->second;
858 CurveCreator_PosPoint* aPosPoint =
859 new CurveCreator_PosPoint( aPointId, aNewCoords );
860 if( aSectionsMap.find(aSectionId) != aSectionsMap.end() )
861 aPosPoints = aSectionsMap[aSectionId];
862 aPosPoints.push_back( aPosPoint );
863 aSectionsMap[aSectionId] = aPosPoints;
866 res = setPointInternal( aSectionsMap );
872 //! For internal use only! Undo/Redo are not used here.
873 bool CurveCreator_Curve::removePointsInternal( const SectionToPointList &thePoints )
876 std::map<int, std::list<int> > aConvPoints;
877 convert( thePoints, aConvPoints );
878 std::map<int, std::list<int> >::const_iterator anIt = aConvPoints.begin(),
879 aLast = aConvPoints.end();
880 CurveCreator_Section *aSection = 0;
881 for ( ; anIt != aLast; anIt++ ) {
882 int aSectionId = anIt->first;
883 aSection = mySections.at(aSectionId);
885 std::list<int> aSectionPoints = anIt->second;
886 aSectionPoints.sort();
887 std::list<int>::const_reverse_iterator aPntIt = aSectionPoints.rbegin();
888 for( ; aPntIt != aSectionPoints.rend(); aPntIt++ ){
889 int aPntIndx = *aPntIt;
890 CurveCreator::Coordinates::iterator aFirstPosition;
892 aFirstPosition = aSection->myPoints.end() - getDimension();
894 aFirstPosition = aSection->myPoints.begin() + toICoord(aPntIndx);
895 aSection->myPoints.erase( aFirstPosition, aFirstPosition + getDimension() );
905 //! Remove point with given id
906 bool CurveCreator_Curve::removePoint( const int theISection, const int theIPnt )
909 // Set the difference.
911 if (addEmptyDiff()) {
912 myListDiffs.back().init(this, CurveCreator_Operation::RemovePoints,
913 theISection, theIPnt);
915 SectionToPointList aListOfSectionsToPoints;
916 aListOfSectionsToPoints.push_back(std::make_pair(theISection, theIPnt));
917 res = removePointsInternal( aListOfSectionsToPoints );
922 //! Remove several points from different sections with given ids
923 bool CurveCreator_Curve::removeSeveralPoints( const SectionToPointList &theSectionToPntIDs)
926 // Set the difference.
928 if (addEmptyDiff()) {
929 myListDiffs.back().init(this, CurveCreator_Operation::RemovePoints,
932 res = removePointsInternal( theSectionToPntIDs );
937 //=======================================================================
938 // function: getCoordinates
940 //=======================================================================
941 CurveCreator::Coordinates CurveCreator_Curve::getPoint( const int theISection,
942 const int theIPnt) const
944 CurveCreator_Section *aSection = mySections.at(theISection);
945 CurveCreator::Coordinates::const_iterator
946 anIter = aSection->myPoints.begin() + toICoord(theIPnt);
947 CurveCreator::Coordinates aResult(anIter, anIter + myDimension);
952 //=======================================================================
953 // function: getPoints
955 //=======================================================================
956 CurveCreator::Coordinates CurveCreator_Curve::getPoints( const int theISection ) const
958 CurveCreator::Coordinates aCoords;
959 if ( ( theISection >= 0 ) && ( theISection < mySections.size() ) )
961 aCoords = mySections.at(theISection)->myPoints;
967 /***********************************************/
968 /*** Presentation methods ***/
969 /***********************************************/
970 std::vector<Handle_AIS_InteractiveObject> CurveCreator_Curve::constructWire() const
972 std::vector<Handle_AIS_InteractiveObject> aCurveRepresentation;
975 CurveCreator_Utils::constructShape( this, aShape );
977 AIS_Shape* anAISShape = new AIS_Shape( aShape );
978 aCurveRepresentation.push_back( anAISShape );
979 return aCurveRepresentation;