SHAPER  9.12.0
GeomAPI_BSpline2d Class Reference

B-spline curve in 2D. More...

Inheritance diagram for GeomAPI_BSpline2d:
Inheritance graph

Public Member Functions

GEOMAPI_EXPORT GeomAPI_BSpline2d (const std::list< std::shared_ptr< GeomAPI_Pnt2d > > &thePoles, const std::list< double > &theWeights, const bool thePeriodic=false)
 Creation of B-spline curve defined by list of poles and weights. More...
 
GEOMAPI_EXPORT GeomAPI_BSpline2d (const int theDegree, const std::list< std::shared_ptr< GeomAPI_Pnt2d > > &thePoles, const std::list< double > &theWeights, const std::list< double > &theKnots=std::list< double >(), const std::list< int > &theMults=std::list< int >(), const bool thePeriodic=false)
 Creation of B-spline curve defined by list of poles and weights. More...
 
GEOMAPI_EXPORT bool isNull () const
 Returns true if curve is not initialized. More...
 
GEOMAPI_EXPORT int degree () const
 Returns degree of the curve. More...
 
GEOMAPI_EXPORT std::list< double > knots () const
 Knots of the curve. More...
 
GEOMAPI_EXPORT std::list< int > mults () const
 Multiplicities of the knots. More...
 
GEOMAPI_EXPORT const bool parameter (const std::shared_ptr< GeomAPI_Pnt2d > thePoint, const double theTolerance, double &theParameter) const
 Computes the parameter of a given point on a circle. More...
 
GEOMAPI_EXPORT void D0 (const double theU, std::shared_ptr< GeomAPI_Pnt2d > &thePoint)
 Calculate point on B-spline curve accrding to the given parameter. More...
 
GEOMAPI_EXPORT void D1 (const double theU, std::shared_ptr< GeomAPI_Pnt2d > &thePoint, std::shared_ptr< GeomAPI_XY > &theDerivative)
 Calculate point and first derivative for B-spline curve accrding to the given parameter. More...
 
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

B-spline curve in 2D.

Constructor & Destructor Documentation

◆ GeomAPI_BSpline2d() [1/2]

GeomAPI_BSpline2d::GeomAPI_BSpline2d ( const std::list< std::shared_ptr< GeomAPI_Pnt2d > > &  thePoles,
const std::list< double > &  theWeights,
const bool  thePeriodic = false 
)

Creation of B-spline curve defined by list of poles and weights.

◆ GeomAPI_BSpline2d() [2/2]

GeomAPI_BSpline2d::GeomAPI_BSpline2d ( const int  theDegree,
const std::list< std::shared_ptr< GeomAPI_Pnt2d > > &  thePoles,
const std::list< double > &  theWeights,
const std::list< double > &  theKnots = std::list<double>(),
const std::list< int > &  theMults = std::list<int>(),
const bool  thePeriodic = false 
)

Creation of B-spline curve defined by list of poles and weights.

Member Function Documentation

◆ isNull()

bool GeomAPI_BSpline2d::isNull ( ) const

Returns true if curve is not initialized.

◆ degree()

int GeomAPI_BSpline2d::degree ( ) const

Returns degree of the curve.

◆ knots()

std::list< double > GeomAPI_BSpline2d::knots ( ) const

Knots of the curve.

◆ mults()

std::list< int > GeomAPI_BSpline2d::mults ( ) const

Multiplicities of the knots.

◆ parameter()

const bool GeomAPI_BSpline2d::parameter ( const std::shared_ptr< GeomAPI_Pnt2d thePoint,
const double  theTolerance,
double &  theParameter 
) const

Computes the parameter of a given point on a circle.

The point must be located either on the circle itself or relatively to the latter at a distance less than the tolerance value. Return FALSE if the point is beyond the tolerance limit or if computation fails. Max Tolerance value is currently limited to 1.e-4

Parameters
[in]thePointpoint of origin.
[in]theTolerancetolerance of computation.
[out]theParameterresulting parameter.

◆ D0()

void GeomAPI_BSpline2d::D0 ( const double  theU,
std::shared_ptr< GeomAPI_Pnt2d > &  thePoint 
)

Calculate point on B-spline curve accrding to the given parameter.

◆ D1()

void GeomAPI_BSpline2d::D1 ( const double  theU,
std::shared_ptr< GeomAPI_Pnt2d > &  thePoint,
std::shared_ptr< GeomAPI_XY > &  theDerivative 
)

Calculate point and first derivative for B-spline curve accrding to the given parameter.

◆ 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.