The CurveCreator_Curve object is represented as one or more sets of connected points; thus CurveCreator_Curve object can contain several not connected curves (polylines or b-splines), each such curve has two only ends "start and end points" in other words non-manifold curves are not supported.
#include <CurveCreator_Curve.hxx>

Public Member Functions | |
| CurveCreator_Curve (const CurveCreator::Dimension theDimension) | |
| Constructor of the curve. More... | |
| virtual | ~CurveCreator_Curve () |
| Destructor. More... | |
| virtual CurveCreator::Dimension | getDimension () const |
| Get the dimension. More... | |
| virtual std::string | getUniqSectionName () const |
| Return unique section name. More... | |
| virtual void | setDisplayer (CurveCreator_Displayer *theDisplayer) |
| Set curve creator Displayer object. More... | |
| CurveCreator_Displayer * | getDisplayer () |
| Return curve creator Displayer object. More... | |
| virtual void | removeDisplayer () |
| Remove curve creator Displayer object. More... | |
| virtual void | setUndoDepth (const int theDepth=-1) |
| Set depth of undo operations (unlimited if theDepth is -1 or disabled if theDepth is 0) More... | |
| virtual int | getUndoDepth () const |
| Get depth of undo operations. More... | |
| virtual void | startOperation () |
| virtual void | finishOperation () |
| virtual int | toICoord (const int theIPnt) const |
| This method converts the point index to the index in an array of coordinates. More... | |
| virtual bool | moveSectionInternal (const int theISection, const int theNewIndex) |
| For internal use only! Undo/Redo are not used here. More... | |
| virtual bool | moveSection (const int theISection, const int theNewIndex) |
| Move section to new position in list. More... | |
| void | getCoordinates (int theISection, int theIPoint, double &theX, double &theY, double &theZ) const |
| virtual int | getNbUndo () const |
| Get number of available undo operations. More... | |
| virtual bool | undo () |
| Undo previous operation. More... | |
| virtual int | getNbRedo () const |
| Get number of available redo operations. More... | |
| virtual bool | redo () |
| Redo last previously "undone" operation. More... | |
| virtual bool | clearInternal () |
| For internal use only! Undo/Redo are not used here. More... | |
| virtual bool | clear () |
| Clear the polyline (remove all sections) More... | |
| virtual bool | joinInternal (const std::list< int > &theSections) |
| For internal use only! Undo/Redo are not used here. More... | |
| virtual bool | join (const std::list< int > &theSections) |
| Join list of sections to one section (join all if the list is empty) More... | |
| virtual int | getNbSections () const |
| Get number of sections. More... | |
| virtual int | addSectionInternal (const std::string &theName, const CurveCreator::SectionType theType, const bool theIsClosed, const CurveCreator::Coordinates &thePoints) |
| For internal use only! Undo/Redo are not used here. More... | |
| virtual int | addSection (const std::string &theName, const CurveCreator::SectionType theType, const bool theIsClosed) |
| Add a new section. More... | |
| virtual int | addSection (const std::string &theName, const CurveCreator::SectionType theType, const bool theIsClosed, const CurveCreator::Coordinates &thePoints) |
| Add a new section. More... | |
| virtual bool | removeSectionInternal (const int theISection) |
| For internal use only! Undo/Redo are not used here. More... | |
| virtual bool | removeSection (const int theISection) |
| Removes the given sections. More... | |
| virtual bool | isClosed (const int theISection) const |
| Get "closed" flag of the specified section. More... | |
| virtual bool | setClosedInternal (const int theISection, const bool theIsClosed) |
| For internal use only! Undo/Redo are not used here. More... | |
| virtual bool | setClosed (const int theISection, const bool theIsClosed) |
| Set "closed" flag of the specified section (all sections if theISection is -1). More... | |
| virtual std::string | getSectionName (const int theISection) const |
| Returns specifyed section name. More... | |
| virtual bool | setSectionNameInternal (const int theISection, const std::string &theName) |
| For internal use only! Undo/Redo are not used here. More... | |
| virtual bool | setSectionName (const int theISection, const std::string &theName) |
| Set name of the specified section. More... | |
| virtual CurveCreator::SectionType | getSectionType (const int theISection) const |
| Get type of the specified section. More... | |
| virtual bool | setSectionTypeInternal (const int theISection, const CurveCreator::SectionType theType) |
| For internal use only! Undo/Redo are not used here. More... | |
| virtual bool | setSectionType (const int theISection, const CurveCreator::SectionType theType) |
| Set type of the specified section (or all sections if theISection is -1). More... | |
| const CurveCreator_ISection * | getSection (const int theSectionIndex) const |
| A virtual method. More... | |
| CurveCreator_ISection * | getSection (const int theSectionIndex) |
| A virtual method. More... | |
| virtual bool | addPointsInternal (const CurveCreator::SectionsMap &theSectionsMap) |
| For internal use only! Undo/Redo are not used here. More... | |
| virtual bool | addPoints (const CurveCreator::Coordinates &theCoords, const int theISection, const int theIPnt=-1) |
| Add one point to the specified section starting from the given theIPnt index (or at the end of points if theIPnt is -1). More... | |
| virtual bool | setPointInternal (const CurveCreator::SectionsMap &theSectionsMap) |
| For internal use only! Undo/Redo are not used here. More... | |
| virtual bool | setPoint (const int theISection, const int theIPnt, const CurveCreator::Coordinates &theNewCoords) |
| Set coordinates of specified point. More... | |
| virtual bool | setSeveralPoints (const SectionToPointCoordsList &theSectionToPntCoords, const bool theIsToSaveDiff=true) |
| Set coordinates of specified points from different sections. More... | |
| virtual bool | removePointsInternal (const SectionToPointList &thePoints) |
| For internal use only! Undo/Redo are not used here. More... | |
| virtual bool | removePoint (const int theISection, const int theIPnt=-1) |
| Remove point with given id. More... | |
| virtual bool | removeSeveralPoints (const SectionToPointList &theSectionToPntIDs) |
| Remove several points from different sections with given ids. More... | |
| virtual CurveCreator::Coordinates | getPoint (const int theISection, const int theIPnt) const |
| Get coordinates of specified point. More... | |
| virtual CurveCreator::Coordinates | getPoints (const int theISection=-1) const |
| Get points of a section (the total points in Curve if theISection is equal to -1). More... | |
| virtual int | getNbPoints (const int theISection) const |
| Get number of points in specified section or (the total number of points in Curve if theISection is equal to -1). More... | |
| virtual void | setSkipSorting (const bool theIsToSkip) |
| Set skip sorting flag. More... | |
| virtual bool | canPointsBeSorted () |
| Indicates whether the points can be sorted. More... | |
| virtual void | saveCoordDiff (const SectionToPointCoordsList &theOldCoords) |
| Saves points coordinates difference. More... | |
| virtual | Handle (AIS_InteractiveObject) getAISObject(const bool theNeedToBuild |
| Get the curve AIS object. More... | |
Public Member Functions inherited from CurveCreator_ICurve | |
| virtual | ~CurveCreator_ICurve () |
| The destructor. More... | |
Public Attributes | |
| bool | myIsLocked |
| CurveCreator::Sections | mySections |
| curve data More... | |
| CurveCreator::Dimension | myDimension |
| curve dimension More... | |
| CurveCreator_Displayer * | myDisplayer |
| curve displayer More... | |
Protected Types | |
| typedef std::list < CurveCreator_Diff > | ListDiff |
Protected Member Functions | |
| virtual bool | addEmptyDiff () |
| This method updates all undo/redo information required to be updated after curve modification operation. More... | |
| void | redisplayCurve () |
| bool | removeSectionPoints (const int theSectionId, const std::list< int > &thePointIds) |
| Removes the points from the section. More... | |
| void | convert (const SectionToPointList &thePoints, std::map< int, std::list< int > > &theConvPoints) |
| Converts the list of pairs of section to point into map of a section to list of points. More... | |
| virtual void | constructAISObject () |
Protected Attributes | |
| bool | mySkipSorting |
Private Attributes | |
| int | myNbUndos |
| int | myNbRedos |
| ListDiff::iterator | myCurrenPos |
| ListDiff | myListDiffs |
| int | myUndoDepth |
| int | myOpLevel |
| AIS_Shape * | myAISShape |
| AIS shape. More... | |
Additional Inherited Members | |
Public Types inherited from CurveCreator_ICurve | |
| typedef std::pair< int, int > | SectionToPoint |
| typedef std::deque < SectionToPoint > | SectionToPointList |
| typedef std::deque< std::pair < SectionToPoint, CurveCreator::Coordinates > > | SectionToPointCoordsList |
|
protected |
| CurveCreator_Curve::CurveCreator_Curve | ( | const CurveCreator::Dimension | theDimension | ) |
The dimension is explicitly specified in the constructor and cannot be changed later.
|
virtual |
References clear().
|
protectedvirtual |
It returns false if undo/redo is disabled and true otherwise.
References myCurrenPos, myListDiffs, myNbRedos, myNbUndos, and myUndoDepth.
|
virtual |
Implements CurveCreator_ICurve.
References addEmptyDiff(), addPointsInternal(), finishOperation(), CurveCreator_Operation::InsertPoints, myListDiffs, and startOperation().
|
virtual |
References getSection(), CurveCreator_Section::myPoints, redisplayCurve(), and toICoord().
|
virtual |
Implements CurveCreator_ICurve.
References CurveCreator_Operation::AddSection.
|
virtual |
References CurveCreator_Operation::AddSection.
|
virtual |
|
virtual |
Implements CurveCreator_ICurve.
|
virtual |
Implements CurveCreator_ICurve.
References addEmptyDiff(), clearInternal(), finishOperation(), myListDiffs, and startOperation().
|
virtual |
References CurveCreator_Displayer::eraseAll(), getNbSections(), getSection(), myAISShape, myDisplayer, mySections, and NULL.
|
protectedvirtual |
Implements CurveCreator_ICurve.
References CurveCreator_Utils::constructShape(), Handle(), and myAISShape.
|
protected |
| thePoints | an source list |
| theConvPoints | a converted map |
|
virtual |
References myOpLevel.
| void CurveCreator_Curve::getCoordinates | ( | int | theISection, |
| int | theIPoint, | ||
| double & | theX, | ||
| double & | theY, | ||
| double & | theZ | ||
| ) | const |
References CurveCreator::Dim3d, getDimension(), and getPoint().
|
virtual |
Implements CurveCreator_ICurve.
References myDimension.
| CurveCreator_Displayer * CurveCreator_Curve::getDisplayer | ( | ) |
References myDisplayer.
|
virtual |
Implements CurveCreator_ICurve.
References getNbSections(), getSection(), myDimension, and CurveCreator_Section::myPoints.
|
virtual |
Implements CurveCreator_ICurve.
References myNbRedos.
|
virtual |
Implements CurveCreator_ICurve.
References mySections.
|
virtual |
Implements CurveCreator_ICurve.
References myNbUndos.
|
virtual |
Implements CurveCreator_ICurve.
References anIter(), aResult, getSection(), myDimension, CurveCreator_Section::myPoints, and toICoord().
|
virtual |
Implements CurveCreator_ICurve.
References getSection(), and CurveCreator_Section::myPoints.
|
inlinevirtual |
Implements CurveCreator_ICurve.
References NULL.
|
inlinevirtual |
Implements CurveCreator_ICurve.
|
virtual |
Returns specified section name.
Implements CurveCreator_ICurve.
References getSection(), and CurveCreator_Section::myName.
|
virtual |
Implements CurveCreator_ICurve.
References CurveCreator_Section::myType, and CurveCreator::Polyline.
|
virtual |
References myUndoDepth.
|
virtual |
References getSection(), CurveCreator_Section::myName, and mySections.
|
virtual |
Reimplemented from CurveCreator_ICurve.
|
virtual |
Implements CurveCreator_ICurve.
References getSection(), and CurveCreator_Section::myIsClosed.
|
virtual |
Implements CurveCreator_ICurve.
References addEmptyDiff(), finishOperation(), CurveCreator_Operation::Join, joinInternal(), myListDiffs, and startOperation().
|
virtual |
References getSection(), CurveCreator_Section::myPoints, redisplayCurve(), and removeSectionInternal().
|
virtual |
|
virtual |
References anIter(), getSection(), and mySections.
|
protected |
References CurveCreator_Displayer::display(), CurveCreator_Displayer::eraseAll(), myAISShape, myDisplayer, and NULL.
|
virtual |
Implements CurveCreator_ICurve.
References myCurrenPos, myNbRedos, and myNbUndos.
|
virtual |
References myDisplayer, and NULL.
|
virtual |
Implements CurveCreator_ICurve.
References addEmptyDiff(), finishOperation(), myListDiffs, CurveCreator_Operation::RemovePoints, removePointsInternal(), and startOperation().
|
virtual |
References convert(), redisplayCurve(), and removeSectionPoints().
|
virtual |
Implements CurveCreator_ICurve.
References addEmptyDiff(), finishOperation(), myListDiffs, CurveCreator_Operation::RemoveSection, removeSectionInternal(), and startOperation().
|
virtual |
References mySections, and redisplayCurve().
|
protected |
It sortes the points and remove them in the decreasing order
| theSectionId | a section index |
| thePointIds | a list of section points |
References getDimension(), getSection(), CurveCreator_Section::myPoints, and toICoord().
|
virtual |
Implements CurveCreator_ICurve.
References addEmptyDiff(), finishOperation(), myListDiffs, CurveCreator_Operation::RemovePoints, removePointsInternal(), and startOperation().
|
virtual |
| theOldCoords | the old points coordinates |
Implements CurveCreator_ICurve.
References addEmptyDiff(), finishOperation(), myListDiffs, and startOperation().
|
virtual |
Implements CurveCreator_ICurve.
References addEmptyDiff(), finishOperation(), myListDiffs, CurveCreator_Operation::SetClosed, setClosedInternal(), and startOperation().
|
virtual |
References getSection(), CurveCreator_Section::myIsClosed, mySections, and redisplayCurve().
|
virtual |
References myDisplayer.
|
virtual |
Implements CurveCreator_ICurve.
References addEmptyDiff(), finishOperation(), getNbPoints(), myListDiffs, CurveCreator_Operation::SetCoordinates, setPointInternal(), and startOperation().
|
virtual |
References getSection(), myDimension, CurveCreator_Section::myPoints, redisplayCurve(), and toICoord().
|
virtual |
Implements CurveCreator_ICurve.
References addEmptyDiff(), finishOperation(), myListDiffs, CurveCreator_Operation::RenameSection, setSectionNameInternal(), and startOperation().
|
virtual |
References getSection(), and CurveCreator_Section::myName.
|
virtual |
Implements CurveCreator_ICurve.
References addEmptyDiff(), finishOperation(), myListDiffs, setSectionTypeInternal(), CurveCreator_Operation::SetType, and startOperation().
|
virtual |
References getNbSections(), getSection(), CurveCreator_Section::myType, and redisplayCurve().
|
virtual |
Implements CurveCreator_ICurve.
References addEmptyDiff(), finishOperation(), myListDiffs, CurveCreator_Operation::SetCoordinates, setPointInternal(), and startOperation().
|
virtual |
If the flag is true - points sorting will be skipped.
Implements CurveCreator_ICurve.
References mySkipSorting.
|
virtual |
References myCurrenPos, myListDiffs, myNbRedos, myNbUndos, and myUndoDepth.
|
virtual |
References myOpLevel.
|
virtual |
References myDimension.
|
virtual |
Implements CurveCreator_ICurve.
References myCurrenPos, myNbRedos, and myNbUndos.
|
private |
|
private |
| CurveCreator::Dimension CurveCreator_Curve::myDimension |
| CurveCreator_Displayer* CurveCreator_Curve::myDisplayer |
| bool CurveCreator_Curve::myIsLocked |
|
private |
|
private |
|
private |
|
private |
| CurveCreator::Sections CurveCreator_Curve::mySections |
|
protected |
|
private |