CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
OdGeLineSeg2d Class Reference

#include <GeLineSeg2d.h>

Inheritance diagram for OdGeLineSeg2d:
OdGeLinearEnt2d OdGeCurve2d OdGeEntity2d

Public Member Functions

 OdGeLineSeg2d ()
 
 OdGeLineSeg2d (const OdGeLineSeg2d &source)
 
 OdGeLineSeg2d (const OdGePoint2d &point1, const OdGePoint2d &point2)
 
 OdGeLineSeg2d (const OdGePoint2d &point, const OdGeVector2d &vect)
 
OdGeLineSeg2dset (const OdGePoint2d &point, const OdGeVector2d &vect)
 
OdGeLineSeg2dset (const OdGePoint2d &point1, const OdGePoint2d &point2)
 
OdGeLineSeg2dset (const OdGeCurve2d &curve1, const OdGeCurve2d &curve2, double &param1, double &param2, bool &success)
 
OdGeLineSeg2dset (const OdGeCurve2d &curve, const OdGePoint2d &point, double &param, bool &success)
 
void getBisector (OdGeLine2d &line) const
 
OdGePoint2d baryComb (double blendCoeff) const
 
OdGePoint2d startPoint () const
 
OdGePoint2d endPoint () const
 
OdGeLineSeg2doperator= (const OdGeLineSeg2d &line)
 
- Public Member Functions inherited from OdGeLinearEnt2d
bool intersectWith (const OdGeLinearEnt2d &line, OdGePoint2d &intPnt, const OdGeTol &tol=OdGeContext::gTol) const
 
bool overlap (const OdGeLinearEnt2d &line, OdGeLinearEnt2d *&overlap, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isParallelTo (const OdGeLinearEnt2d &line, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isPerpendicularTo (const OdGeLinearEnt2d &line, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isColinearTo (const OdGeLinearEnt2d &line, const OdGeTol &tol=OdGeContext::gTol) const
 
void getPerpLine (const OdGePoint2d &point, OdGeLine2d &perpLine) const
 
OdGePoint2d pointOnLine () const
 
OdGeVector2d direction () const
 
void getLine (OdGeLine2d &line) const
 
OdGeLinearEnt2doperator= (const OdGeLinearEnt2d &line)
 
- Public Member Functions inherited from OdGeCurve2d
OdGeCurve3dconvertTo3d () const
 
void convertTo3d (OdGeCurve3d &curve3d) const
 
void getInterval (OdGeInterval &interval) const
 
void getInterval (OdGeInterval &interval, OdGePoint2d &start, OdGePoint2d &end) const
 
OdGeCurve2dreverseParam ()
 
OdGeCurve2dsetInterval ()
 
bool setInterval (const OdGeInterval &interval)
 
double distanceTo (const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
double distanceTo (const OdGeCurve2d &otherCur, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGePoint2d closestPointTo (const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGePoint2d closestPointTo (const OdGePoint2d &point, double &param, const OdGeInterval *range, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGePoint2d closestPointTo (const OdGeCurve2d &curve2d, OdGePoint2d &pntOnOtherCrv, const OdGeTol &tol=OdGeContext::gTol) const
 
void getClosestPointTo (const OdGePoint2d &point, OdGePointOnCurve2d &pntOnCrv, const OdGeTol &tol=OdGeContext::gTol) const
 
void getClosestPointTo (const OdGeCurve2d &curve2d, OdGePointOnCurve2d &pntOnThisCrv, OdGePointOnCurve2d &pntOnOtherCrv, const OdGeTol &tol=OdGeContext::gTol) const
 
bool getNormalPoint (const OdGePoint2d &point, OdGePointOnCurve2d &pntOnCrv, const OdGeTol &tol=OdGeContext::gTol) const
 
 TD_USING (OdGeEntity2d::isOn)
 
bool isOn (const OdGePoint2d &point, double &param, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isOn (double param, const OdGeTol &tol=OdGeContext::gTol) const
 
double paramOf (const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
double paramOf (const OdGePoint2d &point, const OdGeInterval *range, const OdGeTol &tol) const
 
void getTrimmedOffset (double distance, OdGeCurve2dPtrArray &offsetCurveList, OdGe::OffsetCrvExtType extensionType=OdGe::kFillet, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isClosed (const OdGeTol &tol=OdGeContext::gTol) const
 
bool isPeriodic (double &period) const
 
bool isLinear (OdGeLine2d &line, const OdGeTol &tol=OdGeContext::gTol) const
 
double length (double fromParam, double toParam, double tol=OdGeContext::gTol.equalPoint()) const
 
double length (double tol=OdGeContext::gTol.equalPoint()) const
 
double paramAtLength (double datumParam, double length, bool posParamDir=true, double tol=OdGeContext::gTol.equalPoint()) const
 
bool area (double startParam, double endParam, double &value, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isDegenerate (OdGe::EntityId &degenerateType, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isDegenerate (OdGeEntity2d *&pConvertedEntity, const OdGeTol &tol=OdGeContext::gTol) const
 
void getSplitCurves (double param, OdGeCurve2d *&piece1, OdGeCurve2d *&piece2) const
 
bool explode (OdGeCurve2dPtrArray &explodedCurves, OdGeIntArray &newExplodedCurve, const OdGeInterval *interval=NULL) const
 
void getLocalClosestPoints (const OdGePoint2d &point, OdGePointOnCurve2d &approxPnt, const OdGeInterval *nbhd=NULL, const OdGeTol &tol=OdGeContext::gTol) const
 
void getLocalClosestPoints (const OdGeCurve2d &otherCurve, OdGePointOnCurve2d &approxPntOnThisCrv, OdGePointOnCurve2d &approxPntOnOtherCrv, const OdGeInterval *nbhd1=NULL, const OdGeInterval *nbhd2=NULL, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGeBoundBlock2d boundBlock () const
 
OdGeBoundBlock2d boundBlock (const OdGeInterval &range) const
 
OdGeBoundBlock2d orthoBoundBlock () const
 
OdGeBoundBlock2d orthoBoundBlock (const OdGeInterval &range) const
 
OdGeExtents2d getGeomExtents (const OdGeInterval &range=OdGeInterval(), const OdGeMatrix2d *coordSystem=NULL) const
 
bool hasStartPoint (OdGePoint2d &startPoint) const
 
bool hasEndPoint (OdGePoint2d &endPoint) const
 
bool hasMidPoint (OdGePoint2d &point, double coef=0.5) const
 
OdGePoint2d midPoint (double coef=0.5) const
 
OdGePoint2d evalPoint (double param) const
 
OdGePoint2d evalPoint (double param, int numDeriv, OdGeVector2dArray &derivatives) const
 
void getSamplePoints (double fromParam, double toParam, double approxEps, OdGePoint2dArray &pointArray, OdGeDoubleArray &paramArray) const
 
void getSamplePoints (int numSample, OdGePoint2dArray &pointArray) const
 
OdGeCurve2doperator= (const OdGeCurve2d &curve)
 
void getSamplePoints (double fromParam, double toParam, double approxEps, OdGePoint2dArray &pointArray, OdGeDoubleArray *pParamArray=NULL) const
 
void appendSamplePoints (double fromParam, double toParam, double approxEps, OdGePoint2dArray &pointArray, OdGeDoubleArray *pParamArray=NULL) const
 
void appendSamplePoints (int numSample, OdGePoint2dArray &pointArray) const
 
- Public Member Functions inherited from OdGeEntity2d
 ODRX_HEAP_OPERATORS ()
 
 ~OdGeEntity2d ()
 
bool isKindOf (OdGe::EntityId entType) const
 
OdGe::EntityId type () const
 
OdGeEntity2dcopy () const
 
OdGeEntity2doperator= (const OdGeEntity2d &entity)
 
bool operator== (const OdGeEntity2d &entity) const
 
bool operator!= (const OdGeEntity2d &entity) const
 
bool isEqualTo (const OdGeEntity2d &other, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGeEntity2dtransformBy (const OdGeMatrix2d &xfm)
 
OdGeEntity2dtranslateBy (const OdGeVector2d &translateVec)
 
OdGeEntity2drotateBy (double angle, const OdGePoint2d &basePoint=OdGePoint2d::kOrigin)
 
OdGeEntity2dmirror (const OdGeLine2d &line)
 
OdGeEntity2dscaleBy (double scaleFactor, const OdGePoint2d &basePoint=OdGePoint2d::kOrigin)
 
bool isOn (const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
 

Additional Inherited Members

- Static Public Member Functions inherited from OdGeCurve2d
static OdGeCurve2drestoreUvCurve (const OdGeCurve3d *curve, const OdGeSurface *surface, const OdGeTol &tol=OdGeContext::gTol)
 
- Protected Member Functions inherited from OdGeLinearEnt2d
 OdGeLinearEnt2d ()
 
 OdGeLinearEnt2d (const OdGeLinearEnt2d &source)
 
- Protected Member Functions inherited from OdGeCurve2d
 OdGeCurve2d ()
 
 OdGeCurve2d (const OdGeCurve2d &source)
 
- Protected Member Functions inherited from OdGeEntity2d
 OdGeEntity2d ()
 
 OdGeEntity2d (const OdGeEntity2d &)
 
void connectTo (OdGeEntity2dImpl *)
 

Detailed Description

This class represents line segments in 2D space. 2D line segment can be defined with a start and end points or with a point and a non-zero vector that specifies segment length and direction. By default its start parameter equals to 0.0 and end parameter equals to 1.0.

Corresponding C++ library: TD_Ge

<group OdGe_Classes>

See also
<link ge_OdGeLineSeg, Working with Line Segments>

Definition at line 44 of file GeLineSeg2d.h.

Constructor & Destructor Documentation

◆ OdGeLineSeg2d() [1/4]

OdGeLineSeg2d::OdGeLineSeg2d ( )

Default constructor for objects of the OdGeLineSeg2d class. Constructs a line segment between the points (0.0, 0.0) and (1.0, 0.0).

◆ OdGeLineSeg2d() [2/4]

OdGeLineSeg2d::OdGeLineSeg2d ( const OdGeLineSeg2d source)

Copy constructor for objects of the OdGeLineSeg2d class.

Parameters
source[in] A 2D line segment to be copied.

◆ OdGeLineSeg2d() [3/4]

OdGeLineSeg2d::OdGeLineSeg2d ( const OdGePoint2d point1,
const OdGePoint2d point2 
)

Constructor for objects of the OdGeLineSeg2d class.

Parameters
point1[in] First 2D point that represents the start of the segment.
point2[in] Second 2D point that represents the end of the segment.

◆ OdGeLineSeg2d() [4/4]

OdGeLineSeg2d::OdGeLineSeg2d ( const OdGePoint2d point,
const OdGeVector2d vect 
)

Constructor for objects of the OdGeLineSeg2d class.

Parameters
point[in] A 2D point that represents the start of the segment.
vect[in] Defines the direction of the line and the second point of the line.

Member Function Documentation

◆ baryComb()

OdGePoint2d OdGeLineSeg2d::baryComb ( double  blendCoeff) const

Returns the weighted average of the start point and end point of this line segment.

Parameters
blendCoeff[in] Blend coefficient.
Returns
An instance of the OdGePoint2d class.
Remarks
Returns 0 Start point 1 End point 0 to 1 Point on this line segment < 0 or > 1 Point not on this line segment, but collinear with it

◆ endPoint()

OdGePoint2d OdGeLineSeg2d::endPoint ( ) const

Returns the end point of this line segment.

Returns
An instance of the OdGePoint2d class.

◆ getBisector()

void OdGeLineSeg2d::getBisector ( OdGeLine2d line) const

Gets the infinite perpendicular bisector of this line segment.

Parameters
line[out] Receives the perpendicular bisector.

◆ operator=()

OdGeLineSeg2d & OdGeLineSeg2d::operator= ( const OdGeLineSeg2d line)

Assignment operator for the OdGeLinearEnt2d object.

Parameters
line[in] Linear segment to assign.
Returns
A reference to this OdGeLinearEnt2d object.

◆ set() [1/4]

OdGeLineSeg2d & OdGeLineSeg2d::set ( const OdGeCurve2d curve,
const OdGePoint2d point,
double &  param,
bool &  success 
)

Sets the parameters for this line according to the arguments and returns a reference to this line.

Parameters
point[in] 2D point at which the constructed line segment is tangent to the specified curve.
curve[in] 2D curve to which the constructed line segment must be tangent.
param[in] Parameter of the point on curve where this line segment is tangent to the curve.
success[out] Receives true if and only if the tangent was constructed. If false, this line segment is unchanged.
Returns
Reference to this OdGeLineSeg2d object.
Remarks
Constructs a line segment starting at point, and tangent to curve. The param value is the approximate tangent point on curve.

◆ set() [2/4]

OdGeLineSeg2d & OdGeLineSeg2d::set ( const OdGeCurve2d curve1,
const OdGeCurve2d curve2,
double &  param1,
double &  param2,
bool &  success 
)

Sets the parameters for this line according to the arguments and returns a reference to this line.

Parameters
curve1[in] First 2D curve to which a constructed line segment must be tangent.
curve2[in] Second 2D curve to which a constructed line segment must be tangent.
param1[in] Point on curve1 where this line segment is tangent to curve1.
param2[in] Point on curve2 where this line segment is tangent to curve2.
success[out] Receives true if and only if the tangent was constructed. If false, this line segment is unchanged.
Returns
Reference to this OdGeLineSeg2d object.
Remarks
Constructs a tangent line segment between curve1 and curve2. Points param1 and param2 are the approximate tangent points on curve1 and curve2 respectively.

◆ set() [3/4]

OdGeLineSeg2d & OdGeLineSeg2d::set ( const OdGePoint2d point,
const OdGeVector2d vect 
)

Sets the parameters for this line according to the arguments and returns a reference to this line.

Parameters
point[in] A 2D point that represents the start of the segment.
vect[in] Defines the direction of the line and the second point of the line.
Returns
Reference to this OdGeLineSeg2d object.
Remarks
Constructs a line segment between points point and point + vect. The vect parameter cannot have a zero length.

◆ set() [4/4]

OdGeLineSeg2d & OdGeLineSeg2d::set ( const OdGePoint2d point1,
const OdGePoint2d point2 
)

Sets the parameters for this line according to the arguments and returns a reference to this line.

Parameters
point1[in] First 2D point that represents the start of the segment.
point2[in] Second 2D point that represents the end of the segment.
Returns
Reference to this OdGeLineSeg2d object.
Remarks
Constructs a line segment between points point1 and point2. The points cannot coincide.

◆ startPoint()

OdGePoint2d OdGeLineSeg2d::startPoint ( ) const

Returns the start point of this line segment.

Returns
An instance of the OdGePoint2d class.

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