|
CFx SDK Documentation 2024 SP0
|
#include <FMSegment2D.h>
Public Member Functions | |
| Segment2D () | |
| Segment2D (const OdGePoint2d &ptA, const OdGePoint2d &ptB, double dBulge=0.0, OdIntPtr uMetaData=0, OdUInt32 uRawFlags=0) | |
| Segment2D (const OdGePoint2d &ptA, const OdGePoint2d &ptB, const OdGePoint2d &ptIntermediate) | |
| Segment2D (const Segment2D &rSeg, SegmentImplClass eImplClass=esicBulgeSeg2D) | |
| Segment2D (SegmentImplClass eImplClass) | |
| Segment2D (const IBulgeSeg2D &rSeg, SegmentImplClass eImplClass=esicBulgeSeg2D) | |
| Segment2D & | operator= (const Segment2D &rSeg) |
| Segment2D & | operator= (const IBulgeSeg2D &rSeg) |
| SegmentImplClass | implClass () const |
| const OdGePoint2d & | startPt () const |
| const OdGePoint2d & | endPt () const |
| double | bulge () const |
| SegmentType | type () const |
| double | deviation () const |
| void | getDir (OdGeVector2d &vDir) const |
| double | dirLength () const |
| double | length () const |
| Result | getLineSeg (OdGeLineSeg2d &rLine) const |
| Result | getArcSeg (OdGeCircArc2d &rArc) const |
| Result | getPoint (double dParam, OdGePoint2d &ptPoint) const |
| Result | getTangent (double dParam, OdGeVector2d &vTangent) const |
| void | addExtents (OdGeExtents2d &extExtents, double dTol=0.0) const |
| bool | isOn (const OdGePoint2d &ptTest, double *pParam=NULL, const OdGeTol &gTol=FMGeGbl::gTol) const |
| double | nearestParam (const OdGePoint2d &ptTest, OdGePoint2d *ptNearest=NULL) const |
| double | integrate (const OdGePoint2d &ptOrigin=OdGePoint2d::kOrigin) const |
| Result | getSubSegment (double dStartParam, double dEndParam, IBulgeSeg2D &rSubSeg) const |
| Result | getParallelSegment (double dNormalOffset, IBulgeSeg2D &rParSeg) const |
| OdUInt32 | intersectXRay (const OdGePoint2d &ptTest, bool *pOnSegment=NULL, const OdGeTol &gTol=FMGeGbl::gTol) const |
| OdUInt32 | intersect (const IBulgeSeg2D &rSegB, OdGePoint2d *pPt1, OdGePoint2d *pPt2=NULL, const OdGeTol &gTol=FMGeGbl::gTol) const |
| OdUInt32 | intersect (const IBulgeSeg2D &rSegB, Intersection *pInt1=NULL, Intersection *pInt2=NULL, const OdGeTol &gTol=FMGeGbl::gTol) const |
| OdUInt32 | intersectLine (const OdGeLine2d &rGeLine, Intersection *pInt1=NULL, Intersection *pInt2=NULL, const OdGeTol &gTol=FMGeGbl::gTol) const |
| OdGePoint2d | arcCenter () const |
| double | arcRadius () const |
| Result | getCircleData (OdGePoint2d &ptCenter, double &dRadius) const |
| double | arcAngle () const |
| double | arcStartAngle () const |
| Result | getArcData (OdGePoint2d &ptCenter, double &dRadius, double &dStartAngle, double &dInclAngle) const |
| Result | transformBy (const OdGeMatrix2d &mTrans) |
| Result | reverse () |
| Result | set (const OdGePoint2d &ptA, const OdGePoint2d &ptB, double dBulge=0.0, OdIntPtr iMetaData=0, OdUInt32 iRawFlags=0) |
| Result | set (const OdGePoint2d &ptA, const OdGePoint2d &ptB, const OdGePoint2d &ptIntermediate) |
| Result | set (const OdGeLineSeg2d &geLine) |
| Result | set (const OdGeCircArc2d &geArc) |
| Result | set (const IBulgeSeg2D &rSeg) |
| Result | shift (const double dAngle, const double dShiftDist) |
| OdIntPtr | metadata () const |
| Result | setMetadata (OdIntPtr iNewData) |
| bool | isHidden () const |
| Result | setHidden (bool bHidden=true) |
| FaceOrientation | orientation () const |
| Result | setOrientation (FaceOrientation eOrientation) |
| bool | isExplodedArc () const |
| Result | setExplodedArc (bool bExplodedArc=true) |
| OdUInt32 | rawFlags () const |
| Result | setRawFlags (OdUInt32 iRawFlags) |
| ~Segment2D () | |
| operator const IBulgeSeg2D & () const | |
| operator IBulgeSeg2D & () | |
| const IBulgeSeg2D & | impl () const |
| IBulgeSeg2D & | impl () |
Represents 2D Segment objects.
Definition at line 51 of file FMSegment2D.h.
| FacetModeler::Segment2D::Segment2D | ( | ) |
Default constructor.
| FacetModeler::Segment2D::Segment2D | ( | const OdGePoint2d & | ptA, |
| const OdGePoint2d & | ptB, | ||
| double | dBulge = 0.0, |
||
| OdIntPtr | uMetaData = 0, |
||
| OdUInt32 | uRawFlags = 0 |
||
| ) |
Constructor. Creates the object with specified start point, end point, bulge, metadata and flags.
| ptA | [in] Start point. |
| ptB | [in] End point. |
| dBulge | [in] (Optional) Bulge value. |
| uMetaData | [in] (Optional) Metadata attribute. |
| uRawFlags | [in] (Optional) Flags as a raw OdUInt32 value. |
| FacetModeler::Segment2D::Segment2D | ( | const OdGePoint2d & | ptA, |
| const OdGePoint2d & | ptB, | ||
| const OdGePoint2d & | ptIntermediate | ||
| ) |
Constructor. Creates a segment object using three points.
| ptA | [in] Start point. |
| ptB | [in] End point. |
| ptIntermediate | [in] Intermediate point. |
| FacetModeler::Segment2D::Segment2D | ( | const Segment2D & | rSeg, |
| SegmentImplClass | eImplClass = esicBulgeSeg2D |
||
| ) |
|
explicit |
Constructor. Creates an object with data from the specified implementation class.
| eImplClass | [in] Implementation object to copy. |
|
explicit |
Copy constructor. Creates an Segment2D object and initializes it with the given implementation object and with the specified SegmentImplClass type.
| rSeg | [in] Implementation object to copy from. |
| eImplClass | [in] Type of segment implementation. |
| FacetModeler::Segment2D::~Segment2D | ( | ) |
Destructor.
| void FacetModeler::Segment2D::addExtents | ( | OdGeExtents2d & | extExtents, |
| double | dTol = 0.0 |
||
| ) | const |
Adds extents of this segment (extended by dTol) to the given extents.
| extExtents | [out] Extents to add. |
| dTol | [in] Comparing tolerance. |
| double FacetModeler::Segment2D::arcAngle | ( | ) | const |
Gets the signed included angle of the arc segment.
| OdGePoint2d FacetModeler::Segment2D::arcCenter | ( | ) | const |
Gets the center of the arc.
| double FacetModeler::Segment2D::arcRadius | ( | ) | const |
Gets the radius of the arc.
| double FacetModeler::Segment2D::arcStartAngle | ( | ) | const |
Gets the start angle of the arc (direction from center to startPt).
| double FacetModeler::Segment2D::bulge | ( | ) | const |
Gets the bulge value of the segment.
| double FacetModeler::Segment2D::deviation | ( | ) | const |
Gets the deviation value of the segment.
| double FacetModeler::Segment2D::dirLength | ( | ) | const |
Calculates the distance between the start and end point.
| const OdGePoint2d & FacetModeler::Segment2D::endPt | ( | ) | const |
Gets the end point of the segment as OdGePoint2d.
| Result FacetModeler::Segment2D::getArcData | ( | OdGePoint2d & | ptCenter, |
| double & | dRadius, | ||
| double & | dStartAngle, | ||
| double & | dInclAngle | ||
| ) | const |
Gets the arc center point, radius and angles.
| ptCenter | [out] Center of the circular arc. |
| dRadius | [out] Radius of the circular arc. |
| dStartAngle | [out] Start angle of the circular arc. |
| dInclAngle | [out] End angle of the circular arc. |
| Result FacetModeler::Segment2D::getArcSeg | ( | OdGeCircArc2d & | rArc | ) | const |
Gets the arc segment corresponding to this segment.
| rArc | [out] Resulting circular arc segment. |
| Result FacetModeler::Segment2D::getCircleData | ( | OdGePoint2d & | ptCenter, |
| double & | dRadius | ||
| ) | const |
Gets the arc radius and center point.
| ptCenter | [out] Center of the circular arc. |
| dRadius | [out] Radius of the circular arc. |
| void FacetModeler::Segment2D::getDir | ( | OdGeVector2d & | vDir | ) | const |
Gets the direction vector of the segment as OdGeVector2d.
| vDir | [out] Direction vector. |
| Result FacetModeler::Segment2D::getLineSeg | ( | OdGeLineSeg2d & | rLine | ) | const |
Gets the line segment corresponding to this segment.
| rLine | [out] Resulting linear segment. |
| Result FacetModeler::Segment2D::getParallelSegment | ( | double | dNormalOffset, |
| IBulgeSeg2D & | rParSeg | ||
| ) | const |
Gets the parallel segment.
| dNormalOffset | [in] Normal offset. |
| rParSeg | [out] Resulting segment. |
| Result FacetModeler::Segment2D::getPoint | ( | double | dParam, |
| OdGePoint2d & | ptPoint | ||
| ) | const |
Gets the point with the specified parameter.
| dParam | [in] Parameter of point on the segment. |
| ptPoint | [out] Point on the segment. |
| Result FacetModeler::Segment2D::getSubSegment | ( | double | dStartParam, |
| double | dEndParam, | ||
| IBulgeSeg2D & | rSubSeg | ||
| ) | const |
Returns the subsegment with two specified parameters.
| dStartParam | [in] Start parameter. |
| dEndParam | [in] End parameter. |
| rSubSeg | [out] Resulting segment. |
| Result FacetModeler::Segment2D::getTangent | ( | double | dParam, |
| OdGeVector2d & | vTangent | ||
| ) | const |
Gets the tangent vector at the specified parameter.
| dParam | [in] Parameter for calculation. |
| vTangent | [out] Calculated tangent as OdGeVector2d. |
|
inline |
Definition at line 583 of file FMSegment2D.h.
|
inline |
Definition at line 582 of file FMSegment2D.h.
| SegmentImplClass FacetModeler::Segment2D::implClass | ( | ) | const |
Gets the segment implementation class of this object.
| double FacetModeler::Segment2D::integrate | ( | const OdGePoint2d & | ptOrigin = OdGePoint2d::kOrigin | ) | const |
Gets the signed area of a contour bounded by this segment and two lines connecting ptOrigin with ends of this segment.
| ptOrigin | [in] Point of origin. |
| OdUInt32 FacetModeler::Segment2D::intersect | ( | const IBulgeSeg2D & | rSegB, |
| Intersection * | pInt1 = NULL, |
||
| Intersection * | pInt2 = NULL, |
||
| const OdGeTol & | gTol = FMGeGbl::gTol |
||
| ) | const |
Gets the number of intersections with the specified segment.
| rSegB | [in] Segment to check for intersections with. |
| pInt1 | [out] (Optional) First intersection object. |
| pInt2 | [out] (Optional) Second intersection object. |
| gTol | [in] Tolerance. |
| OdUInt32 FacetModeler::Segment2D::intersect | ( | const IBulgeSeg2D & | rSegB, |
| OdGePoint2d * | pPt1, | ||
| OdGePoint2d * | pPt2 = NULL, |
||
| const OdGeTol & | gTol = FMGeGbl::gTol |
||
| ) | const |
Gets the number of intersections with the specified segment.
| rSegB | [in] Segment to check for intersections with. |
| pPt1 | [out] (Optional) First intersection point. |
| pPt2 | [out] (Optional) Second intersection point. |
| gTol | [in] Tolerance. |
| OdUInt32 FacetModeler::Segment2D::intersectLine | ( | const OdGeLine2d & | rGeLine, |
| Intersection * | pInt1 = NULL, |
||
| Intersection * | pInt2 = NULL, |
||
| const OdGeTol & | gTol = FMGeGbl::gTol |
||
| ) | const |
Gets the number of intersections with the specified line.
| rGeLine | [in] Line to check for intersections with. |
| pInt1 | [out] (Optional) First intersection object. |
| pInt2 | [out] (Optional) Second intersection object. |
| gTol | [in] Tolerance. |
| OdUInt32 FacetModeler::Segment2D::intersectXRay | ( | const OdGePoint2d & | ptTest, |
| bool * | pOnSegment = NULL, |
||
| const OdGeTol & | gTol = FMGeGbl::gTol |
||
| ) | const |
Gets the number of different intersection points of the segment (including end points with minimal Y) with a ray, starting at ptTest and going in the X direction.
| ptTest | [in] Point to test. |
| pOnSegment | [out] The result of checking whether a point lies on the segment. |
| gTol | [in] Tolerance. |
| bool FacetModeler::Segment2D::isExplodedArc | ( | ) | const |
Gets the ecfExplodedArc flag value.
| bool FacetModeler::Segment2D::isHidden | ( | ) | const |
Gets the ecfHidden flag value.
| bool FacetModeler::Segment2D::isOn | ( | const OdGePoint2d & | ptTest, |
| double * | pParam = NULL, |
||
| const OdGeTol & | gTol = FMGeGbl::gTol |
||
| ) | const |
Checks whether the point lies within a tolerance on the segment.
| ptTest | [in] Point to test. |
| pParam | [out] Resulting parameter. |
| gTol | [in] Tolerance. |
| double FacetModeler::Segment2D::length | ( | ) | const |
Returns the segment length.
Calculates the segment length.
| OdIntPtr FacetModeler::Segment2D::metadata | ( | ) | const |
Gets metadata.
| double FacetModeler::Segment2D::nearestParam | ( | const OdGePoint2d & | ptTest, |
| OdGePoint2d * | ptNearest = NULL |
||
| ) | const |
Calculates the nearest parameter to the specified point.
| ptTest | [in] Point to test. |
| ptNearest | [out] Nearest point. |
|
inline |
Definition at line 580 of file FMSegment2D.h.
|
inline |
Definition at line 581 of file FMSegment2D.h.
| Segment2D & FacetModeler::Segment2D::operator= | ( | const IBulgeSeg2D & | rSeg | ) |
Copy operator. Copies data from the specified IBulgeSeg2D object.
| rSeg | [in] Segment implementation to copy. |
Copy operator. Copies data from the specified Segment2D object.
| rSeg | [in] Segment to copy. |
| FaceOrientation FacetModeler::Segment2D::orientation | ( | ) | const |
Gets the orientation of the segment.
| OdUInt32 FacetModeler::Segment2D::rawFlags | ( | ) | const |
Gets internal flags (orientation, visibility etc.).
| Result FacetModeler::Segment2D::reverse | ( | ) |
Inverts the segment so it is in the opposite direction.
| Result FacetModeler::Segment2D::set | ( | const IBulgeSeg2D & | rSeg | ) |
Copies data from another segment.
| rSeg | [in] Segment to copy data from. |
| Result FacetModeler::Segment2D::set | ( | const OdGeCircArc2d & | geArc | ) |
Copies data from the specified GeCircArc2d and resets metadata.
| geArc | [in] Circular arc segment to copy data from. |
| Result FacetModeler::Segment2D::set | ( | const OdGeLineSeg2d & | geLine | ) |
Copies data from the specified GeLineSeg2d and resets metadata.
| geLine | [in] Linear segment to copy data from. |
| Result FacetModeler::Segment2D::set | ( | const OdGePoint2d & | ptA, |
| const OdGePoint2d & | ptB, | ||
| const OdGePoint2d & | ptIntermediate | ||
| ) |
Updates end points and calculates the bulge using the specified intermediate point.
| ptA | [in] Start point. |
| ptB | [in] End point. |
| ptIntermediate | [in] Intermediate point. |
| Result FacetModeler::Segment2D::set | ( | const OdGePoint2d & | ptA, |
| const OdGePoint2d & | ptB, | ||
| double | dBulge = 0.0, |
||
| OdIntPtr | iMetaData = 0, |
||
| OdUInt32 | iRawFlags = 0 |
||
| ) |
Updates the object with the specified start point, end point, bulge, metadata and flags.
| ptA | [in] Start point. |
| ptB | [in] End point. |
| dBulge | [in] (Optional) Bulge value. |
| uMetaData | [in] (Optional) Metadata attribute. |
| uRawFlags | [in] (Optional) Flags as raw OdUInt32 value. |
Sets or clears the ecfExplodedArc flag.
| bExplodedArc | [in] New value of the ecfExplodedArc flag. |
Sets or clears the ecfHidden flag.
| bHidden | [in] New value of the ecfHidden flag. |
Sets metadata.
| iNewData | [in] Pointer to a new metadata object. |
| Result FacetModeler::Segment2D::setOrientation | ( | FaceOrientation | eOrientation | ) |
Sets the orientation of the segment.
| eOrientation | [in] New orientation value. |
Sets internal flags (orientation, visibility etc.).
| iRawFlags | [in] New value of internal flags to set. |
| Result FacetModeler::Segment2D::shift | ( | const double | dAngle, |
| const double | dShiftDist | ||
| ) |
Shifts the segment in the direction specified by the angle and distance.
| dAngle | [in] Shear direction angle. |
| dShiftDist | [in] Shear distance. |
| const OdGePoint2d & FacetModeler::Segment2D::startPt | ( | ) | const |
Gets the start point of the segment as OdGePoint2d.
| Result FacetModeler::Segment2D::transformBy | ( | const OdGeMatrix2d & | mTrans | ) |
Transforms the segment using the specified matrix.
| mTrans | [in] Transformation matrix. |
| SegmentType FacetModeler::Segment2D::type | ( | ) | const |
Gets the segment type of this object.