mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
Coding - Apply .clang-format formatting #286
Update empty method guards to new style with regex (see PR). Used clang-format 18.1.8. New actions to validate code formatting is added. Update .clang-format with disabling of include sorting. It is temporary changes, then include will be sorted. Apply formatting for /src and /tools folder. The files with .hxx,.cxx,.lxx,.h,.pxx,.hpp,*.cpp extensions.
This commit is contained in:
@@ -16,26 +16,25 @@
|
||||
|
||||
#include <GeomInt.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : AdjustPeriodic
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
//=================================================================================================
|
||||
|
||||
Standard_Boolean GeomInt::AdjustPeriodic(const Standard_Real thePar,
|
||||
const Standard_Real theParMin,
|
||||
const Standard_Real theParMax,
|
||||
const Standard_Real thePeriod,
|
||||
Standard_Real &theNewPar,
|
||||
Standard_Real &theOffset,
|
||||
Standard_Real& theNewPar,
|
||||
Standard_Real& theOffset,
|
||||
const Standard_Real theEps)
|
||||
{
|
||||
Standard_Boolean bMin, bMax;
|
||||
//
|
||||
theOffset = 0.;
|
||||
theNewPar = thePar;
|
||||
bMin = theParMin - thePar > theEps;
|
||||
bMax = thePar - theParMax > theEps;
|
||||
bMin = theParMin - thePar > theEps;
|
||||
bMax = thePar - theParMax > theEps;
|
||||
//
|
||||
if (bMin || bMax) {
|
||||
if (bMin || bMax)
|
||||
{
|
||||
Standard_Real dp, aNbPer;
|
||||
//
|
||||
dp = (bMin) ? (theParMax - thePar) : (theParMin - thePar);
|
||||
|
@@ -24,19 +24,21 @@
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
|
||||
|
||||
//! Provides intersections on between two surfaces of Geom.
|
||||
//! The result are curves from Geom.
|
||||
class GeomInt
|
||||
class GeomInt
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Adjusts the parameter <thePar> to the range [theParMin, theParMax]
|
||||
Standard_EXPORT static Standard_Boolean AdjustPeriodic (const Standard_Real thePar, const Standard_Real theParMin, const Standard_Real theParMax, const Standard_Real thePeriod, Standard_Real& theNewPar, Standard_Real& theOffset, const Standard_Real theEps = 0.0);
|
||||
|
||||
Standard_EXPORT static Standard_Boolean AdjustPeriodic(const Standard_Real thePar,
|
||||
const Standard_Real theParMin,
|
||||
const Standard_Real theParMax,
|
||||
const Standard_Real thePeriod,
|
||||
Standard_Real& theNewPar,
|
||||
Standard_Real& theOffset,
|
||||
const Standard_Real theEps = 0.0);
|
||||
};
|
||||
|
||||
#endif // _GeomInt_HeaderFile
|
||||
|
@@ -30,42 +30,26 @@ class GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox;
|
||||
class GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox;
|
||||
class math_MultipleVarFunctionWithGradient;
|
||||
|
||||
|
||||
|
||||
class GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox : public math_BFGS
|
||||
class GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox : public math_BFGS
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox(math_MultipleVarFunctionWithGradient& F, const math_Vector& StartingPoint, const Standard_Real Tolerance3d, const Standard_Real Tolerance2d, const Standard_Real Eps, const Standard_Integer NbIterations = 200);
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean IsSolutionReached (math_MultipleVarFunctionWithGradient& F) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
Standard_EXPORT GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox(
|
||||
math_MultipleVarFunctionWithGradient& F,
|
||||
const math_Vector& StartingPoint,
|
||||
const Standard_Real Tolerance3d,
|
||||
const Standard_Real Tolerance2d,
|
||||
const Standard_Real Eps,
|
||||
const Standard_Integer NbIterations = 200);
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean IsSolutionReached(
|
||||
math_MultipleVarFunctionWithGradient& F) const Standard_OVERRIDE;
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Real myTol3d;
|
||||
Standard_Real myTol2d;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox_HeaderFile
|
||||
|
@@ -22,19 +22,22 @@
|
||||
#include <GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#include <GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#include <math_MultipleVarFunctionWithGradient.hxx>
|
||||
|
||||
|
||||
#define MultiLine GeomInt_TheMultiLineOfWLApprox
|
||||
#define MultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
|
||||
#define ToolLine GeomInt_TheMultiLineToolOfWLApprox
|
||||
#define ToolLine_hxx <GeomInt_TheMultiLineToolOfWLApprox.hxx>
|
||||
#define AppParCurves_BSpParLeastSquare GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_BSpParLeastSquare_hxx <GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_BSpParLeastSquare \
|
||||
GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_BSpParLeastSquare_hxx \
|
||||
<GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_BSpParFunction GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_BSpParFunction_hxx <GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_BSpGradient_BFGS GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_BSpGradient_BFGS_hxx <GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_BSpParFunction_hxx \
|
||||
<GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_BSpGradient_BFGS \
|
||||
GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_BSpGradient_BFGS_hxx \
|
||||
<GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_BSpGradient GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_BSpGradient_hxx <GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#include "../AppParCurves/AppParCurves_BSpGradient_BFGS.gxx"
|
||||
|
||||
|
@@ -38,130 +38,121 @@ class GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox;
|
||||
class AppParCurves_MultiBSpCurve;
|
||||
class math_Matrix;
|
||||
|
||||
|
||||
|
||||
class GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox : public math_MultipleVarFunctionWithGradient
|
||||
class GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
: public math_MultipleVarFunctionWithGradient
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! initializes the fields of the function. The approximating
|
||||
//! curve has <NbPol> control points.
|
||||
Standard_EXPORT GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const math_Vector& Parameters, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer NbPol);
|
||||
|
||||
Standard_EXPORT GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox(
|
||||
const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint,
|
||||
const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,
|
||||
const math_Vector& Parameters,
|
||||
const TColStd_Array1OfReal& Knots,
|
||||
const TColStd_Array1OfInteger& Mults,
|
||||
const Standard_Integer NbPol);
|
||||
|
||||
//! returns the number of variables of the function. It
|
||||
//! corresponds to the number of MultiPoints.
|
||||
Standard_EXPORT Standard_Integer NbVariables() const;
|
||||
|
||||
|
||||
//! this method computes the new approximation of the
|
||||
//! MultiLine
|
||||
//! SSP and calculates F = sum (||Pui - Bi*Pi||2) for each
|
||||
//! point of the MultiLine.
|
||||
Standard_EXPORT Standard_Boolean Value (const math_Vector& X, Standard_Real& F);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Value(const math_Vector& X, Standard_Real& F);
|
||||
|
||||
//! returns the gradient G of the sum above for the
|
||||
//! parameters Xi.
|
||||
Standard_EXPORT Standard_Boolean Gradient (const math_Vector& X, math_Vector& G);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Gradient(const math_Vector& X, math_Vector& G);
|
||||
|
||||
//! returns the value F=sum(||Pui - Bi*Pi||)2.
|
||||
//! returns the value G = grad(F) for the parameters Xi.
|
||||
Standard_EXPORT Standard_Boolean Values (const math_Vector& X, Standard_Real& F, math_Vector& G);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Values(const math_Vector& X, Standard_Real& F, math_Vector& G);
|
||||
|
||||
//! returns the new parameters of the MultiLine.
|
||||
Standard_EXPORT const math_Vector& NewParameters() const;
|
||||
|
||||
|
||||
//! returns the MultiBSpCurve approximating the set after
|
||||
//! computing the value F or Grad(F).
|
||||
Standard_EXPORT AppParCurves_MultiBSpCurve CurveValue();
|
||||
|
||||
|
||||
//! returns the distance between the MultiPoint of range
|
||||
//! IPoint and the curve CurveIndex.
|
||||
Standard_EXPORT Standard_Real Error (const Standard_Integer IPoint, const Standard_Integer CurveIndex);
|
||||
|
||||
Standard_EXPORT Standard_Real Error(const Standard_Integer IPoint,
|
||||
const Standard_Integer CurveIndex);
|
||||
|
||||
//! returns the maximum distance between the points
|
||||
//! and the MultiBSpCurve.
|
||||
Standard_EXPORT Standard_Real MaxError3d() const;
|
||||
|
||||
|
||||
//! returns the maximum distance between the points
|
||||
//! and the MultiBSpCurve.
|
||||
Standard_EXPORT Standard_Real MaxError2d() const;
|
||||
|
||||
|
||||
//! returns the function matrix used to approximate the
|
||||
//! multiline.
|
||||
Standard_EXPORT const math_Matrix& FunctionMatrix() const;
|
||||
|
||||
|
||||
//! returns the derivative function matrix used to approximate the
|
||||
//! multiline.
|
||||
Standard_EXPORT const math_Matrix& DerivativeFunctionMatrix() const;
|
||||
|
||||
|
||||
//! Returns the indexes of the first non null values of
|
||||
//! A and DA.
|
||||
//! The values are non null from Index(ieme point) +1
|
||||
//! to Index(ieme point) + degree +1.
|
||||
Standard_EXPORT const math_IntegerVector& Index() const;
|
||||
|
||||
Standard_EXPORT AppParCurves_Constraint FirstConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer FirstPoint) const;
|
||||
|
||||
Standard_EXPORT AppParCurves_Constraint LastConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer LastPoint) const;
|
||||
|
||||
Standard_EXPORT void SetFirstLambda (const Standard_Real l1);
|
||||
|
||||
Standard_EXPORT void SetLastLambda (const Standard_Real l2);
|
||||
|
||||
Standard_EXPORT AppParCurves_Constraint
|
||||
FirstConstraint(const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,
|
||||
const Standard_Integer FirstPoint) const;
|
||||
|
||||
Standard_EXPORT AppParCurves_Constraint
|
||||
LastConstraint(const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,
|
||||
const Standard_Integer LastPoint) const;
|
||||
|
||||
Standard_EXPORT void SetFirstLambda(const Standard_Real l1);
|
||||
|
||||
Standard_EXPORT void SetLastLambda(const Standard_Real l2);
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! this method is used each time Value or Gradient is
|
||||
//! needed.
|
||||
Standard_EXPORT void Perform (const math_Vector& X);
|
||||
|
||||
|
||||
|
||||
Standard_EXPORT void Perform(const math_Vector& X);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Boolean Done;
|
||||
GeomInt_TheMultiLineOfWLApprox MyMultiLine;
|
||||
AppParCurves_MultiBSpCurve MyMultiBSpCurve;
|
||||
Standard_Integer nbpoles;
|
||||
math_Vector myParameters;
|
||||
Standard_Real FVal;
|
||||
math_Vector ValGrad_F;
|
||||
math_Matrix MyF;
|
||||
math_Matrix PTLX;
|
||||
math_Matrix PTLY;
|
||||
math_Matrix PTLZ;
|
||||
math_Matrix A;
|
||||
math_Matrix DA;
|
||||
Standard_Boolean Done;
|
||||
GeomInt_TheMultiLineOfWLApprox MyMultiLine;
|
||||
AppParCurves_MultiBSpCurve MyMultiBSpCurve;
|
||||
Standard_Integer nbpoles;
|
||||
math_Vector myParameters;
|
||||
Standard_Real FVal;
|
||||
math_Vector ValGrad_F;
|
||||
math_Matrix MyF;
|
||||
math_Matrix PTLX;
|
||||
math_Matrix PTLY;
|
||||
math_Matrix PTLZ;
|
||||
math_Matrix A;
|
||||
math_Matrix DA;
|
||||
GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox MyLeastSquare;
|
||||
Standard_Boolean Contraintes;
|
||||
Standard_Integer NbP;
|
||||
Standard_Integer NbCu;
|
||||
Standard_Integer Adeb;
|
||||
Standard_Integer Afin;
|
||||
Handle(TColStd_HArray1OfInteger) tabdim;
|
||||
Standard_Real ERR3d;
|
||||
Standard_Real ERR2d;
|
||||
Standard_Integer FirstP;
|
||||
Standard_Integer LastP;
|
||||
Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints;
|
||||
Standard_Real mylambda1;
|
||||
Standard_Real mylambda2;
|
||||
|
||||
|
||||
Standard_Boolean Contraintes;
|
||||
Standard_Integer NbP;
|
||||
Standard_Integer NbCu;
|
||||
Standard_Integer Adeb;
|
||||
Standard_Integer Afin;
|
||||
Handle(TColStd_HArray1OfInteger) tabdim;
|
||||
Standard_Real ERR3d;
|
||||
Standard_Real ERR2d;
|
||||
Standard_Integer FirstP;
|
||||
Standard_Integer LastP;
|
||||
Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints;
|
||||
Standard_Real mylambda1;
|
||||
Standard_Real mylambda2;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox_HeaderFile
|
||||
|
@@ -21,7 +21,6 @@
|
||||
#include <GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#include <AppParCurves_MultiBSpCurve.hxx>
|
||||
#include <math_Matrix.hxx>
|
||||
|
||||
|
||||
#define MultiLine GeomInt_TheMultiLineOfWLApprox
|
||||
#define MultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
|
||||
@@ -30,6 +29,6 @@
|
||||
#define Squares GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define Squares_hxx <GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_BSpFunction GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_BSpFunction_hxx <GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_BSpFunction_hxx \
|
||||
<GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#include "../AppParCurves/AppParCurves_BSpFunction.gxx"
|
||||
|
||||
|
@@ -42,15 +42,11 @@ class AppParCurves_MultiCurve;
|
||||
class AppParCurves_MultiBSpCurve;
|
||||
class math_Matrix;
|
||||
|
||||
|
||||
|
||||
class GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
class GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! given a MultiLine, this algorithm computes the least
|
||||
//! square resolution using the Householder-QR method.
|
||||
//! If the first and/or the last point is a constraint
|
||||
@@ -67,11 +63,24 @@ public:
|
||||
//! and is also the same for each MultiLine point because
|
||||
//! they are approximated in parallel(so with the same
|
||||
//! parameter, only the vector B changes).
|
||||
Standard_EXPORT GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector& Parameters, const Standard_Integer NbPol);
|
||||
|
||||
Standard_EXPORT GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox(
|
||||
const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint,
|
||||
const AppParCurves_Constraint FirstCons,
|
||||
const AppParCurves_Constraint LastCons,
|
||||
const math_Vector& Parameters,
|
||||
const Standard_Integer NbPol);
|
||||
|
||||
//! Initializes the fields of the object.
|
||||
Standard_EXPORT GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const Standard_Integer NbPol);
|
||||
|
||||
Standard_EXPORT GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox(
|
||||
const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint,
|
||||
const AppParCurves_Constraint FirstCons,
|
||||
const AppParCurves_Constraint LastCons,
|
||||
const Standard_Integer NbPol);
|
||||
|
||||
//! given a MultiLine, this algorithm computes the least
|
||||
//! square resolution using the Householder-QR method.
|
||||
//! If the first and/or the last point is a constraint
|
||||
@@ -87,171 +96,192 @@ public:
|
||||
//! and is also the same for each MultiLine point because
|
||||
//! they are approximated in parallel(so with the same
|
||||
//! parameter, only the vector B changes).
|
||||
Standard_EXPORT GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector& Parameters, const Standard_Integer NbPol);
|
||||
|
||||
Standard_EXPORT GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox(
|
||||
const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const TColStd_Array1OfReal& Knots,
|
||||
const TColStd_Array1OfInteger& Mults,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint,
|
||||
const AppParCurves_Constraint FirstCons,
|
||||
const AppParCurves_Constraint LastCons,
|
||||
const math_Vector& Parameters,
|
||||
const Standard_Integer NbPol);
|
||||
|
||||
//! Initializes the fields of the object.
|
||||
Standard_EXPORT GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const Standard_Integer NbPol);
|
||||
|
||||
Standard_EXPORT GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox(
|
||||
const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const TColStd_Array1OfReal& Knots,
|
||||
const TColStd_Array1OfInteger& Mults,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint,
|
||||
const AppParCurves_Constraint FirstCons,
|
||||
const AppParCurves_Constraint LastCons,
|
||||
const Standard_Integer NbPol);
|
||||
|
||||
//! Is used after having initialized the fields.
|
||||
//! The case "CurvaturePoint" is not treated in this method.
|
||||
Standard_EXPORT void Perform (const math_Vector& Parameters);
|
||||
|
||||
Standard_EXPORT void Perform(const math_Vector& Parameters);
|
||||
|
||||
//! Is used after having initialized the fields.
|
||||
Standard_EXPORT void Perform (const math_Vector& Parameters, const Standard_Real l1, const Standard_Real l2);
|
||||
|
||||
Standard_EXPORT void Perform(const math_Vector& Parameters,
|
||||
const Standard_Real l1,
|
||||
const Standard_Real l2);
|
||||
|
||||
//! Is used after having initialized the fields.
|
||||
//! <V1t> is the tangent vector at the first point.
|
||||
//! <V2t> is the tangent vector at the last point.
|
||||
Standard_EXPORT void Perform (const math_Vector& Parameters, const math_Vector& V1t, const math_Vector& V2t, const Standard_Real l1, const Standard_Real l2);
|
||||
|
||||
Standard_EXPORT void Perform(const math_Vector& Parameters,
|
||||
const math_Vector& V1t,
|
||||
const math_Vector& V2t,
|
||||
const Standard_Real l1,
|
||||
const Standard_Real l2);
|
||||
|
||||
//! Is used after having initialized the fields.
|
||||
//! <V1t> is the tangent vector at the first point.
|
||||
//! <V2t> is the tangent vector at the last point.
|
||||
//! <V1c> is the tangent vector at the first point.
|
||||
//! <V2c> is the tangent vector at the last point.
|
||||
Standard_EXPORT void Perform (const math_Vector& Parameters, const math_Vector& V1t, const math_Vector& V2t, const math_Vector& V1c, const math_Vector& V2c, const Standard_Real l1, const Standard_Real l2);
|
||||
|
||||
Standard_EXPORT void Perform(const math_Vector& Parameters,
|
||||
const math_Vector& V1t,
|
||||
const math_Vector& V2t,
|
||||
const math_Vector& V1c,
|
||||
const math_Vector& V2c,
|
||||
const Standard_Real l1,
|
||||
const Standard_Real l2);
|
||||
|
||||
//! returns True if all has been correctly done.
|
||||
Standard_EXPORT Standard_Boolean IsDone() const;
|
||||
|
||||
|
||||
//! returns the result of the approximation, i.e. all the
|
||||
//! Curves.
|
||||
//! An exception is raised if NotDone.
|
||||
Standard_EXPORT AppParCurves_MultiCurve BezierValue();
|
||||
|
||||
|
||||
//! returns the result of the approximation, i.e. all the
|
||||
//! Curves.
|
||||
//! An exception is raised if NotDone.
|
||||
Standard_EXPORT const AppParCurves_MultiBSpCurve& BSplineValue();
|
||||
|
||||
|
||||
//! returns the function matrix used to approximate the
|
||||
//! set.
|
||||
Standard_EXPORT const math_Matrix& FunctionMatrix() const;
|
||||
|
||||
|
||||
//! returns the derivative function matrix used
|
||||
//! to approximate the set.
|
||||
Standard_EXPORT const math_Matrix& DerivativeFunctionMatrix() const;
|
||||
|
||||
|
||||
//! returns the maximum errors between the MultiLine
|
||||
//! and the approximation curves. F is the sum of the square
|
||||
//! distances. Grad is the derivative vector of the
|
||||
//! function F.
|
||||
Standard_EXPORT void ErrorGradient (math_Vector& Grad, Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d);
|
||||
|
||||
Standard_EXPORT void ErrorGradient(math_Vector& Grad,
|
||||
Standard_Real& F,
|
||||
Standard_Real& MaxE3d,
|
||||
Standard_Real& MaxE2d);
|
||||
|
||||
//! returns the distances between the points of the
|
||||
//! multiline and the approximation curves.
|
||||
Standard_EXPORT const math_Matrix& Distance();
|
||||
|
||||
|
||||
//! returns the maximum errors between the MultiLine
|
||||
//! and the approximation curves. F is the sum of the square
|
||||
//! distances.
|
||||
Standard_EXPORT void Error (Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d);
|
||||
|
||||
Standard_EXPORT void Error(Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d);
|
||||
|
||||
//! returns the value (P2 - P1)/ V1 if the first point
|
||||
//! was a tangency point.
|
||||
Standard_EXPORT Standard_Real FirstLambda() const;
|
||||
|
||||
|
||||
//! returns the value (PN - PN-1)/ VN if the last point
|
||||
//! was a tangency point.
|
||||
Standard_EXPORT Standard_Real LastLambda() const;
|
||||
|
||||
|
||||
//! returns the matrix of points value.
|
||||
Standard_EXPORT const math_Matrix& Points() const;
|
||||
|
||||
|
||||
//! returns the matrix of resulting control points value.
|
||||
Standard_EXPORT const math_Matrix& Poles() const;
|
||||
|
||||
|
||||
//! Returns the indexes of the first non null values of
|
||||
//! A and DA.
|
||||
//! The values are non null from Index(ieme point) +1
|
||||
//! to Index(ieme point) + degree +1.
|
||||
Standard_EXPORT const math_IntegerVector& KIndex() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! is used by the constructors above.
|
||||
Standard_EXPORT void Init (const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint);
|
||||
|
||||
Standard_EXPORT void Init(const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint);
|
||||
|
||||
//! returns the number of second member columns.
|
||||
//! Is used internally to initialize the fields.
|
||||
Standard_EXPORT Standard_Integer NbBColumns (const GeomInt_TheMultiLineOfWLApprox& SSP) const;
|
||||
|
||||
Standard_EXPORT Standard_Integer NbBColumns(const GeomInt_TheMultiLineOfWLApprox& SSP) const;
|
||||
|
||||
//! returns the first point being fitted.
|
||||
Standard_EXPORT Standard_Integer TheFirstPoint (const AppParCurves_Constraint FirstCons, const Standard_Integer FirstPoint) const;
|
||||
|
||||
Standard_EXPORT Standard_Integer TheFirstPoint(const AppParCurves_Constraint FirstCons,
|
||||
const Standard_Integer FirstPoint) const;
|
||||
|
||||
//! returns the last point being fitted.
|
||||
Standard_EXPORT Standard_Integer TheLastPoint (const AppParCurves_Constraint LastCons, const Standard_Integer LastPoint) const;
|
||||
|
||||
Standard_EXPORT Standard_Integer TheLastPoint(const AppParCurves_Constraint LastCons,
|
||||
const Standard_Integer LastPoint) const;
|
||||
|
||||
//! Affects the fields in the case of a constraint point.
|
||||
Standard_EXPORT void Affect (const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer Index, AppParCurves_Constraint& Cons, math_Vector& Vt, math_Vector& Vc);
|
||||
|
||||
Standard_EXPORT void ComputeFunction (const math_Vector& Parameters);
|
||||
|
||||
Standard_EXPORT void SearchIndex (math_IntegerVector& Index);
|
||||
|
||||
//! computes internal matrixes for the resolution
|
||||
Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Vector& TheB);
|
||||
|
||||
//! computes internal matrixes for the resolution
|
||||
Standard_EXPORT void MakeTAA (math_Vector& TheA);
|
||||
|
||||
//! computes internal matrixes for the resolution
|
||||
Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Matrix& TheB);
|
||||
Standard_EXPORT void Affect(const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const Standard_Integer Index,
|
||||
AppParCurves_Constraint& Cons,
|
||||
math_Vector& Vt,
|
||||
math_Vector& Vc);
|
||||
|
||||
Standard_EXPORT void ComputeFunction(const math_Vector& Parameters);
|
||||
|
||||
Standard_EXPORT void SearchIndex(math_IntegerVector& Index);
|
||||
|
||||
//! computes internal matrixes for the resolution
|
||||
Standard_EXPORT void MakeTAA(math_Vector& TheA, math_Vector& TheB);
|
||||
|
||||
//! computes internal matrixes for the resolution
|
||||
Standard_EXPORT void MakeTAA(math_Vector& TheA);
|
||||
|
||||
//! computes internal matrixes for the resolution
|
||||
Standard_EXPORT void MakeTAA(math_Vector& TheA, math_Matrix& TheB);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
AppParCurves_Constraint FirstConstraint;
|
||||
AppParCurves_Constraint LastConstraint;
|
||||
AppParCurves_MultiBSpCurve SCU;
|
||||
Handle(TColStd_HArray1OfReal) myknots;
|
||||
AppParCurves_Constraint FirstConstraint;
|
||||
AppParCurves_Constraint LastConstraint;
|
||||
AppParCurves_MultiBSpCurve SCU;
|
||||
Handle(TColStd_HArray1OfReal) myknots;
|
||||
Handle(TColStd_HArray1OfInteger) mymults;
|
||||
math_Matrix mypoles;
|
||||
math_Matrix A;
|
||||
math_Matrix DA;
|
||||
math_Matrix B2;
|
||||
math_Matrix mypoints;
|
||||
math_Vector Vflatknots;
|
||||
math_Vector Vec1t;
|
||||
math_Vector Vec1c;
|
||||
math_Vector Vec2t;
|
||||
math_Vector Vec2c;
|
||||
math_Matrix theError;
|
||||
math_IntegerVector myindex;
|
||||
Standard_Real lambda1;
|
||||
Standard_Real lambda2;
|
||||
Standard_Integer FirstP;
|
||||
Standard_Integer LastP;
|
||||
Standard_Integer Nlignes;
|
||||
Standard_Integer Ninc;
|
||||
Standard_Integer NA;
|
||||
Standard_Integer myfirstp;
|
||||
Standard_Integer mylastp;
|
||||
Standard_Integer resinit;
|
||||
Standard_Integer resfin;
|
||||
Standard_Integer nbP2d;
|
||||
Standard_Integer nbP;
|
||||
Standard_Integer nbpoles;
|
||||
Standard_Integer deg;
|
||||
Standard_Boolean done;
|
||||
Standard_Boolean iscalculated;
|
||||
Standard_Boolean isready;
|
||||
|
||||
|
||||
math_Matrix mypoles;
|
||||
math_Matrix A;
|
||||
math_Matrix DA;
|
||||
math_Matrix B2;
|
||||
math_Matrix mypoints;
|
||||
math_Vector Vflatknots;
|
||||
math_Vector Vec1t;
|
||||
math_Vector Vec1c;
|
||||
math_Vector Vec2t;
|
||||
math_Vector Vec2c;
|
||||
math_Matrix theError;
|
||||
math_IntegerVector myindex;
|
||||
Standard_Real lambda1;
|
||||
Standard_Real lambda2;
|
||||
Standard_Integer FirstP;
|
||||
Standard_Integer LastP;
|
||||
Standard_Integer Nlignes;
|
||||
Standard_Integer Ninc;
|
||||
Standard_Integer NA;
|
||||
Standard_Integer myfirstp;
|
||||
Standard_Integer mylastp;
|
||||
Standard_Integer resinit;
|
||||
Standard_Integer resfin;
|
||||
Standard_Integer nbP2d;
|
||||
Standard_Integer nbP;
|
||||
Standard_Integer nbpoles;
|
||||
Standard_Integer deg;
|
||||
Standard_Boolean done;
|
||||
Standard_Boolean iscalculated;
|
||||
Standard_Boolean isready;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox_HeaderFile
|
||||
|
@@ -25,13 +25,12 @@
|
||||
#include <AppParCurves_MultiCurve.hxx>
|
||||
#include <AppParCurves_MultiBSpCurve.hxx>
|
||||
#include <math_Matrix.hxx>
|
||||
|
||||
|
||||
#define MultiLine GeomInt_TheMultiLineOfWLApprox
|
||||
#define MultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
|
||||
#define ToolLine GeomInt_TheMultiLineToolOfWLApprox
|
||||
#define ToolLine_hxx <GeomInt_TheMultiLineToolOfWLApprox.hxx>
|
||||
#define AppParCurves_LeastSquare GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_LeastSquare_hxx <GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_LeastSquare_hxx \
|
||||
<GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#include "../AppParCurves/AppParCurves_LeastSquare.gxx"
|
||||
|
||||
|
@@ -31,42 +31,26 @@ class GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox;
|
||||
class GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox;
|
||||
class math_MultipleVarFunctionWithGradient;
|
||||
|
||||
|
||||
|
||||
class GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox : public math_BFGS
|
||||
class GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox : public math_BFGS
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox(math_MultipleVarFunctionWithGradient& F, const math_Vector& StartingPoint, const Standard_Real Tolerance3d, const Standard_Real Tolerance2d, const Standard_Real Eps, const Standard_Integer NbIterations = 200);
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean IsSolutionReached (math_MultipleVarFunctionWithGradient& F) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
Standard_EXPORT GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox(
|
||||
math_MultipleVarFunctionWithGradient& F,
|
||||
const math_Vector& StartingPoint,
|
||||
const Standard_Real Tolerance3d,
|
||||
const Standard_Real Tolerance2d,
|
||||
const Standard_Real Eps,
|
||||
const Standard_Integer NbIterations = 200);
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean IsSolutionReached(
|
||||
math_MultipleVarFunctionWithGradient& F) const Standard_OVERRIDE;
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Real myTol3d;
|
||||
Standard_Real myTol2d;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox_HeaderFile
|
||||
|
@@ -23,21 +23,24 @@
|
||||
#include <GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#include <GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#include <math_MultipleVarFunctionWithGradient.hxx>
|
||||
|
||||
|
||||
#define MultiLine GeomInt_TheMultiLineOfWLApprox
|
||||
#define MultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
|
||||
#define ToolLine GeomInt_TheMultiLineToolOfWLApprox
|
||||
#define ToolLine_hxx <GeomInt_TheMultiLineToolOfWLApprox.hxx>
|
||||
#define AppParCurves_ParLeastSquare GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define AppParCurves_ParLeastSquare_hxx <GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define AppParCurves_ParLeastSquare \
|
||||
GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define AppParCurves_ParLeastSquare_hxx \
|
||||
<GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define AppParCurves_ResConstraint GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define AppParCurves_ResConstraint_hxx <GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define AppParCurves_ResConstraint_hxx \
|
||||
<GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define AppParCurves_ParFunction GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define AppParCurves_ParFunction_hxx <GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define AppParCurves_ParFunction_hxx \
|
||||
<GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define AppParCurves_Gradient_BFGS GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define AppParCurves_Gradient_BFGS_hxx <GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define AppParCurves_Gradient_BFGS_hxx \
|
||||
<GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define AppParCurves_Gradient GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define AppParCurves_Gradient_hxx <GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#include "../AppParCurves/AppParCurves_Gradient_BFGS.gxx"
|
||||
|
||||
|
@@ -31,42 +31,26 @@ class GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox;
|
||||
class GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox;
|
||||
class math_MultipleVarFunctionWithGradient;
|
||||
|
||||
|
||||
|
||||
class GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox : public math_BFGS
|
||||
class GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox : public math_BFGS
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox(math_MultipleVarFunctionWithGradient& F, const math_Vector& StartingPoint, const Standard_Real Tolerance3d, const Standard_Real Tolerance2d, const Standard_Real Eps, const Standard_Integer NbIterations = 200);
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean IsSolutionReached (math_MultipleVarFunctionWithGradient& F) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
Standard_EXPORT GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox(
|
||||
math_MultipleVarFunctionWithGradient& F,
|
||||
const math_Vector& StartingPoint,
|
||||
const Standard_Real Tolerance3d,
|
||||
const Standard_Real Tolerance2d,
|
||||
const Standard_Real Eps,
|
||||
const Standard_Integer NbIterations = 200);
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean IsSolutionReached(
|
||||
math_MultipleVarFunctionWithGradient& F) const Standard_OVERRIDE;
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Real myTol3d;
|
||||
Standard_Real myTol2d;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox_HeaderFile
|
||||
|
@@ -23,21 +23,23 @@
|
||||
#include <GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#include <GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#include <math_MultipleVarFunctionWithGradient.hxx>
|
||||
|
||||
|
||||
#define MultiLine GeomInt_TheMultiLineOfWLApprox
|
||||
#define MultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
|
||||
#define ToolLine GeomInt_TheMultiLineToolOfWLApprox
|
||||
#define ToolLine_hxx <GeomInt_TheMultiLineToolOfWLApprox.hxx>
|
||||
#define AppParCurves_ParLeastSquare GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_ParLeastSquare_hxx <GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_ParLeastSquare_hxx \
|
||||
<GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_ResConstraint GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_ResConstraint_hxx <GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_ResConstraint_hxx \
|
||||
<GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_ParFunction GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_ParFunction_hxx <GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_ParFunction_hxx \
|
||||
<GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_Gradient_BFGS GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_Gradient_BFGS_hxx <GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_Gradient_BFGS_hxx \
|
||||
<GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_Gradient GeomInt_MyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_Gradient_hxx <GeomInt_MyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#include "../AppParCurves/AppParCurves_Gradient_BFGS.gxx"
|
||||
|
||||
|
@@ -21,213 +21,198 @@
|
||||
#include <Extrema_ExtPS.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : Perform
|
||||
//purpose : General intersection
|
||||
// function : Perform
|
||||
// purpose : General intersection
|
||||
//=======================================================================
|
||||
void GeomInt_IntSS::Perform(const Handle(Geom_Surface)& S1,
|
||||
const Handle(Geom_Surface)& S2,
|
||||
const Standard_Real Tol,
|
||||
const Standard_Boolean Approx,
|
||||
const Standard_Boolean ApproxS1,
|
||||
const Standard_Boolean ApproxS2)
|
||||
const Handle(Geom_Surface)& S2,
|
||||
const Standard_Real Tol,
|
||||
const Standard_Boolean Approx,
|
||||
const Standard_Boolean ApproxS1,
|
||||
const Standard_Boolean ApproxS2)
|
||||
{
|
||||
myHS1 = new GeomAdaptor_Surface(S1);
|
||||
if (S1==S2)
|
||||
if (S1 == S2)
|
||||
myHS2 = myHS1;
|
||||
else
|
||||
myHS2 = new GeomAdaptor_Surface(S2);
|
||||
InternalPerform(Tol,Approx,ApproxS1,ApproxS2,Standard_False,0.,0.,0.,0.);
|
||||
InternalPerform(Tol, Approx, ApproxS1, ApproxS2, Standard_False, 0., 0., 0., 0.);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Perform
|
||||
//purpose : General intersection with a Starting Point
|
||||
// function : Perform
|
||||
// purpose : General intersection with a Starting Point
|
||||
//=======================================================================
|
||||
void GeomInt_IntSS::Perform(const Handle(Geom_Surface)& S1,
|
||||
const Handle(Geom_Surface)& S2,
|
||||
const Standard_Real Tol,
|
||||
const Standard_Real U1, const Standard_Real V1,
|
||||
const Standard_Real U2, const Standard_Real V2,
|
||||
const Standard_Boolean Approx,
|
||||
const Standard_Boolean ApproxS1,
|
||||
const Standard_Boolean ApproxS2)
|
||||
void GeomInt_IntSS::Perform(const Handle(Geom_Surface)& S1,
|
||||
const Handle(Geom_Surface)& S2,
|
||||
const Standard_Real Tol,
|
||||
const Standard_Real U1,
|
||||
const Standard_Real V1,
|
||||
const Standard_Real U2,
|
||||
const Standard_Real V2,
|
||||
const Standard_Boolean Approx,
|
||||
const Standard_Boolean ApproxS1,
|
||||
const Standard_Boolean ApproxS2)
|
||||
{
|
||||
myHS1 = new GeomAdaptor_Surface(S1);
|
||||
if (S1==S2)
|
||||
if (S1 == S2)
|
||||
myHS2 = myHS1;
|
||||
else
|
||||
myHS2 = new GeomAdaptor_Surface(S2);
|
||||
InternalPerform(Tol,Approx,ApproxS1,ApproxS2,Standard_True,U1,V1,U2,V2);
|
||||
InternalPerform(Tol, Approx, ApproxS1, ApproxS2, Standard_True, U1, V1, U2, V2);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Internal Perform
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void GeomInt_IntSS::InternalPerform(const Standard_Real Tol,
|
||||
const Standard_Boolean Approx,
|
||||
const Standard_Boolean ApproxS1,
|
||||
const Standard_Boolean ApproxS2,
|
||||
const Standard_Boolean useStart,
|
||||
const Standard_Real U1,
|
||||
const Standard_Real V1,
|
||||
const Standard_Real U2,
|
||||
const Standard_Real V2)
|
||||
//=================================================================================================
|
||||
|
||||
void GeomInt_IntSS::InternalPerform(const Standard_Real Tol,
|
||||
const Standard_Boolean Approx,
|
||||
const Standard_Boolean ApproxS1,
|
||||
const Standard_Boolean ApproxS2,
|
||||
const Standard_Boolean useStart,
|
||||
const Standard_Real U1,
|
||||
const Standard_Real V1,
|
||||
const Standard_Real U2,
|
||||
const Standard_Real V2)
|
||||
{
|
||||
myTolReached2d = myTolReached3d = 0.0;
|
||||
myNbrestr = 0;
|
||||
myNbrestr = 0;
|
||||
sline.Clear();
|
||||
|
||||
Standard_Real TolArc = Tol;
|
||||
Standard_Real TolTang = Tol;
|
||||
|
||||
Standard_Real TolArc = Tol;
|
||||
Standard_Real TolTang = Tol;
|
||||
Standard_Real Deflection = 0.1;
|
||||
if (myHS1->GetType() == GeomAbs_BSplineSurface && myHS2->GetType() == GeomAbs_BSplineSurface)
|
||||
{
|
||||
Deflection /= 10.;
|
||||
}
|
||||
|
||||
Handle(Adaptor3d_TopolTool) dom1 = new Adaptor3d_TopolTool (myHS1);
|
||||
Handle(Adaptor3d_TopolTool) dom2 = new Adaptor3d_TopolTool (myHS2);
|
||||
Handle(Adaptor3d_TopolTool) dom1 = new Adaptor3d_TopolTool(myHS1);
|
||||
Handle(Adaptor3d_TopolTool) dom2 = new Adaptor3d_TopolTool(myHS2);
|
||||
|
||||
NCollection_Vector< Handle(Adaptor3d_Surface)> aVecHS1;
|
||||
NCollection_Vector< Handle(Adaptor3d_Surface)> aVecHS2;
|
||||
NCollection_Vector<Handle(Adaptor3d_Surface)> aVecHS1;
|
||||
NCollection_Vector<Handle(Adaptor3d_Surface)> aVecHS2;
|
||||
|
||||
if (myHS1 == myHS2)
|
||||
{
|
||||
aVecHS1.Append (myHS1);
|
||||
aVecHS2.Append (myHS2);
|
||||
aVecHS1.Append(myHS1);
|
||||
aVecHS2.Append(myHS2);
|
||||
}
|
||||
else
|
||||
{
|
||||
myIntersector.PrepareSurfaces (myHS1, dom1, myHS2, dom2, Tol, aVecHS1, aVecHS2);
|
||||
myIntersector.PrepareSurfaces(myHS1, dom1, myHS2, dom2, Tol, aVecHS1, aVecHS2);
|
||||
}
|
||||
|
||||
for (Standard_Integer aNumOfHS1 = 0; aNumOfHS1 < aVecHS1.Length(); aNumOfHS1++)
|
||||
{
|
||||
const Handle(Adaptor3d_Surface)& aHS1 = aVecHS1.Value (aNumOfHS1);
|
||||
const Handle(Adaptor3d_Surface)& aHS1 = aVecHS1.Value(aNumOfHS1);
|
||||
|
||||
for (Standard_Integer aNumOfHS2 = 0; aNumOfHS2 < aVecHS2.Length(); aNumOfHS2++)
|
||||
{
|
||||
const Handle(Adaptor3d_Surface)& aHS2 = aVecHS2.Value (aNumOfHS2);
|
||||
const Handle(Adaptor3d_Surface)& aHS2 = aVecHS2.Value(aNumOfHS2);
|
||||
|
||||
Handle(Adaptor3d_TopolTool) aDom1 = new Adaptor3d_TopolTool (aHS1);
|
||||
Handle(Adaptor3d_TopolTool) aDom2 = new Adaptor3d_TopolTool (aHS2);
|
||||
Handle(Adaptor3d_TopolTool) aDom1 = new Adaptor3d_TopolTool(aHS1);
|
||||
Handle(Adaptor3d_TopolTool) aDom2 = new Adaptor3d_TopolTool(aHS2);
|
||||
|
||||
myLConstruct.Load (aDom1 ,aDom2,
|
||||
Handle(GeomAdaptor_Surface)::DownCast (aHS1),
|
||||
Handle(GeomAdaptor_Surface)::DownCast (aHS2));
|
||||
myLConstruct.Load(aDom1,
|
||||
aDom2,
|
||||
Handle(GeomAdaptor_Surface)::DownCast(aHS1),
|
||||
Handle(GeomAdaptor_Surface)::DownCast(aHS2));
|
||||
|
||||
Standard_Real UVMaxStep = IntPatch_Intersection::DefineUVMaxStep (aHS1, aDom1, aHS2, aDom2);
|
||||
Standard_Real UVMaxStep = IntPatch_Intersection::DefineUVMaxStep(aHS1, aDom1, aHS2, aDom2);
|
||||
|
||||
myIntersector.SetTolerances (TolArc, TolTang, UVMaxStep, Deflection);
|
||||
myIntersector.SetTolerances(TolArc, TolTang, UVMaxStep, Deflection);
|
||||
|
||||
if (aHS1 == aHS2)
|
||||
{
|
||||
myIntersector.Perform (aHS1, aDom1, TolArc, TolTang);
|
||||
myIntersector.Perform(aHS1, aDom1, TolArc, TolTang);
|
||||
}
|
||||
else if (!useStart)
|
||||
{
|
||||
myIntersector.Perform (aHS1, aDom1, aHS2, aDom2, TolArc, TolTang);
|
||||
myIntersector.Perform(aHS1, aDom1, aHS2, aDom2, TolArc, TolTang);
|
||||
}
|
||||
else
|
||||
{
|
||||
TopAbs_State aState1 = aDom1->Classify (gp_Pnt2d (U1, V1), Tol);
|
||||
TopAbs_State aState2 = aDom2->Classify (gp_Pnt2d (U2, V2), Tol);
|
||||
TopAbs_State aState1 = aDom1->Classify(gp_Pnt2d(U1, V1), Tol);
|
||||
TopAbs_State aState2 = aDom2->Classify(gp_Pnt2d(U2, V2), Tol);
|
||||
|
||||
if ((aState1 == TopAbs_IN || aState1 == TopAbs_ON) &&
|
||||
(aState2 == TopAbs_IN || aState2 == TopAbs_ON))
|
||||
if ((aState1 == TopAbs_IN || aState1 == TopAbs_ON)
|
||||
&& (aState2 == TopAbs_IN || aState2 == TopAbs_ON))
|
||||
{
|
||||
myIntersector.Perform (aHS1, aDom1, aHS2, aDom2, U1, V1, U2, V2, TolArc, TolTang);
|
||||
myIntersector.Perform(aHS1, aDom1, aHS2, aDom2, U1, V1, U2, V2, TolArc, TolTang);
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
if (myIntersector.IsDone()) {
|
||||
if (myIntersector.IsDone())
|
||||
{
|
||||
const Standard_Integer nblin = myIntersector.NbLines();
|
||||
for (Standard_Integer i = 1; i <= nblin; i++)
|
||||
{
|
||||
MakeCurve (i, aDom1, aDom2, Tol, Approx, ApproxS1, ApproxS2);
|
||||
MakeCurve(i, aDom1, aDom2, Tol, Approx, ApproxS1, ApproxS2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Line
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Handle(Geom_Curve) & GeomInt_IntSS::Line (const Standard_Integer Index) const
|
||||
//=================================================================================================
|
||||
|
||||
const Handle(Geom_Curve)& GeomInt_IntSS::Line(const Standard_Integer Index) const
|
||||
{
|
||||
StdFail_NotDone_Raise_if(!myIntersector.IsDone(),"GeomInt_IntSS::Line");
|
||||
return sline(Index+myNbrestr);
|
||||
StdFail_NotDone_Raise_if(!myIntersector.IsDone(), "GeomInt_IntSS::Line");
|
||||
return sline(Index + myNbrestr);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Boundary
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Handle(Geom_Curve) & GeomInt_IntSS::Boundary (const Standard_Integer Index) const
|
||||
//=================================================================================================
|
||||
|
||||
const Handle(Geom_Curve)& GeomInt_IntSS::Boundary(const Standard_Integer Index) const
|
||||
{
|
||||
StdFail_NotDone_Raise_if(!myIntersector.IsDone(),"GeomInt_IntSS::Line");
|
||||
Standard_OutOfRange_Raise_if(Index <= 0 || Index > myNbrestr,
|
||||
"GeomInt_IntSS::Boundary");
|
||||
StdFail_NotDone_Raise_if(!myIntersector.IsDone(), "GeomInt_IntSS::Line");
|
||||
Standard_OutOfRange_Raise_if(Index <= 0 || Index > myNbrestr, "GeomInt_IntSS::Boundary");
|
||||
return sline(Index);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Pnt2d
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
gp_Pnt2d GeomInt_IntSS::Pnt2d(const Standard_Integer Index,
|
||||
const Standard_Boolean OnFirst) const
|
||||
//=================================================================================================
|
||||
|
||||
gp_Pnt2d GeomInt_IntSS::Pnt2d(const Standard_Integer Index, const Standard_Boolean OnFirst) const
|
||||
{
|
||||
const IntPatch_Point& thept = myIntersector.Point(Index);
|
||||
Standard_Real U,V;
|
||||
const IntPatch_Point& thept = myIntersector.Point(Index);
|
||||
Standard_Real U, V;
|
||||
if (OnFirst)
|
||||
thept.ParametersOnS1(U,V);
|
||||
thept.ParametersOnS1(U, V);
|
||||
else
|
||||
thept.ParametersOnS2(U,V);
|
||||
return gp_Pnt2d(U,V);
|
||||
thept.ParametersOnS2(U, V);
|
||||
return gp_Pnt2d(U, V);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : HasLineOnS1
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean GeomInt_IntSS::HasLineOnS1(const Standard_Integer index) const
|
||||
{
|
||||
StdFail_NotDone_Raise_if(!myIntersector.IsDone(),"GeomInt_IntSS::HasLineOnS1");
|
||||
//=================================================================================================
|
||||
|
||||
Standard_Boolean GeomInt_IntSS::HasLineOnS1(const Standard_Integer index) const
|
||||
{
|
||||
StdFail_NotDone_Raise_if(!myIntersector.IsDone(), "GeomInt_IntSS::HasLineOnS1");
|
||||
return (!slineS1(index).IsNull());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : HasLineOnS2
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean GeomInt_IntSS::HasLineOnS2(const Standard_Integer index) const
|
||||
{
|
||||
StdFail_NotDone_Raise_if(!myIntersector.IsDone(),"GeomInt_IntSS::HasLineOnS2");
|
||||
//=================================================================================================
|
||||
|
||||
Standard_Boolean GeomInt_IntSS::HasLineOnS2(const Standard_Integer index) const
|
||||
{
|
||||
StdFail_NotDone_Raise_if(!myIntersector.IsDone(), "GeomInt_IntSS::HasLineOnS2");
|
||||
return (!slineS2(index).IsNull());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : LineOnS1
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Handle(Geom2d_Curve) & GeomInt_IntSS::LineOnS1(const Standard_Integer Index) const
|
||||
//=================================================================================================
|
||||
|
||||
const Handle(Geom2d_Curve)& GeomInt_IntSS::LineOnS1(const Standard_Integer Index) const
|
||||
{
|
||||
StdFail_NotDone_Raise_if(!myIntersector.IsDone(),"GeomInt_IntSS::LineOnS1");
|
||||
StdFail_NotDone_Raise_if(!myIntersector.IsDone(), "GeomInt_IntSS::LineOnS1");
|
||||
return slineS1(Index);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : LineOnS2
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Handle(Geom2d_Curve) & GeomInt_IntSS::LineOnS2(const Standard_Integer Index) const
|
||||
//=================================================================================================
|
||||
|
||||
const Handle(Geom2d_Curve)& GeomInt_IntSS::LineOnS2(const Standard_Integer Index) const
|
||||
{
|
||||
StdFail_NotDone_Raise_if(!myIntersector.IsDone(),"GeomInt_IntSS::LineOnS2");
|
||||
StdFail_NotDone_Raise_if(!myIntersector.IsDone(), "GeomInt_IntSS::LineOnS2");
|
||||
return slineS2(Index);
|
||||
}
|
||||
|
||||
|
@@ -34,121 +34,177 @@ class Bnd_Box2d;
|
||||
class Adaptor3d_TopolTool;
|
||||
class IntPatch_WLine;
|
||||
|
||||
class GeomInt_IntSS
|
||||
class GeomInt_IntSS
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
GeomInt_IntSS();
|
||||
|
||||
GeomInt_IntSS();
|
||||
|
||||
//! performs general intersection of two surfaces just now
|
||||
GeomInt_IntSS(const Handle(Geom_Surface)& S1, const Handle(Geom_Surface)& S2, const Standard_Real Tol, const Standard_Boolean Approx = Standard_True, const Standard_Boolean ApproxS1 = Standard_False, const Standard_Boolean ApproxS2 = Standard_False);
|
||||
|
||||
GeomInt_IntSS(const Handle(Geom_Surface)& S1,
|
||||
const Handle(Geom_Surface)& S2,
|
||||
const Standard_Real Tol,
|
||||
const Standard_Boolean Approx = Standard_True,
|
||||
const Standard_Boolean ApproxS1 = Standard_False,
|
||||
const Standard_Boolean ApproxS2 = Standard_False);
|
||||
|
||||
//! general intersection of two surfaces
|
||||
Standard_EXPORT void Perform (const Handle(Geom_Surface)& S1, const Handle(Geom_Surface)& S2, const Standard_Real Tol, const Standard_Boolean Approx = Standard_True, const Standard_Boolean ApproxS1 = Standard_False, const Standard_Boolean ApproxS2 = Standard_False);
|
||||
|
||||
Standard_EXPORT void Perform(const Handle(Geom_Surface)& S1,
|
||||
const Handle(Geom_Surface)& S2,
|
||||
const Standard_Real Tol,
|
||||
const Standard_Boolean Approx = Standard_True,
|
||||
const Standard_Boolean ApproxS1 = Standard_False,
|
||||
const Standard_Boolean ApproxS2 = Standard_False);
|
||||
|
||||
//! intersection of adapted surfaces
|
||||
void Perform (const Handle(GeomAdaptor_Surface)& HS1, const Handle(GeomAdaptor_Surface)& HS2, const Standard_Real Tol, const Standard_Boolean Approx = Standard_True, const Standard_Boolean ApproxS1 = Standard_False, const Standard_Boolean ApproxS2 = Standard_False);
|
||||
|
||||
void Perform(const Handle(GeomAdaptor_Surface)& HS1,
|
||||
const Handle(GeomAdaptor_Surface)& HS2,
|
||||
const Standard_Real Tol,
|
||||
const Standard_Boolean Approx = Standard_True,
|
||||
const Standard_Boolean ApproxS1 = Standard_False,
|
||||
const Standard_Boolean ApproxS2 = Standard_False);
|
||||
|
||||
//! general intersection using a starting point
|
||||
Standard_EXPORT void Perform (const Handle(Geom_Surface)& S1, const Handle(Geom_Surface)& S2, const Standard_Real Tol, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Boolean Approx = Standard_True, const Standard_Boolean ApproxS1 = Standard_False, const Standard_Boolean ApproxS2 = Standard_False);
|
||||
|
||||
Standard_EXPORT void Perform(const Handle(Geom_Surface)& S1,
|
||||
const Handle(Geom_Surface)& S2,
|
||||
const Standard_Real Tol,
|
||||
const Standard_Real U1,
|
||||
const Standard_Real V1,
|
||||
const Standard_Real U2,
|
||||
const Standard_Real V2,
|
||||
const Standard_Boolean Approx = Standard_True,
|
||||
const Standard_Boolean ApproxS1 = Standard_False,
|
||||
const Standard_Boolean ApproxS2 = Standard_False);
|
||||
|
||||
//! intersection of adapted surfaces using a starting point
|
||||
void Perform (const Handle(GeomAdaptor_Surface)& HS1, const Handle(GeomAdaptor_Surface)& HS2, const Standard_Real Tol, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Boolean Approx = Standard_True, const Standard_Boolean ApproxS1 = Standard_False, const Standard_Boolean ApproxS2 = Standard_False);
|
||||
|
||||
Standard_Boolean IsDone() const;
|
||||
|
||||
Standard_Real TolReached3d() const;
|
||||
|
||||
Standard_Real TolReached2d() const;
|
||||
|
||||
Standard_Integer NbLines() const;
|
||||
|
||||
Standard_EXPORT const Handle(Geom_Curve)& Line (const Standard_Integer Index) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean HasLineOnS1 (const Standard_Integer Index) const;
|
||||
|
||||
Standard_EXPORT const Handle(Geom2d_Curve)& LineOnS1 (const Standard_Integer Index) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean HasLineOnS2 (const Standard_Integer Index) const;
|
||||
|
||||
Standard_EXPORT const Handle(Geom2d_Curve)& LineOnS2 (const Standard_Integer Index) const;
|
||||
|
||||
Standard_Integer NbBoundaries() const;
|
||||
|
||||
Standard_EXPORT const Handle(Geom_Curve)& Boundary (const Standard_Integer Index) const;
|
||||
|
||||
Standard_Integer NbPoints() const;
|
||||
|
||||
gp_Pnt Point (const Standard_Integer Index) const;
|
||||
|
||||
Standard_EXPORT gp_Pnt2d Pnt2d (const Standard_Integer Index, const Standard_Boolean OnFirst) const;
|
||||
|
||||
Standard_EXPORT void SetTolFixTangents (const Standard_Real aTolCheck, const Standard_Real aTolAngCheck);
|
||||
|
||||
Standard_EXPORT void TolFixTangents (Standard_Real& aTolCheck, Standard_Real& aTolAngCheck);
|
||||
|
||||
void Perform(const Handle(GeomAdaptor_Surface)& HS1,
|
||||
const Handle(GeomAdaptor_Surface)& HS2,
|
||||
const Standard_Real Tol,
|
||||
const Standard_Real U1,
|
||||
const Standard_Real V1,
|
||||
const Standard_Real U2,
|
||||
const Standard_Real V2,
|
||||
const Standard_Boolean Approx = Standard_True,
|
||||
const Standard_Boolean ApproxS1 = Standard_False,
|
||||
const Standard_Boolean ApproxS2 = Standard_False);
|
||||
|
||||
Standard_Boolean IsDone() const;
|
||||
|
||||
Standard_Real TolReached3d() const;
|
||||
|
||||
Standard_Real TolReached2d() const;
|
||||
|
||||
Standard_Integer NbLines() const;
|
||||
|
||||
Standard_EXPORT const Handle(Geom_Curve)& Line(const Standard_Integer Index) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean HasLineOnS1(const Standard_Integer Index) const;
|
||||
|
||||
Standard_EXPORT const Handle(Geom2d_Curve)& LineOnS1(const Standard_Integer Index) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean HasLineOnS2(const Standard_Integer Index) const;
|
||||
|
||||
Standard_EXPORT const Handle(Geom2d_Curve)& LineOnS2(const Standard_Integer Index) const;
|
||||
|
||||
Standard_Integer NbBoundaries() const;
|
||||
|
||||
Standard_EXPORT const Handle(Geom_Curve)& Boundary(const Standard_Integer Index) const;
|
||||
|
||||
Standard_Integer NbPoints() const;
|
||||
|
||||
gp_Pnt Point(const Standard_Integer Index) const;
|
||||
|
||||
Standard_EXPORT gp_Pnt2d Pnt2d(const Standard_Integer Index,
|
||||
const Standard_Boolean OnFirst) const;
|
||||
|
||||
Standard_EXPORT void SetTolFixTangents(const Standard_Real aTolCheck,
|
||||
const Standard_Real aTolAngCheck);
|
||||
|
||||
Standard_EXPORT void TolFixTangents(Standard_Real& aTolCheck, Standard_Real& aTolAngCheck);
|
||||
|
||||
//! converts RLine to Geom(2d)_Curve.
|
||||
Standard_EXPORT static void TreatRLine (const Handle(IntPatch_RLine)& theRL, const Handle(GeomAdaptor_Surface)& theHS1, const Handle(GeomAdaptor_Surface)& theHS2, Handle(Geom_Curve)& theC3d, Handle(Geom2d_Curve)& theC2d1, Handle(Geom2d_Curve)& theC2d2, Standard_Real& theTolReached);
|
||||
|
||||
//! creates 2D-curve on given surface from given 3D-curve
|
||||
Standard_EXPORT static void BuildPCurves (const Standard_Real theFirst, const Standard_Real theLast,
|
||||
const Standard_Real theUmin, const Standard_Real theUmax,
|
||||
const Standard_Real theVmin, const Standard_Real theVmax,
|
||||
Standard_Real& theTol,
|
||||
const Handle(Geom_Surface)& theSurface,
|
||||
const Handle(Geom_Curve)& theCurve,
|
||||
Handle(Geom2d_Curve)& theCurve2d);
|
||||
Standard_EXPORT static void TreatRLine(const Handle(IntPatch_RLine)& theRL,
|
||||
const Handle(GeomAdaptor_Surface)& theHS1,
|
||||
const Handle(GeomAdaptor_Surface)& theHS2,
|
||||
Handle(Geom_Curve)& theC3d,
|
||||
Handle(Geom2d_Curve)& theC2d1,
|
||||
Handle(Geom2d_Curve)& theC2d2,
|
||||
Standard_Real& theTolReached);
|
||||
|
||||
//! creates 2D-curve on given surface from given 3D-curve
|
||||
Standard_EXPORT static void BuildPCurves (const Standard_Real f, const Standard_Real l, Standard_Real& Tol, const Handle(Geom_Surface)& S, const Handle(Geom_Curve)& C, Handle(Geom2d_Curve)& C2d);
|
||||
|
||||
Standard_EXPORT static void BuildPCurves(const Standard_Real theFirst,
|
||||
const Standard_Real theLast,
|
||||
const Standard_Real theUmin,
|
||||
const Standard_Real theUmax,
|
||||
const Standard_Real theVmin,
|
||||
const Standard_Real theVmax,
|
||||
Standard_Real& theTol,
|
||||
const Handle(Geom_Surface)& theSurface,
|
||||
const Handle(Geom_Curve)& theCurve,
|
||||
Handle(Geom2d_Curve)& theCurve2d);
|
||||
|
||||
//! creates 2D-curve on given surface from given 3D-curve
|
||||
Standard_EXPORT static void BuildPCurves(const Standard_Real f,
|
||||
const Standard_Real l,
|
||||
Standard_Real& Tol,
|
||||
const Handle(Geom_Surface)& S,
|
||||
const Handle(Geom_Curve)& C,
|
||||
Handle(Geom2d_Curve)& C2d);
|
||||
|
||||
//! puts into theArrayOfParameters the parameters of intersection
|
||||
//! points of given theC2d1 and theC2d2 curves with the boundaries
|
||||
//! of the source surface.
|
||||
Standard_EXPORT static void TrimILineOnSurfBoundaries (const Handle(Geom2d_Curve)& theC2d1, const Handle(Geom2d_Curve)& theC2d2, const Bnd_Box2d& theBound1, const Bnd_Box2d& theBound2, GeomInt_VectorOfReal& theArrayOfParameters);
|
||||
Standard_EXPORT static void TrimILineOnSurfBoundaries(const Handle(Geom2d_Curve)& theC2d1,
|
||||
const Handle(Geom2d_Curve)& theC2d2,
|
||||
const Bnd_Box2d& theBound1,
|
||||
const Bnd_Box2d& theBound2,
|
||||
GeomInt_VectorOfReal& theArrayOfParameters);
|
||||
|
||||
Standard_EXPORT static Handle(Geom_Curve) MakeBSpline (const Handle(IntPatch_WLine)& WL, const Standard_Integer ideb, const Standard_Integer ifin);
|
||||
Standard_EXPORT static Handle(Geom_Curve) MakeBSpline(const Handle(IntPatch_WLine)& WL,
|
||||
const Standard_Integer ideb,
|
||||
const Standard_Integer ifin);
|
||||
|
||||
Standard_EXPORT static Handle(Geom2d_BSplineCurve) MakeBSpline2d(const Handle(IntPatch_WLine)& theWLine, const Standard_Integer ideb, const Standard_Integer ifin, const Standard_Boolean onFirst);
|
||||
Standard_EXPORT static Handle(Geom2d_BSplineCurve) MakeBSpline2d(
|
||||
const Handle(IntPatch_WLine)& theWLine,
|
||||
const Standard_Integer ideb,
|
||||
const Standard_Integer ifin,
|
||||
const Standard_Boolean onFirst);
|
||||
|
||||
protected:
|
||||
Standard_EXPORT void InternalPerform(const Standard_Real Tol,
|
||||
const Standard_Boolean Approx,
|
||||
const Standard_Boolean ApproxS1,
|
||||
const Standard_Boolean ApproxS2,
|
||||
const Standard_Boolean useStart,
|
||||
const Standard_Real U1,
|
||||
const Standard_Real V1,
|
||||
const Standard_Real U2,
|
||||
const Standard_Real V2);
|
||||
|
||||
|
||||
Standard_EXPORT void InternalPerform (const Standard_Real Tol, const Standard_Boolean Approx, const Standard_Boolean ApproxS1, const Standard_Boolean ApproxS2, const Standard_Boolean useStart, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2);
|
||||
|
||||
Standard_EXPORT void MakeCurve (const Standard_Integer Ind, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real Tol, const Standard_Boolean Approx, const Standard_Boolean Approx1, const Standard_Boolean Approx2);
|
||||
|
||||
|
||||
|
||||
Standard_EXPORT void MakeCurve(const Standard_Integer Ind,
|
||||
const Handle(Adaptor3d_TopolTool)& D1,
|
||||
const Handle(Adaptor3d_TopolTool)& D2,
|
||||
const Standard_Real Tol,
|
||||
const Standard_Boolean Approx,
|
||||
const Standard_Boolean Approx1,
|
||||
const Standard_Boolean Approx2);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
IntPatch_Intersection myIntersector;
|
||||
GeomInt_LineConstructor myLConstruct;
|
||||
IntPatch_Intersection myIntersector;
|
||||
GeomInt_LineConstructor myLConstruct;
|
||||
Handle(GeomAdaptor_Surface) myHS1;
|
||||
Handle(GeomAdaptor_Surface) myHS2;
|
||||
Standard_Integer myNbrestr;
|
||||
TColGeom_SequenceOfCurve sline;
|
||||
TColGeom2d_SequenceOfCurve slineS1;
|
||||
TColGeom2d_SequenceOfCurve slineS2;
|
||||
Standard_Real myTolReached2d;
|
||||
Standard_Real myTolReached3d;
|
||||
Standard_Real myTolCheck;
|
||||
Standard_Real myTolAngCheck;
|
||||
|
||||
|
||||
Standard_Integer myNbrestr;
|
||||
TColGeom_SequenceOfCurve sline;
|
||||
TColGeom2d_SequenceOfCurve slineS1;
|
||||
TColGeom2d_SequenceOfCurve slineS2;
|
||||
Standard_Real myTolReached2d;
|
||||
Standard_Real myTolReached3d;
|
||||
Standard_Real myTolCheck;
|
||||
Standard_Real myTolAngCheck;
|
||||
};
|
||||
|
||||
|
||||
#include <GeomInt_IntSS.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_IntSS_HeaderFile
|
||||
|
@@ -17,132 +17,134 @@
|
||||
#include <IntPatch_Point.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : GeomInt_IntSS
|
||||
//purpose :
|
||||
// function : GeomInt_IntSS
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
inline GeomInt_IntSS::GeomInt_IntSS ()
|
||||
: myNbrestr(0),
|
||||
myTolReached2d(0.0),
|
||||
myTolReached3d(0.0),
|
||||
myTolCheck(1.e-7),
|
||||
myTolAngCheck(1.e-6)
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : GeomInt_IntSS
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
inline GeomInt_IntSS::GeomInt_IntSS (const Handle(Geom_Surface)& S1,
|
||||
const Handle(Geom_Surface)& S2,
|
||||
const Standard_Real Tol,
|
||||
const Standard_Boolean Approx,
|
||||
const Standard_Boolean ApproxS1,
|
||||
const Standard_Boolean ApproxS2)
|
||||
: myNbrestr(0),
|
||||
myTolReached2d(0.0),
|
||||
myTolReached3d(0.0),
|
||||
myTolCheck(1.e-7),
|
||||
myTolAngCheck(1.e-6)
|
||||
inline GeomInt_IntSS::GeomInt_IntSS()
|
||||
: myNbrestr(0),
|
||||
myTolReached2d(0.0),
|
||||
myTolReached3d(0.0),
|
||||
myTolCheck(1.e-7),
|
||||
myTolAngCheck(1.e-6)
|
||||
{
|
||||
Perform(S1,S2,Tol,Approx,ApproxS1,ApproxS2);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Perform
|
||||
//purpose : Intersection of Adapted surfaces
|
||||
// function : GeomInt_IntSS
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
inline void GeomInt_IntSS::Perform(const Handle(GeomAdaptor_Surface)& HS1,
|
||||
const Handle(GeomAdaptor_Surface)& HS2,
|
||||
const Standard_Real Tol,
|
||||
const Standard_Boolean Approx,
|
||||
const Standard_Boolean ApproxS1,
|
||||
const Standard_Boolean ApproxS2)
|
||||
inline GeomInt_IntSS::GeomInt_IntSS(const Handle(Geom_Surface)& S1,
|
||||
const Handle(Geom_Surface)& S2,
|
||||
const Standard_Real Tol,
|
||||
const Standard_Boolean Approx,
|
||||
const Standard_Boolean ApproxS1,
|
||||
const Standard_Boolean ApproxS2)
|
||||
: myNbrestr(0),
|
||||
myTolReached2d(0.0),
|
||||
myTolReached3d(0.0),
|
||||
myTolCheck(1.e-7),
|
||||
myTolAngCheck(1.e-6)
|
||||
{
|
||||
Perform(S1, S2, Tol, Approx, ApproxS1, ApproxS2);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : Perform
|
||||
// purpose : Intersection of Adapted surfaces
|
||||
//=======================================================================
|
||||
inline void GeomInt_IntSS::Perform(const Handle(GeomAdaptor_Surface)& HS1,
|
||||
const Handle(GeomAdaptor_Surface)& HS2,
|
||||
const Standard_Real Tol,
|
||||
const Standard_Boolean Approx,
|
||||
const Standard_Boolean ApproxS1,
|
||||
const Standard_Boolean ApproxS2)
|
||||
{
|
||||
myHS1 = HS1;
|
||||
myHS2 = HS2;
|
||||
InternalPerform(Tol,Approx,ApproxS1,ApproxS2,Standard_False,0.,0.,0.,0.);
|
||||
InternalPerform(Tol, Approx, ApproxS1, ApproxS2, Standard_False, 0., 0., 0., 0.);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Perform
|
||||
//purpose : Intersection of Adapted surfaces with a Starting Point
|
||||
// function : Perform
|
||||
// purpose : Intersection of Adapted surfaces with a Starting Point
|
||||
//=======================================================================
|
||||
inline void GeomInt_IntSS::Perform(const Handle(GeomAdaptor_Surface)& HS1,
|
||||
const Handle(GeomAdaptor_Surface)& HS2,
|
||||
const Standard_Real Tol,
|
||||
const Standard_Real U1, const Standard_Real V1,
|
||||
const Standard_Real U2, const Standard_Real V2,
|
||||
const Standard_Boolean Approx,
|
||||
const Standard_Boolean ApproxS1,
|
||||
const Standard_Boolean ApproxS2)
|
||||
inline void GeomInt_IntSS::Perform(const Handle(GeomAdaptor_Surface)& HS1,
|
||||
const Handle(GeomAdaptor_Surface)& HS2,
|
||||
const Standard_Real Tol,
|
||||
const Standard_Real U1,
|
||||
const Standard_Real V1,
|
||||
const Standard_Real U2,
|
||||
const Standard_Real V2,
|
||||
const Standard_Boolean Approx,
|
||||
const Standard_Boolean ApproxS1,
|
||||
const Standard_Boolean ApproxS2)
|
||||
{
|
||||
myHS1 = HS1;
|
||||
myHS2 = HS2;
|
||||
InternalPerform(Tol,Approx,ApproxS1,ApproxS2,Standard_True,U1,V1,U2,V2);
|
||||
InternalPerform(Tol, Approx, ApproxS1, ApproxS2, Standard_True, U1, V1, U2, V2);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : IsDone
|
||||
//purpose :
|
||||
// function : IsDone
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
inline Standard_Boolean GeomInt_IntSS::IsDone () const
|
||||
inline Standard_Boolean GeomInt_IntSS::IsDone() const
|
||||
{
|
||||
return myIntersector.IsDone();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : TolReached2d
|
||||
//purpose :
|
||||
// function : TolReached2d
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
inline Standard_Real GeomInt_IntSS::TolReached2d () const
|
||||
inline Standard_Real GeomInt_IntSS::TolReached2d() const
|
||||
{
|
||||
return myTolReached2d;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : TolReached3d
|
||||
//purpose :
|
||||
// function : TolReached3d
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
inline Standard_Real GeomInt_IntSS::TolReached3d () const
|
||||
inline Standard_Real GeomInt_IntSS::TolReached3d() const
|
||||
{
|
||||
return myTolReached3d;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : NbLines
|
||||
//purpose :
|
||||
// function : NbLines
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
inline Standard_Integer GeomInt_IntSS::NbLines () const
|
||||
inline Standard_Integer GeomInt_IntSS::NbLines() const
|
||||
{
|
||||
return sline.Length()-myNbrestr;
|
||||
return sline.Length() - myNbrestr;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : NbBoundaries
|
||||
//purpose :
|
||||
// function : NbBoundaries
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
inline Standard_Integer GeomInt_IntSS::NbBoundaries () const
|
||||
inline Standard_Integer GeomInt_IntSS::NbBoundaries() const
|
||||
{
|
||||
StdFail_NotDone_Raise_if (!myIntersector.IsDone(), "GeomInt_IntSS::NbBoundaries() - no result");
|
||||
StdFail_NotDone_Raise_if(!myIntersector.IsDone(), "GeomInt_IntSS::NbBoundaries() - no result");
|
||||
return myNbrestr;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : NbPoints
|
||||
//purpose :
|
||||
// function : NbPoints
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
inline Standard_Integer GeomInt_IntSS::NbPoints () const
|
||||
inline Standard_Integer GeomInt_IntSS::NbPoints() const
|
||||
{
|
||||
return myIntersector.NbPnts();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Point
|
||||
//purpose :
|
||||
// function : Point
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
inline gp_Pnt GeomInt_IntSS::Point (const Standard_Integer Index) const
|
||||
inline gp_Pnt GeomInt_IntSS::Point(const Standard_Integer Index) const
|
||||
{
|
||||
return myIntersector.Point(Index).Value();
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -24,69 +24,46 @@ class Adaptor3d_TopolTool;
|
||||
class IntPatch_Line;
|
||||
|
||||
//! Splits given Line.
|
||||
class GeomInt_LineConstructor
|
||||
class GeomInt_LineConstructor
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
GeomInt_LineConstructor();
|
||||
|
||||
GeomInt_LineConstructor();
|
||||
|
||||
//! Initializes me by two surfaces and corresponding
|
||||
//! tools which represent boundaries of surfaces
|
||||
void Load (const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_TopolTool)& D2, const Handle(GeomAdaptor_Surface)& S1, const Handle(GeomAdaptor_Surface)& S2);
|
||||
|
||||
void Load(const Handle(Adaptor3d_TopolTool)& D1,
|
||||
const Handle(Adaptor3d_TopolTool)& D2,
|
||||
const Handle(GeomAdaptor_Surface)& S1,
|
||||
const Handle(GeomAdaptor_Surface)& S2);
|
||||
|
||||
//! Splits line
|
||||
Standard_EXPORT void Perform (const Handle(IntPatch_Line)& L);
|
||||
|
||||
Standard_EXPORT void Perform(const Handle(IntPatch_Line)& L);
|
||||
|
||||
//! Returns True if splitting was successful
|
||||
Standard_Boolean IsDone() const;
|
||||
|
||||
Standard_Boolean IsDone() const;
|
||||
|
||||
//! Returns number of splits
|
||||
Standard_Integer NbParts() const;
|
||||
|
||||
Standard_Integer NbParts() const;
|
||||
|
||||
//! Return first and last parameters
|
||||
//! for given index of split
|
||||
void Part (const Standard_Integer I, Standard_Real& WFirst, Standard_Real& WLast) const;
|
||||
|
||||
|
||||
|
||||
void Part(const Standard_Integer I, Standard_Real& WFirst, Standard_Real& WLast) const;
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Standard_EXPORT void TreatCircle (const Handle(IntPatch_Line)& aLine, const Standard_Real aTol);
|
||||
|
||||
|
||||
|
||||
Standard_EXPORT void TreatCircle(const Handle(IntPatch_Line)& aLine, const Standard_Real aTol);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Boolean done;
|
||||
TColStd_SequenceOfReal seqp;
|
||||
Standard_Boolean done;
|
||||
TColStd_SequenceOfReal seqp;
|
||||
Handle(Adaptor3d_TopolTool) myDom1;
|
||||
Handle(Adaptor3d_TopolTool) myDom2;
|
||||
Handle(GeomAdaptor_Surface) myHS1;
|
||||
Handle(GeomAdaptor_Surface) myHS2;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <GeomInt_LineConstructor.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_LineConstructor_HeaderFile
|
||||
|
@@ -17,25 +17,24 @@
|
||||
#include <StdFail_NotDone.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : GeomInt_LineConstructor
|
||||
//purpose :
|
||||
// function : GeomInt_LineConstructor
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline GeomInt_LineConstructor::GeomInt_LineConstructor ()
|
||||
: done(Standard_False)
|
||||
inline GeomInt_LineConstructor::GeomInt_LineConstructor()
|
||||
: done(Standard_False)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Load
|
||||
//purpose :
|
||||
// function : Load
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline void GeomInt_LineConstructor::Load (const Handle(Adaptor3d_TopolTool)& D1,
|
||||
const Handle(Adaptor3d_TopolTool)& D2,
|
||||
const Handle(GeomAdaptor_Surface)& S1,
|
||||
const Handle(GeomAdaptor_Surface)& S2)
|
||||
inline void GeomInt_LineConstructor::Load(const Handle(Adaptor3d_TopolTool)& D1,
|
||||
const Handle(Adaptor3d_TopolTool)& D2,
|
||||
const Handle(GeomAdaptor_Surface)& S1,
|
||||
const Handle(GeomAdaptor_Surface)& S2)
|
||||
{
|
||||
myDom1 = D1;
|
||||
myDom2 = D2;
|
||||
@@ -43,39 +42,42 @@ inline void GeomInt_LineConstructor::Load (const Handle(Adaptor3d_TopolTool)& D1
|
||||
myHS2 = S2;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : IsDone
|
||||
//purpose :
|
||||
// function : IsDone
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Boolean GeomInt_LineConstructor::IsDone () const
|
||||
inline Standard_Boolean GeomInt_LineConstructor::IsDone() const
|
||||
{
|
||||
return done;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : NbParts
|
||||
//purpose :
|
||||
// function : NbParts
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Integer GeomInt_LineConstructor::NbParts () const
|
||||
inline Standard_Integer GeomInt_LineConstructor::NbParts() const
|
||||
{
|
||||
if (!done) { throw StdFail_NotDone(); }
|
||||
if (!done)
|
||||
{
|
||||
throw StdFail_NotDone();
|
||||
}
|
||||
return (seqp.Length() / 2);
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Part
|
||||
//purpose :
|
||||
// function : Part
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
inline void GeomInt_LineConstructor::Part (const Standard_Integer I,
|
||||
Standard_Real& WFirst,
|
||||
Standard_Real& WLast) const
|
||||
inline void GeomInt_LineConstructor::Part(const Standard_Integer I,
|
||||
Standard_Real& WFirst,
|
||||
Standard_Real& WLast) const
|
||||
{
|
||||
if (!done) { throw StdFail_NotDone(); }
|
||||
WFirst = seqp(2*I-1);
|
||||
WLast = seqp(2*I);
|
||||
if (!done)
|
||||
{
|
||||
throw StdFail_NotDone();
|
||||
}
|
||||
WFirst = seqp(2 * I - 1);
|
||||
WLast = seqp(2 * I);
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -24,48 +24,30 @@
|
||||
class IntPatch_Point;
|
||||
class IntPatch_WLine;
|
||||
|
||||
class GeomInt_LineTool
|
||||
class GeomInt_LineTool
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT static Standard_Integer NbVertex (const Handle(IntPatch_Line)& L);
|
||||
|
||||
Standard_EXPORT static const IntPatch_Point& Vertex (const Handle(IntPatch_Line)& L, const Standard_Integer I);
|
||||
|
||||
Standard_EXPORT static Standard_Real FirstParameter (const Handle(IntPatch_Line)& L);
|
||||
|
||||
Standard_EXPORT static Standard_Real LastParameter (const Handle(IntPatch_Line)& L);
|
||||
Standard_EXPORT static Standard_Integer NbVertex(const Handle(IntPatch_Line)& L);
|
||||
|
||||
Standard_EXPORT static Standard_Boolean
|
||||
DecompositionOfWLine( const Handle(IntPatch_WLine)& theWLine,
|
||||
const Handle(GeomAdaptor_Surface)& theSurface1,
|
||||
const Handle(GeomAdaptor_Surface)& theSurface2,
|
||||
const Standard_Real aTolSum,
|
||||
const GeomInt_LineConstructor& theLConstructor,
|
||||
IntPatch_SequenceOfLine& theNewLines);
|
||||
Standard_EXPORT static const IntPatch_Point& Vertex(const Handle(IntPatch_Line)& L,
|
||||
const Standard_Integer I);
|
||||
|
||||
Standard_EXPORT static Standard_Real FirstParameter(const Handle(IntPatch_Line)& L);
|
||||
|
||||
Standard_EXPORT static Standard_Real LastParameter(const Handle(IntPatch_Line)& L);
|
||||
|
||||
Standard_EXPORT static Standard_Boolean DecompositionOfWLine(
|
||||
const Handle(IntPatch_WLine)& theWLine,
|
||||
const Handle(GeomAdaptor_Surface)& theSurface1,
|
||||
const Handle(GeomAdaptor_Surface)& theSurface2,
|
||||
const Standard_Real aTolSum,
|
||||
const GeomInt_LineConstructor& theLConstructor,
|
||||
IntPatch_SequenceOfLine& theNewLines);
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_LineTool_HeaderFile
|
||||
|
@@ -37,88 +37,99 @@ class GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox;
|
||||
class GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox;
|
||||
class AppParCurves_MultiBSpCurve;
|
||||
|
||||
|
||||
|
||||
class GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox
|
||||
class GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Tries to minimize the sum (square(||Qui - Bi*Pi||))
|
||||
//! where Pui describe the approximating BSpline curves'Poles
|
||||
//! and Qi the MultiLine points with a parameter ui.
|
||||
//! In this algorithm, the parameters ui are the unknowns.
|
||||
//! The tolerance required on this sum is given by Tol.
|
||||
//! The desired degree of the resulting curve is Deg.
|
||||
Standard_EXPORT GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, math_Vector& Parameters, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer Deg, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIterations = 1);
|
||||
|
||||
Standard_EXPORT GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox(
|
||||
const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint,
|
||||
const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,
|
||||
math_Vector& Parameters,
|
||||
const TColStd_Array1OfReal& Knots,
|
||||
const TColStd_Array1OfInteger& Mults,
|
||||
const Standard_Integer Deg,
|
||||
const Standard_Real Tol3d,
|
||||
const Standard_Real Tol2d,
|
||||
const Standard_Integer NbIterations = 1);
|
||||
|
||||
//! Tries to minimize the sum (square(||Qui - Bi*Pi||))
|
||||
//! where Pui describe the approximating BSpline curves'Poles
|
||||
//! and Qi the MultiLine points with a parameter ui.
|
||||
//! In this algorithm, the parameters ui are the unknowns.
|
||||
//! The tolerance required on this sum is given by Tol.
|
||||
//! The desired degree of the resulting curve is Deg.
|
||||
Standard_EXPORT GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, math_Vector& Parameters, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer Deg, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIterations, const Standard_Real lambda1, const Standard_Real lambda2);
|
||||
|
||||
Standard_EXPORT GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox(
|
||||
const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint,
|
||||
const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,
|
||||
math_Vector& Parameters,
|
||||
const TColStd_Array1OfReal& Knots,
|
||||
const TColStd_Array1OfInteger& Mults,
|
||||
const Standard_Integer Deg,
|
||||
const Standard_Real Tol3d,
|
||||
const Standard_Real Tol2d,
|
||||
const Standard_Integer NbIterations,
|
||||
const Standard_Real lambda1,
|
||||
const Standard_Real lambda2);
|
||||
|
||||
//! returns True if all has been correctly done.
|
||||
Standard_EXPORT Standard_Boolean IsDone() const;
|
||||
|
||||
|
||||
//! returns all the BSpline curves approximating the
|
||||
//! MultiLine SSP after minimization of the parameter.
|
||||
Standard_EXPORT AppParCurves_MultiBSpCurve Value() const;
|
||||
|
||||
|
||||
//! returns the difference between the old and the new
|
||||
//! approximation.
|
||||
//! An exception is raised if NotDone.
|
||||
//! An exception is raised if Index<1 or Index>NbParameters.
|
||||
Standard_EXPORT Standard_Real Error (const Standard_Integer Index) const;
|
||||
|
||||
Standard_EXPORT Standard_Real Error(const Standard_Integer Index) const;
|
||||
|
||||
//! returns the maximum difference between the old and the
|
||||
//! new approximation.
|
||||
Standard_EXPORT Standard_Real MaxError3d() const;
|
||||
|
||||
|
||||
//! returns the maximum difference between the old and the
|
||||
//! new approximation.
|
||||
Standard_EXPORT Standard_Real MaxError2d() const;
|
||||
|
||||
|
||||
//! returns the average error between the old and the
|
||||
//! new approximation.
|
||||
Standard_EXPORT Standard_Real AverageError() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Standard_EXPORT void Perform (const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, math_Vector& Parameters, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer Deg, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIterations = 200);
|
||||
|
||||
|
||||
|
||||
Standard_EXPORT void Perform(const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint,
|
||||
const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,
|
||||
math_Vector& Parameters,
|
||||
const TColStd_Array1OfReal& Knots,
|
||||
const TColStd_Array1OfInteger& Mults,
|
||||
const Standard_Integer Deg,
|
||||
const Standard_Real Tol3d,
|
||||
const Standard_Real Tol2d,
|
||||
const Standard_Integer NbIterations = 200);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
AppParCurves_MultiBSpCurve SCU;
|
||||
math_Vector ParError;
|
||||
Standard_Real AvError;
|
||||
Standard_Real MError3d;
|
||||
Standard_Real MError2d;
|
||||
Standard_Real mylambda1;
|
||||
Standard_Real mylambda2;
|
||||
Standard_Boolean myIsLambdaDefined;
|
||||
Standard_Boolean Done;
|
||||
|
||||
|
||||
math_Vector ParError;
|
||||
Standard_Real AvError;
|
||||
Standard_Real MError3d;
|
||||
Standard_Real MError2d;
|
||||
Standard_Real mylambda1;
|
||||
Standard_Real mylambda2;
|
||||
Standard_Boolean myIsLambdaDefined;
|
||||
Standard_Boolean Done;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox_HeaderFile
|
||||
|
@@ -24,19 +24,22 @@
|
||||
#include <GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#include <GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#include <AppParCurves_MultiBSpCurve.hxx>
|
||||
|
||||
|
||||
#define MultiLine GeomInt_TheMultiLineOfWLApprox
|
||||
#define MultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
|
||||
#define ToolLine GeomInt_TheMultiLineToolOfWLApprox
|
||||
#define ToolLine_hxx <GeomInt_TheMultiLineToolOfWLApprox.hxx>
|
||||
#define AppParCurves_BSpParLeastSquare GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_BSpParLeastSquare_hxx <GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_BSpParLeastSquare \
|
||||
GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_BSpParLeastSquare_hxx \
|
||||
<GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_BSpParFunction GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_BSpParFunction_hxx <GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_BSpGradient_BFGS GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_BSpGradient_BFGS_hxx <GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_BSpParFunction_hxx \
|
||||
<GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_BSpGradient_BFGS \
|
||||
GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_BSpGradient_BFGS_hxx \
|
||||
<GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_BSpGradient GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_BSpGradient_hxx <GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#include "../AppParCurves/AppParCurves_BSpGradient.gxx"
|
||||
|
||||
|
@@ -36,75 +36,61 @@ class GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox;
|
||||
class GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox;
|
||||
class AppParCurves_MultiCurve;
|
||||
|
||||
|
||||
|
||||
class GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox
|
||||
class GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Tries to minimize the sum (square(||Qui - Bi*Pi||))
|
||||
//! where Pui describe the approximating Bezier curves'Poles
|
||||
//! and Qi the MultiLine points with a parameter ui.
|
||||
//! In this algorithm, the parameters ui are the unknowns.
|
||||
//! The tolerance required on this sum is given by Tol.
|
||||
//! The desired degree of the resulting curve is Deg.
|
||||
Standard_EXPORT GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, math_Vector& Parameters, const Standard_Integer Deg, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIterations = 200);
|
||||
|
||||
Standard_EXPORT GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox(
|
||||
const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint,
|
||||
const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,
|
||||
math_Vector& Parameters,
|
||||
const Standard_Integer Deg,
|
||||
const Standard_Real Tol3d,
|
||||
const Standard_Real Tol2d,
|
||||
const Standard_Integer NbIterations = 200);
|
||||
|
||||
//! returns True if all has been correctly done.
|
||||
Standard_EXPORT Standard_Boolean IsDone() const;
|
||||
|
||||
|
||||
//! returns all the Bezier curves approximating the
|
||||
//! MultiLine SSP after minimization of the parameter.
|
||||
Standard_EXPORT AppParCurves_MultiCurve Value() const;
|
||||
|
||||
|
||||
//! returns the difference between the old and the new
|
||||
//! approximation.
|
||||
//! An exception is raised if NotDone.
|
||||
//! An exception is raised if Index<1 or Index>NbParameters.
|
||||
Standard_EXPORT Standard_Real Error (const Standard_Integer Index) const;
|
||||
|
||||
Standard_EXPORT Standard_Real Error(const Standard_Integer Index) const;
|
||||
|
||||
//! returns the maximum difference between the old and the
|
||||
//! new approximation.
|
||||
Standard_EXPORT Standard_Real MaxError3d() const;
|
||||
|
||||
|
||||
//! returns the maximum difference between the old and the
|
||||
//! new approximation.
|
||||
Standard_EXPORT Standard_Real MaxError2d() const;
|
||||
|
||||
|
||||
//! returns the average error between the old and the
|
||||
//! new approximation.
|
||||
Standard_EXPORT Standard_Real AverageError() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
AppParCurves_MultiCurve SCU;
|
||||
math_Vector ParError;
|
||||
Standard_Real AvError;
|
||||
Standard_Real MError3d;
|
||||
Standard_Real MError2d;
|
||||
Standard_Boolean Done;
|
||||
|
||||
|
||||
math_Vector ParError;
|
||||
Standard_Real AvError;
|
||||
Standard_Real MError3d;
|
||||
Standard_Real MError2d;
|
||||
Standard_Boolean Done;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox_HeaderFile
|
||||
|
@@ -25,21 +25,24 @@
|
||||
#include <GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#include <GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#include <AppParCurves_MultiCurve.hxx>
|
||||
|
||||
|
||||
#define MultiLine GeomInt_TheMultiLineOfWLApprox
|
||||
#define MultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
|
||||
#define ToolLine GeomInt_TheMultiLineToolOfWLApprox
|
||||
#define ToolLine_hxx <GeomInt_TheMultiLineToolOfWLApprox.hxx>
|
||||
#define AppParCurves_ParLeastSquare GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define AppParCurves_ParLeastSquare_hxx <GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define AppParCurves_ParLeastSquare \
|
||||
GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define AppParCurves_ParLeastSquare_hxx \
|
||||
<GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define AppParCurves_ResConstraint GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define AppParCurves_ResConstraint_hxx <GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define AppParCurves_ResConstraint_hxx \
|
||||
<GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define AppParCurves_ParFunction GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define AppParCurves_ParFunction_hxx <GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define AppParCurves_ParFunction_hxx \
|
||||
<GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define AppParCurves_Gradient_BFGS GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define AppParCurves_Gradient_BFGS_hxx <GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define AppParCurves_Gradient_BFGS_hxx \
|
||||
<GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define AppParCurves_Gradient GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define AppParCurves_Gradient_hxx <GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#include "../AppParCurves/AppParCurves_Gradient.gxx"
|
||||
|
||||
|
@@ -36,75 +36,61 @@ class GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox;
|
||||
class GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox;
|
||||
class AppParCurves_MultiCurve;
|
||||
|
||||
|
||||
|
||||
class GeomInt_MyGradientbisOfTheComputeLineOfWLApprox
|
||||
class GeomInt_MyGradientbisOfTheComputeLineOfWLApprox
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Tries to minimize the sum (square(||Qui - Bi*Pi||))
|
||||
//! where Pui describe the approximating Bezier curves'Poles
|
||||
//! and Qi the MultiLine points with a parameter ui.
|
||||
//! In this algorithm, the parameters ui are the unknowns.
|
||||
//! The tolerance required on this sum is given by Tol.
|
||||
//! The desired degree of the resulting curve is Deg.
|
||||
Standard_EXPORT GeomInt_MyGradientbisOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, math_Vector& Parameters, const Standard_Integer Deg, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIterations = 200);
|
||||
|
||||
Standard_EXPORT GeomInt_MyGradientbisOfTheComputeLineOfWLApprox(
|
||||
const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint,
|
||||
const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,
|
||||
math_Vector& Parameters,
|
||||
const Standard_Integer Deg,
|
||||
const Standard_Real Tol3d,
|
||||
const Standard_Real Tol2d,
|
||||
const Standard_Integer NbIterations = 200);
|
||||
|
||||
//! returns True if all has been correctly done.
|
||||
Standard_EXPORT Standard_Boolean IsDone() const;
|
||||
|
||||
|
||||
//! returns all the Bezier curves approximating the
|
||||
//! MultiLine SSP after minimization of the parameter.
|
||||
Standard_EXPORT AppParCurves_MultiCurve Value() const;
|
||||
|
||||
|
||||
//! returns the difference between the old and the new
|
||||
//! approximation.
|
||||
//! An exception is raised if NotDone.
|
||||
//! An exception is raised if Index<1 or Index>NbParameters.
|
||||
Standard_EXPORT Standard_Real Error (const Standard_Integer Index) const;
|
||||
|
||||
Standard_EXPORT Standard_Real Error(const Standard_Integer Index) const;
|
||||
|
||||
//! returns the maximum difference between the old and the
|
||||
//! new approximation.
|
||||
Standard_EXPORT Standard_Real MaxError3d() const;
|
||||
|
||||
|
||||
//! returns the maximum difference between the old and the
|
||||
//! new approximation.
|
||||
Standard_EXPORT Standard_Real MaxError2d() const;
|
||||
|
||||
|
||||
//! returns the average error between the old and the
|
||||
//! new approximation.
|
||||
Standard_EXPORT Standard_Real AverageError() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
AppParCurves_MultiCurve SCU;
|
||||
math_Vector ParError;
|
||||
Standard_Real AvError;
|
||||
Standard_Real MError3d;
|
||||
Standard_Real MError2d;
|
||||
Standard_Boolean Done;
|
||||
|
||||
|
||||
math_Vector ParError;
|
||||
Standard_Real AvError;
|
||||
Standard_Real MError3d;
|
||||
Standard_Real MError2d;
|
||||
Standard_Boolean Done;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_MyGradientbisOfTheComputeLineOfWLApprox_HeaderFile
|
||||
|
@@ -25,21 +25,23 @@
|
||||
#include <GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#include <GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#include <AppParCurves_MultiCurve.hxx>
|
||||
|
||||
|
||||
#define MultiLine GeomInt_TheMultiLineOfWLApprox
|
||||
#define MultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
|
||||
#define ToolLine GeomInt_TheMultiLineToolOfWLApprox
|
||||
#define ToolLine_hxx <GeomInt_TheMultiLineToolOfWLApprox.hxx>
|
||||
#define AppParCurves_ParLeastSquare GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_ParLeastSquare_hxx <GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_ParLeastSquare_hxx \
|
||||
<GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_ResConstraint GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_ResConstraint_hxx <GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_ResConstraint_hxx \
|
||||
<GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_ParFunction GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_ParFunction_hxx <GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_ParFunction_hxx \
|
||||
<GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_Gradient_BFGS GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_Gradient_BFGS_hxx <GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_Gradient_BFGS_hxx \
|
||||
<GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_Gradient GeomInt_MyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_Gradient_hxx <GeomInt_MyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#include "../AppParCurves/AppParCurves_Gradient.gxx"
|
||||
|
||||
|
@@ -35,110 +35,99 @@ class GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox;
|
||||
class GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox;
|
||||
class AppParCurves_MultiCurve;
|
||||
|
||||
|
||||
|
||||
class GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox : public math_MultipleVarFunctionWithGradient
|
||||
class GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
: public math_MultipleVarFunctionWithGradient
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! initializes the fields of the function. The approximating
|
||||
//! curve has the desired degree Deg.
|
||||
Standard_EXPORT GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const math_Vector& Parameters, const Standard_Integer Deg);
|
||||
|
||||
Standard_EXPORT GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox(
|
||||
const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint,
|
||||
const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,
|
||||
const math_Vector& Parameters,
|
||||
const Standard_Integer Deg);
|
||||
|
||||
//! returns the number of variables of the function. It
|
||||
//! corresponds to the number of MultiPoints.
|
||||
Standard_EXPORT Standard_Integer NbVariables() const;
|
||||
|
||||
|
||||
//! this method computes the new approximation of the
|
||||
//! MultiLine
|
||||
//! SSP and calculates F = sum (||Pui - Bi*Pi||2) for each
|
||||
//! point of the MultiLine.
|
||||
Standard_EXPORT Standard_Boolean Value (const math_Vector& X, Standard_Real& F);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Value(const math_Vector& X, Standard_Real& F);
|
||||
|
||||
//! returns the gradient G of the sum above for the
|
||||
//! parameters Xi.
|
||||
Standard_EXPORT Standard_Boolean Gradient (const math_Vector& X, math_Vector& G);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Gradient(const math_Vector& X, math_Vector& G);
|
||||
|
||||
//! returns the value F=sum(||Pui - Bi*Pi||)2.
|
||||
//! returns the value G = grad(F) for the parameters Xi.
|
||||
Standard_EXPORT Standard_Boolean Values (const math_Vector& X, Standard_Real& F, math_Vector& G);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Values(const math_Vector& X, Standard_Real& F, math_Vector& G);
|
||||
|
||||
//! returns the new parameters of the MultiLine.
|
||||
Standard_EXPORT const math_Vector& NewParameters() const;
|
||||
|
||||
|
||||
//! returns the MultiCurve approximating the set after
|
||||
//! computing the value F or Grad(F).
|
||||
Standard_EXPORT const AppParCurves_MultiCurve& CurveValue();
|
||||
|
||||
|
||||
//! returns the distance between the MultiPoint of range
|
||||
//! IPoint and the curve CurveIndex.
|
||||
Standard_EXPORT Standard_Real Error (const Standard_Integer IPoint, const Standard_Integer CurveIndex) const;
|
||||
|
||||
Standard_EXPORT Standard_Real Error(const Standard_Integer IPoint,
|
||||
const Standard_Integer CurveIndex) const;
|
||||
|
||||
//! returns the maximum distance between the points
|
||||
//! and the MultiCurve.
|
||||
Standard_EXPORT Standard_Real MaxError3d() const;
|
||||
|
||||
|
||||
//! returns the maximum distance between the points
|
||||
//! and the MultiCurve.
|
||||
Standard_EXPORT Standard_Real MaxError2d() const;
|
||||
|
||||
Standard_EXPORT AppParCurves_Constraint FirstConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer FirstPoint) const;
|
||||
|
||||
Standard_EXPORT AppParCurves_Constraint LastConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer LastPoint) const;
|
||||
|
||||
|
||||
Standard_EXPORT AppParCurves_Constraint
|
||||
FirstConstraint(const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,
|
||||
const Standard_Integer FirstPoint) const;
|
||||
|
||||
Standard_EXPORT AppParCurves_Constraint
|
||||
LastConstraint(const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,
|
||||
const Standard_Integer LastPoint) const;
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! this method is used each time Value or Gradient is
|
||||
//! needed.
|
||||
Standard_EXPORT void Perform (const math_Vector& X);
|
||||
|
||||
|
||||
|
||||
Standard_EXPORT void Perform(const math_Vector& X);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Boolean Done;
|
||||
GeomInt_TheMultiLineOfWLApprox MyMultiLine;
|
||||
AppParCurves_MultiCurve MyMultiCurve;
|
||||
Standard_Integer Degre;
|
||||
math_Vector myParameters;
|
||||
Standard_Real FVal;
|
||||
math_Vector ValGrad_F;
|
||||
math_Matrix MyF;
|
||||
math_Matrix PTLX;
|
||||
math_Matrix PTLY;
|
||||
math_Matrix PTLZ;
|
||||
math_Matrix A;
|
||||
math_Matrix DA;
|
||||
Standard_Boolean Done;
|
||||
GeomInt_TheMultiLineOfWLApprox MyMultiLine;
|
||||
AppParCurves_MultiCurve MyMultiCurve;
|
||||
Standard_Integer Degre;
|
||||
math_Vector myParameters;
|
||||
Standard_Real FVal;
|
||||
math_Vector ValGrad_F;
|
||||
math_Matrix MyF;
|
||||
math_Matrix PTLX;
|
||||
math_Matrix PTLY;
|
||||
math_Matrix PTLZ;
|
||||
math_Matrix A;
|
||||
math_Matrix DA;
|
||||
GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox MyLeastSquare;
|
||||
Standard_Boolean Contraintes;
|
||||
Standard_Integer NbP;
|
||||
Standard_Integer NbCu;
|
||||
Standard_Integer Adeb;
|
||||
Standard_Integer Afin;
|
||||
Handle(TColStd_HArray1OfInteger) tabdim;
|
||||
Standard_Real ERR3d;
|
||||
Standard_Real ERR2d;
|
||||
Standard_Integer FirstP;
|
||||
Standard_Integer LastP;
|
||||
Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints;
|
||||
|
||||
|
||||
Standard_Boolean Contraintes;
|
||||
Standard_Integer NbP;
|
||||
Standard_Integer NbCu;
|
||||
Standard_Integer Adeb;
|
||||
Standard_Integer Afin;
|
||||
Handle(TColStd_HArray1OfInteger) tabdim;
|
||||
Standard_Real ERR3d;
|
||||
Standard_Real ERR2d;
|
||||
Standard_Integer FirstP;
|
||||
Standard_Integer LastP;
|
||||
Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox_HeaderFile
|
||||
|
@@ -21,7 +21,6 @@
|
||||
#include <GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#include <GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#include <AppParCurves_MultiCurve.hxx>
|
||||
|
||||
|
||||
#define MultiLine GeomInt_TheMultiLineOfWLApprox
|
||||
#define MultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
|
||||
@@ -32,6 +31,6 @@
|
||||
#define ResolCons GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define ResolCons_hxx <GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define AppParCurves_Function GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define AppParCurves_Function_hxx <GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define AppParCurves_Function_hxx \
|
||||
<GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#include "../AppParCurves/AppParCurves_Function.gxx"
|
||||
|
||||
|
@@ -35,110 +35,99 @@ class GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox;
|
||||
class GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox;
|
||||
class AppParCurves_MultiCurve;
|
||||
|
||||
|
||||
|
||||
class GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox : public math_MultipleVarFunctionWithGradient
|
||||
class GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
: public math_MultipleVarFunctionWithGradient
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! initializes the fields of the function. The approximating
|
||||
//! curve has the desired degree Deg.
|
||||
Standard_EXPORT GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const math_Vector& Parameters, const Standard_Integer Deg);
|
||||
|
||||
Standard_EXPORT GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox(
|
||||
const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint,
|
||||
const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,
|
||||
const math_Vector& Parameters,
|
||||
const Standard_Integer Deg);
|
||||
|
||||
//! returns the number of variables of the function. It
|
||||
//! corresponds to the number of MultiPoints.
|
||||
Standard_EXPORT Standard_Integer NbVariables() const;
|
||||
|
||||
|
||||
//! this method computes the new approximation of the
|
||||
//! MultiLine
|
||||
//! SSP and calculates F = sum (||Pui - Bi*Pi||2) for each
|
||||
//! point of the MultiLine.
|
||||
Standard_EXPORT Standard_Boolean Value (const math_Vector& X, Standard_Real& F);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Value(const math_Vector& X, Standard_Real& F);
|
||||
|
||||
//! returns the gradient G of the sum above for the
|
||||
//! parameters Xi.
|
||||
Standard_EXPORT Standard_Boolean Gradient (const math_Vector& X, math_Vector& G);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Gradient(const math_Vector& X, math_Vector& G);
|
||||
|
||||
//! returns the value F=sum(||Pui - Bi*Pi||)2.
|
||||
//! returns the value G = grad(F) for the parameters Xi.
|
||||
Standard_EXPORT Standard_Boolean Values (const math_Vector& X, Standard_Real& F, math_Vector& G);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Values(const math_Vector& X, Standard_Real& F, math_Vector& G);
|
||||
|
||||
//! returns the new parameters of the MultiLine.
|
||||
Standard_EXPORT const math_Vector& NewParameters() const;
|
||||
|
||||
|
||||
//! returns the MultiCurve approximating the set after
|
||||
//! computing the value F or Grad(F).
|
||||
Standard_EXPORT const AppParCurves_MultiCurve& CurveValue();
|
||||
|
||||
|
||||
//! returns the distance between the MultiPoint of range
|
||||
//! IPoint and the curve CurveIndex.
|
||||
Standard_EXPORT Standard_Real Error (const Standard_Integer IPoint, const Standard_Integer CurveIndex) const;
|
||||
|
||||
Standard_EXPORT Standard_Real Error(const Standard_Integer IPoint,
|
||||
const Standard_Integer CurveIndex) const;
|
||||
|
||||
//! returns the maximum distance between the points
|
||||
//! and the MultiCurve.
|
||||
Standard_EXPORT Standard_Real MaxError3d() const;
|
||||
|
||||
|
||||
//! returns the maximum distance between the points
|
||||
//! and the MultiCurve.
|
||||
Standard_EXPORT Standard_Real MaxError2d() const;
|
||||
|
||||
Standard_EXPORT AppParCurves_Constraint FirstConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer FirstPoint) const;
|
||||
|
||||
Standard_EXPORT AppParCurves_Constraint LastConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer LastPoint) const;
|
||||
|
||||
|
||||
Standard_EXPORT AppParCurves_Constraint
|
||||
FirstConstraint(const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,
|
||||
const Standard_Integer FirstPoint) const;
|
||||
|
||||
Standard_EXPORT AppParCurves_Constraint
|
||||
LastConstraint(const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,
|
||||
const Standard_Integer LastPoint) const;
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! this method is used each time Value or Gradient is
|
||||
//! needed.
|
||||
Standard_EXPORT void Perform (const math_Vector& X);
|
||||
|
||||
|
||||
|
||||
Standard_EXPORT void Perform(const math_Vector& X);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Boolean Done;
|
||||
GeomInt_TheMultiLineOfWLApprox MyMultiLine;
|
||||
AppParCurves_MultiCurve MyMultiCurve;
|
||||
Standard_Integer Degre;
|
||||
math_Vector myParameters;
|
||||
Standard_Real FVal;
|
||||
math_Vector ValGrad_F;
|
||||
math_Matrix MyF;
|
||||
math_Matrix PTLX;
|
||||
math_Matrix PTLY;
|
||||
math_Matrix PTLZ;
|
||||
math_Matrix A;
|
||||
math_Matrix DA;
|
||||
Standard_Boolean Done;
|
||||
GeomInt_TheMultiLineOfWLApprox MyMultiLine;
|
||||
AppParCurves_MultiCurve MyMultiCurve;
|
||||
Standard_Integer Degre;
|
||||
math_Vector myParameters;
|
||||
Standard_Real FVal;
|
||||
math_Vector ValGrad_F;
|
||||
math_Matrix MyF;
|
||||
math_Matrix PTLX;
|
||||
math_Matrix PTLY;
|
||||
math_Matrix PTLZ;
|
||||
math_Matrix A;
|
||||
math_Matrix DA;
|
||||
GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox MyLeastSquare;
|
||||
Standard_Boolean Contraintes;
|
||||
Standard_Integer NbP;
|
||||
Standard_Integer NbCu;
|
||||
Standard_Integer Adeb;
|
||||
Standard_Integer Afin;
|
||||
Handle(TColStd_HArray1OfInteger) tabdim;
|
||||
Standard_Real ERR3d;
|
||||
Standard_Real ERR2d;
|
||||
Standard_Integer FirstP;
|
||||
Standard_Integer LastP;
|
||||
Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints;
|
||||
|
||||
|
||||
Standard_Boolean Contraintes;
|
||||
Standard_Integer NbP;
|
||||
Standard_Integer NbCu;
|
||||
Standard_Integer Adeb;
|
||||
Standard_Integer Afin;
|
||||
Handle(TColStd_HArray1OfInteger) tabdim;
|
||||
Standard_Real ERR3d;
|
||||
Standard_Real ERR2d;
|
||||
Standard_Integer FirstP;
|
||||
Standard_Integer LastP;
|
||||
Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox_HeaderFile
|
||||
|
@@ -21,7 +21,6 @@
|
||||
#include <GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#include <GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#include <AppParCurves_MultiCurve.hxx>
|
||||
|
||||
|
||||
#define MultiLine GeomInt_TheMultiLineOfWLApprox
|
||||
#define MultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
|
||||
@@ -32,6 +31,6 @@
|
||||
#define ResolCons GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define ResolCons_hxx <GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_Function GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_Function_hxx <GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_Function_hxx \
|
||||
<GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#include "../AppParCurves/AppParCurves_Function.gxx"
|
||||
|
||||
|
@@ -42,15 +42,11 @@ class AppParCurves_MultiCurve;
|
||||
class AppParCurves_MultiBSpCurve;
|
||||
class math_Matrix;
|
||||
|
||||
|
||||
|
||||
class GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
class GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! given a MultiLine, this algorithm computes the least
|
||||
//! square resolution using the Householder-QR method.
|
||||
//! If the first and/or the last point is a constraint
|
||||
@@ -67,11 +63,24 @@ public:
|
||||
//! and is also the same for each MultiLine point because
|
||||
//! they are approximated in parallel(so with the same
|
||||
//! parameter, only the vector B changes).
|
||||
Standard_EXPORT GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector& Parameters, const Standard_Integer NbPol);
|
||||
|
||||
Standard_EXPORT GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox(
|
||||
const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint,
|
||||
const AppParCurves_Constraint FirstCons,
|
||||
const AppParCurves_Constraint LastCons,
|
||||
const math_Vector& Parameters,
|
||||
const Standard_Integer NbPol);
|
||||
|
||||
//! Initializes the fields of the object.
|
||||
Standard_EXPORT GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const Standard_Integer NbPol);
|
||||
|
||||
Standard_EXPORT GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox(
|
||||
const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint,
|
||||
const AppParCurves_Constraint FirstCons,
|
||||
const AppParCurves_Constraint LastCons,
|
||||
const Standard_Integer NbPol);
|
||||
|
||||
//! given a MultiLine, this algorithm computes the least
|
||||
//! square resolution using the Householder-QR method.
|
||||
//! If the first and/or the last point is a constraint
|
||||
@@ -87,171 +96,192 @@ public:
|
||||
//! and is also the same for each MultiLine point because
|
||||
//! they are approximated in parallel(so with the same
|
||||
//! parameter, only the vector B changes).
|
||||
Standard_EXPORT GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector& Parameters, const Standard_Integer NbPol);
|
||||
|
||||
Standard_EXPORT GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox(
|
||||
const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const TColStd_Array1OfReal& Knots,
|
||||
const TColStd_Array1OfInteger& Mults,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint,
|
||||
const AppParCurves_Constraint FirstCons,
|
||||
const AppParCurves_Constraint LastCons,
|
||||
const math_Vector& Parameters,
|
||||
const Standard_Integer NbPol);
|
||||
|
||||
//! Initializes the fields of the object.
|
||||
Standard_EXPORT GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const Standard_Integer NbPol);
|
||||
|
||||
Standard_EXPORT GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox(
|
||||
const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const TColStd_Array1OfReal& Knots,
|
||||
const TColStd_Array1OfInteger& Mults,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint,
|
||||
const AppParCurves_Constraint FirstCons,
|
||||
const AppParCurves_Constraint LastCons,
|
||||
const Standard_Integer NbPol);
|
||||
|
||||
//! Is used after having initialized the fields.
|
||||
//! The case "CurvaturePoint" is not treated in this method.
|
||||
Standard_EXPORT void Perform (const math_Vector& Parameters);
|
||||
|
||||
Standard_EXPORT void Perform(const math_Vector& Parameters);
|
||||
|
||||
//! Is used after having initialized the fields.
|
||||
Standard_EXPORT void Perform (const math_Vector& Parameters, const Standard_Real l1, const Standard_Real l2);
|
||||
|
||||
Standard_EXPORT void Perform(const math_Vector& Parameters,
|
||||
const Standard_Real l1,
|
||||
const Standard_Real l2);
|
||||
|
||||
//! Is used after having initialized the fields.
|
||||
//! <V1t> is the tangent vector at the first point.
|
||||
//! <V2t> is the tangent vector at the last point.
|
||||
Standard_EXPORT void Perform (const math_Vector& Parameters, const math_Vector& V1t, const math_Vector& V2t, const Standard_Real l1, const Standard_Real l2);
|
||||
|
||||
Standard_EXPORT void Perform(const math_Vector& Parameters,
|
||||
const math_Vector& V1t,
|
||||
const math_Vector& V2t,
|
||||
const Standard_Real l1,
|
||||
const Standard_Real l2);
|
||||
|
||||
//! Is used after having initialized the fields.
|
||||
//! <V1t> is the tangent vector at the first point.
|
||||
//! <V2t> is the tangent vector at the last point.
|
||||
//! <V1c> is the tangent vector at the first point.
|
||||
//! <V2c> is the tangent vector at the last point.
|
||||
Standard_EXPORT void Perform (const math_Vector& Parameters, const math_Vector& V1t, const math_Vector& V2t, const math_Vector& V1c, const math_Vector& V2c, const Standard_Real l1, const Standard_Real l2);
|
||||
|
||||
Standard_EXPORT void Perform(const math_Vector& Parameters,
|
||||
const math_Vector& V1t,
|
||||
const math_Vector& V2t,
|
||||
const math_Vector& V1c,
|
||||
const math_Vector& V2c,
|
||||
const Standard_Real l1,
|
||||
const Standard_Real l2);
|
||||
|
||||
//! returns True if all has been correctly done.
|
||||
Standard_EXPORT Standard_Boolean IsDone() const;
|
||||
|
||||
|
||||
//! returns the result of the approximation, i.e. all the
|
||||
//! Curves.
|
||||
//! An exception is raised if NotDone.
|
||||
Standard_EXPORT AppParCurves_MultiCurve BezierValue();
|
||||
|
||||
|
||||
//! returns the result of the approximation, i.e. all the
|
||||
//! Curves.
|
||||
//! An exception is raised if NotDone.
|
||||
Standard_EXPORT const AppParCurves_MultiBSpCurve& BSplineValue();
|
||||
|
||||
|
||||
//! returns the function matrix used to approximate the
|
||||
//! set.
|
||||
Standard_EXPORT const math_Matrix& FunctionMatrix() const;
|
||||
|
||||
|
||||
//! returns the derivative function matrix used
|
||||
//! to approximate the set.
|
||||
Standard_EXPORT const math_Matrix& DerivativeFunctionMatrix() const;
|
||||
|
||||
|
||||
//! returns the maximum errors between the MultiLine
|
||||
//! and the approximation curves. F is the sum of the square
|
||||
//! distances. Grad is the derivative vector of the
|
||||
//! function F.
|
||||
Standard_EXPORT void ErrorGradient (math_Vector& Grad, Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d);
|
||||
|
||||
Standard_EXPORT void ErrorGradient(math_Vector& Grad,
|
||||
Standard_Real& F,
|
||||
Standard_Real& MaxE3d,
|
||||
Standard_Real& MaxE2d);
|
||||
|
||||
//! returns the distances between the points of the
|
||||
//! multiline and the approximation curves.
|
||||
Standard_EXPORT const math_Matrix& Distance();
|
||||
|
||||
|
||||
//! returns the maximum errors between the MultiLine
|
||||
//! and the approximation curves. F is the sum of the square
|
||||
//! distances.
|
||||
Standard_EXPORT void Error (Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d);
|
||||
|
||||
Standard_EXPORT void Error(Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d);
|
||||
|
||||
//! returns the value (P2 - P1)/ V1 if the first point
|
||||
//! was a tangency point.
|
||||
Standard_EXPORT Standard_Real FirstLambda() const;
|
||||
|
||||
|
||||
//! returns the value (PN - PN-1)/ VN if the last point
|
||||
//! was a tangency point.
|
||||
Standard_EXPORT Standard_Real LastLambda() const;
|
||||
|
||||
|
||||
//! returns the matrix of points value.
|
||||
Standard_EXPORT const math_Matrix& Points() const;
|
||||
|
||||
|
||||
//! returns the matrix of resulting control points value.
|
||||
Standard_EXPORT const math_Matrix& Poles() const;
|
||||
|
||||
|
||||
//! Returns the indexes of the first non null values of
|
||||
//! A and DA.
|
||||
//! The values are non null from Index(ieme point) +1
|
||||
//! to Index(ieme point) + degree +1.
|
||||
Standard_EXPORT const math_IntegerVector& KIndex() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! is used by the constructors above.
|
||||
Standard_EXPORT void Init (const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint);
|
||||
|
||||
Standard_EXPORT void Init(const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint);
|
||||
|
||||
//! returns the number of second member columns.
|
||||
//! Is used internally to initialize the fields.
|
||||
Standard_EXPORT Standard_Integer NbBColumns (const GeomInt_TheMultiLineOfWLApprox& SSP) const;
|
||||
|
||||
Standard_EXPORT Standard_Integer NbBColumns(const GeomInt_TheMultiLineOfWLApprox& SSP) const;
|
||||
|
||||
//! returns the first point being fitted.
|
||||
Standard_EXPORT Standard_Integer TheFirstPoint (const AppParCurves_Constraint FirstCons, const Standard_Integer FirstPoint) const;
|
||||
|
||||
Standard_EXPORT Standard_Integer TheFirstPoint(const AppParCurves_Constraint FirstCons,
|
||||
const Standard_Integer FirstPoint) const;
|
||||
|
||||
//! returns the last point being fitted.
|
||||
Standard_EXPORT Standard_Integer TheLastPoint (const AppParCurves_Constraint LastCons, const Standard_Integer LastPoint) const;
|
||||
|
||||
Standard_EXPORT Standard_Integer TheLastPoint(const AppParCurves_Constraint LastCons,
|
||||
const Standard_Integer LastPoint) const;
|
||||
|
||||
//! Affects the fields in the case of a constraint point.
|
||||
Standard_EXPORT void Affect (const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer Index, AppParCurves_Constraint& Cons, math_Vector& Vt, math_Vector& Vc);
|
||||
|
||||
Standard_EXPORT void ComputeFunction (const math_Vector& Parameters);
|
||||
|
||||
Standard_EXPORT void SearchIndex (math_IntegerVector& Index);
|
||||
|
||||
//! computes internal matrixes for the resolution
|
||||
Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Vector& TheB);
|
||||
|
||||
//! computes internal matrixes for the resolution
|
||||
Standard_EXPORT void MakeTAA (math_Vector& TheA);
|
||||
|
||||
//! computes internal matrixes for the resolution
|
||||
Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Matrix& TheB);
|
||||
Standard_EXPORT void Affect(const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const Standard_Integer Index,
|
||||
AppParCurves_Constraint& Cons,
|
||||
math_Vector& Vt,
|
||||
math_Vector& Vc);
|
||||
|
||||
Standard_EXPORT void ComputeFunction(const math_Vector& Parameters);
|
||||
|
||||
Standard_EXPORT void SearchIndex(math_IntegerVector& Index);
|
||||
|
||||
//! computes internal matrixes for the resolution
|
||||
Standard_EXPORT void MakeTAA(math_Vector& TheA, math_Vector& TheB);
|
||||
|
||||
//! computes internal matrixes for the resolution
|
||||
Standard_EXPORT void MakeTAA(math_Vector& TheA);
|
||||
|
||||
//! computes internal matrixes for the resolution
|
||||
Standard_EXPORT void MakeTAA(math_Vector& TheA, math_Matrix& TheB);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
AppParCurves_Constraint FirstConstraint;
|
||||
AppParCurves_Constraint LastConstraint;
|
||||
AppParCurves_MultiBSpCurve SCU;
|
||||
Handle(TColStd_HArray1OfReal) myknots;
|
||||
AppParCurves_Constraint FirstConstraint;
|
||||
AppParCurves_Constraint LastConstraint;
|
||||
AppParCurves_MultiBSpCurve SCU;
|
||||
Handle(TColStd_HArray1OfReal) myknots;
|
||||
Handle(TColStd_HArray1OfInteger) mymults;
|
||||
math_Matrix mypoles;
|
||||
math_Matrix A;
|
||||
math_Matrix DA;
|
||||
math_Matrix B2;
|
||||
math_Matrix mypoints;
|
||||
math_Vector Vflatknots;
|
||||
math_Vector Vec1t;
|
||||
math_Vector Vec1c;
|
||||
math_Vector Vec2t;
|
||||
math_Vector Vec2c;
|
||||
math_Matrix theError;
|
||||
math_IntegerVector myindex;
|
||||
Standard_Real lambda1;
|
||||
Standard_Real lambda2;
|
||||
Standard_Integer FirstP;
|
||||
Standard_Integer LastP;
|
||||
Standard_Integer Nlignes;
|
||||
Standard_Integer Ninc;
|
||||
Standard_Integer NA;
|
||||
Standard_Integer myfirstp;
|
||||
Standard_Integer mylastp;
|
||||
Standard_Integer resinit;
|
||||
Standard_Integer resfin;
|
||||
Standard_Integer nbP2d;
|
||||
Standard_Integer nbP;
|
||||
Standard_Integer nbpoles;
|
||||
Standard_Integer deg;
|
||||
Standard_Boolean done;
|
||||
Standard_Boolean iscalculated;
|
||||
Standard_Boolean isready;
|
||||
|
||||
|
||||
math_Matrix mypoles;
|
||||
math_Matrix A;
|
||||
math_Matrix DA;
|
||||
math_Matrix B2;
|
||||
math_Matrix mypoints;
|
||||
math_Vector Vflatknots;
|
||||
math_Vector Vec1t;
|
||||
math_Vector Vec1c;
|
||||
math_Vector Vec2t;
|
||||
math_Vector Vec2c;
|
||||
math_Matrix theError;
|
||||
math_IntegerVector myindex;
|
||||
Standard_Real lambda1;
|
||||
Standard_Real lambda2;
|
||||
Standard_Integer FirstP;
|
||||
Standard_Integer LastP;
|
||||
Standard_Integer Nlignes;
|
||||
Standard_Integer Ninc;
|
||||
Standard_Integer NA;
|
||||
Standard_Integer myfirstp;
|
||||
Standard_Integer mylastp;
|
||||
Standard_Integer resinit;
|
||||
Standard_Integer resfin;
|
||||
Standard_Integer nbP2d;
|
||||
Standard_Integer nbP;
|
||||
Standard_Integer nbpoles;
|
||||
Standard_Integer deg;
|
||||
Standard_Boolean done;
|
||||
Standard_Boolean iscalculated;
|
||||
Standard_Boolean isready;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox_HeaderFile
|
||||
|
@@ -25,13 +25,12 @@
|
||||
#include <AppParCurves_MultiCurve.hxx>
|
||||
#include <AppParCurves_MultiBSpCurve.hxx>
|
||||
#include <math_Matrix.hxx>
|
||||
|
||||
|
||||
#define MultiLine GeomInt_TheMultiLineOfWLApprox
|
||||
#define MultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
|
||||
#define ToolLine GeomInt_TheMultiLineToolOfWLApprox
|
||||
#define ToolLine_hxx <GeomInt_TheMultiLineToolOfWLApprox.hxx>
|
||||
#define AppParCurves_LeastSquare GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define AppParCurves_LeastSquare_hxx <GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define AppParCurves_LeastSquare_hxx \
|
||||
<GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#include "../AppParCurves/AppParCurves_LeastSquare.gxx"
|
||||
|
||||
|
@@ -42,15 +42,11 @@ class AppParCurves_MultiCurve;
|
||||
class AppParCurves_MultiBSpCurve;
|
||||
class math_Matrix;
|
||||
|
||||
|
||||
|
||||
class GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
class GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! given a MultiLine, this algorithm computes the least
|
||||
//! square resolution using the Householder-QR method.
|
||||
//! If the first and/or the last point is a constraint
|
||||
@@ -67,11 +63,24 @@ public:
|
||||
//! and is also the same for each MultiLine point because
|
||||
//! they are approximated in parallel(so with the same
|
||||
//! parameter, only the vector B changes).
|
||||
Standard_EXPORT GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector& Parameters, const Standard_Integer NbPol);
|
||||
|
||||
Standard_EXPORT GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox(
|
||||
const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint,
|
||||
const AppParCurves_Constraint FirstCons,
|
||||
const AppParCurves_Constraint LastCons,
|
||||
const math_Vector& Parameters,
|
||||
const Standard_Integer NbPol);
|
||||
|
||||
//! Initializes the fields of the object.
|
||||
Standard_EXPORT GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const Standard_Integer NbPol);
|
||||
|
||||
Standard_EXPORT GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox(
|
||||
const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint,
|
||||
const AppParCurves_Constraint FirstCons,
|
||||
const AppParCurves_Constraint LastCons,
|
||||
const Standard_Integer NbPol);
|
||||
|
||||
//! given a MultiLine, this algorithm computes the least
|
||||
//! square resolution using the Householder-QR method.
|
||||
//! If the first and/or the last point is a constraint
|
||||
@@ -87,171 +96,192 @@ public:
|
||||
//! and is also the same for each MultiLine point because
|
||||
//! they are approximated in parallel(so with the same
|
||||
//! parameter, only the vector B changes).
|
||||
Standard_EXPORT GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector& Parameters, const Standard_Integer NbPol);
|
||||
|
||||
Standard_EXPORT GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox(
|
||||
const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const TColStd_Array1OfReal& Knots,
|
||||
const TColStd_Array1OfInteger& Mults,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint,
|
||||
const AppParCurves_Constraint FirstCons,
|
||||
const AppParCurves_Constraint LastCons,
|
||||
const math_Vector& Parameters,
|
||||
const Standard_Integer NbPol);
|
||||
|
||||
//! Initializes the fields of the object.
|
||||
Standard_EXPORT GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const Standard_Integer NbPol);
|
||||
|
||||
Standard_EXPORT GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox(
|
||||
const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const TColStd_Array1OfReal& Knots,
|
||||
const TColStd_Array1OfInteger& Mults,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint,
|
||||
const AppParCurves_Constraint FirstCons,
|
||||
const AppParCurves_Constraint LastCons,
|
||||
const Standard_Integer NbPol);
|
||||
|
||||
//! Is used after having initialized the fields.
|
||||
//! The case "CurvaturePoint" is not treated in this method.
|
||||
Standard_EXPORT void Perform (const math_Vector& Parameters);
|
||||
|
||||
Standard_EXPORT void Perform(const math_Vector& Parameters);
|
||||
|
||||
//! Is used after having initialized the fields.
|
||||
Standard_EXPORT void Perform (const math_Vector& Parameters, const Standard_Real l1, const Standard_Real l2);
|
||||
|
||||
Standard_EXPORT void Perform(const math_Vector& Parameters,
|
||||
const Standard_Real l1,
|
||||
const Standard_Real l2);
|
||||
|
||||
//! Is used after having initialized the fields.
|
||||
//! <V1t> is the tangent vector at the first point.
|
||||
//! <V2t> is the tangent vector at the last point.
|
||||
Standard_EXPORT void Perform (const math_Vector& Parameters, const math_Vector& V1t, const math_Vector& V2t, const Standard_Real l1, const Standard_Real l2);
|
||||
|
||||
Standard_EXPORT void Perform(const math_Vector& Parameters,
|
||||
const math_Vector& V1t,
|
||||
const math_Vector& V2t,
|
||||
const Standard_Real l1,
|
||||
const Standard_Real l2);
|
||||
|
||||
//! Is used after having initialized the fields.
|
||||
//! <V1t> is the tangent vector at the first point.
|
||||
//! <V2t> is the tangent vector at the last point.
|
||||
//! <V1c> is the tangent vector at the first point.
|
||||
//! <V2c> is the tangent vector at the last point.
|
||||
Standard_EXPORT void Perform (const math_Vector& Parameters, const math_Vector& V1t, const math_Vector& V2t, const math_Vector& V1c, const math_Vector& V2c, const Standard_Real l1, const Standard_Real l2);
|
||||
|
||||
Standard_EXPORT void Perform(const math_Vector& Parameters,
|
||||
const math_Vector& V1t,
|
||||
const math_Vector& V2t,
|
||||
const math_Vector& V1c,
|
||||
const math_Vector& V2c,
|
||||
const Standard_Real l1,
|
||||
const Standard_Real l2);
|
||||
|
||||
//! returns True if all has been correctly done.
|
||||
Standard_EXPORT Standard_Boolean IsDone() const;
|
||||
|
||||
|
||||
//! returns the result of the approximation, i.e. all the
|
||||
//! Curves.
|
||||
//! An exception is raised if NotDone.
|
||||
Standard_EXPORT AppParCurves_MultiCurve BezierValue();
|
||||
|
||||
|
||||
//! returns the result of the approximation, i.e. all the
|
||||
//! Curves.
|
||||
//! An exception is raised if NotDone.
|
||||
Standard_EXPORT const AppParCurves_MultiBSpCurve& BSplineValue();
|
||||
|
||||
|
||||
//! returns the function matrix used to approximate the
|
||||
//! set.
|
||||
Standard_EXPORT const math_Matrix& FunctionMatrix() const;
|
||||
|
||||
|
||||
//! returns the derivative function matrix used
|
||||
//! to approximate the set.
|
||||
Standard_EXPORT const math_Matrix& DerivativeFunctionMatrix() const;
|
||||
|
||||
|
||||
//! returns the maximum errors between the MultiLine
|
||||
//! and the approximation curves. F is the sum of the square
|
||||
//! distances. Grad is the derivative vector of the
|
||||
//! function F.
|
||||
Standard_EXPORT void ErrorGradient (math_Vector& Grad, Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d);
|
||||
|
||||
Standard_EXPORT void ErrorGradient(math_Vector& Grad,
|
||||
Standard_Real& F,
|
||||
Standard_Real& MaxE3d,
|
||||
Standard_Real& MaxE2d);
|
||||
|
||||
//! returns the distances between the points of the
|
||||
//! multiline and the approximation curves.
|
||||
Standard_EXPORT const math_Matrix& Distance();
|
||||
|
||||
|
||||
//! returns the maximum errors between the MultiLine
|
||||
//! and the approximation curves. F is the sum of the square
|
||||
//! distances.
|
||||
Standard_EXPORT void Error (Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d);
|
||||
|
||||
Standard_EXPORT void Error(Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d);
|
||||
|
||||
//! returns the value (P2 - P1)/ V1 if the first point
|
||||
//! was a tangency point.
|
||||
Standard_EXPORT Standard_Real FirstLambda() const;
|
||||
|
||||
|
||||
//! returns the value (PN - PN-1)/ VN if the last point
|
||||
//! was a tangency point.
|
||||
Standard_EXPORT Standard_Real LastLambda() const;
|
||||
|
||||
|
||||
//! returns the matrix of points value.
|
||||
Standard_EXPORT const math_Matrix& Points() const;
|
||||
|
||||
|
||||
//! returns the matrix of resulting control points value.
|
||||
Standard_EXPORT const math_Matrix& Poles() const;
|
||||
|
||||
|
||||
//! Returns the indexes of the first non null values of
|
||||
//! A and DA.
|
||||
//! The values are non null from Index(ieme point) +1
|
||||
//! to Index(ieme point) + degree +1.
|
||||
Standard_EXPORT const math_IntegerVector& KIndex() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! is used by the constructors above.
|
||||
Standard_EXPORT void Init (const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint);
|
||||
|
||||
Standard_EXPORT void Init(const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint);
|
||||
|
||||
//! returns the number of second member columns.
|
||||
//! Is used internally to initialize the fields.
|
||||
Standard_EXPORT Standard_Integer NbBColumns (const GeomInt_TheMultiLineOfWLApprox& SSP) const;
|
||||
|
||||
Standard_EXPORT Standard_Integer NbBColumns(const GeomInt_TheMultiLineOfWLApprox& SSP) const;
|
||||
|
||||
//! returns the first point being fitted.
|
||||
Standard_EXPORT Standard_Integer TheFirstPoint (const AppParCurves_Constraint FirstCons, const Standard_Integer FirstPoint) const;
|
||||
|
||||
Standard_EXPORT Standard_Integer TheFirstPoint(const AppParCurves_Constraint FirstCons,
|
||||
const Standard_Integer FirstPoint) const;
|
||||
|
||||
//! returns the last point being fitted.
|
||||
Standard_EXPORT Standard_Integer TheLastPoint (const AppParCurves_Constraint LastCons, const Standard_Integer LastPoint) const;
|
||||
|
||||
Standard_EXPORT Standard_Integer TheLastPoint(const AppParCurves_Constraint LastCons,
|
||||
const Standard_Integer LastPoint) const;
|
||||
|
||||
//! Affects the fields in the case of a constraint point.
|
||||
Standard_EXPORT void Affect (const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer Index, AppParCurves_Constraint& Cons, math_Vector& Vt, math_Vector& Vc);
|
||||
|
||||
Standard_EXPORT void ComputeFunction (const math_Vector& Parameters);
|
||||
|
||||
Standard_EXPORT void SearchIndex (math_IntegerVector& Index);
|
||||
|
||||
//! computes internal matrixes for the resolution
|
||||
Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Vector& TheB);
|
||||
|
||||
//! computes internal matrixes for the resolution
|
||||
Standard_EXPORT void MakeTAA (math_Vector& TheA);
|
||||
|
||||
//! computes internal matrixes for the resolution
|
||||
Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Matrix& TheB);
|
||||
Standard_EXPORT void Affect(const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const Standard_Integer Index,
|
||||
AppParCurves_Constraint& Cons,
|
||||
math_Vector& Vt,
|
||||
math_Vector& Vc);
|
||||
|
||||
Standard_EXPORT void ComputeFunction(const math_Vector& Parameters);
|
||||
|
||||
Standard_EXPORT void SearchIndex(math_IntegerVector& Index);
|
||||
|
||||
//! computes internal matrixes for the resolution
|
||||
Standard_EXPORT void MakeTAA(math_Vector& TheA, math_Vector& TheB);
|
||||
|
||||
//! computes internal matrixes for the resolution
|
||||
Standard_EXPORT void MakeTAA(math_Vector& TheA);
|
||||
|
||||
//! computes internal matrixes for the resolution
|
||||
Standard_EXPORT void MakeTAA(math_Vector& TheA, math_Matrix& TheB);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
AppParCurves_Constraint FirstConstraint;
|
||||
AppParCurves_Constraint LastConstraint;
|
||||
AppParCurves_MultiBSpCurve SCU;
|
||||
Handle(TColStd_HArray1OfReal) myknots;
|
||||
AppParCurves_Constraint FirstConstraint;
|
||||
AppParCurves_Constraint LastConstraint;
|
||||
AppParCurves_MultiBSpCurve SCU;
|
||||
Handle(TColStd_HArray1OfReal) myknots;
|
||||
Handle(TColStd_HArray1OfInteger) mymults;
|
||||
math_Matrix mypoles;
|
||||
math_Matrix A;
|
||||
math_Matrix DA;
|
||||
math_Matrix B2;
|
||||
math_Matrix mypoints;
|
||||
math_Vector Vflatknots;
|
||||
math_Vector Vec1t;
|
||||
math_Vector Vec1c;
|
||||
math_Vector Vec2t;
|
||||
math_Vector Vec2c;
|
||||
math_Matrix theError;
|
||||
math_IntegerVector myindex;
|
||||
Standard_Real lambda1;
|
||||
Standard_Real lambda2;
|
||||
Standard_Integer FirstP;
|
||||
Standard_Integer LastP;
|
||||
Standard_Integer Nlignes;
|
||||
Standard_Integer Ninc;
|
||||
Standard_Integer NA;
|
||||
Standard_Integer myfirstp;
|
||||
Standard_Integer mylastp;
|
||||
Standard_Integer resinit;
|
||||
Standard_Integer resfin;
|
||||
Standard_Integer nbP2d;
|
||||
Standard_Integer nbP;
|
||||
Standard_Integer nbpoles;
|
||||
Standard_Integer deg;
|
||||
Standard_Boolean done;
|
||||
Standard_Boolean iscalculated;
|
||||
Standard_Boolean isready;
|
||||
|
||||
|
||||
math_Matrix mypoles;
|
||||
math_Matrix A;
|
||||
math_Matrix DA;
|
||||
math_Matrix B2;
|
||||
math_Matrix mypoints;
|
||||
math_Vector Vflatknots;
|
||||
math_Vector Vec1t;
|
||||
math_Vector Vec1c;
|
||||
math_Vector Vec2t;
|
||||
math_Vector Vec2c;
|
||||
math_Matrix theError;
|
||||
math_IntegerVector myindex;
|
||||
Standard_Real lambda1;
|
||||
Standard_Real lambda2;
|
||||
Standard_Integer FirstP;
|
||||
Standard_Integer LastP;
|
||||
Standard_Integer Nlignes;
|
||||
Standard_Integer Ninc;
|
||||
Standard_Integer NA;
|
||||
Standard_Integer myfirstp;
|
||||
Standard_Integer mylastp;
|
||||
Standard_Integer resinit;
|
||||
Standard_Integer resfin;
|
||||
Standard_Integer nbP2d;
|
||||
Standard_Integer nbP;
|
||||
Standard_Integer nbpoles;
|
||||
Standard_Integer deg;
|
||||
Standard_Boolean done;
|
||||
Standard_Boolean iscalculated;
|
||||
Standard_Boolean isready;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox_HeaderFile
|
||||
|
@@ -25,13 +25,12 @@
|
||||
#include <AppParCurves_MultiCurve.hxx>
|
||||
#include <AppParCurves_MultiBSpCurve.hxx>
|
||||
#include <math_Matrix.hxx>
|
||||
|
||||
|
||||
#define MultiLine GeomInt_TheMultiLineOfWLApprox
|
||||
#define MultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
|
||||
#define ToolLine GeomInt_TheMultiLineToolOfWLApprox
|
||||
#define ToolLine_hxx <GeomInt_TheMultiLineToolOfWLApprox.hxx>
|
||||
#define AppParCurves_LeastSquare GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_LeastSquare_hxx <GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_LeastSquare_hxx \
|
||||
<GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#include "../AppParCurves/AppParCurves_LeastSquare.gxx"
|
||||
|
||||
|
@@ -14,80 +14,59 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <GeomInt_ParameterAndOrientation.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : GeomInt_ParameterAndOrientation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
GeomInt_ParameterAndOrientation::GeomInt_ParameterAndOrientation() :
|
||||
prm(0.0),or1(TopAbs_FORWARD),or2(TopAbs_FORWARD)
|
||||
{}
|
||||
//=================================================================================================
|
||||
|
||||
GeomInt_ParameterAndOrientation::GeomInt_ParameterAndOrientation()
|
||||
: prm(0.0),
|
||||
or1(TopAbs_FORWARD),
|
||||
or2(TopAbs_FORWARD)
|
||||
{
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GeomInt_ParameterAndOrientation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
GeomInt_ParameterAndOrientation::GeomInt_ParameterAndOrientation
|
||||
(const Standard_Real P,
|
||||
const TopAbs_Orientation Or1,
|
||||
const TopAbs_Orientation Or2) : prm(P), or1(Or1), or2(Or2)
|
||||
{}
|
||||
GeomInt_ParameterAndOrientation::GeomInt_ParameterAndOrientation(const Standard_Real P,
|
||||
const TopAbs_Orientation Or1,
|
||||
const TopAbs_Orientation Or2)
|
||||
: prm(P),
|
||||
or1(Or1),
|
||||
or2(Or2)
|
||||
{
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : SetOrientation1
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void GeomInt_ParameterAndOrientation::SetOrientation1
|
||||
(const TopAbs_Orientation Or1)
|
||||
void GeomInt_ParameterAndOrientation::SetOrientation1(const TopAbs_Orientation Or1)
|
||||
{
|
||||
or1 = Or1;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : SetOrientation2
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void GeomInt_ParameterAndOrientation::SetOrientation2
|
||||
(const TopAbs_Orientation Or2)
|
||||
void GeomInt_ParameterAndOrientation::SetOrientation2(const TopAbs_Orientation Or2)
|
||||
{
|
||||
or2 = Or2;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : Parameter
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Real GeomInt_ParameterAndOrientation::Parameter () const
|
||||
Standard_Real GeomInt_ParameterAndOrientation::Parameter() const
|
||||
{
|
||||
return prm;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : Orientation1
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
TopAbs_Orientation GeomInt_ParameterAndOrientation::Orientation1 () const
|
||||
TopAbs_Orientation GeomInt_ParameterAndOrientation::Orientation1() const
|
||||
{
|
||||
return or1;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : Orientation2
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
TopAbs_Orientation GeomInt_ParameterAndOrientation::Orientation2 () const
|
||||
TopAbs_Orientation GeomInt_ParameterAndOrientation::Orientation2() const
|
||||
{
|
||||
return or2;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -24,53 +24,32 @@
|
||||
#include <Standard_Real.hxx>
|
||||
#include <TopAbs_Orientation.hxx>
|
||||
|
||||
|
||||
|
||||
class GeomInt_ParameterAndOrientation
|
||||
class GeomInt_ParameterAndOrientation
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT GeomInt_ParameterAndOrientation();
|
||||
|
||||
Standard_EXPORT GeomInt_ParameterAndOrientation(const Standard_Real P, const TopAbs_Orientation Or1, const TopAbs_Orientation Or2);
|
||||
|
||||
Standard_EXPORT void SetOrientation1 (const TopAbs_Orientation Or);
|
||||
|
||||
Standard_EXPORT void SetOrientation2 (const TopAbs_Orientation Or);
|
||||
|
||||
|
||||
Standard_EXPORT GeomInt_ParameterAndOrientation(const Standard_Real P,
|
||||
const TopAbs_Orientation Or1,
|
||||
const TopAbs_Orientation Or2);
|
||||
|
||||
Standard_EXPORT void SetOrientation1(const TopAbs_Orientation Or);
|
||||
|
||||
Standard_EXPORT void SetOrientation2(const TopAbs_Orientation Or);
|
||||
|
||||
Standard_EXPORT Standard_Real Parameter() const;
|
||||
|
||||
|
||||
Standard_EXPORT TopAbs_Orientation Orientation1() const;
|
||||
|
||||
|
||||
Standard_EXPORT TopAbs_Orientation Orientation2() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Real prm;
|
||||
Standard_Real prm;
|
||||
TopAbs_Orientation or1;
|
||||
TopAbs_Orientation or2;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_ParameterAndOrientation_HeaderFile
|
||||
|
@@ -33,15 +33,11 @@ class GeomInt_TheMultiLineToolOfWLApprox;
|
||||
class AppParCurves_MultiCurve;
|
||||
class math_Matrix;
|
||||
|
||||
|
||||
|
||||
class GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
class GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Given a MultiLine SSP with constraints points, this
|
||||
//! algorithm finds the best curve solution to approximate it.
|
||||
//! The poles from SCurv issued for example from the least
|
||||
@@ -52,67 +48,64 @@ public:
|
||||
//! and DA is the derivative bernstein matrix.(They can come
|
||||
//! from an approximation with ParLeastSquare.)
|
||||
//! The MultiCurve is modified. New MultiPoles are given.
|
||||
Standard_EXPORT GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, AppParCurves_MultiCurve& SCurv, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints, const math_Matrix& Bern, const math_Matrix& DerivativeBern, const Standard_Real Tolerance = 1.0e-10);
|
||||
|
||||
Standard_EXPORT GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox(
|
||||
const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
AppParCurves_MultiCurve& SCurv,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint,
|
||||
const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints,
|
||||
const math_Matrix& Bern,
|
||||
const math_Matrix& DerivativeBern,
|
||||
const Standard_Real Tolerance = 1.0e-10);
|
||||
|
||||
//! returns True if all has been correctly done.
|
||||
Standard_EXPORT Standard_Boolean IsDone() const;
|
||||
|
||||
|
||||
//! returns the maximum difference value between the curve
|
||||
//! and the given points.
|
||||
Standard_EXPORT Standard_Real Error() const;
|
||||
|
||||
|
||||
Standard_EXPORT const math_Matrix& ConstraintMatrix() const;
|
||||
|
||||
|
||||
//! returns the duale variables of the system.
|
||||
Standard_EXPORT const math_Vector& Duale() const;
|
||||
|
||||
|
||||
//! Returns the derivative of the constraint matrix.
|
||||
Standard_EXPORT const math_Matrix& ConstraintDerivative (const GeomInt_TheMultiLineOfWLApprox& SSP, const math_Vector& Parameters, const Standard_Integer Deg, const math_Matrix& DA);
|
||||
|
||||
Standard_EXPORT const math_Matrix& ConstraintDerivative(const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const math_Vector& Parameters,
|
||||
const Standard_Integer Deg,
|
||||
const math_Matrix& DA);
|
||||
|
||||
//! returns the Inverse of Cont*Transposed(Cont), where
|
||||
//! Cont is the constraint matrix for the algorithm.
|
||||
Standard_EXPORT const math_Matrix& InverseMatrix() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! is used internally to create the fields.
|
||||
Standard_EXPORT Standard_Integer NbConstraints (const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints) const;
|
||||
|
||||
Standard_EXPORT Standard_Integer
|
||||
NbConstraints(const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint,
|
||||
const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints) const;
|
||||
|
||||
//! is internally used for the fields creation.
|
||||
Standard_EXPORT Standard_Integer NbColumns (const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer Deg) const;
|
||||
|
||||
|
||||
|
||||
Standard_EXPORT Standard_Integer NbColumns(const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const Standard_Integer Deg) const;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Boolean Done;
|
||||
Standard_Real Err;
|
||||
math_Matrix Cont;
|
||||
math_Matrix DeCont;
|
||||
math_Vector Secont;
|
||||
math_Matrix CTCinv;
|
||||
math_Vector Vardua;
|
||||
Standard_Integer IncPass;
|
||||
Standard_Integer IncTan;
|
||||
Standard_Integer IncCurv;
|
||||
Standard_Boolean Done;
|
||||
Standard_Real Err;
|
||||
math_Matrix Cont;
|
||||
math_Matrix DeCont;
|
||||
math_Vector Secont;
|
||||
math_Matrix CTCinv;
|
||||
math_Vector Vardua;
|
||||
Standard_Integer IncPass;
|
||||
Standard_Integer IncTan;
|
||||
Standard_Integer IncCurv;
|
||||
TColStd_Array1OfInteger IPas;
|
||||
TColStd_Array1OfInteger ITan;
|
||||
TColStd_Array1OfInteger ICurv;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox_HeaderFile
|
||||
|
@@ -21,13 +21,13 @@
|
||||
#include <GeomInt_TheMultiLineToolOfWLApprox.hxx>
|
||||
#include <AppParCurves_MultiCurve.hxx>
|
||||
#include <math_Matrix.hxx>
|
||||
|
||||
|
||||
#define MultiLine GeomInt_TheMultiLineOfWLApprox
|
||||
#define MultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
|
||||
#define ToolLine GeomInt_TheMultiLineToolOfWLApprox
|
||||
#define ToolLine_hxx <GeomInt_TheMultiLineToolOfWLApprox.hxx>
|
||||
#define AppParCurves_ResolConstraint GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define AppParCurves_ResolConstraint_hxx <GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define AppParCurves_ResolConstraint \
|
||||
GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define AppParCurves_ResolConstraint_hxx \
|
||||
<GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#include "../AppParCurves/AppParCurves_ResolConstraint.gxx"
|
||||
|
||||
|
@@ -33,15 +33,11 @@ class GeomInt_TheMultiLineToolOfWLApprox;
|
||||
class AppParCurves_MultiCurve;
|
||||
class math_Matrix;
|
||||
|
||||
|
||||
|
||||
class GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
class GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Given a MultiLine SSP with constraints points, this
|
||||
//! algorithm finds the best curve solution to approximate it.
|
||||
//! The poles from SCurv issued for example from the least
|
||||
@@ -52,67 +48,64 @@ public:
|
||||
//! and DA is the derivative bernstein matrix.(They can come
|
||||
//! from an approximation with ParLeastSquare.)
|
||||
//! The MultiCurve is modified. New MultiPoles are given.
|
||||
Standard_EXPORT GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, AppParCurves_MultiCurve& SCurv, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints, const math_Matrix& Bern, const math_Matrix& DerivativeBern, const Standard_Real Tolerance = 1.0e-10);
|
||||
|
||||
Standard_EXPORT GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox(
|
||||
const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
AppParCurves_MultiCurve& SCurv,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint,
|
||||
const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints,
|
||||
const math_Matrix& Bern,
|
||||
const math_Matrix& DerivativeBern,
|
||||
const Standard_Real Tolerance = 1.0e-10);
|
||||
|
||||
//! returns True if all has been correctly done.
|
||||
Standard_EXPORT Standard_Boolean IsDone() const;
|
||||
|
||||
|
||||
//! returns the maximum difference value between the curve
|
||||
//! and the given points.
|
||||
Standard_EXPORT Standard_Real Error() const;
|
||||
|
||||
|
||||
Standard_EXPORT const math_Matrix& ConstraintMatrix() const;
|
||||
|
||||
|
||||
//! returns the duale variables of the system.
|
||||
Standard_EXPORT const math_Vector& Duale() const;
|
||||
|
||||
|
||||
//! Returns the derivative of the constraint matrix.
|
||||
Standard_EXPORT const math_Matrix& ConstraintDerivative (const GeomInt_TheMultiLineOfWLApprox& SSP, const math_Vector& Parameters, const Standard_Integer Deg, const math_Matrix& DA);
|
||||
|
||||
Standard_EXPORT const math_Matrix& ConstraintDerivative(const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const math_Vector& Parameters,
|
||||
const Standard_Integer Deg,
|
||||
const math_Matrix& DA);
|
||||
|
||||
//! returns the Inverse of Cont*Transposed(Cont), where
|
||||
//! Cont is the constraint matrix for the algorithm.
|
||||
Standard_EXPORT const math_Matrix& InverseMatrix() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! is used internally to create the fields.
|
||||
Standard_EXPORT Standard_Integer NbConstraints (const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints) const;
|
||||
|
||||
Standard_EXPORT Standard_Integer
|
||||
NbConstraints(const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const Standard_Integer FirstPoint,
|
||||
const Standard_Integer LastPoint,
|
||||
const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints) const;
|
||||
|
||||
//! is internally used for the fields creation.
|
||||
Standard_EXPORT Standard_Integer NbColumns (const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer Deg) const;
|
||||
|
||||
|
||||
|
||||
Standard_EXPORT Standard_Integer NbColumns(const GeomInt_TheMultiLineOfWLApprox& SSP,
|
||||
const Standard_Integer Deg) const;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Boolean Done;
|
||||
Standard_Real Err;
|
||||
math_Matrix Cont;
|
||||
math_Matrix DeCont;
|
||||
math_Vector Secont;
|
||||
math_Matrix CTCinv;
|
||||
math_Vector Vardua;
|
||||
Standard_Integer IncPass;
|
||||
Standard_Integer IncTan;
|
||||
Standard_Integer IncCurv;
|
||||
Standard_Boolean Done;
|
||||
Standard_Real Err;
|
||||
math_Matrix Cont;
|
||||
math_Matrix DeCont;
|
||||
math_Vector Secont;
|
||||
math_Matrix CTCinv;
|
||||
math_Vector Vardua;
|
||||
Standard_Integer IncPass;
|
||||
Standard_Integer IncTan;
|
||||
Standard_Integer IncCurv;
|
||||
TColStd_Array1OfInteger IPas;
|
||||
TColStd_Array1OfInteger ITan;
|
||||
TColStd_Array1OfInteger ICurv;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox_HeaderFile
|
||||
|
@@ -21,13 +21,12 @@
|
||||
#include <GeomInt_TheMultiLineToolOfWLApprox.hxx>
|
||||
#include <AppParCurves_MultiCurve.hxx>
|
||||
#include <math_Matrix.hxx>
|
||||
|
||||
|
||||
#define MultiLine GeomInt_TheMultiLineOfWLApprox
|
||||
#define MultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
|
||||
#define ToolLine GeomInt_TheMultiLineToolOfWLApprox
|
||||
#define ToolLine_hxx <GeomInt_TheMultiLineToolOfWLApprox.hxx>
|
||||
#define AppParCurves_ResolConstraint GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define AppParCurves_ResolConstraint_hxx <GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define AppParCurves_ResolConstraint_hxx \
|
||||
<GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#include "../AppParCurves/AppParCurves_ResolConstraint.gxx"
|
||||
|
||||
|
@@ -20,7 +20,7 @@
|
||||
#include <GeomInt_ParameterAndOrientation.hxx>
|
||||
#include <NCollection_Sequence.hxx>
|
||||
|
||||
typedef NCollection_Sequence<GeomInt_ParameterAndOrientation> GeomInt_SequenceOfParameterAndOrientation;
|
||||
|
||||
typedef NCollection_Sequence<GeomInt_ParameterAndOrientation>
|
||||
GeomInt_SequenceOfParameterAndOrientation;
|
||||
|
||||
#endif
|
||||
|
@@ -43,152 +43,190 @@ class GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox;
|
||||
class AppParCurves_MultiCurve;
|
||||
class AppParCurves_MultiBSpCurve;
|
||||
|
||||
|
||||
|
||||
class GeomInt_TheComputeLineBezierOfWLApprox
|
||||
class GeomInt_TheComputeLineBezierOfWLApprox
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! The MultiLine <Line> will be approximated until tolerances
|
||||
//! will be reached.
|
||||
//! The approximation will be done from degreemin to degreemax
|
||||
//! with a cutting if the corresponding boolean is True.
|
||||
//! If <Squares> is True, the computation will be done with
|
||||
//! no iteration at all.
|
||||
Standard_EXPORT GeomInt_TheComputeLineBezierOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& Line, const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-3, const Standard_Real Tolerance2d = 1.0e-6, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Approx_ParametrizationType parametrization = Approx_ChordLength, const Standard_Boolean Squares = Standard_False);
|
||||
|
||||
Standard_EXPORT GeomInt_TheComputeLineBezierOfWLApprox(
|
||||
const GeomInt_TheMultiLineOfWLApprox& Line,
|
||||
const Standard_Integer degreemin = 4,
|
||||
const Standard_Integer degreemax = 8,
|
||||
const Standard_Real Tolerance3d = 1.0e-3,
|
||||
const Standard_Real Tolerance2d = 1.0e-6,
|
||||
const Standard_Integer NbIterations = 5,
|
||||
const Standard_Boolean cutting = Standard_True,
|
||||
const Approx_ParametrizationType parametrization = Approx_ChordLength,
|
||||
const Standard_Boolean Squares = Standard_False);
|
||||
|
||||
//! The MultiLine <Line> will be approximated until tolerances
|
||||
//! will be reached.
|
||||
//! The approximation will be done from degreemin to degreemax
|
||||
//! with a cutting if the corresponding boolean is True.
|
||||
//! If <Squares> is True, the computation will be done with
|
||||
//! no iteration at all.
|
||||
Standard_EXPORT GeomInt_TheComputeLineBezierOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& Line, const math_Vector& Parameters, const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Standard_Boolean Squares = Standard_False);
|
||||
|
||||
Standard_EXPORT GeomInt_TheComputeLineBezierOfWLApprox(
|
||||
const GeomInt_TheMultiLineOfWLApprox& Line,
|
||||
const math_Vector& Parameters,
|
||||
const Standard_Integer degreemin = 4,
|
||||
const Standard_Integer degreemax = 8,
|
||||
const Standard_Real Tolerance3d = 1.0e-03,
|
||||
const Standard_Real Tolerance2d = 1.0e-06,
|
||||
const Standard_Integer NbIterations = 5,
|
||||
const Standard_Boolean cutting = Standard_True,
|
||||
const Standard_Boolean Squares = Standard_False);
|
||||
|
||||
//! Initializes the fields of the algorithm.
|
||||
Standard_EXPORT GeomInt_TheComputeLineBezierOfWLApprox(const math_Vector& Parameters, const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Standard_Boolean Squares = Standard_False);
|
||||
|
||||
Standard_EXPORT GeomInt_TheComputeLineBezierOfWLApprox(
|
||||
const math_Vector& Parameters,
|
||||
const Standard_Integer degreemin = 4,
|
||||
const Standard_Integer degreemax = 8,
|
||||
const Standard_Real Tolerance3d = 1.0e-03,
|
||||
const Standard_Real Tolerance2d = 1.0e-06,
|
||||
const Standard_Integer NbIterations = 5,
|
||||
const Standard_Boolean cutting = Standard_True,
|
||||
const Standard_Boolean Squares = Standard_False);
|
||||
|
||||
//! Initializes the fields of the algorithm.
|
||||
Standard_EXPORT GeomInt_TheComputeLineBezierOfWLApprox(const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Approx_ParametrizationType parametrization = Approx_ChordLength, const Standard_Boolean Squares = Standard_False);
|
||||
|
||||
Standard_EXPORT GeomInt_TheComputeLineBezierOfWLApprox(
|
||||
const Standard_Integer degreemin = 4,
|
||||
const Standard_Integer degreemax = 8,
|
||||
const Standard_Real Tolerance3d = 1.0e-03,
|
||||
const Standard_Real Tolerance2d = 1.0e-06,
|
||||
const Standard_Integer NbIterations = 5,
|
||||
const Standard_Boolean cutting = Standard_True,
|
||||
const Approx_ParametrizationType parametrization = Approx_ChordLength,
|
||||
const Standard_Boolean Squares = Standard_False);
|
||||
|
||||
//! Initializes the fields of the algorithm.
|
||||
Standard_EXPORT void Init (const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Approx_ParametrizationType parametrization = Approx_ChordLength, const Standard_Boolean Squares = Standard_False);
|
||||
|
||||
Standard_EXPORT void Init(const Standard_Integer degreemin = 4,
|
||||
const Standard_Integer degreemax = 8,
|
||||
const Standard_Real Tolerance3d = 1.0e-03,
|
||||
const Standard_Real Tolerance2d = 1.0e-06,
|
||||
const Standard_Integer NbIterations = 5,
|
||||
const Standard_Boolean cutting = Standard_True,
|
||||
const Approx_ParametrizationType parametrization = Approx_ChordLength,
|
||||
const Standard_Boolean Squares = Standard_False);
|
||||
|
||||
//! runs the algorithm after having initialized the fields.
|
||||
Standard_EXPORT void Perform (const GeomInt_TheMultiLineOfWLApprox& Line);
|
||||
|
||||
Standard_EXPORT void Perform(const GeomInt_TheMultiLineOfWLApprox& Line);
|
||||
|
||||
//! changes the degrees of the approximation.
|
||||
Standard_EXPORT void SetDegrees (const Standard_Integer degreemin, const Standard_Integer degreemax);
|
||||
|
||||
Standard_EXPORT void SetDegrees(const Standard_Integer degreemin,
|
||||
const Standard_Integer degreemax);
|
||||
|
||||
//! Changes the tolerances of the approximation.
|
||||
Standard_EXPORT void SetTolerances (const Standard_Real Tolerance3d, const Standard_Real Tolerance2d);
|
||||
|
||||
Standard_EXPORT void SetTolerances(const Standard_Real Tolerance3d,
|
||||
const Standard_Real Tolerance2d);
|
||||
|
||||
//! changes the first and the last constraint points.
|
||||
Standard_EXPORT void SetConstraints (const AppParCurves_Constraint firstC, const AppParCurves_Constraint lastC);
|
||||
|
||||
Standard_EXPORT void SetConstraints(const AppParCurves_Constraint firstC,
|
||||
const AppParCurves_Constraint lastC);
|
||||
|
||||
//! returns False if at a moment of the approximation,
|
||||
//! the status NoApproximation has been sent by the user
|
||||
//! when more points were needed.
|
||||
Standard_EXPORT Standard_Boolean IsAllApproximated() const;
|
||||
|
||||
|
||||
//! returns False if the status NoPointsAdded has been sent.
|
||||
Standard_EXPORT Standard_Boolean IsToleranceReached() const;
|
||||
|
||||
|
||||
//! returns the tolerances 2d and 3d of the <Index> MultiCurve.
|
||||
Standard_EXPORT void Error (const Standard_Integer Index, Standard_Real& tol3d, Standard_Real& tol2d) const;
|
||||
|
||||
Standard_EXPORT void Error(const Standard_Integer Index,
|
||||
Standard_Real& tol3d,
|
||||
Standard_Real& tol2d) const;
|
||||
|
||||
//! Returns the number of MultiCurve doing the approximation
|
||||
//! of the MultiLine.
|
||||
Standard_EXPORT Standard_Integer NbMultiCurves() const;
|
||||
|
||||
|
||||
//! returns the result of the approximation.
|
||||
Standard_EXPORT const AppParCurves_MultiCurve& Value (const Standard_Integer Index = 1) const;
|
||||
|
||||
Standard_EXPORT const AppParCurves_MultiCurve& Value(const Standard_Integer Index = 1) const;
|
||||
|
||||
//! returns the result of the approximation.
|
||||
Standard_EXPORT AppParCurves_MultiCurve& ChangeValue (const Standard_Integer Index = 1);
|
||||
|
||||
Standard_EXPORT AppParCurves_MultiCurve& ChangeValue(const Standard_Integer Index = 1);
|
||||
|
||||
//! returns the result of the approximation.
|
||||
Standard_EXPORT const AppParCurves_MultiBSpCurve& SplineValue();
|
||||
|
||||
|
||||
//! returns the type of parametrization
|
||||
Standard_EXPORT Approx_ParametrizationType Parametrization () const;
|
||||
Standard_EXPORT Approx_ParametrizationType Parametrization() const;
|
||||
|
||||
//! returns the new parameters of the approximation
|
||||
//! corresponding to the points of the multicurve <Index>.
|
||||
Standard_EXPORT const TColStd_Array1OfReal& Parameters (const Standard_Integer Index = 1) const;
|
||||
|
||||
|
||||
|
||||
Standard_EXPORT const TColStd_Array1OfReal& Parameters(const Standard_Integer Index = 1) const;
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
//! is internally used in the algorithm.
|
||||
Standard_EXPORT Standard_Boolean Compute(const GeomInt_TheMultiLineOfWLApprox& Line,
|
||||
const Standard_Integer fpt,
|
||||
const Standard_Integer lpt,
|
||||
math_Vector& Para,
|
||||
Standard_Real& TheTol3d,
|
||||
Standard_Real& TheTol2d,
|
||||
Standard_Integer& indbad);
|
||||
|
||||
|
||||
//! is internally used in the algorithm.
|
||||
Standard_EXPORT Standard_Boolean Compute (const GeomInt_TheMultiLineOfWLApprox& Line,
|
||||
const Standard_Integer fpt,
|
||||
const Standard_Integer lpt,
|
||||
math_Vector& Para,
|
||||
Standard_Real& TheTol3d,
|
||||
Standard_Real& TheTol2d,
|
||||
Standard_Integer& indbad);
|
||||
|
||||
//! is internally used in the algorithm.
|
||||
Standard_EXPORT Standard_Boolean ComputeCurve (const GeomInt_TheMultiLineOfWLApprox& Line, const Standard_Integer firspt, const Standard_Integer lastpt);
|
||||
|
||||
Standard_EXPORT Standard_Boolean ComputeCurve(const GeomInt_TheMultiLineOfWLApprox& Line,
|
||||
const Standard_Integer firspt,
|
||||
const Standard_Integer lastpt);
|
||||
|
||||
//! computes new parameters between firstP and lastP.
|
||||
Standard_EXPORT void Parameters (const GeomInt_TheMultiLineOfWLApprox& Line, const Standard_Integer firstP, const Standard_Integer LastP, math_Vector& TheParameters) const;
|
||||
|
||||
Standard_EXPORT Standard_Real SearchFirstLambda (const GeomInt_TheMultiLineOfWLApprox& Line, const math_Vector& Para, const math_Vector& V, const Standard_Integer index) const;
|
||||
|
||||
Standard_EXPORT Standard_Real SearchLastLambda (const GeomInt_TheMultiLineOfWLApprox& Line, const math_Vector& Para, const math_Vector& V, const Standard_Integer index) const;
|
||||
|
||||
Standard_EXPORT void FirstTangencyVector (const GeomInt_TheMultiLineOfWLApprox& Line, const Standard_Integer index, math_Vector& V) const;
|
||||
|
||||
Standard_EXPORT void LastTangencyVector (const GeomInt_TheMultiLineOfWLApprox& Line, const Standard_Integer index, math_Vector& V) const;
|
||||
Standard_EXPORT void Parameters(const GeomInt_TheMultiLineOfWLApprox& Line,
|
||||
const Standard_Integer firstP,
|
||||
const Standard_Integer LastP,
|
||||
math_Vector& TheParameters) const;
|
||||
|
||||
Standard_EXPORT Standard_Real SearchFirstLambda(const GeomInt_TheMultiLineOfWLApprox& Line,
|
||||
const math_Vector& Para,
|
||||
const math_Vector& V,
|
||||
const Standard_Integer index) const;
|
||||
|
||||
AppParCurves_SequenceOfMultiCurve myMultiCurves;
|
||||
AppParCurves_MultiCurve TheMultiCurve;
|
||||
AppParCurves_MultiBSpCurve myspline;
|
||||
Standard_Boolean alldone;
|
||||
Standard_Boolean tolreached;
|
||||
Approx_ParametrizationType Par;
|
||||
Handle(TColStd_HArray1OfReal) myParameters;
|
||||
Handle(TColStd_HArray1OfReal) myfirstParam;
|
||||
Approx_SequenceOfHArray1OfReal myPar;
|
||||
TColStd_SequenceOfReal Tolers3d;
|
||||
TColStd_SequenceOfReal Tolers2d;
|
||||
Standard_EXPORT Standard_Real SearchLastLambda(const GeomInt_TheMultiLineOfWLApprox& Line,
|
||||
const math_Vector& Para,
|
||||
const math_Vector& V,
|
||||
const Standard_Integer index) const;
|
||||
|
||||
Standard_EXPORT void FirstTangencyVector(const GeomInt_TheMultiLineOfWLApprox& Line,
|
||||
const Standard_Integer index,
|
||||
math_Vector& V) const;
|
||||
|
||||
Standard_EXPORT void LastTangencyVector(const GeomInt_TheMultiLineOfWLApprox& Line,
|
||||
const Standard_Integer index,
|
||||
math_Vector& V) const;
|
||||
|
||||
AppParCurves_SequenceOfMultiCurve myMultiCurves;
|
||||
AppParCurves_MultiCurve TheMultiCurve;
|
||||
AppParCurves_MultiBSpCurve myspline;
|
||||
Standard_Boolean alldone;
|
||||
Standard_Boolean tolreached;
|
||||
Approx_ParametrizationType Par;
|
||||
Handle(TColStd_HArray1OfReal) myParameters;
|
||||
Handle(TColStd_HArray1OfReal) myfirstParam;
|
||||
Approx_SequenceOfHArray1OfReal myPar;
|
||||
TColStd_SequenceOfReal Tolers3d;
|
||||
TColStd_SequenceOfReal Tolers2d;
|
||||
Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints;
|
||||
Standard_Integer mydegremin;
|
||||
Standard_Integer mydegremax;
|
||||
Standard_Real mytol3d;
|
||||
Standard_Real mytol2d;
|
||||
Standard_Real currenttol3d;
|
||||
Standard_Real currenttol2d;
|
||||
Standard_Boolean mycut;
|
||||
Standard_Boolean mysquares;
|
||||
Standard_Integer myitermax;
|
||||
AppParCurves_Constraint myfirstC;
|
||||
AppParCurves_Constraint mylastC;
|
||||
Standard_Integer myMultiLineNb;
|
||||
Standard_Boolean myIsClear;
|
||||
|
||||
|
||||
Standard_Integer mydegremin;
|
||||
Standard_Integer mydegremax;
|
||||
Standard_Real mytol3d;
|
||||
Standard_Real mytol2d;
|
||||
Standard_Real currenttol3d;
|
||||
Standard_Real currenttol2d;
|
||||
Standard_Boolean mycut;
|
||||
Standard_Boolean mysquares;
|
||||
Standard_Integer myitermax;
|
||||
AppParCurves_Constraint myfirstC;
|
||||
AppParCurves_Constraint mylastC;
|
||||
Standard_Integer myMultiLineNb;
|
||||
Standard_Boolean myIsClear;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_TheComputeLineBezierOfWLApprox_HeaderFile
|
||||
|
@@ -25,7 +25,6 @@
|
||||
#include <GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#include <AppParCurves_MultiCurve.hxx>
|
||||
#include <AppParCurves_MultiBSpCurve.hxx>
|
||||
|
||||
|
||||
#define MultiLine GeomInt_TheMultiLineOfWLApprox
|
||||
#define MultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
|
||||
@@ -33,23 +32,38 @@
|
||||
#define LineTool_hxx <GeomInt_TheMultiLineToolOfWLApprox.hxx>
|
||||
#define Approx_MyGradient GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define Approx_MyGradient_hxx <GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define Approx_ParLeastSquareOfMyGradient GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define Approx_ParLeastSquareOfMyGradient_hxx <GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define Approx_ResConstraintOfMyGradient GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define Approx_ResConstraintOfMyGradient_hxx <GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define Approx_ParFunctionOfMyGradient GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define Approx_ParFunctionOfMyGradient_hxx <GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define Approx_Gradient_BFGSOfMyGradient GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define Approx_Gradient_BFGSOfMyGradient_hxx <GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define Approx_ParLeastSquareOfMyGradient GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define Approx_ParLeastSquareOfMyGradient_hxx <GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define Approx_ResConstraintOfMyGradient GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define Approx_ResConstraintOfMyGradient_hxx <GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define Approx_ParFunctionOfMyGradient GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define Approx_ParFunctionOfMyGradient_hxx <GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define Approx_Gradient_BFGSOfMyGradient GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define Approx_Gradient_BFGSOfMyGradient_hxx <GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define Approx_ParLeastSquareOfMyGradient \
|
||||
GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define Approx_ParLeastSquareOfMyGradient_hxx \
|
||||
<GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define Approx_ResConstraintOfMyGradient \
|
||||
GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define Approx_ResConstraintOfMyGradient_hxx \
|
||||
<GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define Approx_ParFunctionOfMyGradient \
|
||||
GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define Approx_ParFunctionOfMyGradient_hxx \
|
||||
<GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define Approx_Gradient_BFGSOfMyGradient \
|
||||
GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define Approx_Gradient_BFGSOfMyGradient_hxx \
|
||||
<GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define Approx_ParLeastSquareOfMyGradient \
|
||||
GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define Approx_ParLeastSquareOfMyGradient_hxx \
|
||||
<GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define Approx_ResConstraintOfMyGradient \
|
||||
GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define Approx_ResConstraintOfMyGradient_hxx \
|
||||
<GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define Approx_ParFunctionOfMyGradient \
|
||||
GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define Approx_ParFunctionOfMyGradient_hxx \
|
||||
<GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define Approx_Gradient_BFGSOfMyGradient \
|
||||
GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define Approx_Gradient_BFGSOfMyGradient_hxx \
|
||||
<GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define Approx_ComputeLine GeomInt_TheComputeLineBezierOfWLApprox
|
||||
#define Approx_ComputeLine_hxx <GeomInt_TheComputeLineBezierOfWLApprox.hxx>
|
||||
#include "../Approx/Approx_ComputeLine.gxx"
|
||||
|
||||
|
@@ -45,15 +45,11 @@ class GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox;
|
||||
class AppParCurves_MultiBSpCurve;
|
||||
class AppParCurves_MultiCurve;
|
||||
|
||||
|
||||
|
||||
class GeomInt_TheComputeLineOfWLApprox
|
||||
class GeomInt_TheComputeLineOfWLApprox
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! The MultiLine <Line> will be approximated until tolerances
|
||||
//! will be reached.
|
||||
//! The approximation will be done from degreemin to degreemax
|
||||
@@ -63,57 +59,100 @@ public:
|
||||
//!
|
||||
//! The multiplicities of the internal knots is set by
|
||||
//! default.
|
||||
Standard_EXPORT GeomInt_TheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& Line, const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-3, const Standard_Real Tolerance2d = 1.0e-6, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Approx_ParametrizationType parametrization = Approx_ChordLength, const Standard_Boolean Squares = Standard_False);
|
||||
|
||||
Standard_EXPORT GeomInt_TheComputeLineOfWLApprox(
|
||||
const GeomInt_TheMultiLineOfWLApprox& Line,
|
||||
const Standard_Integer degreemin = 4,
|
||||
const Standard_Integer degreemax = 8,
|
||||
const Standard_Real Tolerance3d = 1.0e-3,
|
||||
const Standard_Real Tolerance2d = 1.0e-6,
|
||||
const Standard_Integer NbIterations = 5,
|
||||
const Standard_Boolean cutting = Standard_True,
|
||||
const Approx_ParametrizationType parametrization = Approx_ChordLength,
|
||||
const Standard_Boolean Squares = Standard_False);
|
||||
|
||||
//! The MultiLine <Line> will be approximated until tolerances
|
||||
//! will be reached.
|
||||
//! The approximation will be done from degreemin to degreemax
|
||||
//! with a cutting if the corresponding boolean is True.
|
||||
//! If <Squares> is True, the computation will be done with
|
||||
//! no iteration at all.
|
||||
Standard_EXPORT GeomInt_TheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& Line, const math_Vector& Parameters, const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Standard_Boolean Squares = Standard_False);
|
||||
|
||||
Standard_EXPORT GeomInt_TheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& Line,
|
||||
const math_Vector& Parameters,
|
||||
const Standard_Integer degreemin = 4,
|
||||
const Standard_Integer degreemax = 8,
|
||||
const Standard_Real Tolerance3d = 1.0e-03,
|
||||
const Standard_Real Tolerance2d = 1.0e-06,
|
||||
const Standard_Integer NbIterations = 5,
|
||||
const Standard_Boolean cutting = Standard_True,
|
||||
const Standard_Boolean Squares = Standard_False);
|
||||
|
||||
//! Initializes the fields of the algorithm.
|
||||
Standard_EXPORT GeomInt_TheComputeLineOfWLApprox(const math_Vector& Parameters, const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Standard_Boolean Squares = Standard_False);
|
||||
|
||||
Standard_EXPORT GeomInt_TheComputeLineOfWLApprox(const math_Vector& Parameters,
|
||||
const Standard_Integer degreemin = 4,
|
||||
const Standard_Integer degreemax = 8,
|
||||
const Standard_Real Tolerance3d = 1.0e-03,
|
||||
const Standard_Real Tolerance2d = 1.0e-06,
|
||||
const Standard_Integer NbIterations = 5,
|
||||
const Standard_Boolean cutting = Standard_True,
|
||||
const Standard_Boolean Squares = Standard_False);
|
||||
|
||||
//! Initializes the fields of the algorithm.
|
||||
Standard_EXPORT GeomInt_TheComputeLineOfWLApprox(const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Approx_ParametrizationType parametrization = Approx_ChordLength, const Standard_Boolean Squares = Standard_False);
|
||||
|
||||
Standard_EXPORT GeomInt_TheComputeLineOfWLApprox(
|
||||
const Standard_Integer degreemin = 4,
|
||||
const Standard_Integer degreemax = 8,
|
||||
const Standard_Real Tolerance3d = 1.0e-03,
|
||||
const Standard_Real Tolerance2d = 1.0e-06,
|
||||
const Standard_Integer NbIterations = 5,
|
||||
const Standard_Boolean cutting = Standard_True,
|
||||
const Approx_ParametrizationType parametrization = Approx_ChordLength,
|
||||
const Standard_Boolean Squares = Standard_False);
|
||||
|
||||
//! Constructs an interpolation of the MultiLine <Line>
|
||||
//! The result will be a C2 curve of degree 3.
|
||||
Standard_EXPORT void Interpol (const GeomInt_TheMultiLineOfWLApprox& Line);
|
||||
|
||||
Standard_EXPORT void Interpol(const GeomInt_TheMultiLineOfWLApprox& Line);
|
||||
|
||||
//! Initializes the fields of the algorithm.
|
||||
Standard_EXPORT void Init (const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Approx_ParametrizationType parametrization = Approx_ChordLength, const Standard_Boolean Squares = Standard_False);
|
||||
|
||||
Standard_EXPORT void Init(const Standard_Integer degreemin = 4,
|
||||
const Standard_Integer degreemax = 8,
|
||||
const Standard_Real Tolerance3d = 1.0e-03,
|
||||
const Standard_Real Tolerance2d = 1.0e-06,
|
||||
const Standard_Integer NbIterations = 5,
|
||||
const Standard_Boolean cutting = Standard_True,
|
||||
const Approx_ParametrizationType parametrization = Approx_ChordLength,
|
||||
const Standard_Boolean Squares = Standard_False);
|
||||
|
||||
//! runs the algorithm after having initialized the fields.
|
||||
Standard_EXPORT void Perform (const GeomInt_TheMultiLineOfWLApprox& Line);
|
||||
|
||||
Standard_EXPORT void Perform(const GeomInt_TheMultiLineOfWLApprox& Line);
|
||||
|
||||
//! The approximation will begin with the
|
||||
//! set of parameters <ThePar>.
|
||||
Standard_EXPORT void SetParameters (const math_Vector& ThePar);
|
||||
|
||||
Standard_EXPORT void SetParameters(const math_Vector& ThePar);
|
||||
|
||||
//! The approximation will be done with the
|
||||
//! set of knots <Knots>. The multiplicities will be set
|
||||
//! with the degree and the desired continuity.
|
||||
Standard_EXPORT void SetKnots (const TColStd_Array1OfReal& Knots);
|
||||
|
||||
Standard_EXPORT void SetKnots(const TColStd_Array1OfReal& Knots);
|
||||
|
||||
//! The approximation will be done with the
|
||||
//! set of knots <Knots> and the multiplicities <Mults>.
|
||||
Standard_EXPORT void SetKnotsAndMultiplicities (const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults);
|
||||
|
||||
Standard_EXPORT void SetKnotsAndMultiplicities(const TColStd_Array1OfReal& Knots,
|
||||
const TColStd_Array1OfInteger& Mults);
|
||||
|
||||
//! changes the degrees of the approximation.
|
||||
Standard_EXPORT void SetDegrees (const Standard_Integer degreemin, const Standard_Integer degreemax);
|
||||
|
||||
Standard_EXPORT void SetDegrees(const Standard_Integer degreemin,
|
||||
const Standard_Integer degreemax);
|
||||
|
||||
//! Changes the tolerances of the approximation.
|
||||
Standard_EXPORT void SetTolerances (const Standard_Real Tolerance3d, const Standard_Real Tolerance2d);
|
||||
|
||||
Standard_EXPORT void SetTolerances(const Standard_Real Tolerance3d,
|
||||
const Standard_Real Tolerance2d);
|
||||
|
||||
//! sets the continuity of the spline.
|
||||
//! if C = 2, the spline will be C2.
|
||||
Standard_EXPORT void SetContinuity (const Standard_Integer C);
|
||||
|
||||
Standard_EXPORT void SetContinuity(const Standard_Integer C);
|
||||
|
||||
//! changes the first and the last constraint points.
|
||||
Standard_EXPORT void SetConstraints (const AppParCurves_Constraint firstC, const AppParCurves_Constraint lastC);
|
||||
Standard_EXPORT void SetConstraints(const AppParCurves_Constraint firstC,
|
||||
const AppParCurves_Constraint lastC);
|
||||
|
||||
//! Sets periodic flag.
|
||||
//! If thePeriodic = Standard_True, algorithm tries to build periodic
|
||||
@@ -125,93 +164,99 @@ public:
|
||||
//! the status NoApproximation has been sent by the user
|
||||
//! when more points were needed.
|
||||
Standard_EXPORT Standard_Boolean IsAllApproximated() const;
|
||||
|
||||
|
||||
//! returns False if the status NoPointsAdded has been sent.
|
||||
Standard_EXPORT Standard_Boolean IsToleranceReached() const;
|
||||
|
||||
|
||||
//! returns the tolerances 2d and 3d of the MultiBSpCurve.
|
||||
Standard_EXPORT void Error (Standard_Real& tol3d, Standard_Real& tol2d) const;
|
||||
|
||||
Standard_EXPORT void Error(Standard_Real& tol3d, Standard_Real& tol2d) const;
|
||||
|
||||
//! returns the result of the approximation.
|
||||
Standard_EXPORT const AppParCurves_MultiBSpCurve& Value() const;
|
||||
|
||||
|
||||
//! returns the result of the approximation.
|
||||
Standard_EXPORT AppParCurves_MultiBSpCurve& ChangeValue();
|
||||
|
||||
|
||||
//! returns the new parameters of the approximation
|
||||
//! corresponding to the points of the MultiBSpCurve.
|
||||
Standard_EXPORT const TColStd_Array1OfReal& Parameters() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
//! is internally used in the algorithm.
|
||||
Standard_EXPORT Standard_Boolean Compute(const GeomInt_TheMultiLineOfWLApprox& Line,
|
||||
const Standard_Integer fpt,
|
||||
const Standard_Integer lpt,
|
||||
math_Vector& Para,
|
||||
const TColStd_Array1OfReal& Knots,
|
||||
TColStd_Array1OfInteger& Mults);
|
||||
|
||||
|
||||
//! is internally used in the algorithm.
|
||||
Standard_EXPORT Standard_Boolean Compute (const GeomInt_TheMultiLineOfWLApprox& Line, const Standard_Integer fpt, const Standard_Integer lpt, math_Vector& Para, const TColStd_Array1OfReal& Knots, TColStd_Array1OfInteger& Mults);
|
||||
|
||||
//! is internally used in the algorithm.
|
||||
Standard_EXPORT Standard_Boolean ComputeCurve (const GeomInt_TheMultiLineOfWLApprox& Line, const Standard_Integer firspt, const Standard_Integer lastpt);
|
||||
|
||||
Standard_EXPORT Standard_Boolean ComputeCurve(const GeomInt_TheMultiLineOfWLApprox& Line,
|
||||
const Standard_Integer firspt,
|
||||
const Standard_Integer lastpt);
|
||||
|
||||
//! computes new parameters between firstP and lastP.
|
||||
Standard_EXPORT void Parameters (const GeomInt_TheMultiLineOfWLApprox& Line, const Standard_Integer firstP, const Standard_Integer LastP, math_Vector& TheParameters) const;
|
||||
|
||||
Standard_EXPORT Standard_Real SearchFirstLambda (const GeomInt_TheMultiLineOfWLApprox& Line, const math_Vector& Para, const TColStd_Array1OfReal& Knots, const math_Vector& V, const Standard_Integer index) const;
|
||||
|
||||
Standard_EXPORT Standard_Real SearchLastLambda (const GeomInt_TheMultiLineOfWLApprox& Line, const math_Vector& Para, const TColStd_Array1OfReal& Knots, const math_Vector& V, const Standard_Integer index) const;
|
||||
|
||||
Standard_EXPORT void TangencyVector (const GeomInt_TheMultiLineOfWLApprox& Line, const AppParCurves_MultiCurve& C, const Standard_Real U, math_Vector& V) const;
|
||||
|
||||
Standard_EXPORT void FirstTangencyVector (const GeomInt_TheMultiLineOfWLApprox& Line, const Standard_Integer index, math_Vector& V) const;
|
||||
|
||||
Standard_EXPORT void LastTangencyVector (const GeomInt_TheMultiLineOfWLApprox& Line, const Standard_Integer index, math_Vector& V) const;
|
||||
|
||||
Standard_EXPORT void FindRealConstraints (const GeomInt_TheMultiLineOfWLApprox& Line);
|
||||
Standard_EXPORT void Parameters(const GeomInt_TheMultiLineOfWLApprox& Line,
|
||||
const Standard_Integer firstP,
|
||||
const Standard_Integer LastP,
|
||||
math_Vector& TheParameters) const;
|
||||
|
||||
Standard_EXPORT Standard_Real SearchFirstLambda(const GeomInt_TheMultiLineOfWLApprox& Line,
|
||||
const math_Vector& Para,
|
||||
const TColStd_Array1OfReal& Knots,
|
||||
const math_Vector& V,
|
||||
const Standard_Integer index) const;
|
||||
|
||||
AppParCurves_MultiBSpCurve TheMultiBSpCurve;
|
||||
Standard_Boolean alldone;
|
||||
Standard_Boolean tolreached;
|
||||
Approx_ParametrizationType Par;
|
||||
Handle(TColStd_HArray1OfReal) myParameters;
|
||||
Handle(TColStd_HArray1OfReal) myfirstParam;
|
||||
Handle(TColStd_HArray1OfReal) myknots;
|
||||
Handle(TColStd_HArray1OfInteger) mymults;
|
||||
Standard_Boolean myhasknots;
|
||||
Standard_Boolean myhasmults;
|
||||
Standard_EXPORT Standard_Real SearchLastLambda(const GeomInt_TheMultiLineOfWLApprox& Line,
|
||||
const math_Vector& Para,
|
||||
const TColStd_Array1OfReal& Knots,
|
||||
const math_Vector& V,
|
||||
const Standard_Integer index) const;
|
||||
|
||||
Standard_EXPORT void TangencyVector(const GeomInt_TheMultiLineOfWLApprox& Line,
|
||||
const AppParCurves_MultiCurve& C,
|
||||
const Standard_Real U,
|
||||
math_Vector& V) const;
|
||||
|
||||
Standard_EXPORT void FirstTangencyVector(const GeomInt_TheMultiLineOfWLApprox& Line,
|
||||
const Standard_Integer index,
|
||||
math_Vector& V) const;
|
||||
|
||||
Standard_EXPORT void LastTangencyVector(const GeomInt_TheMultiLineOfWLApprox& Line,
|
||||
const Standard_Integer index,
|
||||
math_Vector& V) const;
|
||||
|
||||
Standard_EXPORT void FindRealConstraints(const GeomInt_TheMultiLineOfWLApprox& Line);
|
||||
|
||||
AppParCurves_MultiBSpCurve TheMultiBSpCurve;
|
||||
Standard_Boolean alldone;
|
||||
Standard_Boolean tolreached;
|
||||
Approx_ParametrizationType Par;
|
||||
Handle(TColStd_HArray1OfReal) myParameters;
|
||||
Handle(TColStd_HArray1OfReal) myfirstParam;
|
||||
Handle(TColStd_HArray1OfReal) myknots;
|
||||
Handle(TColStd_HArray1OfInteger) mymults;
|
||||
Standard_Boolean myhasknots;
|
||||
Standard_Boolean myhasmults;
|
||||
Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints;
|
||||
Standard_Integer mydegremin;
|
||||
Standard_Integer mydegremax;
|
||||
Standard_Real mytol3d;
|
||||
Standard_Real mytol2d;
|
||||
Standard_Real currenttol3d;
|
||||
Standard_Real currenttol2d;
|
||||
Standard_Boolean mycut;
|
||||
Standard_Boolean mysquares;
|
||||
Standard_Integer myitermax;
|
||||
AppParCurves_Constraint myfirstC;
|
||||
AppParCurves_Constraint mylastC;
|
||||
AppParCurves_Constraint realfirstC;
|
||||
AppParCurves_Constraint reallastC;
|
||||
Standard_Integer mycont;
|
||||
Standard_Real mylambda1;
|
||||
Standard_Real mylambda2;
|
||||
Standard_Boolean myPeriodic;
|
||||
|
||||
|
||||
Standard_Integer mydegremin;
|
||||
Standard_Integer mydegremax;
|
||||
Standard_Real mytol3d;
|
||||
Standard_Real mytol2d;
|
||||
Standard_Real currenttol3d;
|
||||
Standard_Real currenttol2d;
|
||||
Standard_Boolean mycut;
|
||||
Standard_Boolean mysquares;
|
||||
Standard_Integer myitermax;
|
||||
AppParCurves_Constraint myfirstC;
|
||||
AppParCurves_Constraint mylastC;
|
||||
AppParCurves_Constraint realfirstC;
|
||||
AppParCurves_Constraint reallastC;
|
||||
Standard_Integer mycont;
|
||||
Standard_Real mylambda1;
|
||||
Standard_Real mylambda2;
|
||||
Standard_Boolean myPeriodic;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_TheComputeLineOfWLApprox_HeaderFile
|
||||
|
@@ -29,7 +29,6 @@
|
||||
#include <GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#include <AppParCurves_MultiBSpCurve.hxx>
|
||||
#include <AppParCurves_MultiCurve.hxx>
|
||||
|
||||
|
||||
#define MultiLine GeomInt_TheMultiLineOfWLApprox
|
||||
#define MultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
|
||||
@@ -37,37 +36,64 @@
|
||||
#define LineTool_hxx <GeomInt_TheMultiLineToolOfWLApprox.hxx>
|
||||
#define Approx_MyBSplGradient GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define Approx_MyBSplGradient_hxx <GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_BSpParLeastSquareOfMyBSplGradient GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define Approx_BSpParLeastSquareOfMyBSplGradient_hxx <GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_BSpParFunctionOfMyBSplGradient GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define Approx_BSpParFunctionOfMyBSplGradient_hxx <GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_BSpGradient_BFGSOfMyBSplGradient GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define Approx_BSpGradient_BFGSOfMyBSplGradient_hxx <GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_BSpParLeastSquareOfMyBSplGradient GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define Approx_BSpParLeastSquareOfMyBSplGradient_hxx <GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_BSpParFunctionOfMyBSplGradient GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define Approx_BSpParFunctionOfMyBSplGradient_hxx <GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_BSpGradient_BFGSOfMyBSplGradient GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define Approx_BSpGradient_BFGSOfMyBSplGradient_hxx <GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_BSpParLeastSquareOfMyBSplGradient \
|
||||
GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define Approx_BSpParLeastSquareOfMyBSplGradient_hxx \
|
||||
<GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_BSpParFunctionOfMyBSplGradient \
|
||||
GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define Approx_BSpParFunctionOfMyBSplGradient_hxx \
|
||||
<GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_BSpGradient_BFGSOfMyBSplGradient \
|
||||
GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define Approx_BSpGradient_BFGSOfMyBSplGradient_hxx \
|
||||
<GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_BSpParLeastSquareOfMyBSplGradient \
|
||||
GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define Approx_BSpParLeastSquareOfMyBSplGradient_hxx \
|
||||
<GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_BSpParFunctionOfMyBSplGradient \
|
||||
GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define Approx_BSpParFunctionOfMyBSplGradient_hxx \
|
||||
<GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_BSpGradient_BFGSOfMyBSplGradient \
|
||||
GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define Approx_BSpGradient_BFGSOfMyBSplGradient_hxx \
|
||||
<GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_MyGradientbis GeomInt_MyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define Approx_MyGradientbis_hxx <GeomInt_MyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_ParLeastSquareOfMyGradientbis GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define Approx_ParLeastSquareOfMyGradientbis_hxx <GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_ResConstraintOfMyGradientbis GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define Approx_ResConstraintOfMyGradientbis_hxx <GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_ParFunctionOfMyGradientbis GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define Approx_ParFunctionOfMyGradientbis_hxx <GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_Gradient_BFGSOfMyGradientbis GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define Approx_Gradient_BFGSOfMyGradientbis_hxx <GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_ParLeastSquareOfMyGradientbis GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define Approx_ParLeastSquareOfMyGradientbis_hxx <GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_ResConstraintOfMyGradientbis GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define Approx_ResConstraintOfMyGradientbis_hxx <GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_ParFunctionOfMyGradientbis GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define Approx_ParFunctionOfMyGradientbis_hxx <GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_Gradient_BFGSOfMyGradientbis GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define Approx_Gradient_BFGSOfMyGradientbis_hxx <GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_ParLeastSquareOfMyGradientbis \
|
||||
GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define Approx_ParLeastSquareOfMyGradientbis_hxx \
|
||||
<GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_ResConstraintOfMyGradientbis \
|
||||
GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define Approx_ResConstraintOfMyGradientbis_hxx \
|
||||
<GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_ParFunctionOfMyGradientbis \
|
||||
GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define Approx_ParFunctionOfMyGradientbis_hxx \
|
||||
<GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_Gradient_BFGSOfMyGradientbis \
|
||||
GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define Approx_Gradient_BFGSOfMyGradientbis_hxx \
|
||||
<GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_ParLeastSquareOfMyGradientbis \
|
||||
GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define Approx_ParLeastSquareOfMyGradientbis_hxx \
|
||||
<GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_ResConstraintOfMyGradientbis \
|
||||
GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define Approx_ResConstraintOfMyGradientbis_hxx \
|
||||
<GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_ParFunctionOfMyGradientbis \
|
||||
GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define Approx_ParFunctionOfMyGradientbis_hxx \
|
||||
<GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_Gradient_BFGSOfMyGradientbis \
|
||||
GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define Approx_Gradient_BFGSOfMyGradientbis_hxx \
|
||||
<GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define Approx_BSplComputeLine GeomInt_TheComputeLineOfWLApprox
|
||||
#define Approx_BSplComputeLine_hxx <GeomInt_TheComputeLineOfWLApprox.hxx>
|
||||
#include "../Approx/Approx_BSplComputeLine.gxx"
|
||||
|
||||
|
@@ -30,81 +30,77 @@
|
||||
class Adaptor3d_HSurfaceTool;
|
||||
class math_Matrix;
|
||||
|
||||
class GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox : public math_FunctionSetWithDerivatives
|
||||
class GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox
|
||||
: public math_FunctionSetWithDerivatives
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
Standard_EXPORT GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2);
|
||||
|
||||
Standard_EXPORT GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox(
|
||||
const Handle(Adaptor3d_Surface)& S1,
|
||||
const Handle(Adaptor3d_Surface)& S2);
|
||||
|
||||
Standard_EXPORT Standard_Integer NbVariables() const;
|
||||
|
||||
|
||||
Standard_EXPORT Standard_Integer NbEquations() const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D);
|
||||
|
||||
Standard_EXPORT void ComputeParameters (const IntImp_ConstIsoparametric ChoixIso, const TColStd_Array1OfReal& Param, math_Vector& UVap, math_Vector& BornInf, math_Vector& BornSup, math_Vector& Tolerance);
|
||||
|
||||
|
||||
Standard_EXPORT Standard_Boolean Value(const math_Vector& X, math_Vector& F);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Derivatives(const math_Vector& X, math_Matrix& D);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Values(const math_Vector& X, math_Vector& F, math_Matrix& D);
|
||||
|
||||
Standard_EXPORT void ComputeParameters(const IntImp_ConstIsoparametric ChoixIso,
|
||||
const TColStd_Array1OfReal& Param,
|
||||
math_Vector& UVap,
|
||||
math_Vector& BornInf,
|
||||
math_Vector& BornSup,
|
||||
math_Vector& Tolerance);
|
||||
|
||||
//! returns somme des fi*fi
|
||||
Standard_Real Root() const;
|
||||
|
||||
gp_Pnt Point() const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsTangent (const math_Vector& UVap, TColStd_Array1OfReal& Param, IntImp_ConstIsoparametric& BestChoix);
|
||||
|
||||
gp_Dir Direction() const;
|
||||
|
||||
gp_Dir2d DirectionOnS1() const;
|
||||
|
||||
gp_Dir2d DirectionOnS2() const;
|
||||
|
||||
const Handle(Adaptor3d_Surface)& AuxillarSurface1() const;
|
||||
|
||||
const Handle(Adaptor3d_Surface)& AuxillarSurface2() const;
|
||||
Standard_Real Root() const;
|
||||
|
||||
gp_Pnt Point() const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsTangent(const math_Vector& UVap,
|
||||
TColStd_Array1OfReal& Param,
|
||||
IntImp_ConstIsoparametric& BestChoix);
|
||||
|
||||
gp_Dir Direction() const;
|
||||
|
||||
gp_Dir2d DirectionOnS1() const;
|
||||
|
||||
gp_Dir2d DirectionOnS2() const;
|
||||
|
||||
const Handle(Adaptor3d_Surface)& AuxillarSurface1() const;
|
||||
|
||||
const Handle(Adaptor3d_Surface)& AuxillarSurface2() const;
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Address surf1;
|
||||
Standard_Address surf2;
|
||||
gp_Pnt pntsol1;
|
||||
gp_Pnt pntsol2;
|
||||
Standard_Real f[3];
|
||||
Standard_Boolean compute;
|
||||
Standard_Boolean tangent;
|
||||
Standard_Real tgduv[4];
|
||||
gp_Vec dpuv[4];
|
||||
Standard_Address surf1;
|
||||
Standard_Address surf2;
|
||||
gp_Pnt pntsol1;
|
||||
gp_Pnt pntsol2;
|
||||
Standard_Real f[3];
|
||||
Standard_Boolean compute;
|
||||
Standard_Boolean tangent;
|
||||
Standard_Real tgduv[4];
|
||||
gp_Vec dpuv[4];
|
||||
IntImp_ConstIsoparametric chxIso;
|
||||
Standard_Real paramConst;
|
||||
Standard_Real ua0;
|
||||
Standard_Real va0;
|
||||
Standard_Real ua1;
|
||||
Standard_Real va1;
|
||||
Standard_Real ub0;
|
||||
Standard_Real vb0;
|
||||
Standard_Real ub1;
|
||||
Standard_Real vb1;
|
||||
Standard_Real ures1;
|
||||
Standard_Real ures2;
|
||||
Standard_Real vres1;
|
||||
Standard_Real vres2;
|
||||
|
||||
|
||||
Standard_Real paramConst;
|
||||
Standard_Real ua0;
|
||||
Standard_Real va0;
|
||||
Standard_Real ua1;
|
||||
Standard_Real va1;
|
||||
Standard_Real ub0;
|
||||
Standard_Real vb0;
|
||||
Standard_Real ub1;
|
||||
Standard_Real vb1;
|
||||
Standard_Real ures1;
|
||||
Standard_Real ures2;
|
||||
Standard_Real vres1;
|
||||
Standard_Real vres2;
|
||||
};
|
||||
|
||||
#define ThePSurface Handle(Adaptor3d_Surface)
|
||||
@@ -123,7 +119,4 @@ private:
|
||||
#undef IntImp_ZerParFunc
|
||||
#undef IntImp_ZerParFunc_hxx
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox_HeaderFile
|
||||
|
@@ -21,7 +21,6 @@
|
||||
#include <Adaptor3d_Surface.hxx>
|
||||
#include <Adaptor3d_HSurfaceTool.hxx>
|
||||
#include <math_Matrix.hxx>
|
||||
|
||||
|
||||
#define ThePSurface Handle(Adaptor3d_Surface)
|
||||
#define ThePSurface_hxx <Adaptor3d_Surface.hxx>
|
||||
@@ -30,4 +29,3 @@
|
||||
#define IntImp_ZerParFunc GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox
|
||||
#define IntImp_ZerParFunc_hxx <GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx>
|
||||
#include "../IntImp/IntImp_ZerParFunc.gxx"
|
||||
|
||||
|
@@ -31,34 +31,56 @@ class IntSurf_QuadricTool;
|
||||
class IntPatch_WLine;
|
||||
class GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox;
|
||||
|
||||
class GeomInt_TheImpPrmSvSurfacesOfWLApprox : public ApproxInt_SvSurfaces
|
||||
class GeomInt_TheImpPrmSvSurfacesOfWLApprox : public ApproxInt_SvSurfaces
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT GeomInt_TheImpPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_Surface)& Surf1, const IntSurf_Quadric& Surf2);
|
||||
|
||||
Standard_EXPORT GeomInt_TheImpPrmSvSurfacesOfWLApprox(const IntSurf_Quadric& Surf1, const Handle(Adaptor3d_Surface)& Surf2);
|
||||
|
||||
Standard_EXPORT GeomInt_TheImpPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_Surface)& Surf1,
|
||||
const IntSurf_Quadric& Surf2);
|
||||
|
||||
Standard_EXPORT GeomInt_TheImpPrmSvSurfacesOfWLApprox(const IntSurf_Quadric& Surf1,
|
||||
const Handle(Adaptor3d_Surface)& Surf2);
|
||||
|
||||
//! returns True if Tg,Tguv1 Tguv2 can be computed.
|
||||
Standard_EXPORT Standard_Boolean Compute (Standard_Real& u1, Standard_Real& v1, Standard_Real& u2, Standard_Real& v2,
|
||||
gp_Pnt& Pt, gp_Vec& Tg, gp_Vec2d& Tguv1, gp_Vec2d& Tguv2);
|
||||
|
||||
Standard_EXPORT void Pnt (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Pnt& P);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Compute(Standard_Real& u1,
|
||||
Standard_Real& v1,
|
||||
Standard_Real& u2,
|
||||
Standard_Real& v2,
|
||||
gp_Pnt& Pt,
|
||||
gp_Vec& Tg,
|
||||
gp_Vec2d& Tguv1,
|
||||
gp_Vec2d& Tguv2);
|
||||
|
||||
Standard_EXPORT void Pnt(const Standard_Real u1,
|
||||
const Standard_Real v1,
|
||||
const Standard_Real u2,
|
||||
const Standard_Real v2,
|
||||
gp_Pnt& P);
|
||||
|
||||
Standard_EXPORT Standard_Boolean SeekPoint(const Standard_Real u1,
|
||||
const Standard_Real v1,
|
||||
const Standard_Real u2,
|
||||
const Standard_Real v2,
|
||||
IntSurf_PntOn2S& Point);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Tangency (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Vec& Tg);
|
||||
|
||||
Standard_EXPORT Standard_Boolean TangencyOnSurf1 (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Vec2d& Tg);
|
||||
|
||||
Standard_EXPORT Standard_Boolean TangencyOnSurf2 (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Vec2d& Tg);
|
||||
IntSurf_PntOn2S& Point);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Tangency(const Standard_Real u1,
|
||||
const Standard_Real v1,
|
||||
const Standard_Real u2,
|
||||
const Standard_Real v2,
|
||||
gp_Vec& Tg);
|
||||
|
||||
Standard_EXPORT Standard_Boolean TangencyOnSurf1(const Standard_Real u1,
|
||||
const Standard_Real v1,
|
||||
const Standard_Real u2,
|
||||
const Standard_Real v2,
|
||||
gp_Vec2d& Tg);
|
||||
|
||||
Standard_EXPORT Standard_Boolean TangencyOnSurf2(const Standard_Real u1,
|
||||
const Standard_Real v1,
|
||||
const Standard_Real u2,
|
||||
const Standard_Real v2,
|
||||
gp_Vec2d& Tg);
|
||||
|
||||
Standard_Boolean FillInitialVectorOfSolution(const Standard_Real u1,
|
||||
const Standard_Real v1,
|
||||
@@ -68,47 +90,30 @@ public:
|
||||
const Standard_Real bsupu,
|
||||
const Standard_Real binfv,
|
||||
const Standard_Real bsupv,
|
||||
math_Vector& X,
|
||||
Standard_Real& TranslationU,
|
||||
Standard_Real& TranslationV);
|
||||
|
||||
math_Vector& X,
|
||||
Standard_Real& TranslationU,
|
||||
Standard_Real& TranslationV);
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
gp_Pnt2d MyParOnS1;
|
||||
gp_Pnt2d MyParOnS2;
|
||||
gp_Pnt MyPnt;
|
||||
gp_Vec2d MyTguv1;
|
||||
gp_Vec2d MyTguv2;
|
||||
gp_Vec MyTg;
|
||||
Standard_Boolean MyIsTangent;
|
||||
Standard_Boolean MyHasBeenComputed;
|
||||
gp_Pnt2d MyParOnS1bis;
|
||||
gp_Pnt2d MyParOnS2bis;
|
||||
gp_Pnt MyPntbis;
|
||||
gp_Vec2d MyTguv1bis;
|
||||
gp_Vec2d MyTguv2bis;
|
||||
gp_Vec MyTgbis;
|
||||
Standard_Boolean MyIsTangentbis;
|
||||
Standard_Boolean MyHasBeenComputedbis;
|
||||
Standard_Boolean MyImplicitFirst;
|
||||
gp_Pnt2d MyParOnS1;
|
||||
gp_Pnt2d MyParOnS2;
|
||||
gp_Pnt MyPnt;
|
||||
gp_Vec2d MyTguv1;
|
||||
gp_Vec2d MyTguv2;
|
||||
gp_Vec MyTg;
|
||||
Standard_Boolean MyIsTangent;
|
||||
Standard_Boolean MyHasBeenComputed;
|
||||
gp_Pnt2d MyParOnS1bis;
|
||||
gp_Pnt2d MyParOnS2bis;
|
||||
gp_Pnt MyPntbis;
|
||||
gp_Vec2d MyTguv1bis;
|
||||
gp_Vec2d MyTguv2bis;
|
||||
gp_Vec MyTgbis;
|
||||
Standard_Boolean MyIsTangentbis;
|
||||
Standard_Boolean MyHasBeenComputedbis;
|
||||
Standard_Boolean MyImplicitFirst;
|
||||
GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox MyZerImpFunc;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_TheImpPrmSvSurfacesOfWLApprox_HeaderFile
|
||||
|
@@ -25,7 +25,6 @@
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
|
||||
|
||||
#define ThePSurface Handle(Adaptor3d_Surface)
|
||||
#define ThePSurface_hxx <Adaptor3d_Surface.hxx>
|
||||
@@ -43,4 +42,3 @@
|
||||
#define ApproxInt_ImpPrmSvSurfaces GeomInt_TheImpPrmSvSurfacesOfWLApprox
|
||||
#define ApproxInt_ImpPrmSvSurfaces_hxx <GeomInt_TheImpPrmSvSurfacesOfWLApprox.hxx>
|
||||
#include "../ApproxInt/ApproxInt_ImpPrmSvSurfaces.gxx"
|
||||
|
||||
|
@@ -30,15 +30,18 @@ class GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox;
|
||||
class math_FunctionSetRoot;
|
||||
class IntSurf_PntOn2S;
|
||||
|
||||
class GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox
|
||||
class GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
//! compute the solution point with the close point
|
||||
Standard_EXPORT GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox(const TColStd_Array1OfReal& Param, const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const Standard_Real TolTangency);
|
||||
|
||||
Standard_EXPORT GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox(
|
||||
const TColStd_Array1OfReal& Param,
|
||||
const Handle(Adaptor3d_Surface)& S1,
|
||||
const Handle(Adaptor3d_Surface)& S2,
|
||||
const Standard_Real TolTangency);
|
||||
|
||||
//! initialize the parameters to compute the solution point
|
||||
//! it 's possible to write to optimize:
|
||||
//! IntImp_Int2S inter(S1,S2,Func,TolTangency);
|
||||
@@ -49,90 +52,83 @@ public:
|
||||
//! param(3)=...
|
||||
//! inter.Perform(Param,rsnld);
|
||||
//! }
|
||||
Standard_EXPORT GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const Standard_Real TolTangency);
|
||||
|
||||
Standard_EXPORT GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox(
|
||||
const Handle(Adaptor3d_Surface)& S1,
|
||||
const Handle(Adaptor3d_Surface)& S2,
|
||||
const Standard_Real TolTangency);
|
||||
|
||||
//! returns the best constant isoparametric to find
|
||||
//! the next intersection's point +stores the solution
|
||||
//! point (the solution point is found with the close point
|
||||
//! to intersect the isoparametric with the other patch;
|
||||
//! the choice of the isoparametic is calculated)
|
||||
Standard_EXPORT IntImp_ConstIsoparametric Perform (const TColStd_Array1OfReal& Param, math_FunctionSetRoot& Rsnld);
|
||||
|
||||
Standard_EXPORT IntImp_ConstIsoparametric Perform(const TColStd_Array1OfReal& Param,
|
||||
math_FunctionSetRoot& Rsnld);
|
||||
|
||||
//! returns the best constant isoparametric to find
|
||||
//! the next intersection's point +stores the solution
|
||||
//! point (the solution point is found with the close point
|
||||
//! to intersect the isoparametric with the other patch;
|
||||
//! the choice of the isoparametic is given by ChoixIso)
|
||||
Standard_EXPORT IntImp_ConstIsoparametric Perform (const TColStd_Array1OfReal& Param, math_FunctionSetRoot& Rsnld, const IntImp_ConstIsoparametric ChoixIso);
|
||||
|
||||
Standard_EXPORT IntImp_ConstIsoparametric Perform(const TColStd_Array1OfReal& Param,
|
||||
math_FunctionSetRoot& Rsnld,
|
||||
const IntImp_ConstIsoparametric ChoixIso);
|
||||
|
||||
//! Returns TRUE if the creation completed without failure.
|
||||
Standard_Boolean IsDone() const;
|
||||
|
||||
Standard_Boolean IsDone() const;
|
||||
|
||||
//! Returns TRUE when there is no solution to the problem.
|
||||
Standard_Boolean IsEmpty() const;
|
||||
|
||||
Standard_Boolean IsEmpty() const;
|
||||
|
||||
//! Returns the intersection point.
|
||||
const IntSurf_PntOn2S& Point() const;
|
||||
|
||||
const IntSurf_PntOn2S& Point() const;
|
||||
|
||||
//! Returns True if the surfaces are tangent at the
|
||||
//! intersection point.
|
||||
Standard_Boolean IsTangent() const;
|
||||
|
||||
Standard_Boolean IsTangent() const;
|
||||
|
||||
//! Returns the tangent at the intersection line.
|
||||
const gp_Dir& Direction() const;
|
||||
|
||||
const gp_Dir& Direction() const;
|
||||
|
||||
//! Returns the tangent at the intersection line in the
|
||||
//! parametric space of the first surface.
|
||||
const gp_Dir2d& DirectionOnS1() const;
|
||||
|
||||
const gp_Dir2d& DirectionOnS1() const;
|
||||
|
||||
//! Returns the tangent at the intersection line in the
|
||||
//! parametric space of the second surface.
|
||||
const gp_Dir2d& DirectionOnS2() const;
|
||||
|
||||
const gp_Dir2d& DirectionOnS2() const;
|
||||
|
||||
//! return the math function which
|
||||
//! is used to compute the intersection
|
||||
GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox& Function();
|
||||
|
||||
GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox& Function();
|
||||
|
||||
//! return the intersection point which is
|
||||
//! enable for changing.
|
||||
IntSurf_PntOn2S& ChangePoint();
|
||||
|
||||
|
||||
|
||||
IntSurf_PntOn2S& ChangePoint();
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Boolean done;
|
||||
Standard_Boolean empty;
|
||||
IntSurf_PntOn2S pint;
|
||||
Standard_Boolean tangent;
|
||||
gp_Dir d3d;
|
||||
gp_Dir2d d2d1;
|
||||
gp_Dir2d d2d2;
|
||||
Standard_Boolean done;
|
||||
Standard_Boolean empty;
|
||||
IntSurf_PntOn2S pint;
|
||||
Standard_Boolean tangent;
|
||||
gp_Dir d3d;
|
||||
gp_Dir2d d2d1;
|
||||
gp_Dir2d d2d2;
|
||||
GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox myZerParFunc;
|
||||
Standard_Real tol;
|
||||
Standard_Real ua0;
|
||||
Standard_Real va0;
|
||||
Standard_Real ua1;
|
||||
Standard_Real va1;
|
||||
Standard_Real ub0;
|
||||
Standard_Real vb0;
|
||||
Standard_Real ub1;
|
||||
Standard_Real vb1;
|
||||
Standard_Real ures1;
|
||||
Standard_Real ures2;
|
||||
Standard_Real vres1;
|
||||
Standard_Real vres2;
|
||||
|
||||
|
||||
Standard_Real tol;
|
||||
Standard_Real ua0;
|
||||
Standard_Real va0;
|
||||
Standard_Real ua1;
|
||||
Standard_Real va1;
|
||||
Standard_Real ub0;
|
||||
Standard_Real vb0;
|
||||
Standard_Real ub1;
|
||||
Standard_Real vb1;
|
||||
Standard_Real ures1;
|
||||
Standard_Real ures2;
|
||||
Standard_Real vres1;
|
||||
Standard_Real vres2;
|
||||
};
|
||||
|
||||
#define ThePSurface Handle(Adaptor3d_Surface)
|
||||
@@ -155,7 +151,4 @@ private:
|
||||
#undef IntImp_Int2S
|
||||
#undef IntImp_Int2S_hxx
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox_HeaderFile
|
||||
|
@@ -27,7 +27,6 @@
|
||||
#include <IntSurf_PntOn2S.hxx>
|
||||
#include <gp_Dir.hxx>
|
||||
#include <gp_Dir2d.hxx>
|
||||
|
||||
|
||||
#define ThePSurface Handle(Adaptor3d_Surface)
|
||||
#define ThePSurface_hxx <Adaptor3d_Surface.hxx>
|
||||
@@ -38,4 +37,3 @@
|
||||
#define IntImp_Int2S GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox
|
||||
#define IntImp_Int2S_hxx <GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx>
|
||||
#include "../IntImp/IntImp_Int2S.gxx"
|
||||
|
||||
|
@@ -32,58 +32,55 @@
|
||||
class IntPatch_WLine;
|
||||
class ApproxInt_SvSurfaces;
|
||||
|
||||
|
||||
|
||||
class GeomInt_TheMultiLineOfWLApprox
|
||||
class GeomInt_TheMultiLineOfWLApprox
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
Standard_EXPORT GeomInt_TheMultiLineOfWLApprox();
|
||||
|
||||
//! The class SvSurfaces is used when the approximation algorithm
|
||||
//! needs some extra points on the line <line>.
|
||||
|
||||
//! The class SvSurfaces is used when the approximation algorithm
|
||||
//! needs some extra points on the line <line>.
|
||||
//! A New line is then created which shares the same surfaces and functions.
|
||||
//! SvSurfaces is a deferred class which allows several implementations of
|
||||
//! this algorithm with different surfaces (bi-parametric ones, or
|
||||
//! this algorithm with different surfaces (bi-parametric ones, or
|
||||
//! implicit and biparametric ones)
|
||||
Standard_EXPORT GeomInt_TheMultiLineOfWLApprox( const Handle(IntPatch_WLine)& line,
|
||||
const Standard_Address PtrSvSurfaces,
|
||||
const Standard_Integer NbP3d,
|
||||
const Standard_Integer NbP2d,
|
||||
const Standard_Boolean ApproxU1V1,
|
||||
const Standard_Boolean ApproxU2V2,
|
||||
const Standard_Real xo,
|
||||
const Standard_Real yo,
|
||||
const Standard_Real zo,
|
||||
const Standard_Real u1o,
|
||||
const Standard_Real v1o,
|
||||
const Standard_Real u2o,
|
||||
const Standard_Real v2o,
|
||||
const Standard_Boolean P2DOnFirst,
|
||||
const Standard_Integer IndMin = 0,
|
||||
const Standard_Integer IndMax = 0);
|
||||
|
||||
Standard_EXPORT GeomInt_TheMultiLineOfWLApprox(const Handle(IntPatch_WLine)& line,
|
||||
const Standard_Address PtrSvSurfaces,
|
||||
const Standard_Integer NbP3d,
|
||||
const Standard_Integer NbP2d,
|
||||
const Standard_Boolean ApproxU1V1,
|
||||
const Standard_Boolean ApproxU2V2,
|
||||
const Standard_Real xo,
|
||||
const Standard_Real yo,
|
||||
const Standard_Real zo,
|
||||
const Standard_Real u1o,
|
||||
const Standard_Real v1o,
|
||||
const Standard_Real u2o,
|
||||
const Standard_Real v2o,
|
||||
const Standard_Boolean P2DOnFirst,
|
||||
const Standard_Integer IndMin = 0,
|
||||
const Standard_Integer IndMax = 0);
|
||||
|
||||
//! No Extra points will be added on the current line
|
||||
Standard_EXPORT GeomInt_TheMultiLineOfWLApprox( const Handle(IntPatch_WLine)& line,
|
||||
const Standard_Integer NbP3d,
|
||||
const Standard_Integer NbP2d,
|
||||
const Standard_Boolean ApproxU1V1,
|
||||
const Standard_Boolean ApproxU2V2,
|
||||
const Standard_Real xo,
|
||||
const Standard_Real yo,
|
||||
const Standard_Real zo,
|
||||
const Standard_Real u1o,
|
||||
const Standard_Real v1o,
|
||||
const Standard_Real u2o,
|
||||
const Standard_Real v2o,
|
||||
const Standard_Boolean P2DOnFirst,
|
||||
const Standard_Integer IndMin = 0,
|
||||
const Standard_Integer IndMax = 0);
|
||||
|
||||
Standard_EXPORT GeomInt_TheMultiLineOfWLApprox(const Handle(IntPatch_WLine)& line,
|
||||
const Standard_Integer NbP3d,
|
||||
const Standard_Integer NbP2d,
|
||||
const Standard_Boolean ApproxU1V1,
|
||||
const Standard_Boolean ApproxU2V2,
|
||||
const Standard_Real xo,
|
||||
const Standard_Real yo,
|
||||
const Standard_Real zo,
|
||||
const Standard_Real u1o,
|
||||
const Standard_Real v1o,
|
||||
const Standard_Real u2o,
|
||||
const Standard_Real v2o,
|
||||
const Standard_Boolean P2DOnFirst,
|
||||
const Standard_Integer IndMin = 0,
|
||||
const Standard_Integer IndMax = 0);
|
||||
|
||||
Standard_EXPORT Standard_Integer FirstPoint() const;
|
||||
|
||||
|
||||
Standard_EXPORT Standard_Integer LastPoint() const;
|
||||
|
||||
//! Returns the number of 2d points of a TheLine.
|
||||
@@ -91,72 +88,72 @@ public:
|
||||
|
||||
//! Returns the number of 3d points of a TheLine.
|
||||
Standard_EXPORT Standard_Integer NbP3d() const;
|
||||
|
||||
|
||||
Standard_EXPORT Approx_Status WhatStatus() const;
|
||||
|
||||
|
||||
//! Returns the 3d points of the multipoint <MPointIndex> when only 3d points exist.
|
||||
Standard_EXPORT void Value (const Standard_Integer MPointIndex, TColgp_Array1OfPnt& tabPt) const;
|
||||
|
||||
Standard_EXPORT void Value(const Standard_Integer MPointIndex, TColgp_Array1OfPnt& tabPt) const;
|
||||
|
||||
//! Returns the 2d points of the multipoint <MPointIndex> when only 2d points exist.
|
||||
Standard_EXPORT void Value (const Standard_Integer MPointIndex,
|
||||
TColgp_Array1OfPnt2d& tabPt2d) const;
|
||||
Standard_EXPORT void Value(const Standard_Integer MPointIndex,
|
||||
TColgp_Array1OfPnt2d& tabPt2d) const;
|
||||
|
||||
//! returns the 3d and 2d points of the multipoint <MPointIndex>.
|
||||
Standard_EXPORT void Value (const Standard_Integer MPointIndex, TColgp_Array1OfPnt& tabPt, TColgp_Array1OfPnt2d& tabPt2d) const;
|
||||
|
||||
Standard_EXPORT void Value(const Standard_Integer MPointIndex,
|
||||
TColgp_Array1OfPnt& tabPt,
|
||||
TColgp_Array1OfPnt2d& tabPt2d) const;
|
||||
|
||||
//! Returns the 3d tangency points of the multipoint <MPointIndex> only
|
||||
//! when 3d points exist.
|
||||
Standard_EXPORT Standard_Boolean Tangency ( const Standard_Integer MPointIndex,
|
||||
TColgp_Array1OfVec& tabV) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean Tangency(const Standard_Integer MPointIndex,
|
||||
TColgp_Array1OfVec& tabV) const;
|
||||
|
||||
//! Returns the 2d tangency points of the multipoint <MPointIndex> only
|
||||
//! when 2d points exist.
|
||||
Standard_EXPORT Standard_Boolean Tangency ( const Standard_Integer MPointIndex,
|
||||
TColgp_Array1OfVec2d& tabV2d) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean Tangency(const Standard_Integer MPointIndex,
|
||||
TColgp_Array1OfVec2d& tabV2d) const;
|
||||
|
||||
//! Returns the 3d and 2d points of the multipoint <MPointIndex>.
|
||||
Standard_EXPORT Standard_Boolean Tangency (const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV, TColgp_Array1OfVec2d& tabV2d) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean Tangency(const Standard_Integer MPointIndex,
|
||||
TColgp_Array1OfVec& tabV,
|
||||
TColgp_Array1OfVec2d& tabV2d) const;
|
||||
|
||||
//! Tries to make a sub-line between <Low> and <High> points of this line
|
||||
//! by adding <NbPointsToInsert> new points
|
||||
Standard_EXPORT GeomInt_TheMultiLineOfWLApprox MakeMLBetween (const Standard_Integer Low,
|
||||
const Standard_Integer High,
|
||||
const Standard_Integer NbPointsToInsert) const;
|
||||
|
||||
Standard_EXPORT GeomInt_TheMultiLineOfWLApprox
|
||||
MakeMLBetween(const Standard_Integer Low,
|
||||
const Standard_Integer High,
|
||||
const Standard_Integer NbPointsToInsert) const;
|
||||
|
||||
//! Tries to make a sub-line between <Low> and <High> points of this line
|
||||
//! by adding one more point between (indbad-1)-th and indbad-th points
|
||||
Standard_EXPORT Standard_Boolean MakeMLOneMorePoint (const Standard_Integer Low,
|
||||
const Standard_Integer High,
|
||||
const Standard_Integer indbad,
|
||||
GeomInt_TheMultiLineOfWLApprox& OtherLine) const;
|
||||
Standard_EXPORT Standard_Boolean
|
||||
MakeMLOneMorePoint(const Standard_Integer Low,
|
||||
const Standard_Integer High,
|
||||
const Standard_Integer indbad,
|
||||
GeomInt_TheMultiLineOfWLApprox& OtherLine) const;
|
||||
|
||||
//! Dump of the current multi-line.
|
||||
Standard_EXPORT void Dump() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
Standard_Address PtrOnmySvSurfaces;
|
||||
Standard_Address PtrOnmySvSurfaces;
|
||||
Handle(IntPatch_WLine) myLine;
|
||||
Standard_Integer indicemin;
|
||||
Standard_Integer indicemax;
|
||||
Standard_Integer nbp3d;
|
||||
Standard_Integer nbp2d;
|
||||
Standard_Boolean myApproxU1V1;
|
||||
Standard_Boolean myApproxU2V2;
|
||||
Standard_Boolean p2donfirst;
|
||||
Standard_Real Xo;
|
||||
Standard_Real Yo;
|
||||
Standard_Real Zo;
|
||||
Standard_Real U1o;
|
||||
Standard_Real V1o;
|
||||
Standard_Real U2o;
|
||||
Standard_Real V2o;
|
||||
|
||||
|
||||
Standard_Integer indicemin;
|
||||
Standard_Integer indicemax;
|
||||
Standard_Integer nbp3d;
|
||||
Standard_Integer nbp2d;
|
||||
Standard_Boolean myApproxU1V1;
|
||||
Standard_Boolean myApproxU2V2;
|
||||
Standard_Boolean p2donfirst;
|
||||
Standard_Real Xo;
|
||||
Standard_Real Yo;
|
||||
Standard_Real Zo;
|
||||
Standard_Real U1o;
|
||||
Standard_Real V1o;
|
||||
Standard_Real U2o;
|
||||
Standard_Real V2o;
|
||||
};
|
||||
|
||||
#endif // _GeomInt_TheMultiLineOfWLApprox_HeaderFile
|
||||
|
@@ -18,7 +18,6 @@
|
||||
|
||||
#include <IntPatch_WLine.hxx>
|
||||
#include <ApproxInt_SvSurfaces.hxx>
|
||||
|
||||
|
||||
#define Handle_TheLine Handle(IntPatch_WLine)
|
||||
#define TheLine IntPatch_WLine
|
||||
@@ -28,4 +27,3 @@
|
||||
#define ApproxInt_MultiLine GeomInt_TheMultiLineOfWLApprox
|
||||
#define ApproxInt_MultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
|
||||
#include "../ApproxInt/ApproxInt_MultiLine.gxx"
|
||||
|
||||
|
@@ -26,93 +26,102 @@
|
||||
class GeomInt_TheMultiLineOfWLApprox;
|
||||
class ApproxInt_SvSurfaces;
|
||||
|
||||
|
||||
|
||||
class GeomInt_TheMultiLineToolOfWLApprox
|
||||
class GeomInt_TheMultiLineToolOfWLApprox
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns the number of multipoints of the TheMultiLine.
|
||||
static Standard_Integer FirstPoint (const GeomInt_TheMultiLineOfWLApprox& ML);
|
||||
|
||||
static Standard_Integer FirstPoint(const GeomInt_TheMultiLineOfWLApprox& ML);
|
||||
|
||||
//! Returns the number of multipoints of the TheMultiLine.
|
||||
static Standard_Integer LastPoint (const GeomInt_TheMultiLineOfWLApprox& ML);
|
||||
|
||||
static Standard_Integer LastPoint(const GeomInt_TheMultiLineOfWLApprox& ML);
|
||||
|
||||
//! Returns the number of 2d points of a TheMultiLine.
|
||||
static Standard_Integer NbP2d (const GeomInt_TheMultiLineOfWLApprox& ML);
|
||||
|
||||
static Standard_Integer NbP2d(const GeomInt_TheMultiLineOfWLApprox& ML);
|
||||
|
||||
//! Returns the number of 3d points of a TheMultiLine.
|
||||
static Standard_Integer NbP3d (const GeomInt_TheMultiLineOfWLApprox& ML);
|
||||
|
||||
static Standard_Integer NbP3d(const GeomInt_TheMultiLineOfWLApprox& ML);
|
||||
|
||||
//! returns the 3d points of the multipoint <MPointIndex>
|
||||
//! when only 3d points exist.
|
||||
static void Value (const GeomInt_TheMultiLineOfWLApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfPnt& tabPt);
|
||||
|
||||
static void Value(const GeomInt_TheMultiLineOfWLApprox& ML,
|
||||
const Standard_Integer MPointIndex,
|
||||
TColgp_Array1OfPnt& tabPt);
|
||||
|
||||
//! returns the 2d points of the multipoint <MPointIndex>
|
||||
//! when only 2d points exist.
|
||||
static void Value (const GeomInt_TheMultiLineOfWLApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfPnt2d& tabPt2d);
|
||||
|
||||
static void Value(const GeomInt_TheMultiLineOfWLApprox& ML,
|
||||
const Standard_Integer MPointIndex,
|
||||
TColgp_Array1OfPnt2d& tabPt2d);
|
||||
|
||||
//! returns the 3d and 2d points of the multipoint
|
||||
//! <MPointIndex>.
|
||||
static void Value (const GeomInt_TheMultiLineOfWLApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfPnt& tabPt, TColgp_Array1OfPnt2d& tabPt2d);
|
||||
|
||||
static void Value(const GeomInt_TheMultiLineOfWLApprox& ML,
|
||||
const Standard_Integer MPointIndex,
|
||||
TColgp_Array1OfPnt& tabPt,
|
||||
TColgp_Array1OfPnt2d& tabPt2d);
|
||||
|
||||
//! returns the 3d points of the multipoint <MPointIndex>
|
||||
//! when only 3d points exist.
|
||||
static Standard_Boolean Tangency (const GeomInt_TheMultiLineOfWLApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV);
|
||||
|
||||
static Standard_Boolean Tangency(const GeomInt_TheMultiLineOfWLApprox& ML,
|
||||
const Standard_Integer MPointIndex,
|
||||
TColgp_Array1OfVec& tabV);
|
||||
|
||||
//! returns the 2d tangency points of the multipoint
|
||||
//! <MPointIndex> only when 2d points exist.
|
||||
static Standard_Boolean Tangency (const GeomInt_TheMultiLineOfWLApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec2d& tabV2d);
|
||||
|
||||
static Standard_Boolean Tangency(const GeomInt_TheMultiLineOfWLApprox& ML,
|
||||
const Standard_Integer MPointIndex,
|
||||
TColgp_Array1OfVec2d& tabV2d);
|
||||
|
||||
//! returns the 3d and 2d points of the multipoint
|
||||
//! <MPointIndex>.
|
||||
static Standard_Boolean Tangency (const GeomInt_TheMultiLineOfWLApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV, TColgp_Array1OfVec2d& tabV2d);
|
||||
|
||||
static Standard_Boolean Tangency(const GeomInt_TheMultiLineOfWLApprox& ML,
|
||||
const Standard_Integer MPointIndex,
|
||||
TColgp_Array1OfVec& tabV,
|
||||
TColgp_Array1OfVec2d& tabV2d);
|
||||
|
||||
//! returns the 3d curvature of the multipoint <MPointIndex>
|
||||
//! when only 3d points exist.
|
||||
static Standard_Boolean Curvature (const GeomInt_TheMultiLineOfWLApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV);
|
||||
|
||||
static Standard_Boolean Curvature(const GeomInt_TheMultiLineOfWLApprox& ML,
|
||||
const Standard_Integer MPointIndex,
|
||||
TColgp_Array1OfVec& tabV);
|
||||
|
||||
//! returns the 2d curvature points of the multipoint
|
||||
//! <MPointIndex> only when 2d points exist.
|
||||
static Standard_Boolean Curvature (const GeomInt_TheMultiLineOfWLApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec2d& tabV2d);
|
||||
|
||||
static Standard_Boolean Curvature(const GeomInt_TheMultiLineOfWLApprox& ML,
|
||||
const Standard_Integer MPointIndex,
|
||||
TColgp_Array1OfVec2d& tabV2d);
|
||||
|
||||
//! returns the 3d and 2d curvature of the multipoint
|
||||
//! <MPointIndex>.
|
||||
static Standard_Boolean Curvature (const GeomInt_TheMultiLineOfWLApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV, TColgp_Array1OfVec2d& tabV2d);
|
||||
|
||||
static Standard_Boolean Curvature(const GeomInt_TheMultiLineOfWLApprox& ML,
|
||||
const Standard_Integer MPointIndex,
|
||||
TColgp_Array1OfVec& tabV,
|
||||
TColgp_Array1OfVec2d& tabV2d);
|
||||
|
||||
//! Is called if WhatStatus returned "PointsAdded".
|
||||
static GeomInt_TheMultiLineOfWLApprox MakeMLBetween (const GeomInt_TheMultiLineOfWLApprox& ML, const Standard_Integer I1, const Standard_Integer I2, const Standard_Integer NbPMin);
|
||||
|
||||
static GeomInt_TheMultiLineOfWLApprox MakeMLBetween(const GeomInt_TheMultiLineOfWLApprox& ML,
|
||||
const Standard_Integer I1,
|
||||
const Standard_Integer I2,
|
||||
const Standard_Integer NbPMin);
|
||||
|
||||
//! Is called when the Bezier curve contains a loop
|
||||
static Standard_Boolean MakeMLOneMorePoint (const GeomInt_TheMultiLineOfWLApprox& ML,
|
||||
const Standard_Integer I1,
|
||||
const Standard_Integer I2,
|
||||
const Standard_Integer indbad,
|
||||
GeomInt_TheMultiLineOfWLApprox& OtherLine);
|
||||
|
||||
static Approx_Status WhatStatus (const GeomInt_TheMultiLineOfWLApprox& ML, const Standard_Integer I1, const Standard_Integer I2);
|
||||
|
||||
static Standard_Boolean MakeMLOneMorePoint(const GeomInt_TheMultiLineOfWLApprox& ML,
|
||||
const Standard_Integer I1,
|
||||
const Standard_Integer I2,
|
||||
const Standard_Integer indbad,
|
||||
GeomInt_TheMultiLineOfWLApprox& OtherLine);
|
||||
|
||||
static Approx_Status WhatStatus(const GeomInt_TheMultiLineOfWLApprox& ML,
|
||||
const Standard_Integer I1,
|
||||
const Standard_Integer I2);
|
||||
|
||||
//! Dump of the current multi-line.
|
||||
static void Dump (const GeomInt_TheMultiLineOfWLApprox& ML);
|
||||
|
||||
|
||||
|
||||
static void Dump(const GeomInt_TheMultiLineOfWLApprox& ML);
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define TheMultiLine GeomInt_TheMultiLineOfWLApprox
|
||||
@@ -131,7 +140,4 @@ private:
|
||||
#undef ApproxInt_MultiLineTool
|
||||
#undef ApproxInt_MultiLineTool_hxx
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_TheMultiLineToolOfWLApprox_HeaderFile
|
||||
|
@@ -30,71 +30,73 @@ class IntPatch_WLine;
|
||||
class GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox;
|
||||
class GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox;
|
||||
|
||||
class GeomInt_ThePrmPrmSvSurfacesOfWLApprox : public ApproxInt_SvSurfaces
|
||||
class GeomInt_ThePrmPrmSvSurfacesOfWLApprox : public ApproxInt_SvSurfaces
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT GeomInt_ThePrmPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor3d_Surface)& Surf2);
|
||||
|
||||
Standard_EXPORT GeomInt_ThePrmPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_Surface)& Surf1,
|
||||
const Handle(Adaptor3d_Surface)& Surf2);
|
||||
|
||||
//! returns True if Tg,Tguv1 Tguv2 can be computed.
|
||||
Standard_EXPORT Standard_Boolean Compute (Standard_Real& u1, Standard_Real& v1, Standard_Real& u2, Standard_Real& v2,
|
||||
gp_Pnt& Pt, gp_Vec& Tg, gp_Vec2d& Tguv1, gp_Vec2d& Tguv2);
|
||||
|
||||
Standard_EXPORT void Pnt (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Pnt& P);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Compute(Standard_Real& u1,
|
||||
Standard_Real& v1,
|
||||
Standard_Real& u2,
|
||||
Standard_Real& v2,
|
||||
gp_Pnt& Pt,
|
||||
gp_Vec& Tg,
|
||||
gp_Vec2d& Tguv1,
|
||||
gp_Vec2d& Tguv2);
|
||||
|
||||
Standard_EXPORT void Pnt(const Standard_Real u1,
|
||||
const Standard_Real v1,
|
||||
const Standard_Real u2,
|
||||
const Standard_Real v2,
|
||||
gp_Pnt& P);
|
||||
|
||||
Standard_EXPORT Standard_Boolean SeekPoint(const Standard_Real u1,
|
||||
const Standard_Real v1,
|
||||
const Standard_Real u2,
|
||||
const Standard_Real v2,
|
||||
IntSurf_PntOn2S& Point);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Tangency (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Vec& Tg);
|
||||
|
||||
Standard_EXPORT Standard_Boolean TangencyOnSurf1 (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Vec2d& Tg);
|
||||
|
||||
Standard_EXPORT Standard_Boolean TangencyOnSurf2 (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Vec2d& Tg);
|
||||
IntSurf_PntOn2S& Point);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Tangency(const Standard_Real u1,
|
||||
const Standard_Real v1,
|
||||
const Standard_Real u2,
|
||||
const Standard_Real v2,
|
||||
gp_Vec& Tg);
|
||||
|
||||
Standard_EXPORT Standard_Boolean TangencyOnSurf1(const Standard_Real u1,
|
||||
const Standard_Real v1,
|
||||
const Standard_Real u2,
|
||||
const Standard_Real v2,
|
||||
gp_Vec2d& Tg);
|
||||
|
||||
Standard_EXPORT Standard_Boolean TangencyOnSurf2(const Standard_Real u1,
|
||||
const Standard_Real v1,
|
||||
const Standard_Real u2,
|
||||
const Standard_Real v2,
|
||||
gp_Vec2d& Tg);
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
gp_Pnt2d MyParOnS1;
|
||||
gp_Pnt2d MyParOnS2;
|
||||
gp_Pnt MyPnt;
|
||||
gp_Vec2d MyTguv1;
|
||||
gp_Vec2d MyTguv2;
|
||||
gp_Vec MyTg;
|
||||
Standard_Boolean MyIsTangent;
|
||||
Standard_Boolean MyHasBeenComputed;
|
||||
gp_Pnt2d MyParOnS1bis;
|
||||
gp_Pnt2d MyParOnS2bis;
|
||||
gp_Pnt MyPntbis;
|
||||
gp_Vec2d MyTguv1bis;
|
||||
gp_Vec2d MyTguv2bis;
|
||||
gp_Vec MyTgbis;
|
||||
Standard_Boolean MyIsTangentbis;
|
||||
Standard_Boolean MyHasBeenComputedbis;
|
||||
gp_Pnt2d MyParOnS1;
|
||||
gp_Pnt2d MyParOnS2;
|
||||
gp_Pnt MyPnt;
|
||||
gp_Vec2d MyTguv1;
|
||||
gp_Vec2d MyTguv2;
|
||||
gp_Vec MyTg;
|
||||
Standard_Boolean MyIsTangent;
|
||||
Standard_Boolean MyHasBeenComputed;
|
||||
gp_Pnt2d MyParOnS1bis;
|
||||
gp_Pnt2d MyParOnS2bis;
|
||||
gp_Pnt MyPntbis;
|
||||
gp_Vec2d MyTguv1bis;
|
||||
gp_Vec2d MyTguv2bis;
|
||||
gp_Vec MyTgbis;
|
||||
Standard_Boolean MyIsTangentbis;
|
||||
Standard_Boolean MyHasBeenComputedbis;
|
||||
GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox MyIntersectionOn2S;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_ThePrmPrmSvSurfacesOfWLApprox_HeaderFile
|
||||
|
@@ -24,7 +24,6 @@
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
|
||||
|
||||
#define ThePSurface Handle(Adaptor3d_Surface)
|
||||
#define ThePSurface_hxx <Adaptor3d_Surface.hxx>
|
||||
@@ -36,10 +35,11 @@
|
||||
#define ApproxInt_TheInt2S GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox
|
||||
#define ApproxInt_TheInt2S_hxx <GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx>
|
||||
#define ApproxInt_TheFunctionOfTheInt2S GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox
|
||||
#define ApproxInt_TheFunctionOfTheInt2S_hxx <GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx>
|
||||
#define ApproxInt_TheFunctionOfTheInt2S_hxx \
|
||||
<GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx>
|
||||
#define ApproxInt_TheFunctionOfTheInt2S GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox
|
||||
#define ApproxInt_TheFunctionOfTheInt2S_hxx <GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx>
|
||||
#define ApproxInt_TheFunctionOfTheInt2S_hxx \
|
||||
<GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx>
|
||||
#define ApproxInt_PrmPrmSvSurfaces GeomInt_ThePrmPrmSvSurfacesOfWLApprox
|
||||
#define ApproxInt_PrmPrmSvSurfaces_hxx <GeomInt_ThePrmPrmSvSurfacesOfWLApprox.hxx>
|
||||
#include "../ApproxInt/ApproxInt_PrmPrmSvSurfaces.gxx"
|
||||
|
||||
|
@@ -29,85 +29,72 @@ class IntSurf_Quadric;
|
||||
class IntSurf_QuadricTool;
|
||||
class math_Matrix;
|
||||
|
||||
class GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox : public math_FunctionSetWithDerivatives
|
||||
class GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox : public math_FunctionSetWithDerivatives
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox();
|
||||
|
||||
Standard_EXPORT GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_Surface)& PS, const IntSurf_Quadric& IS);
|
||||
|
||||
|
||||
Standard_EXPORT GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox(
|
||||
const Handle(Adaptor3d_Surface)& PS,
|
||||
const IntSurf_Quadric& IS);
|
||||
|
||||
Standard_EXPORT GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox(const IntSurf_Quadric& IS);
|
||||
|
||||
void Set (const Handle(Adaptor3d_Surface)& PS);
|
||||
|
||||
void SetImplicitSurface (const IntSurf_Quadric& IS);
|
||||
|
||||
void Set (const Standard_Real Tolerance);
|
||||
|
||||
|
||||
void Set(const Handle(Adaptor3d_Surface)& PS);
|
||||
|
||||
void SetImplicitSurface(const IntSurf_Quadric& IS);
|
||||
|
||||
void Set(const Standard_Real Tolerance);
|
||||
|
||||
Standard_EXPORT Standard_Integer NbVariables() const;
|
||||
|
||||
|
||||
Standard_EXPORT Standard_Integer NbEquations() const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D);
|
||||
|
||||
Standard_Real Root() const;
|
||||
|
||||
|
||||
Standard_EXPORT Standard_Boolean Value(const math_Vector& X, math_Vector& F);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Derivatives(const math_Vector& X, math_Matrix& D);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Values(const math_Vector& X, math_Vector& F, math_Matrix& D);
|
||||
|
||||
Standard_Real Root() const;
|
||||
|
||||
//! Returns the value Tol so that if Abs(Func.Root())<Tol
|
||||
//! the function is considered null.
|
||||
Standard_Real Tolerance() const;
|
||||
|
||||
const gp_Pnt& Point() const;
|
||||
|
||||
Standard_Real Tolerance() const;
|
||||
|
||||
const gp_Pnt& Point() const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsTangent();
|
||||
|
||||
const gp_Vec& Direction3d();
|
||||
|
||||
const gp_Dir2d& Direction2d();
|
||||
|
||||
const Handle(Adaptor3d_Surface)& PSurface() const;
|
||||
|
||||
const IntSurf_Quadric& ISurface() const;
|
||||
|
||||
const gp_Vec& Direction3d();
|
||||
|
||||
const gp_Dir2d& Direction2d();
|
||||
|
||||
const Handle(Adaptor3d_Surface)& PSurface() const;
|
||||
|
||||
const IntSurf_Quadric& ISurface() const;
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Address surf;
|
||||
Standard_Address func;
|
||||
Standard_Real u;
|
||||
Standard_Real v;
|
||||
Standard_Real tol;
|
||||
gp_Pnt pntsol;
|
||||
Standard_Real valf;
|
||||
Standard_Real u;
|
||||
Standard_Real v;
|
||||
Standard_Real tol;
|
||||
gp_Pnt pntsol;
|
||||
Standard_Real valf;
|
||||
Standard_Boolean computed;
|
||||
Standard_Boolean tangent;
|
||||
Standard_Real tgdu;
|
||||
Standard_Real tgdv;
|
||||
gp_Vec gradient;
|
||||
Standard_Real tgdu;
|
||||
Standard_Real tgdv;
|
||||
gp_Vec gradient;
|
||||
Standard_Boolean derived;
|
||||
gp_Vec d1u;
|
||||
gp_Vec d1v;
|
||||
gp_Vec d3d;
|
||||
gp_Dir2d d2d;
|
||||
|
||||
|
||||
gp_Vec d1u;
|
||||
gp_Vec d1v;
|
||||
gp_Vec d3d;
|
||||
gp_Dir2d d2d;
|
||||
};
|
||||
|
||||
#define ThePSurface Handle(Adaptor3d_Surface)
|
||||
@@ -134,7 +121,4 @@ private:
|
||||
#undef IntImp_ZerImpFunc
|
||||
#undef IntImp_ZerImpFunc_hxx
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox_HeaderFile
|
||||
|
@@ -25,7 +25,6 @@
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <gp_Dir2d.hxx>
|
||||
|
||||
|
||||
#define ThePSurface Handle(Adaptor3d_Surface)
|
||||
#define ThePSurface_hxx <Adaptor3d_Surface.hxx>
|
||||
@@ -38,4 +37,3 @@
|
||||
#define IntImp_ZerImpFunc GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox
|
||||
#define IntImp_ZerImpFunc_hxx <GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox.hxx>
|
||||
#include "../IntImp/IntImp_ZerImpFunc.gxx"
|
||||
|
||||
|
@@ -41,77 +41,97 @@ class GeomInt_TheComputeLineBezierOfWLApprox;
|
||||
class GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox;
|
||||
class AppParCurves_MultiBSpCurve;
|
||||
|
||||
class GeomInt_WLApprox
|
||||
class GeomInt_WLApprox
|
||||
{
|
||||
private:
|
||||
struct Approx_Data
|
||||
struct Approx_Data
|
||||
{
|
||||
Approx_Data () : myBezierApprox (Standard_True),
|
||||
Xo (0.0), Yo (0.0), Zo (0.0),
|
||||
U1o (0.0), V1o (0.0), U2o (0.0), V2o (0.0),
|
||||
ApproxXYZ (Standard_True),
|
||||
ApproxU1V1 (Standard_True),
|
||||
ApproxU2V2 (Standard_True),
|
||||
indicemin (0), indicemax (0),
|
||||
myNbPntMax (30), parametrization (Approx_ChordLength)
|
||||
Approx_Data()
|
||||
: myBezierApprox(Standard_True),
|
||||
Xo(0.0),
|
||||
Yo(0.0),
|
||||
Zo(0.0),
|
||||
U1o(0.0),
|
||||
V1o(0.0),
|
||||
U2o(0.0),
|
||||
V2o(0.0),
|
||||
ApproxXYZ(Standard_True),
|
||||
ApproxU1V1(Standard_True),
|
||||
ApproxU2V2(Standard_True),
|
||||
indicemin(0),
|
||||
indicemax(0),
|
||||
myNbPntMax(30),
|
||||
parametrization(Approx_ChordLength)
|
||||
{
|
||||
}
|
||||
|
||||
Standard_Boolean myBezierApprox;
|
||||
Standard_Real Xo, Yo, Zo, U1o, V1o, U2o, V2o;
|
||||
Standard_Boolean ApproxXYZ, ApproxU1V1, ApproxU2V2;
|
||||
Standard_Integer indicemin, indicemax, myNbPntMax;
|
||||
Standard_Boolean myBezierApprox;
|
||||
Standard_Real Xo, Yo, Zo, U1o, V1o, U2o, V2o;
|
||||
Standard_Boolean ApproxXYZ, ApproxU1V1, ApproxU2V2;
|
||||
Standard_Integer indicemin, indicemax, myNbPntMax;
|
||||
Approx_ParametrizationType parametrization;
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT GeomInt_WLApprox();
|
||||
|
||||
Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor3d_Surface)& Surf2, const Handle(IntPatch_WLine)& aLine, const Standard_Boolean ApproxXYZ = Standard_True, const Standard_Boolean ApproxU1V1 = Standard_True, const Standard_Boolean ApproxU2V2 = Standard_True, const Standard_Integer indicemin = 0, const Standard_Integer indicemax = 0);
|
||||
|
||||
Standard_EXPORT void Perform (const Handle(IntPatch_WLine)& aLine, const Standard_Boolean ApproxXYZ = Standard_True, const Standard_Boolean ApproxU1V1 = Standard_True, const Standard_Boolean ApproxU2V2 = Standard_True, const Standard_Integer indicemin = 0, const Standard_Integer indicemax = 0);
|
||||
|
||||
Standard_EXPORT
|
||||
void SetParameters (const Standard_Real Tol3d, const Standard_Real Tol2d,
|
||||
const Standard_Integer DegMin,
|
||||
const Standard_Integer DegMax,
|
||||
const Standard_Integer NbIterMax,
|
||||
const Standard_Integer NbPntMax = 30,
|
||||
const Standard_Boolean ApproxWithTangency = Standard_True,
|
||||
const Approx_ParametrizationType
|
||||
Parametrization = Approx_ChordLength);
|
||||
|
||||
Standard_EXPORT void Perform(const Handle(Adaptor3d_Surface)& Surf1,
|
||||
const Handle(Adaptor3d_Surface)& Surf2,
|
||||
const Handle(IntPatch_WLine)& aLine,
|
||||
const Standard_Boolean ApproxXYZ = Standard_True,
|
||||
const Standard_Boolean ApproxU1V1 = Standard_True,
|
||||
const Standard_Boolean ApproxU2V2 = Standard_True,
|
||||
const Standard_Integer indicemin = 0,
|
||||
const Standard_Integer indicemax = 0);
|
||||
|
||||
Standard_EXPORT void Perform(const Handle(IntPatch_WLine)& aLine,
|
||||
const Standard_Boolean ApproxXYZ = Standard_True,
|
||||
const Standard_Boolean ApproxU1V1 = Standard_True,
|
||||
const Standard_Boolean ApproxU2V2 = Standard_True,
|
||||
const Standard_Integer indicemin = 0,
|
||||
const Standard_Integer indicemax = 0);
|
||||
|
||||
Standard_EXPORT void SetParameters(
|
||||
const Standard_Real Tol3d,
|
||||
const Standard_Real Tol2d,
|
||||
const Standard_Integer DegMin,
|
||||
const Standard_Integer DegMax,
|
||||
const Standard_Integer NbIterMax,
|
||||
const Standard_Integer NbPntMax = 30,
|
||||
const Standard_Boolean ApproxWithTangency = Standard_True,
|
||||
const Approx_ParametrizationType Parametrization = Approx_ChordLength);
|
||||
Standard_EXPORT void Perform();
|
||||
|
||||
|
||||
Standard_EXPORT Standard_Real TolReached3d() const;
|
||||
|
||||
|
||||
Standard_EXPORT Standard_Real TolReached2d() const;
|
||||
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsDone() const;
|
||||
|
||||
|
||||
Standard_EXPORT Standard_Integer NbMultiCurves() const;
|
||||
|
||||
Standard_EXPORT const AppParCurves_MultiBSpCurve& Value (const Standard_Integer Index) const;
|
||||
|
||||
Standard_EXPORT const AppParCurves_MultiBSpCurve& Value(const Standard_Integer Index) const;
|
||||
|
||||
Standard_EXPORT static void Parameters(const GeomInt_TheMultiLineOfWLApprox& Line,
|
||||
const Standard_Integer firstP,
|
||||
const Standard_Integer lastP,
|
||||
const Approx_ParametrizationType Par,
|
||||
math_Vector& TheParameters);
|
||||
|
||||
const Standard_Integer firstP,
|
||||
const Standard_Integer lastP,
|
||||
const Approx_ParametrizationType Par,
|
||||
math_Vector& TheParameters);
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
Standard_EXPORT void Perform (const IntSurf_Quadric& Surf1, const Handle(Adaptor3d_Surface)& Surf2, const Handle(IntPatch_WLine)& aLine, const Standard_Boolean ApproxXYZ, const Standard_Boolean ApproxU1V1, const Standard_Boolean ApproxU2V2, const Standard_Integer indicemin, const Standard_Integer indicemax, const Standard_Boolean isTheQuadFirst);
|
||||
|
||||
Standard_EXPORT void Perform(const IntSurf_Quadric& Surf1,
|
||||
const Handle(Adaptor3d_Surface)& Surf2,
|
||||
const Handle(IntPatch_WLine)& aLine,
|
||||
const Standard_Boolean ApproxXYZ,
|
||||
const Standard_Boolean ApproxU1V1,
|
||||
const Standard_Boolean ApproxU2V2,
|
||||
const Standard_Integer indicemin,
|
||||
const Standard_Integer indicemax,
|
||||
const Standard_Boolean isTheQuadFirst);
|
||||
|
||||
Standard_EXPORT void UpdateTolReached();
|
||||
|
||||
//! Fill data structure for intersection approximation.
|
||||
@@ -126,32 +146,25 @@ private:
|
||||
|
||||
//! Build knot sequence.
|
||||
Standard_EXPORT void buildKnots(const Handle(IntPatch_WLine)& theline,
|
||||
const Standard_Address thePtrSVSurf);
|
||||
const Standard_Address thePtrSVSurf);
|
||||
|
||||
//! Build curve.
|
||||
Standard_EXPORT void buildCurve(const Handle(IntPatch_WLine)& theline,
|
||||
const Standard_Address thePtrSVSurf);
|
||||
const Standard_Address thePtrSVSurf);
|
||||
|
||||
GeomInt_TheComputeLineOfWLApprox myComputeLine;
|
||||
GeomInt_TheComputeLineOfWLApprox myComputeLine;
|
||||
GeomInt_TheComputeLineBezierOfWLApprox myComputeLineBezier;
|
||||
Approx_MCurvesToBSpCurve myBezToBSpl;
|
||||
Standard_Boolean myWithTangency;
|
||||
Standard_Real myTol3d;
|
||||
Standard_Real myTol2d;
|
||||
Standard_Integer myDegMin;
|
||||
Standard_Integer myDegMax;
|
||||
Standard_Integer myNbIterMax;
|
||||
Standard_Real myTolReached3d;
|
||||
Standard_Real myTolReached2d;
|
||||
Approx_Data myData;
|
||||
NCollection_Vector<Standard_Integer> myKnots;
|
||||
|
||||
Approx_MCurvesToBSpCurve myBezToBSpl;
|
||||
Standard_Boolean myWithTangency;
|
||||
Standard_Real myTol3d;
|
||||
Standard_Real myTol2d;
|
||||
Standard_Integer myDegMin;
|
||||
Standard_Integer myDegMax;
|
||||
Standard_Integer myNbIterMax;
|
||||
Standard_Real myTolReached3d;
|
||||
Standard_Real myTolReached2d;
|
||||
Approx_Data myData;
|
||||
NCollection_Vector<Standard_Integer> myKnots;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomInt_WLApprox_HeaderFile
|
||||
|
@@ -35,7 +35,6 @@
|
||||
#include <GeomInt_TheComputeLineBezierOfWLApprox.hxx>
|
||||
#include <GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#include <AppParCurves_MultiBSpCurve.hxx>
|
||||
|
||||
|
||||
#define ThePSurface Handle(Adaptor3d_Surface)
|
||||
#define ThePSurface_hxx <Adaptor3d_Surface.hxx>
|
||||
@@ -51,15 +50,21 @@
|
||||
#define ApproxInt_ThePrmPrmSvSurfaces GeomInt_ThePrmPrmSvSurfacesOfWLApprox
|
||||
#define ApproxInt_ThePrmPrmSvSurfaces_hxx <GeomInt_ThePrmPrmSvSurfacesOfWLApprox.hxx>
|
||||
#define ApproxInt_TheInt2SOfThePrmPrmSvSurfaces GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox
|
||||
#define ApproxInt_TheInt2SOfThePrmPrmSvSurfaces_hxx <GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx>
|
||||
#define ApproxInt_TheInt2SOfThePrmPrmSvSurfaces_hxx \
|
||||
<GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx>
|
||||
#define ApproxInt_TheInt2SOfThePrmPrmSvSurfaces GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox
|
||||
#define ApproxInt_TheInt2SOfThePrmPrmSvSurfaces_hxx <GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx>
|
||||
#define ApproxInt_TheInt2SOfThePrmPrmSvSurfaces_hxx \
|
||||
<GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx>
|
||||
#define ApproxInt_TheImpPrmSvSurfaces GeomInt_TheImpPrmSvSurfacesOfWLApprox
|
||||
#define ApproxInt_TheImpPrmSvSurfaces_hxx <GeomInt_TheImpPrmSvSurfacesOfWLApprox.hxx>
|
||||
#define ApproxInt_TheZerImpFuncOfTheImpPrmSvSurfaces GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox
|
||||
#define ApproxInt_TheZerImpFuncOfTheImpPrmSvSurfaces_hxx <GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox.hxx>
|
||||
#define ApproxInt_TheZerImpFuncOfTheImpPrmSvSurfaces GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox
|
||||
#define ApproxInt_TheZerImpFuncOfTheImpPrmSvSurfaces_hxx <GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox.hxx>
|
||||
#define ApproxInt_TheZerImpFuncOfTheImpPrmSvSurfaces \
|
||||
GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox
|
||||
#define ApproxInt_TheZerImpFuncOfTheImpPrmSvSurfaces_hxx \
|
||||
<GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox.hxx>
|
||||
#define ApproxInt_TheZerImpFuncOfTheImpPrmSvSurfaces \
|
||||
GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox
|
||||
#define ApproxInt_TheZerImpFuncOfTheImpPrmSvSurfaces_hxx \
|
||||
<GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox.hxx>
|
||||
#define ApproxInt_TheMultiLine GeomInt_TheMultiLineOfWLApprox
|
||||
#define ApproxInt_TheMultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
|
||||
#define ApproxInt_TheMultiLineTool GeomInt_TheMultiLineToolOfWLApprox
|
||||
@@ -67,20 +72,27 @@
|
||||
#define ApproxInt_TheComputeLine GeomInt_TheComputeLineOfWLApprox
|
||||
#define ApproxInt_TheComputeLine_hxx <GeomInt_TheComputeLineOfWLApprox.hxx>
|
||||
#define ApproxInt_MyBSplGradientOfTheComputeLine GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define ApproxInt_MyBSplGradientOfTheComputeLine_hxx <GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define ApproxInt_MyBSplGradientOfTheComputeLine_hxx \
|
||||
<GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define ApproxInt_MyGradientbisOfTheComputeLine GeomInt_MyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define ApproxInt_MyGradientbisOfTheComputeLine_hxx <GeomInt_MyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define ApproxInt_MyGradientbisOfTheComputeLine_hxx \
|
||||
<GeomInt_MyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define ApproxInt_MyBSplGradientOfTheComputeLine GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox
|
||||
#define ApproxInt_MyBSplGradientOfTheComputeLine_hxx <GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define ApproxInt_MyBSplGradientOfTheComputeLine_hxx \
|
||||
<GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox.hxx>
|
||||
#define ApproxInt_MyGradientbisOfTheComputeLine GeomInt_MyGradientbisOfTheComputeLineOfWLApprox
|
||||
#define ApproxInt_MyGradientbisOfTheComputeLine_hxx <GeomInt_MyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define ApproxInt_MyGradientbisOfTheComputeLine_hxx \
|
||||
<GeomInt_MyGradientbisOfTheComputeLineOfWLApprox.hxx>
|
||||
#define ApproxInt_TheComputeLineBezier GeomInt_TheComputeLineBezierOfWLApprox
|
||||
#define ApproxInt_TheComputeLineBezier_hxx <GeomInt_TheComputeLineBezierOfWLApprox.hxx>
|
||||
#define ApproxInt_MyGradientOfTheComputeLineBezier GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define ApproxInt_MyGradientOfTheComputeLineBezier_hxx <GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define ApproxInt_MyGradientOfTheComputeLineBezier GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define ApproxInt_MyGradientOfTheComputeLineBezier_hxx <GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define ApproxInt_MyGradientOfTheComputeLineBezier \
|
||||
GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define ApproxInt_MyGradientOfTheComputeLineBezier_hxx \
|
||||
<GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define ApproxInt_MyGradientOfTheComputeLineBezier \
|
||||
GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox
|
||||
#define ApproxInt_MyGradientOfTheComputeLineBezier_hxx \
|
||||
<GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox.hxx>
|
||||
#define ApproxInt_Approx GeomInt_WLApprox
|
||||
#define ApproxInt_Approx_hxx <GeomInt_WLApprox.hxx>
|
||||
#include "../ApproxInt/ApproxInt_Approx.gxx"
|
||||
|
||||
|
Reference in New Issue
Block a user