Reen::BSplineParameterCorrection Class Reference

This class calculates a B-spline area on any point cloud (AKA scattered data). More...

#include <ApproxSurface.h>

Public Member Functions

 BSplineParameterCorrection (unsigned usUOrder=4, unsigned usVOrder=4, unsigned usUCtrlpoints=6, unsigned usVCtrlpoints=6)
 
virtual void EnableSmoothing (bool bSmooth, double fSmoothInfl, double fFirst, double fSec, double fThird)
 Use smoothing-terms. More...
 
virtual void EnableSmoothing (bool bSmooth=true, double fSmoothInfl=1.0f)
 Use smoothing-terms. More...
 
virtual const math_Matrix & GetFirstSmoothMatrix () const
 Returns the first matrix of smoothing terms, if calculated. More...
 
virtual const math_Matrix & GetSecondSmoothMatrix () const
 Returns the second matrix of smoothing terms, if calculated. More...
 
virtual const math_Matrix & GetThirdSmoothMatrix () const
 Returns the third matrix of smoothing terms, if calculated. More...
 
virtual void SetFirstSmoothMatrix (const math_Matrix &rclMat)
 Sets the first matrix of the smoothing terms. More...
 
virtual void SetSecondSmoothMatrix (const math_Matrix &rclMat)
 Sets the second matrix of smoothing terms. More...
 
virtual void SetThirdSmoothMatrix (const math_Matrix &rclMat)
 Sets the third matrix of smoothing terms. More...
 
void SetUKnots (const std::vector< double > &afKnots)
 Setting the knot vector. More...
 
void SetVKnots (const std::vector< double > &afKnots)
 Setting the knot vector. More...
 
virtual ~BSplineParameterCorrection ()
 
- Public Member Functions inherited from Reen::ParameterCorrection
virtual void EnableSmoothing (bool bSmooth=true, double fSmoothInfl=1.0f)
 Use smoothing-terms. More...
 
virtual Base::Vector3d GetGravityPoint () const
 Get the center of gravity. More...
 
virtual void GetUVW (Base::Vector3d &clU, Base::Vector3d &clV, Base::Vector3d &clW) const
 Returns the u/v/w directions. More...
 
virtual Handle (Geom_BSplineSurface) CreateSurface(const TColgp_Array1OfPnt &points
 Calculates a B-spline surface from the given points. More...
 
 ParameterCorrection (unsigned usUOrder=4, unsigned usVOrder=4, unsigned usUCtrlpoints=6, unsigned usVCtrlpoints=6)
 
virtual void SetUV (const Base::Vector3d &clU, const Base::Vector3d &clV, bool bUseDir=true)
 Setting the u/v directions The third parameter specifies whether the directions should actually be used. More...
 
virtual ~ParameterCorrection ()
 

Protected Member Functions

virtual void CalcFirstSmoothMatrix (Base::SequencerLauncher &)
 Calculates the matrix for the first smoothing term (see U.Dietz dissertation) More...
 
virtual void CalcSecondSmoothMatrix (Base::SequencerLauncher &)
 Calculates the matrix for the second smoothing term (see U.Dietz dissertation) More...
 
virtual void CalcSmoothingTerms (bool bRecalc, double fFirst, double fSecond, double fThird)
 Calculates the matrix for the smoothing terms (see U.Dietz dissertation) More...
 
virtual void CalcThirdSmoothMatrix (Base::SequencerLauncher &)
 Calculates the matrix for the third smoothing term. More...
 
virtual void DoParameterCorrection (int iIter)
 Carries out a parameter correction. More...
 
virtual void Init ()
 Initialization. More...
 
virtual bool SolveWithoutSmoothing ()
 Solve an overdetermined LGS with the help of the Householder-Tansformation. More...
 
virtual bool SolveWithSmoothing (double fWeight)
 Solve a regular system of equations by LU decomposition. More...
 
- Protected Member Functions inherited from Reen::ParameterCorrection
virtual void CalcEigenvectors ()
 Calculates the eigenvectors of the covariance matrix. More...
 
virtual bool DoInitialParameterCorrection (double fSizeFactor=0.0f)
 Calculates an initial area at the beginning of the algorithm. More...
 
virtual void DoParameterCorrection (int iIter)=0
 Carries out a parameter correction. More...
 
virtual bool GetUVParameters (double fSizeFactor)
 Calculates the (u, v) values of the points. More...
 
void ProjectControlPointsOnPlane ()
 Projects the control points onto the fit plane. More...
 
virtual bool SolveWithoutSmoothing ()=0
 Solves system of equations. More...
 
virtual bool SolveWithSmoothing (double fWeight)=0
 Solve a regular system of equations. More...
 

Additional Inherited Members

- Public Attributes inherited from Reen::ParameterCorrection
virtual int bool bParaCor
 
virtual int bool double fSizeFactor =0.0f)
 
virtual int iIter
 

Detailed Description

This class calculates a B-spline area on any point cloud (AKA scattered data).

The surface is generated iteratively with the help of a parameter correction. See Hoschek/Lasser 2nd ed. (1992). The approximation is expanded to include smoothing terms so that smooth surfaces can be generated.

Constructor & Destructor Documentation

◆ BSplineParameterCorrection()

BSplineParameterCorrection::BSplineParameterCorrection ( unsigned  usUOrder = 4,
unsigned  usVOrder = 4,
unsigned  usUCtrlpoints = 6,
unsigned  usVCtrlpoints = 6 
)

References Init().

◆ ~BSplineParameterCorrection()

virtual Reen::BSplineParameterCorrection::~BSplineParameterCorrection ( )
virtual

Member Function Documentation

◆ CalcFirstSmoothMatrix()

void BSplineParameterCorrection::CalcFirstSmoothMatrix ( Base::SequencerLauncher seq)
protectedvirtual

Calculates the matrix for the first smoothing term (see U.Dietz dissertation)

References Base::SequencerLauncher::next().

Referenced by CalcSmoothingTerms().

◆ CalcSecondSmoothMatrix()

void BSplineParameterCorrection::CalcSecondSmoothMatrix ( Base::SequencerLauncher seq)
protectedvirtual

Calculates the matrix for the second smoothing term (see U.Dietz dissertation)

References Base::SequencerLauncher::next().

Referenced by CalcSmoothingTerms().

◆ CalcSmoothingTerms()

void BSplineParameterCorrection::CalcSmoothingTerms ( bool  bRecalc,
double  fFirst,
double  fSecond,
double  fThird 
)
protectedvirtual

Calculates the matrix for the smoothing terms (see U.Dietz dissertation)

References CalcFirstSmoothMatrix(), CalcSecondSmoothMatrix(), and CalcThirdSmoothMatrix().

Referenced by EnableSmoothing().

◆ CalcThirdSmoothMatrix()

void BSplineParameterCorrection::CalcThirdSmoothMatrix ( Base::SequencerLauncher seq)
protectedvirtual

Calculates the matrix for the third smoothing term.

References Base::SequencerLauncher::next().

Referenced by CalcSmoothingTerms().

◆ DoParameterCorrection()

void BSplineParameterCorrection::DoParameterCorrection ( int  iIter)
protectedvirtual

◆ EnableSmoothing() [1/2]

void BSplineParameterCorrection::EnableSmoothing ( bool  bSmooth,
double  fSmoothInfl,
double  fFirst,
double  fSec,
double  fThird 
)
virtual

◆ EnableSmoothing() [2/2]

void BSplineParameterCorrection::EnableSmoothing ( bool  bSmooth = true,
double  fSmoothInfl = 1.0f 
)
virtual

Use smoothing-terms.

Reimplemented from Reen::ParameterCorrection.

References EnableSmoothing().

Referenced by EnableSmoothing().

◆ GetFirstSmoothMatrix()

const math_Matrix & BSplineParameterCorrection::GetFirstSmoothMatrix ( ) const
virtual

Returns the first matrix of smoothing terms, if calculated.

◆ GetSecondSmoothMatrix()

const math_Matrix & BSplineParameterCorrection::GetSecondSmoothMatrix ( ) const
virtual

Returns the second matrix of smoothing terms, if calculated.

◆ GetThirdSmoothMatrix()

const math_Matrix & BSplineParameterCorrection::GetThirdSmoothMatrix ( ) const
virtual

Returns the third matrix of smoothing terms, if calculated.

◆ Init()

void BSplineParameterCorrection::Init ( )
protectedvirtual

Initialization.

Referenced by BSplineParameterCorrection().

◆ SetFirstSmoothMatrix()

void BSplineParameterCorrection::SetFirstSmoothMatrix ( const math_Matrix &  rclMat)
virtual

Sets the first matrix of the smoothing terms.

◆ SetSecondSmoothMatrix()

void BSplineParameterCorrection::SetSecondSmoothMatrix ( const math_Matrix &  rclMat)
virtual

Sets the second matrix of smoothing terms.

◆ SetThirdSmoothMatrix()

void BSplineParameterCorrection::SetThirdSmoothMatrix ( const math_Matrix &  rclMat)
virtual

Sets the third matrix of smoothing terms.

◆ SetUKnots()

void BSplineParameterCorrection::SetUKnots ( const std::vector< double > &  afKnots)

Setting the knot vector.

◆ SetVKnots()

void BSplineParameterCorrection::SetVKnots ( const std::vector< double > &  afKnots)

Setting the knot vector.

◆ SolveWithoutSmoothing()

bool BSplineParameterCorrection::SolveWithoutSmoothing ( )
protectedvirtual

Solve an overdetermined LGS with the help of the Householder-Tansformation.

Implements Reen::ParameterCorrection.

Referenced by DoParameterCorrection().

◆ SolveWithSmoothing()

bool BSplineParameterCorrection::SolveWithSmoothing ( double  fWeight)
protectedvirtual

Solve a regular system of equations by LU decomposition.

Depending on the weighting, smoothing terms are included

Implements Reen::ParameterCorrection.

References draftgeoutils.faces::bind(), and Reen::ScalarProduct::multiply().

Referenced by DoParameterCorrection().


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