C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2

Contours construction graph. More...

#include <contour_graph.h>

+ Inheritance diagram for MpGraph:
+ Collaboration diagram for MpGraph:

Public Member Functions

 MpGraph ()
 Constructor.
 
 MpGraph (MpLoop *init)
 Constructor by loop.
 
 MpGraph (RPArray< MpLoop > &init)
 Constructor by a set of loops.
 
 MpGraph (const MpGraph &)
 Copy-constructor.
 
virtual ~MpGraph ()
 Destructor.
 
Functions for access to data.
size_t GetLoopsCount () const
 Count of boundaries.
 
MpLoopGetLoop (size_t index) const
 Loop by index. More...
 
int GetMode () const
 Traversal direction.
 
bool GetPointIn (const RPArray< MbCurve > &curveList, SArray< MbCrossPoint > &cross, MbCartPoint &p, double epsilon=Math::LengthEps *c3d::METRIC_DELTA) const
 Get the point. More...
 
template<class CurvesArray , class CurvesArray2 >
void GetUsedCurves (const CurvesArray &curveList, CurvesArray2 &usedCurves)
 Get used curves. More...
 
bool GetLoopOrientation (size_t i) const
 The orientation of a loop by its index. More...
 
Functions for changing data.
void AddLoop (MpLoop *newLoop)
 Add a new boundary of the face.
 
void InsertLoop (MpLoop *newLoop)
 Add a new boundary of the face to the beginning of face list.
 
void SetMode (int m)
 Set the traverse direction.
 
void MakeContours (RPArray< MbContour > &contours) const
 Get loops' contours.
 
template<class CurvesArray >
void SetAllName (const CurvesArray &curveList, MpGraph *g, std::map< const MbCurve *, ptrdiff_t > &curvesNames)
 Store unused edges. More...
 
template<class CurvesArray >
void SetEdgeName (const CurvesArray &curveList, std::map< const MbCurve *, ptrdiff_t > &curvesNames)
 Give names to edges. More...
 
template<class ContourArray >
void SetLoopsOrientation (const ContourArray &contourArray)
 Determine the contours' orientation. More...
 
void ConvertEdgesParams (const SArray< ptrdiff_t > &unchangeCurve, const SArray< ptrdiff_t > &changeCurve, const RPArray< MbCurve > &curveList) const
 Convert edges' parameters to curves' parameters. More...
 
Transformation operations.
void Transform (const MbMatrix &matr)
 Transformation. More...
 
void Move (const MbVector &to)
 Move. More...
 
void Rotate (const MbCartPoint &pnt, const MbDirection &angle)
 Rotate. More...
 
- Public Member Functions inherited from TapeBase
 TapeBase (RegistrableRec regs=noRegistrable)
 Constructor.
 
 TapeBase (const TapeBase &)
 Copy-constructor.
 
virtual ~TapeBase ()
 Destructor.
 
RegistrableRec GetRegistrable () const
 Whether the stream class is registrable.
 
void SetRegistrable (RegistrableRec regs=registrable) const
 Set the state of registration of the stream class.
 
virtual const char * GetPureName (const VersionContainer &) const
 Get the class name.
 
virtual bool IsFamilyRegistrable () const
 Whether the object belongs to a registrable family.
 

Detailed Description

Contours construction graph.

Contours construction graph.
Contains list of boundaries - loops.

Member Function Documentation

◆ GetLoop()

MpLoop* MpGraph::GetLoop ( size_t  index) const
inline

Loop by index.

Loop by index without check of index.

Parameters
[in]index- The loop index.

◆ GetPointIn()

bool MpGraph::GetPointIn ( const RPArray< MbCurve > &  curveList,
SArray< MbCrossPoint > &  cross,
MbCartPoint p,
double  epsilon = Math::LengthEps *c3d::METRIC_DELTA 
) const

Get the point.

Get the point for graph building.

Parameters
[in]curveList- A set of curves (without coincidences) for creating the graph.
[in]cross- Set of intersection points of curves from curveList.
[out]p- The result is a two-dimensional point.

◆ GetUsedCurves()

template<class CurvesArray , class CurvesArray2 >
void MpGraph::GetUsedCurves ( const CurvesArray &  curveList,
CurvesArray2 &  usedCurves 
)

Get used curves.

Get used curves and rename in compliance with the last ones.

Parameters
[in]curveList- Set of curves.
[out]usedCurves- The result are the used curves.

Get used curves and rename in compliance with the last ones.

Parameters
[in]curveList- Set of curves.
[out]usedCurves- The result are the used curves.

◆ GetLoopOrientation()

bool MpGraph::GetLoopOrientation ( size_t  i) const
inline

The orientation of a loop by its index.

The orientation of loop by its index without check of index.

Parameters
[in]i- The loop index.
Returns
The loop orientation.

◆ SetAllName()

template<class CurvesArray >
void MpGraph::SetAllName ( const CurvesArray &  curveList,
MpGraph g,
std::map< const MbCurve *, ptrdiff_t > &  curvesNames 
)

Store unused edges.

Store unused edges giving names for them.

Parameters
[in]curveList- The list of unused curves for setting the names.
[in]g- Graph for searching unused edges.
If there is an edge by the names of an unused curve in the graph or its array of unused edges, then it is stored in the array of unused edges unusedEdges.
[in]curvesNames- Curves names.

Store unused edges giving names for them.

Parameters
[in]curveList- The list of unused curves for setting the names.
[in]g- Graph for searching unused edges.
If there is an edge by the names of an unused curve in the graph or its array of unused edges, then it is stored in the array of unused edges unusedEdges.
[in]curvesNames- Curves names.

◆ SetEdgeName()

template<class CurvesArray >
void MpGraph::SetEdgeName ( const CurvesArray &  curveList,
std::map< const MbCurve *, ptrdiff_t > &  curvesNames 
)

Give names to edges.

Give names to edges by the list of curves.

Parameters
[in]curveList- The list of curves for naming.
[in]curvesNames- Curves names.

Give names to edges by the list of curves.

Parameters
[in]curveList- The list of curves for naming.
[in]curvesNames- Curves names.

◆ SetLoopsOrientation()

template<class ContourArray >
void MpGraph::SetLoopsOrientation ( const ContourArray &  contourArray)

Determine the contours' orientation.

Determine the contours' orientation by its inclusion.

Parameters
[in]contourArray- List of contours the graph is built for.

Determine the contours' orientation by its inclusion.

Parameters
[in]contourArray- List of contours the graph is built for.

◆ ConvertEdgesParams()

void MpGraph::ConvertEdgesParams ( const SArray< ptrdiff_t > &  unchangeCurve,
const SArray< ptrdiff_t > &  changeCurve,
const RPArray< MbCurve > &  curveList 
) const

Convert edges' parameters to curves' parameters.

Convert parameters of edges to parameters of curves if edges' curves are found in lists.

Parameters
[in]unchangeCurve- List of curves' names for modification.
[in]changeCurve- List of curves' names for modification.
[in]curveList- List of curves for modification of parametrization.
Warning
For internal use only.

◆ Transform()

void MpGraph::Transform ( const MbMatrix matr)

Transformation.

Transformation according to the matrix.

Parameters
[in]matr- Transformation matrix.

◆ Move()

void MpGraph::Move ( const MbVector to)

Move.

Move by a vector.

Parameters
[in]to- Movement vector.

◆ Rotate()

void MpGraph::Rotate ( const MbCartPoint pnt,
const MbDirection angle 
)

Rotate.

Rotate at angle around a point.

Parameters
[in]pnt- A point is a rotation center.
[in]angle- A two-dimensional normalized vector determining the rotation angle.

The documentation for this class was generated from the following file: