MeshCore::QuadraticFit Class Reference

Approximation of a quadratic surface into a given set of points. More...

#include <Approximation.h>

Inheritance diagram for MeshCore::QuadraticFit:
MeshCore::Approximation

List of all members.

Public Member Functions

void CalcEigenValues (float &dLambda1, float &dLambda2, float &dLambda3, Base::Vector3f &clEV1, Base::Vector3f &clEV2, Base::Vector3f &clEV3) const
 Aufstellen der Formanmatrix A und Berechnen der Eigenwerte.
void CalcZValues (float x, float y, float &dZ1, float &dZ2) const
float Fit ()
 Aufruf des Fit-Algorithmus.
float GetCoeff (unsigned long ulIndex) const
 Übertragen der Quadric-Koeffizienten.
const float & GetCoeffArray () const
 Übertragen der Koeffizientan als Referenz auf das interne Array.
bool GetCurvatureInfo (float x, float y, float z, float &rfCurv0, float &rfcurv1)
bool GetCurvatureInfo (float x, float y, float z, float &rfCurv0, float &rfCurv1, Base::Vector3f &rkDir0, Base::Vector3f &rkDir1, float &dDistance)
 Berechnen der Krümmungswerte der Quadric in einem bestimmten Punkt.
 QuadraticFit ()
 Construction.
virtual ~QuadraticFit ()
 Destruction.

Protected Attributes

float _fCoeff [10]
 Ziel der Koeffizienten aus dem Fit.

Detailed Description

Approximation of a quadratic surface into a given set of points.

The implicit form of the surface is defined by F(x,y,z) = a * x^2 + b * y^2 + c * z^2 + 2d * x * y + 2e * x * z + 2f * y * z + g * x + h * y + * i * z + k = 0 Depending on the parameters (a,..,k) this surface defines a sphere, ellipsoid, cylinder, cone and so on.

Definition at line 190 of file Approximation.h.


Constructor & Destructor Documentation

MeshCore::QuadraticFit::QuadraticFit (  )  [inline]

Construction.

Definition at line 196 of file Approximation.h.

virtual MeshCore::QuadraticFit::~QuadraticFit (  )  [inline, virtual]

Destruction.

Definition at line 200 of file Approximation.h.


Member Function Documentation

void QuadraticFit::CalcEigenValues ( float &  dLambda1,
float &  dLambda2,
float &  dLambda3,
Base::Vector3f clEV1,
Base::Vector3f clEV2,
Base::Vector3f clEV3 
) const

Aufstellen der Formanmatrix A und Berechnen der Eigenwerte.

Parameters:
dLambda1 Eigenwert 1
dLambda2 Eigenwert 2
dLambda3 Eigenwert 3
clEV1 Eigenvektor 1
clEV2 Eigenvektor 2
clEV3 Eigenvektor 3

Definition at line 428 of file Approximation.cpp.

References MeshCore::Approximation::_bIsFitted, _fCoeff, MeshCore::Approximation::Convert(), Wm4::Matrix3< Real >::EigenDecomposition(), SketcherExample::f, and Wm4::Matrix3< Real >::GetColumn().

void QuadraticFit::CalcZValues ( float  x,
float  y,
float &  dZ1,
float &  dZ2 
) const
float QuadraticFit::Fit (  )  [virtual]
float QuadraticFit::GetCoeff ( unsigned long  ulIndex  )  const

Übertragen der Quadric-Koeffizienten.

Parameters:
ulIndex Nummer des Koeffizienten (0..9)
Returns:
float Wert des Koeffizienten

Definition at line 402 of file Approximation.cpp.

References MeshCore::Approximation::_bIsFitted, _fCoeff, and FLOAT_MAX.

const float & QuadraticFit::GetCoeffArray (  )  const

Übertragen der Koeffizientan als Referenz auf das interne Array.

Returns:
const float& Referenz auf das float-Array

Definition at line 397 of file Approximation.cpp.

References _fCoeff.

bool QuadraticFit::GetCurvatureInfo ( float  x,
float  y,
float  z,
float &  rfCurv0,
float &  rfcurv1 
)
bool QuadraticFit::GetCurvatureInfo ( float  x,
float  y,
float  z,
float &  rfCurv0,
float &  rfCurv1,
Base::Vector3f rkDir0,
Base::Vector3f rkDir1,
float &  dDistance 
)

Berechnen der Krümmungswerte der Quadric in einem bestimmten Punkt.

Parameters:
x X-Koordinate
y Y-Koordinate
z Z-Koordinate
rfCurv0 1. Hauptkrümmung
rfCurv1 2. Hauptkrümmung
rkDir0 Richtung der 1. Hauptkrümmung
rkDir1 Richtung der 2. Hauptkrümmung
dDistance 
Returns:
bool Fehlerfreie Ausfürhung = true, ansonsten false

Definition at line 365 of file Approximation.cpp.

References MeshCore::Approximation::_bIsFitted, _fCoeff, MeshCore::Approximation::Convert(), MeshCore::FunctionContainer::CurvatureInfo(), MeshCore::FunctionContainer::GetGradient(), and Base::Vector3< _Precision >::Length().


Member Data Documentation

float MeshCore::QuadraticFit::_fCoeff[10] [protected]

Ziel der Koeffizienten aus dem Fit.

Definition at line 251 of file Approximation.h.

Referenced by CalcEigenValues(), CalcZValues(), Fit(), GetCoeff(), GetCoeffArray(), and GetCurvatureInfo().


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

Generated on Wed Nov 23 19:02:26 2011 for FreeCAD by  doxygen 1.6.1