CFx SDK Documentation 2024 SP0
|
#include <FMContour2D.h>
Public Member Functions | |
Contour2D () | |
Contour2D (ContourImplClass eImplClass) | |
Contour2D (const IBulgeSeg2D &rSrcSeg, ContourImplClass eImplClass=ecicSimple) | |
Contour2D (const Contour2D &rSrcCont, ContourImplClass eImplClass=ecicSimple) | |
Contour2D (const IContour2D &rSrcCont, ContourImplClass eImplClass=ecicSimple) | |
Contour2D (const OdGeExtents2d &ext) | |
Contour2D & | operator= (const Contour2D &rSrcCont) |
Contour2D & | operator= (const IContour2D &rSrcCont) |
Contour2D & | cloneFrom (const IContour2D &rSrcCont) |
Contour2D & | reset (ContourImplClass eImplClass=ecicUnknown) |
ContourImplClass | implClass () const |
void | swap (Contour2D &rAnother) |
bool | isClosed () const |
bool | isEndsEqual (const OdGeTol &gTol=FMGeGbl::gTol) const |
void | setClosed (bool bClosed=true) |
bool | isEmpty () const |
OdUInt32 | numVerts () const |
OdUInt32 | numSegments () const |
bool | hasArcs () const |
SegmentType | segmentType (OdUInt32 iIndex) const |
Result | getSegmentAt (OdUInt32 iIndex, Segment2D &rSegment) const |
Result | getSegmentAt (OdUInt32 iIndex, OdGePoint2d &ptStart, OdGePoint2d &ptEnd, double &dBulge) const |
Result | getLineSegAt (OdUInt32 iIndex, OdGeLineSeg2d &geLine) const |
Result | getArcSegAt (OdUInt32 iIndex, OdGeCircArc2d &geArc) const |
Result | getPointAt (OdUInt32 iIndex, OdGePoint2d &ptPoint) const |
Result | getBulgeAt (OdUInt32 iIndex, double &dBulge) const |
Result | getVertexAt (OdUInt32 iIndex, OdGePoint2d *pPoint, double *pBulge=NULL, OdIntPtr *pMetadata=NULL, OdUInt32 *puRawFlags=NULL) const |
Result | getInternalAngleAt (OdUInt32 iIndex, double &dAngle) const |
Result | setPointAt (OdUInt32 iIndex, const OdGePoint2d &ptPoint) |
Result | setBulgeAt (OdUInt32 iIndex, double dBulge) |
Result | setVertexAt (OdUInt32 iIndex, const OdGePoint2d &ptPoint, double dBulge) |
void | reserveVertices (OdUInt32 iReservedSize) |
OdIntPtr | metadataAt (OdUInt32 iIndex) const |
Result | setMetadataAt (OdUInt32 iIndex, OdIntPtr iNewData) |
Result | setAllMetadata (OdIntPtr iNewData, OdIntPtr iBitsToModify=(OdIntPtr) -1) |
bool | isHiddenAt (OdUInt32 iIndex) const |
Result | setHiddenAt (OdUInt32 iIndex, bool bHidden=true) |
FaceOrientation | orientationAt (OdUInt32 iIndex) const |
Result | setOrientationAt (OdUInt32 iIndex, FaceOrientation eOrientation) |
bool | threatAsSmoothCurveAt (OdUInt32 iIndex) const |
void | setThreatAsSmoothCurveAt (OdUInt32 iIndex, bool bSmooth) |
bool | isExplodedArcAt (OdUInt32 iIndex) const |
Result | setExplodedArcAt (OdUInt32 iIndex, bool bExplodedArc=true) |
OdUInt32 | rawFlagsAt (OdUInt32 iIndex) const |
Result | setRawFlagsAt (OdUInt32 iIndex, OdUInt32 iRawFlags) |
Result | addVertexAt (OdUInt32 iIndex, const OdGePoint2d &ptStart, double dBulge=0.0, OdIntPtr uMetadata=0, OdUInt32 uRawFlags=0) |
Result | appendVertex (const OdGePoint2d &ptStart, double dBulge=0.0, OdIntPtr uMetadata=0, OdUInt32 uRawFlags=0) |
Result | appendVertex (const OdGePoint2d &ptStart, const OdGePoint2d &ptMid, OdIntPtr uMetadata=0, OdUInt32 uRawFlags=0) |
Result | appendVertices (const OdGePoint2dArray &vecSource) |
Result | appendVertices (OdUInt32 size, const OdGePoint2d *vecSource, const double *bulgeSource=NULL) |
Result | appendSegment (const Segment2D &rSeg, bool bShiftToHit=false) |
Result | appendContour (const Contour2D &rCont, bool bCloseGap=false, double dMaxGap=1e99) |
Result | removeVertexAt (OdUInt32 iIndex) |
Result | getStartPoint (OdGePoint2d &ptPoint) const |
Result | getEndPoint (OdGePoint2d &ptPoint) const |
Result | getTangent (double dParam, OdGeVector2d &vTangent) const |
Result | getTangentAtDist (double dDist, OdGeVector2d &vTangent) const |
Result | getPoint (double dParam, OdGePoint2d &ptPoint) const |
Result | getPointAtDist (double dDist, OdGePoint2d &ptPoint) const |
Result | getDistAtParam (double dParam, double &dDist) const |
Result | getParamAtDist (double dDist, double &dParam) const |
Result | getNormalizedParam (double &dParam) const |
Result | getNormalizedDist (double &dDist) const |
bool | areEqualParams (double dParam1, double dParam2, double dParamTol=1e-10) const |
bool | areEqualDists (double dDist1, double dDist2, double dTol=1e-6) const |
Result | addExtents (OdGeExtents2d &extExtents) const |
double | startParam () const |
double | endParam () const |
double | length () const |
double | area () const |
double | signedArea () const |
bool | isConvex () const |
bool | isCCW () const |
void | makeCCW (bool bCCW=true) |
bool | isOn (const OdGePoint2d &ptTest, double *pParam=NULL, const OdGeTol &gTol=FMGeGbl::gTol) const |
double | nearestParam (const OdGePoint2d &ptTest, OdGePoint2d *ptNearest=NULL) const |
bool | contains (const OdGePoint2d &ptPoint, bool *pOnBorder=NULL, const OdGeTol &gTol=FMGeGbl::gTol) const |
bool | isSelfIntersecting (const OdGeTol &gTol=FMGeGbl::gTol, bool bExcludeTouch=false) const |
bool | isValidRegion (const OdGeTol &gTol=FMGeGbl::gTol) const |
bool | isInsideContour (const Contour2D &c2dOuter, bool fAllowBordersTouch=false, const OdGeTol &gTol=FMGeGbl::gTol) const |
OdUInt32 | intersect (const Segment2D &rSegB, std::vector< Intersection > &vecPoints, const OdGeTol &gTol=FMGeGbl::gTol) const |
OdUInt32 | intersect (const Contour2D &rContB, std::vector< Intersection > &vecPoints, const OdGeTol &gTol=FMGeGbl::gTol) const |
OdUInt32 | intersectLine (const OdGeLine2d &rLine, std::vector< Intersection > &vecPoints, const OdGeTol &gTol=FMGeGbl::gTol) const |
Result | transformBy (const OdGeMatrix2d &mMatrix, const DeviationParams &devDeviation=FMGeGbl::gDefDev) |
void | reverse () |
void | deleteCoincident (const OdGeTol &gTol=FMGeGbl::gTol) |
void | mergeSegments (int iMergeFlags=0, const OdGeTol &gTol=FMGeGbl::gTol) |
Result | explode (const DeviationParams &devDeviation=FMGeGbl::gDefDev, OdIntPtr uArcMetadata=0) |
Result | explodeTo (Contour2D &rDestCont, const DeviationParams &devDeviation=FMGeGbl::gDefDev, OdIntPtr uArcMetadata=0) const |
OdUInt32 | createVertexAt (double dParam, const OdGeTol &gTol=FMGeGbl::gTol) |
OdUInt32 | createVertexAtDist (double dDist, const OdGeTol &gTol=FMGeGbl::gTol) |
Result | createVerticesAt (const std::vector< double > &vecParams, const OdGeTol &gTol=FMGeGbl::gTol) |
Result | createVerticesAt (OdUInt32 size, const double *vecParams, const OdGeTol &gTol=FMGeGbl::gTol) |
Result | getSubContour (double dStartParam, double dEndParam, Contour2D &rSubContour, const OdGeTol &gTol=FMGeGbl::gTol) const |
Result | getOffsetProfile (double dOffset, Profile2D &rResult, FilletType eFilletType=eftExtend, const OdGeTol &gTol=FMGeGbl::gTol) const |
Result | getProfileByOffsets (const std::vector< double > &adOffset, Profile2D &rResult, const OdGeTol &gTol=FMGeGbl::gTol) const |
bool | traverse (Contour2DTraversingReactor &reactor) const |
void | getGeomExtens (OdGeExtents2d &extens) |
~Contour2D () | |
operator const IContour2D & () const | |
operator IContour2D & () | |
const IContour2D & | impl () const |
IContour2D & | impl () |
Static Public Member Functions | |
static Contour2D | createCircle (const OdGePoint2d ¢er, double radius) |
static Contour2D | createSquare (const OdGePoint2d ¢er, double side) |
Static Public Attributes | |
static FMGEOMETRY_API_STATIC const Contour2D | kNull |
Represents facet body 2D contour objects.
There are three ways to pick (non-vertex) points on the contour: a) Use an integer index to get a segment and then use a parameter on the segment (GeLine or GeArc). b) Use a distance along the curve from the starting point. c) Use a "parameter" value.
The last way is the fastest (and preferred in most cases) because of the "parameter" structure: dParam = startParam() + iIndex * (dOffsetOnSegment/dSegmentLength)
So the point given by the parameter value can be found fast consistently.
Definition at line 118 of file FMContour2D.h.
FacetModeler::Contour2D::Contour2D | ( | ) |
Default constructor. Creates a contour of the eSimple implementation type.
|
explicit |
Creates a contour of the specified implementation type.
eImplClass | [in] Implementation type. |
|
explicit |
Creates a contour of the eSimple implementation type by the specified segment.
rSrcSeg | [in] Input segment to create the contour. |
eImplClass | [in] Optional argument representing a Contour2D implementation type of the object to create. Default value is ecicSimple. |
FacetModeler::Contour2D::Contour2D | ( | const Contour2D & | rSrcCont, |
ContourImplClass | eImplClass = ecicSimple |
||
) |
Copy constructor. Creates a contour of the eSimple implementation type and initializes it with parameters of the specified contour.
|
explicit |
Creates a contour of the eImplClass implementation type with the specified contour implementation object.
FacetModeler::Contour2D::Contour2D | ( | const OdGeExtents2d & | ext | ) |
Creates a rectangular contour with the specified extent points.
ext | [in] Rectangle as OdGeExtents2d. |
FacetModeler::Contour2D::~Contour2D | ( | ) |
Destructor.
Result FacetModeler::Contour2D::addExtents | ( | OdGeExtents2d & | extExtents | ) | const |
Appends the extents of the contour to the specified extents structure.
extExtents | [in/out] Extents to add to. |
Result FacetModeler::Contour2D::addVertexAt | ( | OdUInt32 | iIndex, |
const OdGePoint2d & | ptStart, | ||
double | dBulge = 0.0 , |
||
OdIntPtr | uMetadata = 0 , |
||
OdUInt32 | uRawFlags = 0 |
||
) |
Adds a vertex at the specified index.
iIndex | [in] Vertex index to append. |
ptStart | [in] Vertex point to append. |
dBulge | [in] (Optional) Arc segment bulge. Default value is 0.0. |
uMetadata | [in] (Optional) Metadata to set. Default value is 0. |
uRawFlags | [in] (Optional) Raw flags to set. Default value is 0. |
Result FacetModeler::Contour2D::appendContour | ( | const Contour2D & | rCont, |
bool | bCloseGap = false , |
||
double | dMaxGap = 1e99 |
||
) |
Appends a contour to the end of this contour.
rCont | [in] Contour to append. |
bCloseGap | [in] If true, a segment connecting the points is inserted and the return code is erWarnPointNotOnThis. |
dMaxGap | [in] (Optional) The maximum allowable distance between the ends of the connected contours. Default value is 1e99. |
Appends a segment to the end of this contour.
rSeg | [in] Segment to add. |
bShiftToHit | [in] (Optional) true to enable shift correction, or false for disable. Default value is false. |
Result FacetModeler::Contour2D::appendVertex | ( | const OdGePoint2d & | ptStart, |
const OdGePoint2d & | ptMid, | ||
OdIntPtr | uMetadata = 0 , |
||
OdUInt32 | uRawFlags = 0 |
||
) |
Appends a new vertex to the end of the contour.
ptStart | [in] Vertex point to append. |
ptMid | [in] Middle point of bulge to calculate. |
uMetadata | [in] Metadata pointer to set. |
uRawFlags | [in] Raw flags to set. |
Result FacetModeler::Contour2D::appendVertex | ( | const OdGePoint2d & | ptStart, |
double | dBulge = 0.0 , |
||
OdIntPtr | uMetadata = 0 , |
||
OdUInt32 | uRawFlags = 0 |
||
) |
Appends a new vertex to the end of the contour.
ptStart | [in] Vertex point to append. |
dBulge | [in] (Optional) Arc segment bulge. Default value is 0.0. |
uMetadata | [in] (Optional) Metadata to set. Default value is 0. |
uRawFlags | [in] (Optional) Raw flags to set. Default value is 0. |
Result FacetModeler::Contour2D::appendVertices | ( | const OdGePoint2dArray & | vecSource | ) |
Appends vertices to the end of this contour.
vecSource | [in] Array of vertices to append as OdGePoint2dArray. |
Result FacetModeler::Contour2D::appendVertices | ( | OdUInt32 | size, |
const OdGePoint2d * | vecSource, | ||
const double * | bulgeSource = NULL |
||
) |
Appends vertices to the end of this contour.
size | [in] Number of points to add. |
vecSource | [in] Pointer to an array of points. |
bulgeSource | [in] (Optional) Pointer to an array of bulge values. The array must be the same size as vecSource. |
double FacetModeler::Contour2D::area | ( | ) | const |
Gets the non-negative area of the contour.
bool FacetModeler::Contour2D::areEqualDists | ( | double | dDist1, |
double | dDist2, | ||
double | dTol = 1e-6 |
||
) | const |
Checks whether the specified distances are equal depending on the closed state of the contour.
dDist1 | [in] First distance. |
dDist2 | [in] Second distance. |
dTol | [in] Tolerance. |
bool FacetModeler::Contour2D::areEqualParams | ( | double | dParam1, |
double | dParam2, | ||
double | dParamTol = 1e-10 |
||
) | const |
Checks whether the specified parameters are equal depending on the closed state of the contour.
dParam1 | [in] First parameter. |
dParam2 | [in] Second parameter. |
dParamTol | [in] Tolerance. |
Contour2D & FacetModeler::Contour2D::cloneFrom | ( | const IContour2D & | rSrcCont | ) |
Clones the contents of the specified contour.
rSrcCont | [in] Contour implementation to clone. |
bool FacetModeler::Contour2D::contains | ( | const OdGePoint2d & | ptPoint, |
bool * | pOnBorder = NULL , |
||
const OdGeTol & | gTol = FMGeGbl::gTol |
||
) | const |
Checks whether a point is inside the contour, at its boundary, or outside.
ptPoint | [in] Point to check. |
pOnBorder | [out] (Optional) true if the point is located on the contour border. |
gTol | [in] Tolerance. |
|
static |
|
static |
OdUInt32 FacetModeler::Contour2D::createVertexAt | ( | double | dParam, |
const OdGeTol & | gTol = FMGeGbl::gTol |
||
) |
Adds a vertex to the contour at the specified parameter value.
dParam | [in] Parameter to create a vertex. |
gTol | [in] Tolerance. |
Insertion or removal of a vertex at dParam invalidates all parameters greater than floor(dParam).
OdUInt32 FacetModeler::Contour2D::createVertexAtDist | ( | double | dDist, |
const OdGeTol & | gTol = FMGeGbl::gTol |
||
) |
Adds a vertex to the contour at the specified distance.
dDist | [in] Distance on the contour to add the vertex at. |
gTol | [in] Tolerance. |
Result FacetModeler::Contour2D::createVerticesAt | ( | const std::vector< double > & | vecParams, |
const OdGeTol & | gTol = FMGeGbl::gTol |
||
) |
Adds vertices at the specified parameters into the contour.
vecParams | [in] Array of parameters. |
gTol | [in] Tolerance. |
Result FacetModeler::Contour2D::createVerticesAt | ( | OdUInt32 | size, |
const double * | vecParams, | ||
const OdGeTol & | gTol = FMGeGbl::gTol |
||
) |
Adds vertices at the specified parameters into the contour.
size | [in] The number of elements in the parameter array. |
vecParams | [in] Pointer to an array of parameters. |
gTol | [in] Tolerance. |
void FacetModeler::Contour2D::deleteCoincident | ( | const OdGeTol & | gTol = FMGeGbl::gTol | ) |
Removes redundant segments with zero length.
gTol | [in] Tolerance. |
double FacetModeler::Contour2D::endParam | ( | ) | const |
Gets the end contour parameter.
Result FacetModeler::Contour2D::explode | ( | const DeviationParams & | devDeviation = FMGeGbl::gDefDev , |
OdIntPtr | uArcMetadata = 0 |
||
) |
Explodes all arc segments to lines. Sets the uArcMetadata flag on exploded segments.
devDeviation | [in] Deviation parameters. |
uArcMetadata | [in] Metadata to set. |
Result FacetModeler::Contour2D::explodeTo | ( | Contour2D & | rDestCont, |
const DeviationParams & | devDeviation = FMGeGbl::gDefDev , |
||
OdIntPtr | uArcMetadata = 0 |
||
) | const |
Explodes all arc segments to lines. Sets the uArcMetadata flag on exploded segments.
rDestCont | [out] Destination contour for exploded lines. |
devDeviation | [in] Deviation parameters. |
uArcMetadata | [in] Metadata to set. |
Result FacetModeler::Contour2D::getArcSegAt | ( | OdUInt32 | iIndex, |
OdGeCircArc2d & | geArc | ||
) | const |
Gets a circular arc segment by the specified index.
iIndex | [in] Segment index. |
geArc | [out] Resulting arc segment as OdGeCircArc2d. |
Gets a bulge value of a segment with the specified index.
iIndex | [in] Segment index. |
dBulge | [out] Bulge value. |
Result FacetModeler::Contour2D::getDistAtParam | ( | double | dParam, |
double & | dDist | ||
) | const |
Gets a distance from the start point to the specified parameter.
dParam | [in] Parameter. |
dDist | [out] Resulting distance. |
Result FacetModeler::Contour2D::getEndPoint | ( | OdGePoint2d & | ptPoint | ) | const |
Gets the end point of the contour.
ptPoint | [out] Resulting end point as OdGePoint2d. |
void FacetModeler::Contour2D::getGeomExtens | ( | OdGeExtents2d & | extens | ) |
Gets the geometry extents.
extens | [out] Resulting extents as OdGeExtents2d. |
Gets an internal angle of a vertex with the specified index.
iIndex | [in] Vertex index. |
dAngle | [out] Internal angle value. |
Result FacetModeler::Contour2D::getLineSegAt | ( | OdUInt32 | iIndex, |
OdGeLineSeg2d & | geLine | ||
) | const |
Gets a linear segment by the specified index.
iIndex | [in] Segment index. |
geLine | [out] Resulting line segment as OdGeLineSeg2d. |
Result FacetModeler::Contour2D::getNormalizedDist | ( | double & | dDist | ) | const |
Converts a distance to the [0, length] range.
dDist | [in/out] Distance to normalize. |
Result FacetModeler::Contour2D::getNormalizedParam | ( | double & | dParam | ) | const |
Converts a parameter to the [start param, end param] range.
dParam | [in/out] Parameter to normalize. |
Result FacetModeler::Contour2D::getOffsetProfile | ( | double | dOffset, |
Profile2D & | rResult, | ||
FilletType | eFilletType = eftExtend , |
||
const OdGeTol & | gTol = FMGeGbl::gTol |
||
) | const |
Gets the profile that is shifted in the normal direction from this closed contour. E.g., if dOffset is negative, a counter-clockwise circle is extended. If dOffset is positive and small enough, it is contracted, and becomes empty if dOffset > radius.
dOffset | [in] Signed offset along the normal direction. A positive offset is towards the inside for CCW contours. |
rResult | [out] Resulting profile. |
eFilletType | [in] Gap filling strategy for the segments sliding apart. |
gTol | [in] Tolerance. |
Result FacetModeler::Contour2D::getParamAtDist | ( | double | dDist, |
double & | dParam | ||
) | const |
Gets a parameter at the specified distance from the start point.
dDist | [in] Distance. |
dParam | [out] Resulting param. |
Result FacetModeler::Contour2D::getPoint | ( | double | dParam, |
OdGePoint2d & | ptPoint | ||
) | const |
Gets a point on the contour at the specified parameter.
dParam | [in] Parameter. |
ptPoint | [out] Resulting point. |
Result FacetModeler::Contour2D::getPointAt | ( | OdUInt32 | iIndex, |
OdGePoint2d & | ptPoint | ||
) | const |
Gets a point by the specified index.
iIndex | [in] Vertex index. |
ptPoint | [out] Vertex point as OdGePoint2d. |
Result FacetModeler::Contour2D::getPointAtDist | ( | double | dDist, |
OdGePoint2d & | ptPoint | ||
) | const |
Gets a point on the contour at the specified distance.
dDist | [in] Distance. |
ptPoint | [out] Resulting point. |
Result FacetModeler::Contour2D::getProfileByOffsets | ( | const std::vector< double > & | adOffset, |
Profile2D & | rResult, | ||
const OdGeTol & | gTol = FMGeGbl::gTol |
||
) | const |
Gets the profile that is shifted in the normal direction from this closed contour.
adOffset | [in] Array of the signed offset along the normal direction. A positive offset is inside for CCW contours. |
rResult | [out] Resulting profile. |
gTol | [in] Tolerance. |
Result FacetModeler::Contour2D::getSegmentAt | ( | OdUInt32 | iIndex, |
OdGePoint2d & | ptStart, | ||
OdGePoint2d & | ptEnd, | ||
double & | dBulge | ||
) | const |
Gets parameters of the segment specified by the index.
iIndex | [in] Segment index. |
ptStart | [out] Start point as OdGePoint2d. |
ptEnd | [out] End point as OdGePoint2d. |
dBulge | [out] Bulge value. |
Gets a segment by the specified index.
iIndex | [in] Segment index. |
rSegment | [out] Found segment. |
Result FacetModeler::Contour2D::getStartPoint | ( | OdGePoint2d & | ptPoint | ) | const |
Gets the start point of the contour.
ptPoint | [out] Resulting start point as OdGePoint2d. |
Result FacetModeler::Contour2D::getSubContour | ( | double | dStartParam, |
double | dEndParam, | ||
Contour2D & | rSubContour, | ||
const OdGeTol & | gTol = FMGeGbl::gTol |
||
) | const |
Gets a sub-contour given by two parameters.
dStartParam | [in] The lower bound on which to create a sub-contour. |
dEndParam | [in] The upper bound on which to create a sub-contour. |
rSubContour | [out] Resulting sub-contour. |
gTol | [in] Tolerance. |
Result FacetModeler::Contour2D::getTangent | ( | double | dParam, |
OdGeVector2d & | vTangent | ||
) | const |
Gets a tangent to the contour at the specified parameter.
dParam | [in] Parameter to calculate the tangent at. |
vTangent | [out] Resulting tangent vector as OdGeVector2d. |
Result FacetModeler::Contour2D::getTangentAtDist | ( | double | dDist, |
OdGeVector2d & | vTangent | ||
) | const |
Gets a tangent at the distance along the contour starting from the start point.
dDist | [in] Distance. |
vTangent | [out] Resulting tangent vector as OdGeVector2d. |
Result FacetModeler::Contour2D::getVertexAt | ( | OdUInt32 | iIndex, |
OdGePoint2d * | pPoint, | ||
double * | pBulge = NULL , |
||
OdIntPtr * | pMetadata = NULL , |
||
OdUInt32 * | puRawFlags = NULL |
||
) | const |
Gets data of a vertex with the specified index.
iIndex | [in] Vertex index. |
pPoint | [out] Vertex point as OdGePoint2d. |
pBulge | [out] (Optional) Bulge value. |
pMetadata | [out] (Optional) Metadata attribute. |
puRawFlags | [out] (Optional) Flags as a raw OdUInt32 value. |
bool FacetModeler::Contour2D::hasArcs | ( | ) | const |
Checks whether the contour has arcs.
|
inline |
Definition at line 1167 of file FMContour2D.h.
|
inline |
Definition at line 1165 of file FMContour2D.h.
ContourImplClass FacetModeler::Contour2D::implClass | ( | ) | const |
Gets the implementation type.
OdUInt32 FacetModeler::Contour2D::intersect | ( | const Contour2D & | rContB, |
std::vector< Intersection > & | vecPoints, | ||
const OdGeTol & | gTol = FMGeGbl::gTol |
||
) | const |
Calculates all intersections with the specified contour and appends the result to vecPoints.
rContB | [in] Other contour this contour is intersected with. |
vecPoints | [out] Intersection container the result is appended to. |
gTol | [in] Tolerance. |
OdUInt32 FacetModeler::Contour2D::intersect | ( | const Segment2D & | rSegB, |
std::vector< Intersection > & | vecPoints, | ||
const OdGeTol & | gTol = FMGeGbl::gTol |
||
) | const |
Calculates all intersections with the specified segment and appends the result to vecPoints.
rSegB | [in] Segment this contour is intersected with. |
vecPoints | [out] Intersection container the result is appended to. |
gTol | [in] Tolerance. |
OdUInt32 FacetModeler::Contour2D::intersectLine | ( | const OdGeLine2d & | rLine, |
std::vector< Intersection > & | vecPoints, | ||
const OdGeTol & | gTol = FMGeGbl::gTol |
||
) | const |
Calculates all intersections with the specified line and appends the result to vecPoints.
rLine | [in] Line this contour is intersected with. |
vecPoints | [out] Intersection container the result is appended to. |
gTol | [in] Tolerance. |
bool FacetModeler::Contour2D::isCCW | ( | ) | const |
Gets the orientation of the contour.
bool FacetModeler::Contour2D::isClosed | ( | ) | const |
Checks whether the contour is closed.
bool FacetModeler::Contour2D::isConvex | ( | ) | const |
Checks whether the contour is convex.
bool FacetModeler::Contour2D::isEmpty | ( | ) | const |
Checks whether the contour is empty.
bool FacetModeler::Contour2D::isEndsEqual | ( | const OdGeTol & | gTol = FMGeGbl::gTol | ) | const |
Checks whether the start and the end of the contour are equal to the specified tolerance.
gTol | [in] Tolerance. |
bool FacetModeler::Contour2D::isExplodedArcAt | ( | OdUInt32 | iIndex | ) | const |
Gets the ecfExplodedArc flag value at the specified segment.
iIndex | [in] Segment index. |
bool FacetModeler::Contour2D::isHiddenAt | ( | OdUInt32 | iIndex | ) | const |
Checks whether the segment with the specified index is hidden.
iIndex | [in] Segment index. |
bool FacetModeler::Contour2D::isInsideContour | ( | const Contour2D & | c2dOuter, |
bool | fAllowBordersTouch = false , |
||
const OdGeTol & | gTol = FMGeGbl::gTol |
||
) | const |
Checks whether this contour is inside the specified contour.
c2dOuter | [in] Probable outer contour. |
fAllowBordersTouch | [in] true to allow the contour to touch and overlap, or false to disallow. |
gTol | [in] Tolerance. |
bool FacetModeler::Contour2D::isOn | ( | const OdGePoint2d & | ptTest, |
double * | pParam = NULL , |
||
const OdGeTol & | gTol = FMGeGbl::gTol |
||
) | const |
Checks whether the 2D point is located on the contour with the given tolerance. If the point is on the contour, the method calculates the parameter value at this point.
ptTest | [in] Point to check. |
pParam | [out] (Optional) The contour's resulting parameter at the point ptTest. |
gTol | [in] Tolerance. |
bool FacetModeler::Contour2D::isSelfIntersecting | ( | const OdGeTol & | gTol = FMGeGbl::gTol , |
bool | bExcludeTouch = false |
||
) | const |
Checks whether the contour intersects itself.
gTol | [in] Tolerance. |
bExcludeTouch | [in] true for not considering a touch as self-intersection, or false otherwise. |
E.g. The method returns true for an 8-shaped contour regardless of the central intersection type (touch or crossing). The method returns false for a O-shaped closed contour, but returns true for an open one.
bool FacetModeler::Contour2D::isValidRegion | ( | const OdGeTol & | gTol = FMGeGbl::gTol | ) | const |
Checks whether this contour is closed and coincides with a directional boundary of an open 2D region.
gTol | [in] Tolerance. |
double FacetModeler::Contour2D::length | ( | ) | const |
Gets the length of the contour.
Makes the contour counter-clockwise or clockwise.
bCCW | [in] true for counter-clockwise, or false for clockwise. |
void FacetModeler::Contour2D::mergeSegments | ( | int | iMergeFlags = 0 , |
const OdGeTol & | gTol = FMGeGbl::gTol |
||
) |
Merges adjacent segments.
iMergeFlags | [in] Combination of AECGe::FilletType flags (emfMergeArcs,emfIgnoreMetadata,emfMergeOrigin). |
gTol | [in] Tolerance. |
Gets metadata for the specified segment.
iIndex | [in] Segment index. |
double FacetModeler::Contour2D::nearestParam | ( | const OdGePoint2d & | ptTest, |
OdGePoint2d * | ptNearest = NULL |
||
) | const |
Gets the nearest parameter and (optional) point on the contour for the given 2D point.
ptTest | [in] Point to check. |
ptNearest | [out] (Optional) The nearest point on the contour for the given point ptTest. |
OdUInt32 FacetModeler::Contour2D::numSegments | ( | ) | const |
Gets the number of segments.
OdUInt32 FacetModeler::Contour2D::numVerts | ( | ) | const |
Gets the number of vertices.
|
inline |
Definition at line 1161 of file FMContour2D.h.
|
inline |
Definition at line 1163 of file FMContour2D.h.
Creates a copy of the specified contour.
rSrcCont | [in] Contour to copy. |
Contour2D & FacetModeler::Contour2D::operator= | ( | const IContour2D & | rSrcCont | ) |
Creates a copy of the specified contour implementation to this object.
rSrcCont | [in] Contour implementation to copy. |
FaceOrientation FacetModeler::Contour2D::orientationAt | ( | OdUInt32 | iIndex | ) | const |
Gets the orientation of the segment with the specified index.
iIndex | [in] Segment index. |
Returns all built-in flags (orientation, visibility etc.) for the specified segment.
iIndex | [in] Segment index. |
Removes a vertex and corresponding segment.
iIndex | [in] Vertex index. |
Sets the capacity of the contour data to the specified vertex number.
iReservedSize | [in] Vertex number to reserve. |
Contour2D & FacetModeler::Contour2D::reset | ( | ContourImplClass | eImplClass = ecicUnknown | ) |
Clears the contents of the contour.
eImplClass | [in] Implementation type. |
void FacetModeler::Contour2D::reverse | ( | ) |
Reverses the contour.
SegmentType FacetModeler::Contour2D::segmentType | ( | OdUInt32 | iIndex | ) | const |
Gets the type of segment that begins at the specified vertex.
iIndex | [in] Segment index. |
Result FacetModeler::Contour2D::setAllMetadata | ( | OdIntPtr | iNewData, |
OdIntPtr | iBitsToModify = (OdIntPtr) -1 |
||
) |
Sets metadata for all segments.
iNewData | [in] New metadata to set. |
iBitsToModify | [in] A bit mask that indicates which bits to change. |
Sets a bulge value for a vertex with the specified index.
iIndex | [in] Vertex index. |
dBulge | [in] Bulge value to set. |
Makes the contour closed (or open).
bClosed | [in] New closed state to set. |
Sets or clears the ecfExplodedArc flag at the specified segment.
iIndex | [in] Segment index. |
bExplodedArc | [in] New flag value. |
Sets or clears the ecfHidden flag at the specified segment.
iIndex | [in] Segment index. |
bHidden | [in] Hidden state to set. |
Sets metadata for the specified segment.
iIndex | [in] Segment index. |
iNewData | [in] New metadata to set. |
Result FacetModeler::Contour2D::setOrientationAt | ( | OdUInt32 | iIndex, |
FaceOrientation | eOrientation | ||
) |
Sets the orientation of the segment with the specified index.
iIndex | [in] Segment index. |
eOrientation | [in] Orientation state to set. |
Result FacetModeler::Contour2D::setPointAt | ( | OdUInt32 | iIndex, |
const OdGePoint2d & | ptPoint | ||
) |
Updates all built-in flags (orientation, visibility etc.) for the specified segment.
iIndex | [in] Vertex index to set. |
iRawFlags | [in] Raw flags to set as OdUInt32. |
Sets the "smooth" flag value.
iIndex | [in] Segment index. |
bSmooth | [in] New value of the "smooth" flag. |
Result FacetModeler::Contour2D::setVertexAt | ( | OdUInt32 | iIndex, |
const OdGePoint2d & | ptPoint, | ||
double | dBulge | ||
) |
double FacetModeler::Contour2D::signedArea | ( | ) | const |
Gets the signed area of the contour.
|
inline |
Gets the start contour parameter.
Definition at line 779 of file FMContour2D.h.
Swaps the contents of the contour with another one.
rAnother | [in] Contour to swap. |
bool FacetModeler::Contour2D::threatAsSmoothCurveAt | ( | OdUInt32 | iIndex | ) | const |
Gets the "smooth" flag value of the segment with the specified index.
iIndex | [in] Segment index. |
Result FacetModeler::Contour2D::transformBy | ( | const OdGeMatrix2d & | mMatrix, |
const DeviationParams & | devDeviation = FMGeGbl::gDefDev |
||
) |
Transforms the contour.
mMatrix | [in] Transformation matrix. |
devDeviation | [in] Deviation parameters. |
bool FacetModeler::Contour2D::traverse | ( | Contour2DTraversingReactor & | reactor | ) | const |
Traverses the contour.
reactor | [in/out] Contour2DTraversingReactor object to traverse. |
|
static |
An empty static contour.
Definition at line 1152 of file FMContour2D.h.