CFx SDK Documentation  2023 SP0
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
FacetModeler::Profile2D Class Reference

#include <FMProfile2D.h>

Inheritance diagram for FacetModeler::Profile2D:
FacetModeler::Profile3D

Public Types

typedef Contour2D value_type
 DOM. More...
 
typedef const Contour2Dconst_reference
 DOM. More...
 
typedef Contour2Dreference
 DOM. More...
 
typedef const Contour2Dconst_pointer
 DOM. More...
 
typedef Contour2Dpointer
 DOM. More...
 
typedef OdUInt32 size_type
 DOM. More...
 
typedef const Contour2Dconst_iterator
 DOM. More...
 
typedef Contour2Diterator
 DOM. More...
 

Public Member Functions

 Profile2D ()
 
 Profile2D (const Contour2D &rSrcCont)
 
 ~Profile2D ()
 
 Profile2D (const Profile2D &rSrc)
 
Profile2Doperator= (const Profile2D &rSrc)
 
size_type size () const
 DOM. More...
 
bool empty () const
 DOM. More...
 
size_type capacity () const
 DOM. More...
 
size_type max_size () const
 DOM. More...
 
const_reference operator[] (size_type iPos) const
 DOM. More...
 
reference operator[] (size_type iPos)
 DOM. More...
 
const_reference front () const
 DOM. More...
 
reference front ()
 DOM. More...
 
const_reference back () const
 DOM. More...
 
reference back ()
 DOM. More...
 
const_iterator begin () const
 DOM. More...
 
iterator begin ()
 DOM. More...
 
const_iterator end () const
 DOM. More...
 
iterator end ()
 DOM. More...
 
void clear ()
 
void resize (size_type iSize)
 
void reserve (size_type iNewCapacity)
 DOM. More...
 
Contour2Dpush_back ()
 DOM. More...
 
Contour2Dpush_back (ContourImplClass eCC)
 DOM. More...
 
void push_back (const Contour2D &rVal)
 DOM. More...
 
void pop_back ()
 DOM. More...
 
void erase (size_type iPos)
 DOM. More...
 
iterator erase (iterator itWhere)
 DOM. More...
 
iterator erase (iterator itFirst, iterator itLast)
 DOM. More...
 
void insert (size_type iPos, const Contour2D &rVal)
 DOM. More...
 
iterator insert (iterator itWhere, const Contour2D &rVal)
 DOM. More...
 
void insert (iterator itWhere, const_iterator itFirst, const_iterator itLast)
 DOM. More...
 
void swap (Profile2D &rAnother)
 DOM. More...
 
Result addExtents (OdGeExtents2d &extExtents) const
 
bool hasNonEmptyContours () const
 
void reverse ()
 
Result transformBy (const OdGeMatrix2d &mMatrix, const DeviationParams &devDeviation=FMGeGbl::gDefDev)
 
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 (Profile2D &rDestProfile, const DeviationParams &devDeviation=FMGeGbl::gDefDev, OdIntPtr uArcMetadata=0) const
 
double perimeter () const
 
void getAdjustedProfile (double dWidth, double dDepth, bool bAdjustWidth, bool bAdjustDepth, bool bMirrorInX, bool bMirrorInY, double dRotation, Profile2D &rResult) const
 
void fit (const OdGeExtents2d &extBoundingBox, const DeviationParams &devDeviation=FMGeGbl::gDefDev)
 
void fit (const OdGeExtents2d &extBoundingBox, bool bFitX, bool bFitY, const DeviationParams &devDeviation=FMGeGbl::gDefDev)
 
Result getOffsetProfile (double dOffset, Profile2D &rResult, FilletType eFilletType=eftExtend, const OdGeTol &gTol=FMGeGbl::gTol) const
 
void getHoles (Profile2D &rHolesProfile) const
 
void getWithoutHoles (Profile2D &rNoHolesProfile) const
 
Result getFaces (std::vector< Profile2D > &aFaces) const
 
void split (const OdGeLine2d &lCutter, Profile2D &rRght, Profile2D &rLeft) const
 
Result setAllMetadata (OdIntPtr uNewData, OdIntPtr uBitsToModify=INT_MAX)
 
Result regularizeTo (Profile2D &rDest, const OdGeTol &gTol=FMGeGbl::gTol) const
 
bool isValidRegion (const OdGeTol &gTol=FMGeGbl::gTol) const
 
double signedArea () const
 
Result getSingleContour (Contour2D &rDest, const OdGeTol &gTol=FMGeGbl::gTol) const
 
bool contains (const OdGePoint2d &ptTest, bool *pOnBorder=0, const OdGeTol &gTol=FMGeGbl::gTol) const
 

Static Public Member Functions

static bool PerformOperation (BooleanOperation eOperation, const Profile2D &rArg1, const Profile2D &rArg2, Profile2D &rResult, const OdGeTol &tol=FMGeGbl::gTol)
 

Static Public Attributes

static FMGEOMETRY_API_STATIC const Profile2D kNull
 

Detailed Description

Describes 2D Profile.

Definition at line 38 of file FMProfile2D.h.

Member Typedef Documentation

◆ const_iterator

DOM.

Definition at line 79 of file FMProfile2D.h.

◆ const_pointer

DOM.

Definition at line 73 of file FMProfile2D.h.

◆ const_reference

DOM.

Definition at line 69 of file FMProfile2D.h.

◆ iterator

DOM.

Definition at line 81 of file FMProfile2D.h.

◆ pointer

DOM.

Definition at line 75 of file FMProfile2D.h.

◆ reference

DOM.

Definition at line 71 of file FMProfile2D.h.

◆ size_type

DOM.

Definition at line 77 of file FMProfile2D.h.

◆ value_type

DOM.

Definition at line 67 of file FMProfile2D.h.

Constructor & Destructor Documentation

◆ Profile2D() [1/3]

FacetModeler::Profile2D::Profile2D ( )

Constructor.

◆ Profile2D() [2/3]

FacetModeler::Profile2D::Profile2D ( const Contour2D rSrcCont)
explicit

Constructor.

◆ ~Profile2D()

FacetModeler::Profile2D::~Profile2D ( )

Destructor.

◆ Profile2D() [3/3]

FacetModeler::Profile2D::Profile2D ( const Profile2D rSrc)

Copy constructor.

Member Function Documentation

◆ addExtents()

Result FacetModeler::Profile2D::addExtents ( OdGeExtents2d extExtents) const

Appends the extents of the profile to the specified extents structure.

◆ back() [1/2]

reference FacetModeler::Profile2D::back ( )

DOM.

◆ back() [2/2]

const_reference FacetModeler::Profile2D::back ( ) const

DOM.

◆ begin() [1/2]

iterator FacetModeler::Profile2D::begin ( )

DOM.

◆ begin() [2/2]

const_iterator FacetModeler::Profile2D::begin ( ) const

DOM.

◆ capacity()

size_type FacetModeler::Profile2D::capacity ( ) const

DOM.

◆ clear()

void FacetModeler::Profile2D::clear ( )

Clears the profile.

◆ contains()

bool FacetModeler::Profile2D::contains ( const OdGePoint2d ptTest,
bool *  pOnBorder = 0,
const OdGeTol gTol = FMGeGbl::gTol 
) const

Tries to create a profile from standard ACAD object's geometry.

Parameters
idEntity[in] Object ID of ACAD entity to convert geometry from.
mResult[out] Result.
Remarks
Currently works for the following entities: OdDbPolyline

Returns true if the point lies inside the profile or on it's border.

Remarks
Contours of the profile should be closed. pOnBorder is true, if the point lies on the border of the contour. The return value is equal to ( iNumCCW - iNumCW > 0 ), where the iNum(C)CW is number of (C)CW contours, containing the point Default value (e.g. empty profile) is true

◆ deleteCoincident()

void FacetModeler::Profile2D::deleteCoincident ( const OdGeTol gTol = FMGeGbl::gTol)

Removes redundant segments with zero length for all contours.

◆ empty()

bool FacetModeler::Profile2D::empty ( ) const

DOM.

◆ end() [1/2]

iterator FacetModeler::Profile2D::end ( )

DOM.

◆ end() [2/2]

const_iterator FacetModeler::Profile2D::end ( ) const

DOM.

◆ erase() [1/3]

iterator FacetModeler::Profile2D::erase ( iterator  itFirst,
iterator  itLast 
)

DOM.

◆ erase() [2/3]

iterator FacetModeler::Profile2D::erase ( iterator  itWhere)

DOM.

◆ erase() [3/3]

void FacetModeler::Profile2D::erase ( size_type  iPos)

DOM.

◆ explode()

Result FacetModeler::Profile2D::explode ( const DeviationParams devDeviation = FMGeGbl::gDefDev,
OdIntPtr  uArcMetadata = 0 
)

Explodes all contours.

◆ explodeTo()

Result FacetModeler::Profile2D::explodeTo ( Profile2D rDestProfile,
const DeviationParams devDeviation = FMGeGbl::gDefDev,
OdIntPtr  uArcMetadata = 0 
) const

Explodes all contours.

◆ fit() [1/2]

void FacetModeler::Profile2D::fit ( const OdGeExtents2d extBoundingBox,
bool  bFitX,
bool  bFitY,
const DeviationParams devDeviation = FMGeGbl::gDefDev 
)

Adjusts profile to bounding box extents.

◆ fit() [2/2]

void FacetModeler::Profile2D::fit ( const OdGeExtents2d extBoundingBox,
const DeviationParams devDeviation = FMGeGbl::gDefDev 
)

Adjusts profile to bounding box extents.

◆ front() [1/2]

reference FacetModeler::Profile2D::front ( )

DOM.

◆ front() [2/2]

const_reference FacetModeler::Profile2D::front ( ) const

DOM.

◆ getAdjustedProfile()

void FacetModeler::Profile2D::getAdjustedProfile ( double  dWidth,
double  dDepth,
bool  bAdjustWidth,
bool  bAdjustDepth,
bool  bMirrorInX,
bool  bMirrorInY,
double  dRotation,
Profile2D rResult 
) const

Returns adjusted profile.

Parameters
dWidth[in] Width of desired extents.
dDepth[in] Depth of desired extents.
bAdjustWidth[in] Adjusts the width to extents.
bAdjustDepth[in] Adjusts the depth to extents.
bMirrorInX[in] Mirror in X.
bMirrorInY[in] Mirror in Y.
dRotation[in] Rotation around Z axis.
rResult[out] Resulting profile.

◆ getFaces()

Result FacetModeler::Profile2D::getFaces ( std::vector< Profile2D > &  aFaces) const

Returns profiles. Each of the returned profiles bounds a connected domain, and contains one (the first one) big CCW contour and possibly few smaller CW "holes".

Remarks
This profile should be "regular" (no self-intersections, valid nesting of CCW/CW ).

◆ getHoles()

void FacetModeler::Profile2D::getHoles ( Profile2D rHolesProfile) const

Returns all hole contours reversed.

◆ getOffsetProfile()

Result FacetModeler::Profile2D::getOffsetProfile ( double  dOffset,
Profile2D rResult,
FilletType  eFilletType = eftExtend,
const OdGeTol gTol = FMGeGbl::gTol 
) const

Return the profile that is shifted in normal direction from this closed(!) contour. E.g. counter-clockwise circle is extended, if dOffset is negative. It is contracted, if dOffset is positive and small enough, and it becomes empty, if dOffset > radius

Parameters
dOffset[in] Signed offset along normal direction. Positive offset is to inside for CCW contours.
rResult[out] Resulting profile.
eFilletType[in] Gap filling strategy for the segments sliding apart
tTol[in] Tolerance.
Returns
Success status.

◆ getSingleContour()

Result FacetModeler::Profile2D::getSingleContour ( Contour2D rDest,
const OdGeTol gTol = FMGeGbl::gTol 
) const

Returns single contour describing the profile with bridges between initial contours.

Remarks
The contour is not self-intersecting unless initial contours intersect.

This profile should be "regular" (no self-intersections and valid nesting of CW/CCW contours )

◆ getWithoutHoles()

void FacetModeler::Profile2D::getWithoutHoles ( Profile2D rNoHolesProfile) const

Returns all non-hole contours.

◆ hasNonEmptyContours()

bool FacetModeler::Profile2D::hasNonEmptyContours ( ) const

Returns true if this profile contains at least one non-empty contour

◆ insert() [1/3]

iterator FacetModeler::Profile2D::insert ( iterator  itWhere,
const Contour2D rVal 
)

DOM.

◆ insert() [2/3]

void FacetModeler::Profile2D::insert ( iterator  itWhere,
const_iterator  itFirst,
const_iterator  itLast 
)

DOM.

◆ insert() [3/3]

void FacetModeler::Profile2D::insert ( size_type  iPos,
const Contour2D rVal 
)

DOM.

◆ isValidRegion()

bool FacetModeler::Profile2D::isValidRegion ( const OdGeTol gTol = FMGeGbl::gTol) const

Returns whether this profile contains only closed contours and coincides with a directional boundary of some open 2D-region.

Remarks
  • returns false for empty and for non-closed contours;
  • returns false, if there are coincident bounds with opposite directions (e.g. O-O shape);
  • returns false, if there are sub-contours with incorrect orientation (e.g. 8 shape)
  • returns true otherwise

◆ max_size()

size_type FacetModeler::Profile2D::max_size ( ) const

DOM.

◆ mergeSegments()

void FacetModeler::Profile2D::mergeSegments ( int  iMergeFlags = 0,
const OdGeTol gTol = FMGeGbl::gTol 
)

Merges adjacent segments for all contours.

Parameters
iMergeFlags[in] combination of AECGe::FilletType flags (emfMergeArcs,emfIgnoreMetadata,emfMergeOrigin)
gTol[in] Tolerance.

◆ operator=()

Profile2D& FacetModeler::Profile2D::operator= ( const Profile2D rSrc)

Copy operator.

◆ operator[]() [1/2]

reference FacetModeler::Profile2D::operator[] ( size_type  iPos)

DOM.

◆ operator[]() [2/2]

const_reference FacetModeler::Profile2D::operator[] ( size_type  iPos) const

DOM.

◆ PerformOperation()

static bool FacetModeler::Profile2D::PerformOperation ( BooleanOperation  eOperation,
const Profile2D rArg1,
const Profile2D rArg2,
Profile2D rResult,
const OdGeTol tol = FMGeGbl::gTol 
)
static

Performs boolean operation on 2D profiles.

Remarks
Each argument is a set of points on the plane, not necessary convex or connected. All contours must be non-selfintersecting, closed. Segments in contours must usually go counterclockwise, otherwise they will be counted as holes in other contours. The method performs operation on arguments and returns true if the operation is successful.

◆ perimeter()

double FacetModeler::Profile2D::perimeter ( ) const

Returns the perimeter of the profile.

◆ pop_back()

void FacetModeler::Profile2D::pop_back ( )

DOM.

◆ push_back() [1/3]

Contour2D& FacetModeler::Profile2D::push_back ( )

DOM.

◆ push_back() [2/3]

void FacetModeler::Profile2D::push_back ( const Contour2D rVal)

DOM.

◆ push_back() [3/3]

Contour2D& FacetModeler::Profile2D::push_back ( ContourImplClass  eCC)

DOM.

◆ regularizeTo()

Result FacetModeler::Profile2D::regularizeTo ( Profile2D rDest,
const OdGeTol gTol = FMGeGbl::gTol 
) const

Removes self-intersecting parts oriented clockwise and leaves counter-clockwise parts intact.

◆ reserve()

void FacetModeler::Profile2D::reserve ( size_type  iNewCapacity)

DOM.

◆ resize()

void FacetModeler::Profile2D::resize ( size_type  iSize)

Resizes the profile.

◆ reverse()

void FacetModeler::Profile2D::reverse ( )

Reverses all contours.

◆ setAllMetadata()

Result FacetModeler::Profile2D::setAllMetadata ( OdIntPtr  uNewData,
OdIntPtr  uBitsToModify = INT_MAX 
)

Updates metadata for all segments in all contours.

◆ signedArea()

double FacetModeler::Profile2D::signedArea ( ) const

Returns signed area

◆ size()

size_type FacetModeler::Profile2D::size ( ) const

DOM.

◆ split()

void FacetModeler::Profile2D::split ( const OdGeLine2d lCutter,
Profile2D rRght,
Profile2D rLeft 
) const

Splits profile with a line.

◆ swap()

void FacetModeler::Profile2D::swap ( Profile2D rAnother)

DOM.

◆ transformBy()

Result FacetModeler::Profile2D::transformBy ( const OdGeMatrix2d mMatrix,
const DeviationParams devDeviation = FMGeGbl::gDefDev 
)

Transforms all contours.

Member Data Documentation

◆ kNull

FMGEOMETRY_API_STATIC const Profile2D FacetModeler::Profile2D::kNull
static

An empty static profile

Definition at line 373 of file FMProfile2D.h.


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