SHAPER  9.12.0
GeomAPI_Lin Class Reference

Line in 3D. More...

Inheritance diagram for GeomAPI_Lin:
Inheritance graph

Public Member Functions

GEOMAPI_EXPORT GeomAPI_Lin (const double theStartX, const double theStartY, const double theStartZ, const double theEndX, const double theEndY, const double theEndZ)
 Creation of line defined by cordinates of start and end points. More...
 
GEOMAPI_EXPORT GeomAPI_Lin (const std::shared_ptr< GeomAPI_Pnt > &theStart, const std::shared_ptr< GeomAPI_Pnt > &theEnd)
 Creation of line defined by start and end points. More...
 
GEOMAPI_EXPORT GeomAPI_Lin (const std::shared_ptr< GeomAPI_Pnt > &theOrigin, const std::shared_ptr< GeomAPI_Dir > &theDirection)
 Creation of line defined by origin and direction. More...
 
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Pntlocation ()
 Returns point on the line (first point) More...
 
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Dirdirection ()
 Returns a line direction. More...
 
GEOMAPI_EXPORT double distance (const std::shared_ptr< GeomAPI_Pnt > &thePoint) const
 Distance between two points. More...
 
GEOMAPI_EXPORT const std::shared_ptr< GeomAPI_Pntintersect (const std::shared_ptr< GeomAPI_Lin > &theLine) const
 Intersection of two lines. More...
 
GEOMAPI_EXPORT const std::shared_ptr< GeomAPI_Pntproject (const std::shared_ptr< GeomAPI_Pnt > &thePoint) const
 Project point on line. More...
 
GEOMAPI_EXPORT double projParam (const std::shared_ptr< GeomAPI_Pnt > &thePoint) const
 Returns parameter of the point projection. More...
 
GEOMAPI_EXPORT bool contains (const std::shared_ptr< GeomAPI_Pnt > thePoint, const double theLinearTolerance=1.e-7) const
 
GEOMAPI_EXPORT bool isParallel (const std::shared_ptr< GeomAPI_Lin > theLin) const
 
GEOMAPI_EXPORT bool isCoplanar (const std::shared_ptr< GeomAPI_Lin > theLin) const
 
template<class T >
T * implPtr ()
 Returns the pointer to the impl. More...
 
template<class T >
const T * implPtr () const
 Returns the pointer to the impl. More...
 
template<class T >
const T & impl () const
 Returns the reference object of the impl. More...
 
template<class T >
void setImpl (T *theImpl)
 Updates the impl (deletes the old one) More...
 
GEOMAPI_EXPORT bool empty () const
 Returns true if the impl is empty. More...
 

Detailed Description

Line in 3D.

Constructor & Destructor Documentation

◆ GeomAPI_Lin() [1/3]

GeomAPI_Lin::GeomAPI_Lin ( const double  theStartX,
const double  theStartY,
const double  theStartZ,
const double  theEndX,
const double  theEndY,
const double  theEndZ 
)

Creation of line defined by cordinates of start and end points.

◆ GeomAPI_Lin() [2/3]

GeomAPI_Lin::GeomAPI_Lin ( const std::shared_ptr< GeomAPI_Pnt > &  theStart,
const std::shared_ptr< GeomAPI_Pnt > &  theEnd 
)

Creation of line defined by start and end points.

◆ GeomAPI_Lin() [3/3]

GeomAPI_Lin::GeomAPI_Lin ( const std::shared_ptr< GeomAPI_Pnt > &  theOrigin,
const std::shared_ptr< GeomAPI_Dir > &  theDirection 
)

Creation of line defined by origin and direction.

Member Function Documentation

◆ location()

std::shared_ptr< GeomAPI_Pnt > GeomAPI_Lin::location ( )

Returns point on the line (first point)

◆ direction()

std::shared_ptr< GeomAPI_Dir > GeomAPI_Lin::direction ( )

Returns a line direction.

◆ distance()

double GeomAPI_Lin::distance ( const std::shared_ptr< GeomAPI_Pnt > &  thePoint) const

Distance between two points.

◆ intersect()

const std::shared_ptr< GeomAPI_Pnt > GeomAPI_Lin::intersect ( const std::shared_ptr< GeomAPI_Lin > &  theLine) const

Intersection of two lines.

◆ project()

const std::shared_ptr< GeomAPI_Pnt > GeomAPI_Lin::project ( const std::shared_ptr< GeomAPI_Pnt > &  thePoint) const

Project point on line.

◆ projParam()

double GeomAPI_Lin::projParam ( const std::shared_ptr< GeomAPI_Pnt > &  thePoint) const

Returns parameter of the point projection.

◆ contains()

bool GeomAPI_Lin::contains ( const std::shared_ptr< GeomAPI_Pnt thePoint,
const double  theLinearTolerance = 1.e-7 
) const
Returns
true if this line contains thePoint, that is, if the distance between thePoint and this line is less than or equal to theLinearTolerance.

◆ isParallel()

bool GeomAPI_Lin::isParallel ( const std::shared_ptr< GeomAPI_Lin theLin) const
Returns
true if lines are parallel.

◆ isCoplanar()

bool GeomAPI_Lin::isCoplanar ( const std::shared_ptr< GeomAPI_Lin theLin) const
Returns
true if lines are coplanar.

◆ implPtr() [1/2]

template<class T >
T* GeomAPI_Interface::implPtr ( )
inlineinherited

Returns the pointer to the impl.

◆ implPtr() [2/2]

template<class T >
const T* GeomAPI_Interface::implPtr ( ) const
inlineinherited

Returns the pointer to the impl.

◆ impl()

template<class T >
const T& GeomAPI_Interface::impl ( ) const
inlineinherited

Returns the reference object of the impl.

◆ setImpl()

template<class T >
void GeomAPI_Interface::setImpl ( T *  theImpl)
inlineinherited

Updates the impl (deletes the old one)

◆ empty()

bool GeomAPI_Interface::empty ( ) const
inherited

Returns true if the impl is empty.