23#ifndef _CurveCreator_ICurve_HeaderFile
24#define _CurveCreator_ICurve_HeaderFile
29#include <TColgp_HArray1OfPnt.hxx>
30#include <AIS_InteractiveObject.hxx>
62 virtual Handle(TColgp_HArray1OfPnt) GetDifferentPoints(
int theDimension )
const = 0;
110 virtual bool join(
const std::list<int>& theSections ) = 0;
118 const bool theIsClosed ) = 0;
124 virtual bool isClosed(
const int theISection )
const = 0;
131 const bool theIsClosed ) = 0;
138 const std::string& theName ) = 0;
152 const int theSectionIndex)
const = 0;
170 const int theISection,
171 const int theIPnt = -1 ) = 0;
180 const bool theIsToSaveDiff =
true ) = 0;
183 virtual bool removePoint(
const int theISection,
const int theIPnt = -1 ) = 0;
189 const int theIPnt )
const = 0;
194 virtual Handle(TColgp_HArray1OfPnt) GetDifferentPoints(
int theISection = -1 )
const = 0;
#define CURVECREATOR_EXPORT
Definition: CurveCreator_Macro.hxx:41
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.
std::pair< int, int > SectionToPoint
Definition: CurveCreator_ICurve.hxx:75
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 const CurveCreator_ISection * getSection(const int theSectionIndex) const =0
Returns the curve section with the index.
virtual Handle(AIS_InteractiveObject) getAISObject(const bool theNeedToBuild
virtual void constructAISObject()=0
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 Handle(TColgp_HArray1OfPnt) GetDifferentPoints(int theISection
Get points of a section (the total points in Curve if theISection is equal to -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 ~CurveCreator_ICurve()
The destructor.
Definition: CurveCreator_ICurve.hxx:86
virtual CurveCreator_ISection * getSection(const int theSectionIndex)=0
Returns the curve section with the index.
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.
Definition: CurveCreator.hxx:34
Dimension
Dimension of the curve.
Definition: CurveCreator_ICurve.hxx:48
@ Dim2d
Definition: CurveCreator_ICurve.hxx:49
@ Dim3d
Definition: CurveCreator_ICurve.hxx:50
std::deque< TypeCoord > Coordinates
List of coordinates in format depends on section dimension: 2D: [x1, y1, x2, y2, x3,...
Definition: CurveCreator.hxx:42
SectionType
Type of the section.
Definition: CurveCreator_ICurve.hxx:41
@ Spline
Definition: CurveCreator_ICurve.hxx:43
@ Polyline
Definition: CurveCreator_ICurve.hxx:42
The type represents the interface to the curve section.
Definition: CurveCreator_ICurve.hxx:57
virtual Handle(TColgp_HArray1OfPnt) GetDifferentPoints(int theDimension) const =0
Calculates the different points of the section.
virtual ~CurveCreator_ISection()
The destructor.
Definition: CurveCreator_ICurve.hxx:59