23#ifndef _CurveCreator_Curve_HeaderFile
24#define _CurveCreator_Curve_HeaderFile
34#include <NCollection_IndexedDataMap.hxx>
69 virtual std::string getUniqSectionName()
const;
78 virtual void removeDisplayer();
83 virtual void setUndoDepth(
const int theDepth = -1);
86 virtual int getUndoDepth()
const;
88 virtual void startOperation();
89 virtual void finishOperation();
95 virtual int toICoord(
const int theIPnt)
const;
98 virtual bool moveSectionInternal(
const int theISection,
99 const int theNewIndex);
101 virtual bool moveSection(
const int theISection,
102 const int theNewIndex);
109 virtual bool addEmptyDiff();
112 void getCoordinates(
int theISection,
int theIPoint,
double& theX,
double& theY,
double& theZ )
const;
114 void redisplayCurve(
bool preEraseAllObjects =
true);
141 virtual bool clearInternal();
143 virtual bool clear();
147 void SetEraseAllState(
bool toEraseAll);
151 bool GetEraseAllState()
const;
154 virtual bool joinInternal(
const std::list<int>& theSections );
158 virtual bool join(
const std::list<int>& theSections );
164 virtual int addSectionInternal(
const std::string &theName,
166 const bool theIsClosed,
168 const Quantity_Color& aColor);
170 virtual int addSection(
const std::string &theName,
172 const bool theIsClosed );
174 virtual int addSection(
const std::string &theName,
176 const bool theIsClosed,
180 virtual bool removeSectionInternal(
const int theISection );
185 virtual bool isClosed(
const int theISection )
const;
188 virtual bool setClosedInternal(
const int theISection,
189 const bool theIsClosed );
194 virtual bool setClosed(
const int theISection,
195 const bool theIsClosed );
198 virtual bool setColorSection(
int SectInd, Quantity_Color theNewColor );
201 virtual void setColorSectionInternal(
int SectInd, Quantity_Color theNewColor );
203 virtual Quantity_Color getLastRemovedColor()
const;
205 virtual void popLastRemovedColor();
208 virtual Quantity_Color getColorSection(
int SectInd )
const;
211 virtual std::string
getSectionName(
const int theISection )
const;
214 virtual bool setSectionNameInternal(
const int theISection,
215 const std::string& theName );
218 const std::string& theName );
224 virtual bool setSectionTypeInternal(
const int theISection,
236 if (theSectionIndex >= 0 && theSectionIndex < (
int)mySections.size())
260 const int theISection,
261 const int theIPnt = -1 );
266 virtual bool setPoint(
const int theISection,
271 virtual bool setSeveralPoints(
const SectionToPointCoordsList &theSectionToPntCoords,
272 const bool theIsToSaveDiff =
true );
275 virtual bool removePointsInternal(
const SectionToPointList &thePoints );
277 virtual bool removePoint(
const int theISection,
const int theIPnt = -1 );
284 const int theIPnt )
const;
289 virtual Handle(TColgp_HArray1OfPnt) GetDifferentPoints(
int theISection = -1 )
const;
298 virtual int getNbPoints(
const int theISection )
const;
332 const std::list<int>& thePointIds );
339 std::map<
int, std::list<int> > &theConvPoints );
#define CURVECREATOR_EXPORT
Definition: CurveCreator_Macro.hxx:41
The CurveCreator_Curve object is represented as one or more sets of connected points; thus CurveCreat...
Definition: CurveCreator_Curve.hxx:51
CurveCreator::Dimension myDimension
curve dimension
Definition: CurveCreator_Curve.hxx:351
CurveCreator_Displayer * myDisplayer
curve displayer
Definition: CurveCreator_Curve.hxx:352
int myNbRedos
Definition: CurveCreator_Curve.hxx:362
virtual Handle(AIS_InteractiveObject) getAISObject(const bool theNeedToBuild
Get the curve AIS object.
int myUndoDepth
Definition: CurveCreator_Curve.hxx:365
std::list< CurveCreator_Diff > ListDiff
Definition: CurveCreator_Curve.hxx:53
bool mySkipSorting
Definition: CurveCreator_Curve.hxx:345
bool myIsLocked
Definition: CurveCreator_Curve.hxx:349
std::vector< int > myCurSectInd
Definition: CurveCreator_Curve.hxx:357
int myNbUndos
Definition: CurveCreator_Curve.hxx:361
AIS_Shape * myAISShape
AIS shape.
Definition: CurveCreator_Curve.hxx:346
virtual void constructAISObject()
CurveCreator::Sections mySections
curve data
Definition: CurveCreator_Curve.hxx:350
virtual Handle(TColgp_HArray1OfPnt) GetDifferentPoints(int theISection
Get points of a section (the total points in Curve if theISection is equal to -1).
int myOpLevel
Definition: CurveCreator_Curve.hxx:366
std::vector< Quantity_Color > myRemColors
Definition: CurveCreator_Curve.hxx:368
ListDiff::iterator myCurrenPos
Definition: CurveCreator_Curve.hxx:363
ListDiff myListDiffs
Definition: CurveCreator_Curve.hxx:364
NCollection_IndexedDataMap< int, TopoDS_Shape > mySect2Shape
Definition: CurveCreator_Curve.hxx:356
bool myEraseAll
Definition: CurveCreator_Curve.hxx:367
Quantity_Color myPointAspectColor
Definition: CurveCreator_Curve.hxx:353
bool removeSectionPoints(const int theSectionId, const std::list< int > &thePointIds)
Removes the points from the section.
double myLineWidth
Definition: CurveCreator_Curve.hxx:355
CurveCreator_ISection * getSection(const int theSectionIndex)
A virtual method.
Definition: CurveCreator_Curve.hxx:244
const CurveCreator_ISection * getSection(const int theSectionIndex) const
A virtual method.
Definition: CurveCreator_Curve.hxx:234
Definition: CurveCreator_Displayer.hxx:31
The CurveCreator_ICurve object is represented as one or more sets of connected points; thus CurveCrea...
Definition: CurveCreator_ICurve.hxx:73
virtual int getNbUndo() const =0
Get number of available undo operations.
virtual bool setSectionName(const int theISection, const std::string &theName)=0
Set name of the specified section.
virtual bool redo()=0
Redo last previously "undone" operation.
virtual bool join(const std::list< int > &theSections)=0
Join list of sections to one section (join all if the list is empty)
virtual bool removeSection(const int theISection)=0
Removes the given sections.
std::deque< SectionToPoint > SectionToPointList
Definition: CurveCreator_ICurve.hxx:76
virtual bool setSeveralPoints(const SectionToPointCoordsList &theSectionToPntCoords, const bool theIsToSaveDiff=true)=0
Set coordinates of specified points from different sections.
virtual int getNbPoints(const int theISection) const =0
Get number of points in specified section or (the total number of points in Curve if theISection is e...
virtual bool isClosed(const int theISection) const =0
Get "closed" flag of the specified section.
virtual int getNbRedo() const =0
Get number of available redo operations.
virtual void setSkipSorting(const bool)=0
Set skip sorting flag.
virtual CurveCreator::SectionType getSectionType(const int theISection) const =0
Get type of the specified section.
virtual bool undo()=0
Undo previous operation.
virtual bool setPoint(const int theISection, const int theIPnt, const CurveCreator::Coordinates &theNewCoords)=0
Set coordinates of specified point.
virtual bool canPointsBeSorted()=0
Indicates whether the points can be sorted.
virtual CurveCreator::Coordinates getPoint(const int theISection, const int theIPnt) const =0
Get coordinates of specified point.
virtual bool addPoints(const CurveCreator::Coordinates &theCoords, const int theISection, const int theIPnt=-1)=0
Insert one or several points to the specified section starting from the given theIPnt index (or add t...
virtual int getNbSections() const =0
Get number of sections.
virtual std::string getSectionName(const int theISection) const =0
Returns specifyed section name.
virtual int addSection(const std::string &theName, const CurveCreator::SectionType theType, const bool theIsClosed)=0
Add a new section.
virtual bool setClosed(const int theISection, const bool theIsClosed)=0
Set "closed" flag of the specified section (all sections if theISection is -1).
virtual bool setSectionType(const int theISection, const CurveCreator::SectionType theType)=0
Set type of the specified section (or all sections if theISection is -1).
std::deque< std::pair< SectionToPoint, CurveCreator::Coordinates > > SectionToPointCoordsList
Definition: CurveCreator_ICurve.hxx:78
virtual bool removePoint(const int theISection, const int theIPnt=-1)=0
Remove point with given id.
virtual bool removeSeveralPoints(const SectionToPointList &theSectionToPntIDs)=0
Remove several points from different sections.
virtual bool clear()=0
Clear the polyline (remove all sections)
virtual CurveCreator::Dimension getDimension() const =0
Get the dimension.
virtual void saveCoordDiff(const SectionToPointCoordsList &theOldCoords)=0
Saves points coordinates difference.
std::map< int, PosPointsList > SectionsMap
Map of sections with positioned points.
Definition: CurveCreator.hxx:50
Dimension
Dimension of the curve.
Definition: CurveCreator_ICurve.hxx:48
std::deque< TypeCoord > Coordinates
List of coordinates in format depends on section dimension: 2D: [x1, y1, x2, y2, x3,...
Definition: CurveCreator.hxx:42
std::deque< CurveCreator_Section * > Sections
List of sections.
Definition: CurveCreator.hxx:45
SectionType
Type of the section.
Definition: CurveCreator_ICurve.hxx:41
The type represents the interface to the curve section.
Definition: CurveCreator_ICurve.hxx:57
Structure to store sections representing the CurveCreator_Curve object.
Definition: CurveCreator_Section.hxx:34