OCC.Core.AppDef module

AppDef module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_appdef.html

class AppDef_Array1OfMultiPointConstraint(*args)

Bases: object

Assign()
ChangeFirst()
ChangeLast()
ChangeValue()
First()
Init()
IsAllocated()
IsDeletable()
IsEmpty()
Last()
Length()
Lower()
Move()
Resize()
Set()
SetValue()
Size()
Upper()
Value()
begin()
cbegin()
cend()
end()
next()
property thisown

The membership flag

class AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute(*args)

Bases: OCC.Core.math.math_BFGS

Parameters

F

type F

math_MultipleVarFunctionWithGradient

param StartingPoint

type StartingPoint

math_Vector

param Tolerance3d

type Tolerance3d

float

param Tolerance2d

type Tolerance2d

float

param Eps

type Eps

float

param NbIterations

default value is 200

type NbIterations

int

rtype

None

property thisown

The membership flag

class AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute(*args)

Bases: OCC.Core.math.math_MultipleVarFunctionWithGradient

  • initializes the fields of the function. The approximating curve has <NbPol> control points.
    param SSP

    type SSP

    AppDef_MultiLine

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param TheConstraints

    type TheConstraints

    AppParCurves_HArray1OfConstraintCouple

    param Parameters

    type Parameters

    math_Vector

    param Knots

    type Knots

    TColStd_Array1OfReal

    param Mults

    type Mults

    TColStd_Array1OfInteger

    param NbPol

    type NbPol

    int

    rtype

    None

CurveValue()
  • returns the MultiBSpCurve approximating the set after computing the value F or Grad(F).
    rtype

    AppParCurves_MultiBSpCurve

DerivativeFunctionMatrix()
  • returns the derivative function matrix used to approximate the multiline.
    rtype

    math_Matrix

Error()
  • returns the distance between the MultiPoint of range IPoint and the curve CurveIndex.
    param IPoint

    type IPoint

    int

    param CurveIndex

    type CurveIndex

    int

    rtype

    float

FirstConstraint()
Parameters

TheConstraints

type TheConstraints

AppParCurves_HArray1OfConstraintCouple

param FirstPoint

type FirstPoint

int

rtype

AppParCurves_Constraint

FunctionMatrix()
  • returns the function matrix used to approximate the multiline.
    rtype

    math_Matrix

Index()
  • 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.
    rtype

    math_IntegerVector

LastConstraint()
Parameters

TheConstraints

type TheConstraints

AppParCurves_HArray1OfConstraintCouple

param LastPoint

type LastPoint

int

rtype

AppParCurves_Constraint

MaxError2d()
  • returns the maximum distance between the points and the MultiBSpCurve.
    rtype

    float

MaxError3d()
  • returns the maximum distance between the points and the MultiBSpCurve.
    rtype

    float

NewParameters()
  • returns the new parameters of the MultiLine.
    rtype

    math_Vector

SetFirstLambda()
Parameters

l1

type l1

float

rtype

None

SetLastLambda()
Parameters

l2

type l2

float

rtype

None

property thisown

The membership flag

class AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute(*args)

Bases: object

  • 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 point, the value of the tangency or curvature is computed in the resolution. NbPol is the number of control points wanted for the approximating curves. The system to solve is the following: A X = B. Where A is the Bernstein matrix computed with the parameters, B the points coordinates and X the poles solutions. The matrix A is the same for each coordinate x, y and z 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).
    param SSP

    type SSP

    AppDef_MultiLine

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param FirstCons

    type FirstCons

    AppParCurves_Constraint

    param LastCons

    type LastCons

    AppParCurves_Constraint

    param Parameters

    type Parameters

    math_Vector

    param NbPol

    type NbPol

    int

    rtype

    None* Initializes the fields of the object.

    param SSP

    type SSP

    AppDef_MultiLine

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param FirstCons

    type FirstCons

    AppParCurves_Constraint

    param LastCons

    type LastCons

    AppParCurves_Constraint

    param NbPol

    type NbPol

    int

    rtype

    None* 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 point, the value of the tangency or curvature is computed in the resolution. Deg is the degree wanted for the approximating curves. The system to solve is the following: A X = B. Where A is the BSpline functions matrix computed with <parameters>, B the points coordinates and X the poles solutions. The matrix A is the same for each coordinate x, y and z 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).

    param SSP

    type SSP

    AppDef_MultiLine

    param Knots

    type Knots

    TColStd_Array1OfReal

    param Mults

    type Mults

    TColStd_Array1OfInteger

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param FirstCons

    type FirstCons

    AppParCurves_Constraint

    param LastCons

    type LastCons

    AppParCurves_Constraint

    param Parameters

    type Parameters

    math_Vector

    param NbPol

    type NbPol

    int

    rtype

    None* Initializes the fields of the object.

    param SSP

    type SSP

    AppDef_MultiLine

    param Knots

    type Knots

    TColStd_Array1OfReal

    param Mults

    type Mults

    TColStd_Array1OfInteger

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param FirstCons

    type FirstCons

    AppParCurves_Constraint

    param LastCons

    type LastCons

    AppParCurves_Constraint

    param NbPol

    type NbPol

    int

    rtype

    None

BSplineValue()
  • returns the result of the approximation, i.e. all the Curves. An exception is raised if NotDone.
    rtype

    AppParCurves_MultiBSpCurve

BezierValue()
  • returns the result of the approximation, i.e. all the Curves. An exception is raised if NotDone.
    rtype

    AppParCurves_MultiCurve

DerivativeFunctionMatrix()
  • returns the derivative function matrix used to approximate the set.
    rtype

    math_Matrix

Distance()
  • returns the distances between the points of the multiline and the approximation curves.
    rtype

    math_Matrix

Error()
  • returns the maximum errors between the MultiLine and the approximation curves. F is the sum of the square distances.
    param F

    type F

    float

    param MaxE3d

    type MaxE3d

    float

    param MaxE2d

    type MaxE2d

    float

    rtype

    None

ErrorGradient()
  • 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.
    param Grad

    type Grad

    math_Vector

    param F

    type F

    float

    param MaxE3d

    type MaxE3d

    float

    param MaxE2d

    type MaxE2d

    float

    rtype

    None

FirstLambda()
  • returns the value (P2 - P1)/ V1 if the first point was a tangency point.
    rtype

    float

FunctionMatrix()
  • returns the function matrix used to approximate the set.
    rtype

    math_Matrix

IsDone()
  • returns True if all has been correctly done.
    rtype

    bool

KIndex()
  • 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.
    rtype

    math_IntegerVector

LastLambda()
  • returns the value (PN - PN-1)/ VN if the last point was a tangency point.
    rtype

    float

Perform()
  • Is used after having initialized the fields. The case ‘CurvaturePoint’ is not treated in this method.
    param Parameters

    type Parameters

    math_Vector

    rtype

    None* Is used after having initialized the fields.

    param Parameters

    type Parameters

    math_Vector

    param l1

    type l1

    float

    param l2

    type l2

    float

    rtype

    None* 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.

    param Parameters

    type Parameters

    math_Vector

    param V1t

    type V1t

    math_Vector

    param V2t

    type V2t

    math_Vector

    param l1

    type l1

    float

    param l2

    type l2

    float

    rtype

    None* 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.

    param Parameters

    type Parameters

    math_Vector

    param V1t

    type V1t

    math_Vector

    param V2t

    type V2t

    math_Vector

    param V1c

    type V1c

    math_Vector

    param V2c

    type V2c

    math_Vector

    param l1

    type l1

    float

    param l2

    type l2

    float

    rtype

    None

Points()
  • returns the matrix of points value.
    rtype

    math_Matrix

Poles()
  • returns the matrix of resulting control points value.
    rtype

    math_Matrix

property thisown

The membership flag

class AppDef_BSplineCompute(*args)

Bases: object

  • 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. //! The multiplicities of the internal knots is set by default.
    param Line

    type Line

    AppDef_MultiLine

    param degreemin

    default value is 4

    type degreemin

    int

    param degreemax

    default value is 8

    type degreemax

    int

    param Tolerance3d

    default value is 1.0e-3

    type Tolerance3d

    float

    param Tolerance2d

    default value is 1.0e-6

    type Tolerance2d

    float

    param NbIterations

    default value is 5

    type NbIterations

    int

    param cutting

    default value is Standard_True

    type cutting

    bool

    param parametrization

    default value is Approx_ChordLength

    type parametrization

    Approx_ParametrizationType

    param Squares

    default value is Standard_False

    type Squares

    bool

    rtype

    None* 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.

    param Line

    type Line

    AppDef_MultiLine

    param Parameters

    type Parameters

    math_Vector

    param degreemin

    default value is 4

    type degreemin

    int

    param degreemax

    default value is 8

    type degreemax

    int

    param Tolerance3d

    default value is 1.0e-03

    type Tolerance3d

    float

    param Tolerance2d

    default value is 1.0e-06

    type Tolerance2d

    float

    param NbIterations

    default value is 5

    type NbIterations

    int

    param cutting

    default value is Standard_True

    type cutting

    bool

    param Squares

    default value is Standard_False

    type Squares

    bool

    rtype

    None* Initializes the fields of the algorithm.

    param Parameters

    type Parameters

    math_Vector

    param degreemin

    default value is 4

    type degreemin

    int

    param degreemax

    default value is 8

    type degreemax

    int

    param Tolerance3d

    default value is 1.0e-03

    type Tolerance3d

    float

    param Tolerance2d

    default value is 1.0e-06

    type Tolerance2d

    float

    param NbIterations

    default value is 5

    type NbIterations

    int

    param cutting

    default value is Standard_True

    type cutting

    bool

    param Squares

    default value is Standard_False

    type Squares

    bool

    rtype

    None* Initializes the fields of the algorithm.

    param degreemin

    default value is 4

    type degreemin

    int

    param degreemax

    default value is 8

    type degreemax

    int

    param Tolerance3d

    default value is 1.0e-03

    type Tolerance3d

    float

    param Tolerance2d

    default value is 1.0e-06

    type Tolerance2d

    float

    param NbIterations

    default value is 5

    type NbIterations

    int

    param cutting

    default value is Standard_True

    type cutting

    bool

    param parametrization

    default value is Approx_ChordLength

    type parametrization

    Approx_ParametrizationType

    param Squares

    default value is Standard_False

    type Squares

    bool

    rtype

    None

ChangeValue()
  • returns the result of the approximation.
    rtype

    AppParCurves_MultiBSpCurve

Error()
  • returns the tolerances 2d and 3d of the MultiBSpCurve.
    param tol3d

    type tol3d

    float

    param tol2d

    type tol2d

    float

    rtype

    None

Init()
  • Initializes the fields of the algorithm.
    param degreemin

    default value is 4

    type degreemin

    int

    param degreemax

    default value is 8

    type degreemax

    int

    param Tolerance3d

    default value is 1.0e-03

    type Tolerance3d

    float

    param Tolerance2d

    default value is 1.0e-06

    type Tolerance2d

    float

    param NbIterations

    default value is 5

    type NbIterations

    int

    param cutting

    default value is Standard_True

    type cutting

    bool

    param parametrization

    default value is Approx_ChordLength

    type parametrization

    Approx_ParametrizationType

    param Squares

    default value is Standard_False

    type Squares

    bool

    rtype

    None

Interpol()
  • Constructs an interpolation of the MultiLine <Line> The result will be a C2 curve of degree 3.
    param Line

    type Line

    AppDef_MultiLine

    rtype

    None

IsAllApproximated()
  • returns False if at a moment of the approximation, the status NoApproximation has been sent by the user when more points were needed.
    rtype

    bool

IsToleranceReached()
  • returns False if the status NoPointsAdded has been sent.
    rtype

    bool

Parameters()
  • returns the new parameters of the approximation corresponding to the points of the MultiBSpCurve.
    rtype

    TColStd_Array1OfReal

Perform()
  • runs the algorithm after having initialized the fields.
    param Line

    type Line

    AppDef_MultiLine

    rtype

    None

SetConstraints()
  • changes the first and the last constraint points.
    param firstC

    type firstC

    AppParCurves_Constraint

    param lastC

    type lastC

    AppParCurves_Constraint

    rtype

    None

SetContinuity()
  • sets the continuity of the spline. if C = 2, the spline will be C2.
    param C

    type C

    int

    rtype

    None

SetDegrees()
  • changes the degrees of the approximation.
    param degreemin

    type degreemin

    int

    param degreemax

    type degreemax

    int

    rtype

    None

SetKnots()
  • The approximation will be done with the set of knots <Knots>. The multiplicities will be set with the degree and the desired continuity.
    param Knots

    type Knots

    TColStd_Array1OfReal

    rtype

    None

SetKnotsAndMultiplicities()
  • The approximation will be done with the set of knots <Knots> and the multiplicities <Mults>.
    param Knots

    type Knots

    TColStd_Array1OfReal

    param Mults

    type Mults

    TColStd_Array1OfInteger

    rtype

    None

SetParameters()
  • The approximation will begin with the set of parameters <ThePar>.
    param ThePar

    type ThePar

    math_Vector

    rtype

    None

SetPeriodic()
  • Sets periodic flag. If thePeriodic = Standard_True, algorith tries to build periodic multicurve using corresponding C1 boundary condition for first and last multipoints. Multiline must be closed.
    param thePeriodic

    type thePeriodic

    bool

    rtype

    None

SetTolerances()
  • Changes the tolerances of the approximation.
    param Tolerance3d

    type Tolerance3d

    float

    param Tolerance2d

    type Tolerance2d

    float

    rtype

    None

Value()
  • returns the result of the approximation.
    rtype

    AppParCurves_MultiBSpCurve

property thisown

The membership flag

class AppDef_Compute(*args)

Bases: object

  • 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.
    param Line

    type Line

    AppDef_MultiLine

    param degreemin

    default value is 4

    type degreemin

    int

    param degreemax

    default value is 8

    type degreemax

    int

    param Tolerance3d

    default value is 1.0e-3

    type Tolerance3d

    float

    param Tolerance2d

    default value is 1.0e-6

    type Tolerance2d

    float

    param NbIterations

    default value is 5

    type NbIterations

    int

    param cutting

    default value is Standard_True

    type cutting

    bool

    param parametrization

    default value is Approx_ChordLength

    type parametrization

    Approx_ParametrizationType

    param Squares

    default value is Standard_False

    type Squares

    bool

    rtype

    None* 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.

    param Line

    type Line

    AppDef_MultiLine

    param Parameters

    type Parameters

    math_Vector

    param degreemin

    default value is 4

    type degreemin

    int

    param degreemax

    default value is 8

    type degreemax

    int

    param Tolerance3d

    default value is 1.0e-03

    type Tolerance3d

    float

    param Tolerance2d

    default value is 1.0e-06

    type Tolerance2d

    float

    param NbIterations

    default value is 5

    type NbIterations

    int

    param cutting

    default value is Standard_True

    type cutting

    bool

    param Squares

    default value is Standard_False

    type Squares

    bool

    rtype

    None* Initializes the fields of the algorithm.

    param Parameters

    type Parameters

    math_Vector

    param degreemin

    default value is 4

    type degreemin

    int

    param degreemax

    default value is 8

    type degreemax

    int

    param Tolerance3d

    default value is 1.0e-03

    type Tolerance3d

    float

    param Tolerance2d

    default value is 1.0e-06

    type Tolerance2d

    float

    param NbIterations

    default value is 5

    type NbIterations

    int

    param cutting

    default value is Standard_True

    type cutting

    bool

    param Squares

    default value is Standard_False

    type Squares

    bool

    rtype

    None* Initializes the fields of the algorithm.

    param degreemin

    default value is 4

    type degreemin

    int

    param degreemax

    default value is 8

    type degreemax

    int

    param Tolerance3d

    default value is 1.0e-03

    type Tolerance3d

    float

    param Tolerance2d

    default value is 1.0e-06

    type Tolerance2d

    float

    param NbIterations

    default value is 5

    type NbIterations

    int

    param cutting

    default value is Standard_True

    type cutting

    bool

    param parametrization

    default value is Approx_ChordLength

    type parametrization

    Approx_ParametrizationType

    param Squares

    default value is Standard_False

    type Squares

    bool

    rtype

    None

ChangeValue()
  • returns the result of the approximation.
    param Index

    default value is 1

    type Index

    int

    rtype

    AppParCurves_MultiCurve

Error()
  • returns the tolerances 2d and 3d of the <Index> MultiCurve.
    param Index

    type Index

    int

    param tol3d

    type tol3d

    float

    param tol2d

    type tol2d

    float

    rtype

    None

Init()
  • Initializes the fields of the algorithm.
    param degreemin

    default value is 4

    type degreemin

    int

    param degreemax

    default value is 8

    type degreemax

    int

    param Tolerance3d

    default value is 1.0e-03

    type Tolerance3d

    float

    param Tolerance2d

    default value is 1.0e-06

    type Tolerance2d

    float

    param NbIterations

    default value is 5

    type NbIterations

    int

    param cutting

    default value is Standard_True

    type cutting

    bool

    param parametrization

    default value is Approx_ChordLength

    type parametrization

    Approx_ParametrizationType

    param Squares

    default value is Standard_False

    type Squares

    bool

    rtype

    None

IsAllApproximated()
  • returns False if at a moment of the approximation, the status NoApproximation has been sent by the user when more points were needed.
    rtype

    bool

IsToleranceReached()
  • returns False if the status NoPointsAdded has been sent.
    rtype

    bool

NbMultiCurves()
  • Returns the number of MultiCurve doing the approximation of the MultiLine.
    rtype

    int

Parameters()
  • returns the new parameters of the approximation corresponding to the points of the multicurve <Index>.
    param Index

    default value is 1

    type Index

    int

    rtype

    TColStd_Array1OfReal

Parametrization()
  • returns the type of parametrization
    rtype

    Approx_ParametrizationType

Perform()
  • runs the algorithm after having initialized the fields.
    param Line

    type Line

    AppDef_MultiLine

    rtype

    None

SetConstraints()
  • changes the first and the last constraint points.
    param firstC

    type firstC

    AppParCurves_Constraint

    param lastC

    type lastC

    AppParCurves_Constraint

    rtype

    None

SetDegrees()
  • changes the degrees of the approximation.
    param degreemin

    type degreemin

    int

    param degreemax

    type degreemax

    int

    rtype

    None

SetTolerances()
  • Changes the tolerances of the approximation.
    param Tolerance3d

    type Tolerance3d

    float

    param Tolerance2d

    type Tolerance2d

    float

    rtype

    None

SplineValue()
  • returns the result of the approximation.
    rtype

    AppParCurves_MultiBSpCurve

Value()
  • returns the result of the approximation.
    param Index

    default value is 1

    type Index

    int

    rtype

    AppParCurves_MultiCurve

property thisown

The membership flag

class AppDef_Gradient_BFGSOfMyGradientOfCompute(*args)

Bases: OCC.Core.math.math_BFGS

Parameters

F

type F

math_MultipleVarFunctionWithGradient

param StartingPoint

type StartingPoint

math_Vector

param Tolerance3d

type Tolerance3d

float

param Tolerance2d

type Tolerance2d

float

param Eps

type Eps

float

param NbIterations

default value is 200

type NbIterations

int

rtype

None

property thisown

The membership flag

class AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute(*args)

Bases: OCC.Core.math.math_BFGS

Parameters

F

type F

math_MultipleVarFunctionWithGradient

param StartingPoint

type StartingPoint

math_Vector

param Tolerance3d

type Tolerance3d

float

param Tolerance2d

type Tolerance2d

float

param Eps

type Eps

float

param NbIterations

default value is 200

type NbIterations

int

rtype

None

property thisown

The membership flag

class AppDef_Gradient_BFGSOfTheGradient(*args)

Bases: OCC.Core.math.math_BFGS

Parameters

F

type F

math_MultipleVarFunctionWithGradient

param StartingPoint

type StartingPoint

math_Vector

param Tolerance3d

type Tolerance3d

float

param Tolerance2d

type Tolerance2d

float

param Eps

type Eps

float

param NbIterations

default value is 200

type NbIterations

int

rtype

None

property thisown

The membership flag

class AppDef_HArray1OfMultiPointConstraint(*args)

Bases: OCC.Core.AppDef.AppDef_Array1OfMultiPointConstraint, OCC.Core.Standard.Standard_Transient

  • Empty constructor

Return type

None* Copy constructor – does nothing

Parameters

& (Standard_Transient) –

Return type

None

Array1()
ChangeArray1()
static DownCast(t)
property thisown

The membership flag

class AppDef_LinearCriteria(*args)

Bases: OCC.Core.AppDef.AppDef_SmoothCriterion

Parameters

SSP

type SSP

AppDef_MultiLine

param FirstPoint

type FirstPoint

int

param LastPoint

type LastPoint

int

rtype

None

static DownCast(t)
GetEstLength(AppDef_LinearCriteria self) → Standard_Real
SetEstLength(AppDef_LinearCriteria self, Standard_Real value)
SetWeight()
Parameters

QuadraticWeight

type QuadraticWeight

float

param QualityWeight

type QualityWeight

float

param percentJ1

type percentJ1

float

param percentJ2

type percentJ2

float

param percentJ3

type percentJ3

float

rtype

None:param Weight:

type Weight

TColStd_Array1OfReal

rtype

None

property thisown

The membership flag

class AppDef_MultiLine(*args)

Bases: object

  • creates an undefined MultiLine.
    rtype

    None* given the number NbMult of MultiPointConstraints of this MultiLine , it initializes all the fields.SetValue must be called in order for the values of the multipoint constraint to be taken into account. An exception is raised if NbMult < 0.

    param NbMult

    type NbMult

    int

    rtype

    None* Constructs a MultiLine with an array of MultiPointConstraints.

    param tabMultiP

    type tabMultiP

    AppDef_Array1OfMultiPointConstraint

    rtype

    None* The MultiLine constructed will have one line of 3d points without their tangencies.

    param tabP3d

    type tabP3d

    TColgp_Array1OfPnt

    rtype

    None* The MultiLine constructed will have one line of 2d points without their tangencies.

    param tabP2d

    type tabP2d

    TColgp_Array1OfPnt2d

    rtype

    None

DumpToString(AppDef_MultiLine self) → std::string
NbMultiPoints()
  • returns the number of MultiPointConstraints of the MultiLine.
    rtype

    int

NbPoints()
  • returns the number of Points from MultiPoints composing the MultiLine.
    rtype

    int

SetValue()
  • It sets the MultiPointConstraint of range Index to the value MPoint. An exception is raised if Index < 0 or Index> MPoint. An exception is raised if the dimensions of the MultiPoints are different.
    param Index

    type Index

    int

    param MPoint

    type MPoint

    AppDef_MultiPointConstraint

    rtype

    None

Value()
  • returns the MultiPointConstraint of range Index An exception is raised if Index<0 or Index>MPoint.
    param Index

    type Index

    int

    rtype

    AppDef_MultiPointConstraint

property thisown

The membership flag

class AppDef_MultiPointConstraint(*args)

Bases: OCC.Core.AppParCurves.AppParCurves_MultiPoint

  • creates an undefined MultiPointConstraint.
    rtype

    None* constructs a set of Points used to approximate a Multiline. These Points can be of 2 or 3 dimensions. Points will be initialized with SetPoint and SetPoint2d.

    param NbPoints

    type NbPoints

    int

    param NbPoints2d

    type NbPoints2d

    int

    rtype

    None* creates a MultiPoint only composed of 3D points.

    param tabP

    type tabP

    TColgp_Array1OfPnt

    rtype

    None* creates a MultiPoint only composed of 2D points.

    param tabP

    type tabP

    TColgp_Array1OfPnt2d

    rtype

    None* constructs a set of Points used to approximate a Multiline. These Points can be of 2 or 3 dimensions. Points will be initialized with SetPoint and SetPoint2d.

    param tabP

    type tabP

    TColgp_Array1OfPnt

    param tabP2d

    type tabP2d

    TColgp_Array1OfPnt2d

    rtype

    None* creates a MultiPointConstraint with a constraint of Curvature. An exception is raised if (length of <tabP> + length of <tabP2d> ) is different from (length of <tabVec> + length of <tabVec2d> ) or from (length of <tabCur> + length of <tabCur2d> )

    param tabP

    type tabP

    TColgp_Array1OfPnt

    param tabP2d

    type tabP2d

    TColgp_Array1OfPnt2d

    param tabVec

    type tabVec

    TColgp_Array1OfVec

    param tabVec2d

    type tabVec2d

    TColgp_Array1OfVec2d

    param tabCur

    type tabCur

    TColgp_Array1OfVec

    param tabCur2d

    type tabCur2d

    TColgp_Array1OfVec2d

    rtype

    None* creates a MultiPointConstraint with a constraint of Tangency. An exception is raised if (length of <tabP> + length of <tabP2d> ) is different from (length of <tabVec> + length of <tabVec2d> )

    param tabP

    type tabP

    TColgp_Array1OfPnt

    param tabP2d

    type tabP2d

    TColgp_Array1OfPnt2d

    param tabVec

    type tabVec

    TColgp_Array1OfVec

    param tabVec2d

    type tabVec2d

    TColgp_Array1OfVec2d

    rtype

    None* creates a MultiPointConstraint only composed of 3d points with constraints of curvature. An exception is raised if the length of tabP is different from the length of tabVec or from tabCur.

    param tabP

    type tabP

    TColgp_Array1OfPnt

    param tabVec

    type tabVec

    TColgp_Array1OfVec

    param tabCur

    type tabCur

    TColgp_Array1OfVec

    rtype

    None* creates a MultiPointConstraint only composed of 3d points with constraints of tangency. An exception is raised if the length of tabP is different from the length of tabVec.

    param tabP

    type tabP

    TColgp_Array1OfPnt

    param tabVec

    type tabVec

    TColgp_Array1OfVec

    rtype

    None* creates a MultiPointConstraint only composed of 2d points with constraints of tangency. An exception is raised if the length of tabP is different from the length of tabVec2d.

    param tabP2d

    type tabP2d

    TColgp_Array1OfPnt2d

    param tabVec2d

    type tabVec2d

    TColgp_Array1OfVec2d

    rtype

    None* creates a MultiPointConstraint only composed of 2d points with constraints of curvature. An exception is raised if the length of tabP is different from the length of tabVec2d or from tabCur2d.

    param tabP2d

    type tabP2d

    TColgp_Array1OfPnt2d

    param tabVec2d

    type tabVec2d

    TColgp_Array1OfVec2d

    param tabCur2d

    type tabCur2d

    TColgp_Array1OfVec2d

    rtype

    None

Curv()
  • returns the normal vector at the point of range Index. An exception is raised if Index < 0 or if Index > number of 3d points.
    param Index

    type Index

    int

    rtype

    gp_Vec

Curv2d()
  • returns the normal vector at the point of range Index. An exception is raised if Index < 0 or if Index > number of 3d points.
    param Index

    type Index

    int

    rtype

    gp_Vec2d

DumpToString(AppDef_MultiPointConstraint self) → std::string
IsCurvaturePoint()
  • returns True if the MultiPoint has a curvature value.
    rtype

    bool

IsTangencyPoint()
  • returns True if the MultiPoint has a tangency value.
    rtype

    bool

SetCurv()
  • Vec sets the value of the normal vector at the point of index Index. The norm of the normal vector at the point of position Index is set to the normal curvature. An exception is raised if Index <0 or if Index > number of 3d points. An exception is raised if Curv has an incorrect number of dimensions.
    param Index

    type Index

    int

    param Curv

    type Curv

    gp_Vec

    rtype

    None

SetCurv2d()
  • Vec sets the value of the normal vector at the point of index Index. The norm of the normal vector at the point of position Index is set to the normal curvature. An exception is raised if Index <0 or if Index > number of 3d points. An exception is raised if Curv has an incorrect number of dimensions.
    param Index

    type Index

    int

    param Curv2d

    type Curv2d

    gp_Vec2d

    rtype

    None

SetTang()
  • sets the value of the tangency of the point of range Index. An exception is raised if Index <0 or if Index > number of 3d points. An exception is raised if Tang has an incorrect number of dimensions.
    param Index

    type Index

    int

    param Tang

    type Tang

    gp_Vec

    rtype

    None

SetTang2d()
  • sets the value of the tangency of the point of range Index. An exception is raised if Index <number of 3d points or if Index > total number of Points An exception is raised if Tang has an incorrect number of dimensions.
    param Index

    type Index

    int

    param Tang2d

    type Tang2d

    gp_Vec2d

    rtype

    None

Tang()
  • returns the tangency value of the point of range Index. An exception is raised if Index < 0 or if Index > number of 3d points.
    param Index

    type Index

    int

    rtype

    gp_Vec

Tang2d()
  • returns the tangency value of the point of range Index. An exception is raised if Index < number of 3d points or if Index > total number of points.
    param Index

    type Index

    int

    rtype

    gp_Vec2d

property thisown

The membership flag

class AppDef_MyBSplGradientOfBSplineCompute(*args)

Bases: object

  • 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.
    param SSP

    type SSP

    AppDef_MultiLine

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param TheConstraints

    type TheConstraints

    AppParCurves_HArray1OfConstraintCouple

    param Parameters

    type Parameters

    math_Vector

    param Knots

    type Knots

    TColStd_Array1OfReal

    param Mults

    type Mults

    TColStd_Array1OfInteger

    param Deg

    type Deg

    int

    param Tol3d

    type Tol3d

    float

    param Tol2d

    type Tol2d

    float

    param NbIterations

    default value is 1

    type NbIterations

    int

    rtype

    None* 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.

    param SSP

    type SSP

    AppDef_MultiLine

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param TheConstraints

    type TheConstraints

    AppParCurves_HArray1OfConstraintCouple

    param Parameters

    type Parameters

    math_Vector

    param Knots

    type Knots

    TColStd_Array1OfReal

    param Mults

    type Mults

    TColStd_Array1OfInteger

    param Deg

    type Deg

    int

    param Tol3d

    type Tol3d

    float

    param Tol2d

    type Tol2d

    float

    param NbIterations

    type NbIterations

    int

    param lambda1

    type lambda1

    float

    param lambda2

    type lambda2

    float

    rtype

    None

AverageError()
  • returns the average error between the old and the new approximation.
    rtype

    float

Error()
  • 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.
    param Index

    type Index

    int

    rtype

    float

IsDone()
  • returns True if all has been correctly done.
    rtype

    bool

MaxError2d()
  • returns the maximum difference between the old and the new approximation.
    rtype

    float

MaxError3d()
  • returns the maximum difference between the old and the new approximation.
    rtype

    float

Value()
  • returns all the BSpline curves approximating the MultiLine SSP after minimization of the parameter.
    rtype

    AppParCurves_MultiBSpCurve

property thisown

The membership flag

class AppDef_MyGradientOfCompute(*args)

Bases: object

  • 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.
    param SSP

    type SSP

    AppDef_MultiLine

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param TheConstraints

    type TheConstraints

    AppParCurves_HArray1OfConstraintCouple

    param Parameters

    type Parameters

    math_Vector

    param Deg

    type Deg

    int

    param Tol3d

    type Tol3d

    float

    param Tol2d

    type Tol2d

    float

    param NbIterations

    default value is 200

    type NbIterations

    int

    rtype

    None

AverageError()
  • returns the average error between the old and the new approximation.
    rtype

    float

Error()
  • 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.
    param Index

    type Index

    int

    rtype

    float

IsDone()
  • returns True if all has been correctly done.
    rtype

    bool

MaxError2d()
  • returns the maximum difference between the old and the new approximation.
    rtype

    float

MaxError3d()
  • returns the maximum difference between the old and the new approximation.
    rtype

    float

Value()
  • returns all the Bezier curves approximating the MultiLine SSP after minimization of the parameter.
    rtype

    AppParCurves_MultiCurve

property thisown

The membership flag

class AppDef_MyGradientbisOfBSplineCompute(*args)

Bases: object

  • 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.
    param SSP

    type SSP

    AppDef_MultiLine

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param TheConstraints

    type TheConstraints

    AppParCurves_HArray1OfConstraintCouple

    param Parameters

    type Parameters

    math_Vector

    param Deg

    type Deg

    int

    param Tol3d

    type Tol3d

    float

    param Tol2d

    type Tol2d

    float

    param NbIterations

    default value is 200

    type NbIterations

    int

    rtype

    None

AverageError()
  • returns the average error between the old and the new approximation.
    rtype

    float

Error()
  • 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.
    param Index

    type Index

    int

    rtype

    float

IsDone()
  • returns True if all has been correctly done.
    rtype

    bool

MaxError2d()
  • returns the maximum difference between the old and the new approximation.
    rtype

    float

MaxError3d()
  • returns the maximum difference between the old and the new approximation.
    rtype

    float

Value()
  • returns all the Bezier curves approximating the MultiLine SSP after minimization of the parameter.
    rtype

    AppParCurves_MultiCurve

property thisown

The membership flag

class AppDef_MyLineTool

Bases: object

static Curvature()
  • returns the 3d curvatures of the multipoint <MPointIndex> when only 3d points exist.
    param ML

    type ML

    AppDef_MultiLine

    param MPointIndex

    type MPointIndex

    int

    param tabV

    type tabV

    TColgp_Array1OfVec

    rtype

    bool* returns the 2d curvatures of the multipoint <MPointIndex> only when 2d points exist.

    param ML

    type ML

    AppDef_MultiLine

    param MPointIndex

    type MPointIndex

    int

    param tabV2d

    type tabV2d

    TColgp_Array1OfVec2d

    rtype

    bool* returns the 3d and 2d curvatures of the multipoint <MPointIndex>.

    param ML

    type ML

    AppDef_MultiLine

    param MPointIndex

    type MPointIndex

    int

    param tabV

    type tabV

    TColgp_Array1OfVec

    param tabV2d

    type tabV2d

    TColgp_Array1OfVec2d

    rtype

    bool

static FirstPoint()
  • Returns the first index of multipoints of the MultiLine.
    param ML

    type ML

    AppDef_MultiLine

    rtype

    int

static LastPoint()
  • Returns the last index of multipoints of the MultiLine.
    param ML

    type ML

    AppDef_MultiLine

    rtype

    int

static MakeMLBetween()
  • Is never called in the algorithms. Nothing is done.
    param ML

    type ML

    AppDef_MultiLine

    param I1

    type I1

    int

    param I2

    type I2

    int

    param NbPMin

    type NbPMin

    int

    rtype

    AppDef_MultiLine

static MakeMLOneMorePoint()
  • Is never called in the algorithms. Nothing is done.
    param ML

    type ML

    AppDef_MultiLine

    param I1

    type I1

    int

    param I2

    type I2

    int

    param indbad

    type indbad

    int

    param OtherLine

    type OtherLine

    AppDef_MultiLine

    rtype

    bool

static NbP2d()
  • Returns the number of 2d points of a MultiLine.
    param ML

    type ML

    AppDef_MultiLine

    rtype

    int

static NbP3d()
  • Returns the number of 3d points of a MultiLine.
    param ML

    type ML

    AppDef_MultiLine

    rtype

    int

static Tangency()
  • returns the 3d points of the multipoint <MPointIndex> when only 3d points exist.
    param ML

    type ML

    AppDef_MultiLine

    param MPointIndex

    type MPointIndex

    int

    param tabV

    type tabV

    TColgp_Array1OfVec

    rtype

    bool* returns the 2d tangency points of the multipoint <MPointIndex> only when 2d points exist.

    param ML

    type ML

    AppDef_MultiLine

    param MPointIndex

    type MPointIndex

    int

    param tabV2d

    type tabV2d

    TColgp_Array1OfVec2d

    rtype

    bool* returns the 3d and 2d points of the multipoint <MPointIndex>.

    param ML

    type ML

    AppDef_MultiLine

    param MPointIndex

    type MPointIndex

    int

    param tabV

    type tabV

    TColgp_Array1OfVec

    param tabV2d

    type tabV2d

    TColgp_Array1OfVec2d

    rtype

    bool

static Value()
  • returns the 3d points of the multipoint <MPointIndex> when only 3d points exist.
    param ML

    type ML

    AppDef_MultiLine

    param MPointIndex

    type MPointIndex

    int

    param tabPt

    type tabPt

    TColgp_Array1OfPnt

    rtype

    void* returns the 2d points of the multipoint <MPointIndex> when only 2d points exist.

    param ML

    type ML

    AppDef_MultiLine

    param MPointIndex

    type MPointIndex

    int

    param tabPt2d

    type tabPt2d

    TColgp_Array1OfPnt2d

    rtype

    void* returns the 3d and 2d points of the multipoint <MPointIndex>.

    param ML

    type ML

    AppDef_MultiLine

    param MPointIndex

    type MPointIndex

    int

    param tabPt

    type tabPt

    TColgp_Array1OfPnt

    param tabPt2d

    type tabPt2d

    TColgp_Array1OfPnt2d

    rtype

    void

static WhatStatus()
  • returns NoPointsAdded
    param ML

    type ML

    AppDef_MultiLine

    param I1

    type I1

    int

    param I2

    type I2

    int

    rtype

    Approx_Status

property thisown

The membership flag

class AppDef_ParFunctionOfMyGradientOfCompute(*args)

Bases: OCC.Core.math.math_MultipleVarFunctionWithGradient

  • initializes the fields of the function. The approximating curve has the desired degree Deg.
    param SSP

    type SSP

    AppDef_MultiLine

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param TheConstraints

    type TheConstraints

    AppParCurves_HArray1OfConstraintCouple

    param Parameters

    type Parameters

    math_Vector

    param Deg

    type Deg

    int

    rtype

    None

CurveValue()
  • returns the MultiCurve approximating the set after computing the value F or Grad(F).
    rtype

    AppParCurves_MultiCurve

Error()
  • returns the distance between the MultiPoint of range IPoint and the curve CurveIndex.
    param IPoint

    type IPoint

    int

    param CurveIndex

    type CurveIndex

    int

    rtype

    float

FirstConstraint()
Parameters

TheConstraints

type TheConstraints

AppParCurves_HArray1OfConstraintCouple

param FirstPoint

type FirstPoint

int

rtype

AppParCurves_Constraint

LastConstraint()
Parameters

TheConstraints

type TheConstraints

AppParCurves_HArray1OfConstraintCouple

param LastPoint

type LastPoint

int

rtype

AppParCurves_Constraint

MaxError2d()
  • returns the maximum distance between the points and the MultiCurve.
    rtype

    float

MaxError3d()
  • returns the maximum distance between the points and the MultiCurve.
    rtype

    float

NewParameters()
  • returns the new parameters of the MultiLine.
    rtype

    math_Vector

property thisown

The membership flag

class AppDef_ParFunctionOfMyGradientbisOfBSplineCompute(*args)

Bases: OCC.Core.math.math_MultipleVarFunctionWithGradient

  • initializes the fields of the function. The approximating curve has the desired degree Deg.
    param SSP

    type SSP

    AppDef_MultiLine

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param TheConstraints

    type TheConstraints

    AppParCurves_HArray1OfConstraintCouple

    param Parameters

    type Parameters

    math_Vector

    param Deg

    type Deg

    int

    rtype

    None

CurveValue()
  • returns the MultiCurve approximating the set after computing the value F or Grad(F).
    rtype

    AppParCurves_MultiCurve

Error()
  • returns the distance between the MultiPoint of range IPoint and the curve CurveIndex.
    param IPoint

    type IPoint

    int

    param CurveIndex

    type CurveIndex

    int

    rtype

    float

FirstConstraint()
Parameters

TheConstraints

type TheConstraints

AppParCurves_HArray1OfConstraintCouple

param FirstPoint

type FirstPoint

int

rtype

AppParCurves_Constraint

LastConstraint()
Parameters

TheConstraints

type TheConstraints

AppParCurves_HArray1OfConstraintCouple

param LastPoint

type LastPoint

int

rtype

AppParCurves_Constraint

MaxError2d()
  • returns the maximum distance between the points and the MultiCurve.
    rtype

    float

MaxError3d()
  • returns the maximum distance between the points and the MultiCurve.
    rtype

    float

NewParameters()
  • returns the new parameters of the MultiLine.
    rtype

    math_Vector

property thisown

The membership flag

class AppDef_ParFunctionOfTheGradient(*args)

Bases: OCC.Core.math.math_MultipleVarFunctionWithGradient

  • initializes the fields of the function. The approximating curve has the desired degree Deg.
    param SSP

    type SSP

    AppDef_MultiLine

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param TheConstraints

    type TheConstraints

    AppParCurves_HArray1OfConstraintCouple

    param Parameters

    type Parameters

    math_Vector

    param Deg

    type Deg

    int

    rtype

    None

CurveValue()
  • returns the MultiCurve approximating the set after computing the value F or Grad(F).
    rtype

    AppParCurves_MultiCurve

Error()
  • returns the distance between the MultiPoint of range IPoint and the curve CurveIndex.
    param IPoint

    type IPoint

    int

    param CurveIndex

    type CurveIndex

    int

    rtype

    float

FirstConstraint()
Parameters

TheConstraints

type TheConstraints

AppParCurves_HArray1OfConstraintCouple

param FirstPoint

type FirstPoint

int

rtype

AppParCurves_Constraint

LastConstraint()
Parameters

TheConstraints

type TheConstraints

AppParCurves_HArray1OfConstraintCouple

param LastPoint

type LastPoint

int

rtype

AppParCurves_Constraint

MaxError2d()
  • returns the maximum distance between the points and the MultiCurve.
    rtype

    float

MaxError3d()
  • returns the maximum distance between the points and the MultiCurve.
    rtype

    float

NewParameters()
  • returns the new parameters of the MultiLine.
    rtype

    math_Vector

property thisown

The membership flag

class AppDef_ParLeastSquareOfMyGradientOfCompute(*args)

Bases: object

  • 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 point, the value of the tangency or curvature is computed in the resolution. NbPol is the number of control points wanted for the approximating curves. The system to solve is the following: A X = B. Where A is the Bernstein matrix computed with the parameters, B the points coordinates and X the poles solutions. The matrix A is the same for each coordinate x, y and z 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).
    param SSP

    type SSP

    AppDef_MultiLine

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param FirstCons

    type FirstCons

    AppParCurves_Constraint

    param LastCons

    type LastCons

    AppParCurves_Constraint

    param Parameters

    type Parameters

    math_Vector

    param NbPol

    type NbPol

    int

    rtype

    None* Initializes the fields of the object.

    param SSP

    type SSP

    AppDef_MultiLine

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param FirstCons

    type FirstCons

    AppParCurves_Constraint

    param LastCons

    type LastCons

    AppParCurves_Constraint

    param NbPol

    type NbPol

    int

    rtype

    None* 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 point, the value of the tangency or curvature is computed in the resolution. Deg is the degree wanted for the approximating curves. The system to solve is the following: A X = B. Where A is the BSpline functions matrix computed with <parameters>, B the points coordinates and X the poles solutions. The matrix A is the same for each coordinate x, y and z 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).

    param SSP

    type SSP

    AppDef_MultiLine

    param Knots

    type Knots

    TColStd_Array1OfReal

    param Mults

    type Mults

    TColStd_Array1OfInteger

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param FirstCons

    type FirstCons

    AppParCurves_Constraint

    param LastCons

    type LastCons

    AppParCurves_Constraint

    param Parameters

    type Parameters

    math_Vector

    param NbPol

    type NbPol

    int

    rtype

    None* Initializes the fields of the object.

    param SSP

    type SSP

    AppDef_MultiLine

    param Knots

    type Knots

    TColStd_Array1OfReal

    param Mults

    type Mults

    TColStd_Array1OfInteger

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param FirstCons

    type FirstCons

    AppParCurves_Constraint

    param LastCons

    type LastCons

    AppParCurves_Constraint

    param NbPol

    type NbPol

    int

    rtype

    None

BSplineValue()
  • returns the result of the approximation, i.e. all the Curves. An exception is raised if NotDone.
    rtype

    AppParCurves_MultiBSpCurve

BezierValue()
  • returns the result of the approximation, i.e. all the Curves. An exception is raised if NotDone.
    rtype

    AppParCurves_MultiCurve

DerivativeFunctionMatrix()
  • returns the derivative function matrix used to approximate the set.
    rtype

    math_Matrix

Distance()
  • returns the distances between the points of the multiline and the approximation curves.
    rtype

    math_Matrix

Error()
  • returns the maximum errors between the MultiLine and the approximation curves. F is the sum of the square distances.
    param F

    type F

    float

    param MaxE3d

    type MaxE3d

    float

    param MaxE2d

    type MaxE2d

    float

    rtype

    None

ErrorGradient()
  • 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.
    param Grad

    type Grad

    math_Vector

    param F

    type F

    float

    param MaxE3d

    type MaxE3d

    float

    param MaxE2d

    type MaxE2d

    float

    rtype

    None

FirstLambda()
  • returns the value (P2 - P1)/ V1 if the first point was a tangency point.
    rtype

    float

FunctionMatrix()
  • returns the function matrix used to approximate the set.
    rtype

    math_Matrix

IsDone()
  • returns True if all has been correctly done.
    rtype

    bool

KIndex()
  • 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.
    rtype

    math_IntegerVector

LastLambda()
  • returns the value (PN - PN-1)/ VN if the last point was a tangency point.
    rtype

    float

Perform()
  • Is used after having initialized the fields. The case ‘CurvaturePoint’ is not treated in this method.
    param Parameters

    type Parameters

    math_Vector

    rtype

    None* Is used after having initialized the fields.

    param Parameters

    type Parameters

    math_Vector

    param l1

    type l1

    float

    param l2

    type l2

    float

    rtype

    None* 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.

    param Parameters

    type Parameters

    math_Vector

    param V1t

    type V1t

    math_Vector

    param V2t

    type V2t

    math_Vector

    param l1

    type l1

    float

    param l2

    type l2

    float

    rtype

    None* 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.

    param Parameters

    type Parameters

    math_Vector

    param V1t

    type V1t

    math_Vector

    param V2t

    type V2t

    math_Vector

    param V1c

    type V1c

    math_Vector

    param V2c

    type V2c

    math_Vector

    param l1

    type l1

    float

    param l2

    type l2

    float

    rtype

    None

Points()
  • returns the matrix of points value.
    rtype

    math_Matrix

Poles()
  • returns the matrix of resulting control points value.
    rtype

    math_Matrix

property thisown

The membership flag

class AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute(*args)

Bases: object

  • 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 point, the value of the tangency or curvature is computed in the resolution. NbPol is the number of control points wanted for the approximating curves. The system to solve is the following: A X = B. Where A is the Bernstein matrix computed with the parameters, B the points coordinates and X the poles solutions. The matrix A is the same for each coordinate x, y and z 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).
    param SSP

    type SSP

    AppDef_MultiLine

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param FirstCons

    type FirstCons

    AppParCurves_Constraint

    param LastCons

    type LastCons

    AppParCurves_Constraint

    param Parameters

    type Parameters

    math_Vector

    param NbPol

    type NbPol

    int

    rtype

    None* Initializes the fields of the object.

    param SSP

    type SSP

    AppDef_MultiLine

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param FirstCons

    type FirstCons

    AppParCurves_Constraint

    param LastCons

    type LastCons

    AppParCurves_Constraint

    param NbPol

    type NbPol

    int

    rtype

    None* 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 point, the value of the tangency or curvature is computed in the resolution. Deg is the degree wanted for the approximating curves. The system to solve is the following: A X = B. Where A is the BSpline functions matrix computed with <parameters>, B the points coordinates and X the poles solutions. The matrix A is the same for each coordinate x, y and z 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).

    param SSP

    type SSP

    AppDef_MultiLine

    param Knots

    type Knots

    TColStd_Array1OfReal

    param Mults

    type Mults

    TColStd_Array1OfInteger

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param FirstCons

    type FirstCons

    AppParCurves_Constraint

    param LastCons

    type LastCons

    AppParCurves_Constraint

    param Parameters

    type Parameters

    math_Vector

    param NbPol

    type NbPol

    int

    rtype

    None* Initializes the fields of the object.

    param SSP

    type SSP

    AppDef_MultiLine

    param Knots

    type Knots

    TColStd_Array1OfReal

    param Mults

    type Mults

    TColStd_Array1OfInteger

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param FirstCons

    type FirstCons

    AppParCurves_Constraint

    param LastCons

    type LastCons

    AppParCurves_Constraint

    param NbPol

    type NbPol

    int

    rtype

    None

BSplineValue()
  • returns the result of the approximation, i.e. all the Curves. An exception is raised if NotDone.
    rtype

    AppParCurves_MultiBSpCurve

BezierValue()
  • returns the result of the approximation, i.e. all the Curves. An exception is raised if NotDone.
    rtype

    AppParCurves_MultiCurve

DerivativeFunctionMatrix()
  • returns the derivative function matrix used to approximate the set.
    rtype

    math_Matrix

Distance()
  • returns the distances between the points of the multiline and the approximation curves.
    rtype

    math_Matrix

Error()
  • returns the maximum errors between the MultiLine and the approximation curves. F is the sum of the square distances.
    param F

    type F

    float

    param MaxE3d

    type MaxE3d

    float

    param MaxE2d

    type MaxE2d

    float

    rtype

    None

ErrorGradient()
  • 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.
    param Grad

    type Grad

    math_Vector

    param F

    type F

    float

    param MaxE3d

    type MaxE3d

    float

    param MaxE2d

    type MaxE2d

    float

    rtype

    None

FirstLambda()
  • returns the value (P2 - P1)/ V1 if the first point was a tangency point.
    rtype

    float

FunctionMatrix()
  • returns the function matrix used to approximate the set.
    rtype

    math_Matrix

IsDone()
  • returns True if all has been correctly done.
    rtype

    bool

KIndex()
  • 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.
    rtype

    math_IntegerVector

LastLambda()
  • returns the value (PN - PN-1)/ VN if the last point was a tangency point.
    rtype

    float

Perform()
  • Is used after having initialized the fields. The case ‘CurvaturePoint’ is not treated in this method.
    param Parameters

    type Parameters

    math_Vector

    rtype

    None* Is used after having initialized the fields.

    param Parameters

    type Parameters

    math_Vector

    param l1

    type l1

    float

    param l2

    type l2

    float

    rtype

    None* 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.

    param Parameters

    type Parameters

    math_Vector

    param V1t

    type V1t

    math_Vector

    param V2t

    type V2t

    math_Vector

    param l1

    type l1

    float

    param l2

    type l2

    float

    rtype

    None* 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.

    param Parameters

    type Parameters

    math_Vector

    param V1t

    type V1t

    math_Vector

    param V2t

    type V2t

    math_Vector

    param V1c

    type V1c

    math_Vector

    param V2c

    type V2c

    math_Vector

    param l1

    type l1

    float

    param l2

    type l2

    float

    rtype

    None

Points()
  • returns the matrix of points value.
    rtype

    math_Matrix

Poles()
  • returns the matrix of resulting control points value.
    rtype

    math_Matrix

property thisown

The membership flag

class AppDef_ParLeastSquareOfTheGradient(*args)

Bases: object

  • 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 point, the value of the tangency or curvature is computed in the resolution. NbPol is the number of control points wanted for the approximating curves. The system to solve is the following: A X = B. Where A is the Bernstein matrix computed with the parameters, B the points coordinates and X the poles solutions. The matrix A is the same for each coordinate x, y and z 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).
    param SSP

    type SSP

    AppDef_MultiLine

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param FirstCons

    type FirstCons

    AppParCurves_Constraint

    param LastCons

    type LastCons

    AppParCurves_Constraint

    param Parameters

    type Parameters

    math_Vector

    param NbPol

    type NbPol

    int

    rtype

    None* Initializes the fields of the object.

    param SSP

    type SSP

    AppDef_MultiLine

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param FirstCons

    type FirstCons

    AppParCurves_Constraint

    param LastCons

    type LastCons

    AppParCurves_Constraint

    param NbPol

    type NbPol

    int

    rtype

    None* 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 point, the value of the tangency or curvature is computed in the resolution. Deg is the degree wanted for the approximating curves. The system to solve is the following: A X = B. Where A is the BSpline functions matrix computed with <parameters>, B the points coordinates and X the poles solutions. The matrix A is the same for each coordinate x, y and z 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).

    param SSP

    type SSP

    AppDef_MultiLine

    param Knots

    type Knots

    TColStd_Array1OfReal

    param Mults

    type Mults

    TColStd_Array1OfInteger

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param FirstCons

    type FirstCons

    AppParCurves_Constraint

    param LastCons

    type LastCons

    AppParCurves_Constraint

    param Parameters

    type Parameters

    math_Vector

    param NbPol

    type NbPol

    int

    rtype

    None* Initializes the fields of the object.

    param SSP

    type SSP

    AppDef_MultiLine

    param Knots

    type Knots

    TColStd_Array1OfReal

    param Mults

    type Mults

    TColStd_Array1OfInteger

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param FirstCons

    type FirstCons

    AppParCurves_Constraint

    param LastCons

    type LastCons

    AppParCurves_Constraint

    param NbPol

    type NbPol

    int

    rtype

    None

BSplineValue()
  • returns the result of the approximation, i.e. all the Curves. An exception is raised if NotDone.
    rtype

    AppParCurves_MultiBSpCurve

BezierValue()
  • returns the result of the approximation, i.e. all the Curves. An exception is raised if NotDone.
    rtype

    AppParCurves_MultiCurve

DerivativeFunctionMatrix()
  • returns the derivative function matrix used to approximate the set.
    rtype

    math_Matrix

Distance()
  • returns the distances between the points of the multiline and the approximation curves.
    rtype

    math_Matrix

Error()
  • returns the maximum errors between the MultiLine and the approximation curves. F is the sum of the square distances.
    param F

    type F

    float

    param MaxE3d

    type MaxE3d

    float

    param MaxE2d

    type MaxE2d

    float

    rtype

    None

ErrorGradient()
  • 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.
    param Grad

    type Grad

    math_Vector

    param F

    type F

    float

    param MaxE3d

    type MaxE3d

    float

    param MaxE2d

    type MaxE2d

    float

    rtype

    None

FirstLambda()
  • returns the value (P2 - P1)/ V1 if the first point was a tangency point.
    rtype

    float

FunctionMatrix()
  • returns the function matrix used to approximate the set.
    rtype

    math_Matrix

IsDone()
  • returns True if all has been correctly done.
    rtype

    bool

KIndex()
  • 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.
    rtype

    math_IntegerVector

LastLambda()
  • returns the value (PN - PN-1)/ VN if the last point was a tangency point.
    rtype

    float

Perform()
  • Is used after having initialized the fields. The case ‘CurvaturePoint’ is not treated in this method.
    param Parameters

    type Parameters

    math_Vector

    rtype

    None* Is used after having initialized the fields.

    param Parameters

    type Parameters

    math_Vector

    param l1

    type l1

    float

    param l2

    type l2

    float

    rtype

    None* 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.

    param Parameters

    type Parameters

    math_Vector

    param V1t

    type V1t

    math_Vector

    param V2t

    type V2t

    math_Vector

    param l1

    type l1

    float

    param l2

    type l2

    float

    rtype

    None* 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.

    param Parameters

    type Parameters

    math_Vector

    param V1t

    type V1t

    math_Vector

    param V2t

    type V2t

    math_Vector

    param V1c

    type V1c

    math_Vector

    param V2c

    type V2c

    math_Vector

    param l1

    type l1

    float

    param l2

    type l2

    float

    rtype

    None

Points()
  • returns the matrix of points value.
    rtype

    math_Matrix

Poles()
  • returns the matrix of resulting control points value.
    rtype

    math_Matrix

property thisown

The membership flag

class AppDef_ResConstraintOfMyGradientOfCompute(*args)

Bases: object

  • 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 squares are used as a guess solution for the uzawa algorithm. The tolerance used in the Uzawa algorithms is Tolerance. A is the Bernstein matrix associated to the MultiLine and DA is the derivative bernstein matrix.(They can come from an approximation with ParLeastSquare.) The MultiCurve is modified. New MultiPoles are given.
    param SSP

    type SSP

    AppDef_MultiLine

    param SCurv

    type SCurv

    AppParCurves_MultiCurve

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param Constraints

    type Constraints

    AppParCurves_HArray1OfConstraintCouple

    param Bern

    type Bern

    math_Matrix

    param DerivativeBern

    type DerivativeBern

    math_Matrix

    param Tolerance

    default value is 1.0e-10

    type Tolerance

    float

    rtype

    None

ConstraintDerivative()
  • Returns the derivative of the constraint matrix.
    param SSP

    type SSP

    AppDef_MultiLine

    param Parameters

    type Parameters

    math_Vector

    param Deg

    type Deg

    int

    param DA

    type DA

    math_Matrix

    rtype

    math_Matrix

ConstraintMatrix()
Return type

math_Matrix

Duale()
  • returns the duale variables of the system.
    rtype

    math_Vector

InverseMatrix()
  • returns the Inverse of Cont*Transposed(Cont), where Cont is the constraint matrix for the algorithm.
    rtype

    math_Matrix

IsDone()
  • returns True if all has been correctly done.
    rtype

    bool

property thisown

The membership flag

class AppDef_ResConstraintOfMyGradientbisOfBSplineCompute(*args)

Bases: object

  • 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 squares are used as a guess solution for the uzawa algorithm. The tolerance used in the Uzawa algorithms is Tolerance. A is the Bernstein matrix associated to the MultiLine and DA is the derivative bernstein matrix.(They can come from an approximation with ParLeastSquare.) The MultiCurve is modified. New MultiPoles are given.
    param SSP

    type SSP

    AppDef_MultiLine

    param SCurv

    type SCurv

    AppParCurves_MultiCurve

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param Constraints

    type Constraints

    AppParCurves_HArray1OfConstraintCouple

    param Bern

    type Bern

    math_Matrix

    param DerivativeBern

    type DerivativeBern

    math_Matrix

    param Tolerance

    default value is 1.0e-10

    type Tolerance

    float

    rtype

    None

ConstraintDerivative()
  • Returns the derivative of the constraint matrix.
    param SSP

    type SSP

    AppDef_MultiLine

    param Parameters

    type Parameters

    math_Vector

    param Deg

    type Deg

    int

    param DA

    type DA

    math_Matrix

    rtype

    math_Matrix

ConstraintMatrix()
Return type

math_Matrix

Duale()
  • returns the duale variables of the system.
    rtype

    math_Vector

InverseMatrix()
  • returns the Inverse of Cont*Transposed(Cont), where Cont is the constraint matrix for the algorithm.
    rtype

    math_Matrix

IsDone()
  • returns True if all has been correctly done.
    rtype

    bool

property thisown

The membership flag

class AppDef_ResConstraintOfTheGradient(*args)

Bases: object

  • 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 squares are used as a guess solution for the uzawa algorithm. The tolerance used in the Uzawa algorithms is Tolerance. A is the Bernstein matrix associated to the MultiLine and DA is the derivative bernstein matrix.(They can come from an approximation with ParLeastSquare.) The MultiCurve is modified. New MultiPoles are given.
    param SSP

    type SSP

    AppDef_MultiLine

    param SCurv

    type SCurv

    AppParCurves_MultiCurve

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param Constraints

    type Constraints

    AppParCurves_HArray1OfConstraintCouple

    param Bern

    type Bern

    math_Matrix

    param DerivativeBern

    type DerivativeBern

    math_Matrix

    param Tolerance

    default value is 1.0e-10

    type Tolerance

    float

    rtype

    None

ConstraintDerivative()
  • Returns the derivative of the constraint matrix.
    param SSP

    type SSP

    AppDef_MultiLine

    param Parameters

    type Parameters

    math_Vector

    param Deg

    type Deg

    int

    param DA

    type DA

    math_Matrix

    rtype

    math_Matrix

ConstraintMatrix()
Return type

math_Matrix

Duale()
  • returns the duale variables of the system.
    rtype

    math_Vector

InverseMatrix()
  • returns the Inverse of Cont*Transposed(Cont), where Cont is the constraint matrix for the algorithm.
    rtype

    math_Matrix

IsDone()
  • returns True if all has been correctly done.
    rtype

    bool

property thisown

The membership flag

class AppDef_SmoothCriterion(*args, **kwargs)

Bases: OCC.Core.Standard.Standard_Transient

  • Empty constructor

Return type

None* Copy constructor – does nothing

Parameters

& (Standard_Transient) –

Return type

None

AssemblyTable()
Return type

opencascade::handle<FEmTool_HAssemblyTable>

DependenceTable()
Return type

opencascade::handle<TColStd_HArray2OfInteger>

static DownCast(t)
ErrorValues()
Parameters

MaxError

type MaxError

float

param QuadraticError

type QuadraticError

float

param AverageError

type AverageError

float

rtype

void

EstLength()
Return type

float

GetCurve()
Parameters

C

type C

FEmTool_Curve

rtype

void

GetEstimation()
Parameters

E1

type E1

float

param E2

type E2

float

param E3

type E3

float

rtype

void

GetWeight()
Parameters

QuadraticWeight

type QuadraticWeight

float

param QualityWeight

type QualityWeight

float

rtype

void

Gradient()
Parameters

Element

type Element

int

param Dimension

type Dimension

int

param G

type G

math_Vector

rtype

void

Hessian()
Parameters

Element

type Element

int

param Dimension1

type Dimension1

int

param Dimension2

type Dimension2

int

param H

type H

math_Matrix

rtype

void

InputVector()
  • Convert the assembly Vector in an Curve;
    param X

    type X

    math_Vector

    param AssTable

    type AssTable

    FEmTool_HAssemblyTable

    rtype

    void

QualityValues()
Parameters

J1min

type J1min

float

param J2min

type J2min

float

param J3min

type J3min

float

param J1

type J1

float

param J2

type J2

float

param J3

type J3

float

rtype

int

SetCurve()
Parameters

C

type C

FEmTool_Curve

rtype

void

SetEstimation()
Parameters

E1

type E1

float

param E2

type E2

float

param E3

type E3

float

rtype

void

SetParameters()
Parameters

Parameters

type Parameters

TColStd_HArray1OfReal

rtype

void

SetWeight()
Parameters

QuadraticWeight

type QuadraticWeight

float

param QualityWeight

type QualityWeight

float

param percentJ1

type percentJ1

float

param percentJ2

type percentJ2

float

param percentJ3

type percentJ3

float

rtype

void:param Weight:

type Weight

TColStd_Array1OfReal

rtype

void

property thisown

The membership flag

class AppDef_TheFunction(*args)

Bases: OCC.Core.math.math_MultipleVarFunctionWithGradient

  • initializes the fields of the function. The approximating curve has the desired degree Deg.
    param SSP

    type SSP

    AppDef_MultiLine

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param TheConstraints

    type TheConstraints

    AppParCurves_HArray1OfConstraintCouple

    param Parameters

    type Parameters

    math_Vector

    param Deg

    type Deg

    int

    rtype

    None

CurveValue()
  • returns the MultiCurve approximating the set after computing the value F or Grad(F).
    rtype

    AppParCurves_MultiCurve

Error()
  • returns the distance between the MultiPoint of range IPoint and the curve CurveIndex.
    param IPoint

    type IPoint

    int

    param CurveIndex

    type CurveIndex

    int

    rtype

    float

FirstConstraint()
Parameters

TheConstraints

type TheConstraints

AppParCurves_HArray1OfConstraintCouple

param FirstPoint

type FirstPoint

int

rtype

AppParCurves_Constraint

LastConstraint()
Parameters

TheConstraints

type TheConstraints

AppParCurves_HArray1OfConstraintCouple

param LastPoint

type LastPoint

int

rtype

AppParCurves_Constraint

MaxError2d()
  • returns the maximum distance between the points and the MultiCurve.
    rtype

    float

MaxError3d()
  • returns the maximum distance between the points and the MultiCurve.
    rtype

    float

NewParameters()
  • returns the new parameters of the MultiLine.
    rtype

    math_Vector

property thisown

The membership flag

class AppDef_TheGradient(*args)

Bases: object

  • 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.
    param SSP

    type SSP

    AppDef_MultiLine

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param TheConstraints

    type TheConstraints

    AppParCurves_HArray1OfConstraintCouple

    param Parameters

    type Parameters

    math_Vector

    param Deg

    type Deg

    int

    param Tol3d

    type Tol3d

    float

    param Tol2d

    type Tol2d

    float

    param NbIterations

    default value is 200

    type NbIterations

    int

    rtype

    None

AverageError()
  • returns the average error between the old and the new approximation.
    rtype

    float

Error()
  • 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.
    param Index

    type Index

    int

    rtype

    float

IsDone()
  • returns True if all has been correctly done.
    rtype

    bool

MaxError2d()
  • returns the maximum difference between the old and the new approximation.
    rtype

    float

MaxError3d()
  • returns the maximum difference between the old and the new approximation.
    rtype

    float

Value()
  • returns all the Bezier curves approximating the MultiLine SSP after minimization of the parameter.
    rtype

    AppParCurves_MultiCurve

property thisown

The membership flag

class AppDef_TheLeastSquares(*args)

Bases: object

  • 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 point, the value of the tangency or curvature is computed in the resolution. NbPol is the number of control points wanted for the approximating curves. The system to solve is the following: A X = B. Where A is the Bernstein matrix computed with the parameters, B the points coordinates and X the poles solutions. The matrix A is the same for each coordinate x, y and z 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).
    param SSP

    type SSP

    AppDef_MultiLine

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param FirstCons

    type FirstCons

    AppParCurves_Constraint

    param LastCons

    type LastCons

    AppParCurves_Constraint

    param Parameters

    type Parameters

    math_Vector

    param NbPol

    type NbPol

    int

    rtype

    None* Initializes the fields of the object.

    param SSP

    type SSP

    AppDef_MultiLine

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param FirstCons

    type FirstCons

    AppParCurves_Constraint

    param LastCons

    type LastCons

    AppParCurves_Constraint

    param NbPol

    type NbPol

    int

    rtype

    None* 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 point, the value of the tangency or curvature is computed in the resolution. Deg is the degree wanted for the approximating curves. The system to solve is the following: A X = B. Where A is the BSpline functions matrix computed with <parameters>, B the points coordinates and X the poles solutions. The matrix A is the same for each coordinate x, y and z 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).

    param SSP

    type SSP

    AppDef_MultiLine

    param Knots

    type Knots

    TColStd_Array1OfReal

    param Mults

    type Mults

    TColStd_Array1OfInteger

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param FirstCons

    type FirstCons

    AppParCurves_Constraint

    param LastCons

    type LastCons

    AppParCurves_Constraint

    param Parameters

    type Parameters

    math_Vector

    param NbPol

    type NbPol

    int

    rtype

    None* Initializes the fields of the object.

    param SSP

    type SSP

    AppDef_MultiLine

    param Knots

    type Knots

    TColStd_Array1OfReal

    param Mults

    type Mults

    TColStd_Array1OfInteger

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param FirstCons

    type FirstCons

    AppParCurves_Constraint

    param LastCons

    type LastCons

    AppParCurves_Constraint

    param NbPol

    type NbPol

    int

    rtype

    None

BSplineValue()
  • returns the result of the approximation, i.e. all the Curves. An exception is raised if NotDone.
    rtype

    AppParCurves_MultiBSpCurve

BezierValue()
  • returns the result of the approximation, i.e. all the Curves. An exception is raised if NotDone.
    rtype

    AppParCurves_MultiCurve

DerivativeFunctionMatrix()
  • returns the derivative function matrix used to approximate the set.
    rtype

    math_Matrix

Distance()
  • returns the distances between the points of the multiline and the approximation curves.
    rtype

    math_Matrix

Error()
  • returns the maximum errors between the MultiLine and the approximation curves. F is the sum of the square distances.
    param F

    type F

    float

    param MaxE3d

    type MaxE3d

    float

    param MaxE2d

    type MaxE2d

    float

    rtype

    None

ErrorGradient()
  • 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.
    param Grad

    type Grad

    math_Vector

    param F

    type F

    float

    param MaxE3d

    type MaxE3d

    float

    param MaxE2d

    type MaxE2d

    float

    rtype

    None

FirstLambda()
  • returns the value (P2 - P1)/ V1 if the first point was a tangency point.
    rtype

    float

FunctionMatrix()
  • returns the function matrix used to approximate the set.
    rtype

    math_Matrix

IsDone()
  • returns True if all has been correctly done.
    rtype

    bool

KIndex()
  • 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.
    rtype

    math_IntegerVector

LastLambda()
  • returns the value (PN - PN-1)/ VN if the last point was a tangency point.
    rtype

    float

Perform()
  • Is used after having initialized the fields. The case ‘CurvaturePoint’ is not treated in this method.
    param Parameters

    type Parameters

    math_Vector

    rtype

    None* Is used after having initialized the fields.

    param Parameters

    type Parameters

    math_Vector

    param l1

    type l1

    float

    param l2

    type l2

    float

    rtype

    None* 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.

    param Parameters

    type Parameters

    math_Vector

    param V1t

    type V1t

    math_Vector

    param V2t

    type V2t

    math_Vector

    param l1

    type l1

    float

    param l2

    type l2

    float

    rtype

    None* 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.

    param Parameters

    type Parameters

    math_Vector

    param V1t

    type V1t

    math_Vector

    param V2t

    type V2t

    math_Vector

    param V1c

    type V1c

    math_Vector

    param V2c

    type V2c

    math_Vector

    param l1

    type l1

    float

    param l2

    type l2

    float

    rtype

    None

Points()
  • returns the matrix of points value.
    rtype

    math_Matrix

Poles()
  • returns the matrix of resulting control points value.
    rtype

    math_Matrix

property thisown

The membership flag

class AppDef_TheResol(*args)

Bases: object

  • 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 squares are used as a guess solution for the uzawa algorithm. The tolerance used in the Uzawa algorithms is Tolerance. A is the Bernstein matrix associated to the MultiLine and DA is the derivative bernstein matrix.(They can come from an approximation with ParLeastSquare.) The MultiCurve is modified. New MultiPoles are given.
    param SSP

    type SSP

    AppDef_MultiLine

    param SCurv

    type SCurv

    AppParCurves_MultiCurve

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param Constraints

    type Constraints

    AppParCurves_HArray1OfConstraintCouple

    param Bern

    type Bern

    math_Matrix

    param DerivativeBern

    type DerivativeBern

    math_Matrix

    param Tolerance

    default value is 1.0e-10

    type Tolerance

    float

    rtype

    None

ConstraintDerivative()
  • Returns the derivative of the constraint matrix.
    param SSP

    type SSP

    AppDef_MultiLine

    param Parameters

    type Parameters

    math_Vector

    param Deg

    type Deg

    int

    param DA

    type DA

    math_Matrix

    rtype

    math_Matrix

ConstraintMatrix()
Return type

math_Matrix

Duale()
  • returns the duale variables of the system.
    rtype

    math_Vector

InverseMatrix()
  • returns the Inverse of Cont*Transposed(Cont), where Cont is the constraint matrix for the algorithm.
    rtype

    math_Matrix

IsDone()
  • returns True if all has been correctly done.
    rtype

    bool

property thisown

The membership flag

class AppDef_Variational(*args)

Bases: object

  • Constructor. Initialization of the fields. warningNc0number of PassagePoint consraints Nc2number of TangencyPoint constraints Nc3number of CurvaturePoint constraints if ((MaxDegree-Continuity)*MaxSegment -Nc0 - 2*Nc1 -3*Nc2) is negative The problem is over-constrained. //! LimitationThe MultiLine from AppDef has to be composed by only one Line ( Dimension 2 or 3).
    param SSP

    type SSP

    AppDef_MultiLine

    param FirstPoint

    type FirstPoint

    int

    param LastPoint

    type LastPoint

    int

    param TheConstraints

    type TheConstraints

    AppParCurves_HArray1OfConstraintCouple

    param MaxDegree

    default value is 14

    type MaxDegree

    int

    param MaxSegment

    default value is 100

    type MaxSegment

    int

    param Continuity

    default value is GeomAbs_C2

    type Continuity

    GeomAbs_Shape

    param WithMinMax

    default value is Standard_False

    type WithMinMax

    bool

    param WithCutting

    default value is Standard_True

    type WithCutting

    bool

    param Tolerance

    default value is 1.0

    type Tolerance

    float

    param NbIterations

    default value is 2

    type NbIterations

    int

    rtype

    None

Approximate()
  • Makes the approximation with the current fields.
    rtype

    None

AverageError()
  • returns the average error between the MultiLine from AppDef and the approximation.
    rtype

    float

Continuity()
  • returns the Continuity used in the approximation
    rtype

    GeomAbs_Shape

Criterium()
  • returns the values of the quality criterium.
    param VFirstOrder

    type VFirstOrder

    float

    param VSecondOrder

    type VSecondOrder

    float

    param VThirdOrder

    type VThirdOrder

    float

    rtype

    None

CriteriumWeight()
  • returns the Weights (as percent) associed to the criterium used in the optimization.
    param Percent1

    type Percent1

    float

    param Percent2

    type Percent2

    float

    param Percent3

    type Percent3

    float

    rtype

    None

Distance()
  • returns the distances between the points of the multiline and the approximation curves.
    param mat

    type mat

    math_Matrix

    rtype

    None

DumpToString(AppDef_Variational self) → std::string
IsCreated()
  • returns True if the creation is done and correspond to the current fields.
    rtype

    bool

IsDone()
  • returns True if the approximation is ok and correspond to the current fields.
    rtype

    bool

IsOverConstrained()
  • returns True if the problem is overconstrained in this case, approximation cannot be done.
    rtype

    bool

Knots()
  • returns the knots uses to the approximations
    rtype

    opencascade::handle<TColStd_HArray1OfReal>

MaxDegree()
  • returns the Maximum Degree used in the approximation
    rtype

    int

MaxError()
  • returns the maximum of the distances between the points of the multiline and the approximation curves.
    rtype

    float

MaxErrorIndex()
  • returns the index of the MultiPoint of ErrorMax
    rtype

    int

MaxSegment()
  • returns the Maximum of segment used in the approximation
    rtype

    int

NbIterations()
  • returns the number of iterations used in the approximation.
    rtype

    int

Parameters()
  • returns the parameters uses to the approximations
    rtype

    opencascade::handle<TColStd_HArray1OfReal>

QuadraticError()
  • returns the quadratic average of the distances between the points of the multiline and the approximation curves.
    rtype

    float

SetConstraints()
  • Define the constraints to approximate If this value is incompatible with the others fields this method modify nothing and returns false
    param aConstrainst

    type aConstrainst

    AppParCurves_HArray1OfConstraintCouple

    rtype

    bool

SetContinuity()
  • Define the Continuity used in the approximation If this value is incompatible with the others fields this method modify nothing and returns false
    param C

    type C

    GeomAbs_Shape

    rtype

    bool

SetCriteriumWeight()
  • define the Weights (as percent) associed to the criterium used in the optimization. //! if Percent <= 0
    param Percent1

    type Percent1

    float

    param Percent2

    type Percent2

    float

    param Percent3

    type Percent3

    float

    rtype

    None* define the Weight (as percent) associed to the criterium Order used in the optimization : Others weights are updated. if Percent < 0 if Order < 1 or Order > 3

    param Order

    type Order

    int

    param Percent

    type Percent

    float

    rtype

    None

SetKnots()
  • Defines the knots used by the approximations If this value is incompatible with the others fields this method modify nothing and returns false
    param knots

    type knots

    TColStd_HArray1OfReal

    rtype

    bool

SetMaxDegree()
  • Define the Maximum Degree used in the approximation If this value is incompatible with the others fields this method modify nothing and returns false
    param Degree

    type Degree

    int

    rtype

    bool

SetMaxSegment()
  • Define the maximum number of segments used in the approximation If this value is incompatible with the others fields this method modify nothing and returns false
    param NbSegment

    type NbSegment

    int

    rtype

    bool

SetNbIterations()
  • define the number of iterations used in the approximation. if Iter < 1
    param Iter

    type Iter

    int

    rtype

    None

SetParameters()
  • Defines the parameters used by the approximations.
    param param

    type param

    TColStd_HArray1OfReal

    rtype

    None

SetTolerance()
  • define the tolerance used in the approximation.
    param Tol

    type Tol

    float

    rtype

    None

SetWithCutting()
  • Define if the approximation can insert new Knots or not. If this value is incompatible with the others fields this method modify nothing and returns false
    param Cutting

    type Cutting

    bool

    rtype

    bool

SetWithMinMax()
  • Define if the approximation search to minimize the maximum Error or not.
    param MinMax

    type MinMax

    bool

    rtype

    None

Tolerance()
  • returns the tolerance used in the approximation.
    rtype

    float

Value()
  • returns all the BSpline curves approximating the MultiLine from AppDef SSP after minimization of the parameter.
    rtype

    AppParCurves_MultiBSpCurve

WithCutting()
  • returns if the approximation can insert new Knots or not.
    rtype

    bool

WithMinMax()
  • returns if the approximation search to minimize the maximum Error or not.
    rtype

    bool

property thisown

The membership flag

class SwigPyIterator(*args, **kwargs)

Bases: object

advance()
copy()
decr()
distance()
equal()
incr()
next()
previous()
property thisown

The membership flag

value()