OCC.Core.BRepApprox module

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

class BRepApprox_Approx(*args)

Bases: object

Return type

None

IsDone()
Return type

bool

NbMultiCurves()
Return type

int

SetParameters()
Parameters

Tol3d

type Tol3d

float

param Tol2d

type Tol2d

float

param DegMin

type DegMin

int

param DegMax

type DegMax

int

param NbIterMax

type NbIterMax

int

param NbPntMax

default value is 30

type NbPntMax

int

param ApproxWithTangency

default value is Standard_True

type ApproxWithTangency

bool

param Parametrization

default value is Approx_ChordLength

type Parametrization

Approx_ParametrizationType

rtype

None

TolReached2d()
Return type

float

TolReached3d()
Return type

float

Value()
Parameters

Index

type Index

int

rtype

AppParCurves_MultiBSpCurve

property thisown

The membership flag

class BRepApprox_ApproxLine(*args)

Bases: OCC.Core.Standard.Standard_Transient

Parameters

CurveXYZ

type CurveXYZ

Geom_BSplineCurve

param CurveUV1

type CurveUV1

Geom2d_BSplineCurve

param CurveUV2

type CurveUV2

Geom2d_BSplineCurve

rtype

None* theTang variable has been entered only for compatibility with the alias IntPatch_WLine. They are not used in this class.

param lin

type lin

IntSurf_LineOn2S

param theTang

default value is Standard_False

type theTang

bool

rtype

None

static DownCast(t)
NbPnts()
Return type

int

Point()
Parameters

Index

type Index

int

rtype

IntSurf_PntOn2S

property thisown

The membership flag

class BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox(*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 BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox(*args)

Bases: OCC.Core.math.math_MultipleVarFunctionWithGradient

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

    type SSP

    BRepApprox_TheMultiLineOfApprox

    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 BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox(*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

    BRepApprox_TheMultiLineOfApprox

    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

    BRepApprox_TheMultiLineOfApprox

    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

    BRepApprox_TheMultiLineOfApprox

    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

    BRepApprox_TheMultiLineOfApprox

    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 BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox(*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 BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox(*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 BRepApprox_MyBSplGradientOfTheComputeLineOfApprox(*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

    BRepApprox_TheMultiLineOfApprox

    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

    BRepApprox_TheMultiLineOfApprox

    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 BRepApprox_MyGradientOfTheComputeLineBezierOfApprox(*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

    BRepApprox_TheMultiLineOfApprox

    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 BRepApprox_MyGradientbisOfTheComputeLineOfApprox(*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

    BRepApprox_TheMultiLineOfApprox

    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 BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox(*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

    BRepApprox_TheMultiLineOfApprox

    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 BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox(*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

    BRepApprox_TheMultiLineOfApprox

    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 BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox(*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

    BRepApprox_TheMultiLineOfApprox

    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

    BRepApprox_TheMultiLineOfApprox

    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

    BRepApprox_TheMultiLineOfApprox

    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

    BRepApprox_TheMultiLineOfApprox

    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 BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox(*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

    BRepApprox_TheMultiLineOfApprox

    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

    BRepApprox_TheMultiLineOfApprox

    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

    BRepApprox_TheMultiLineOfApprox

    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

    BRepApprox_TheMultiLineOfApprox

    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 BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox(*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

    BRepApprox_TheMultiLineOfApprox

    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

    BRepApprox_TheMultiLineOfApprox

    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 BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox(*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

    BRepApprox_TheMultiLineOfApprox

    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

    BRepApprox_TheMultiLineOfApprox

    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 BRepApprox_TheComputeLineBezierOfApprox(*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

    BRepApprox_TheMultiLineOfApprox

    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

    BRepApprox_TheMultiLineOfApprox

    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

    BRepApprox_TheMultiLineOfApprox

    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 BRepApprox_TheComputeLineOfApprox(*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

    BRepApprox_TheMultiLineOfApprox

    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

    BRepApprox_TheMultiLineOfApprox

    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

    BRepApprox_TheMultiLineOfApprox

    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

    BRepApprox_TheMultiLineOfApprox

    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 BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox(*args)

Bases: OCC.Core.math.math_FunctionSetWithDerivatives

Parameters

S1

type S1

BRepAdaptor_Surface

param S2

type S2

BRepAdaptor_Surface

rtype

None

AuxillarSurface1()
Return type

BRepAdaptor_Surface

AuxillarSurface2()
Return type

BRepAdaptor_Surface

ComputeParameters()
Parameters

ChoixIso

type ChoixIso

IntImp_ConstIsoparametric

param Param

type Param

TColStd_Array1OfReal

param UVap

type UVap

math_Vector

param BornInf

type BornInf

math_Vector

param BornSup

type BornSup

math_Vector

param Tolerance

type Tolerance

math_Vector

rtype

None

Direction()
Return type

gp_Dir

DirectionOnS1()
Return type

gp_Dir2d

DirectionOnS2()
Return type

gp_Dir2d

IsTangent()
Parameters

UVap

type UVap

math_Vector

param Param

type Param

TColStd_Array1OfReal

param BestChoix

type BestChoix

IntImp_ConstIsoparametric

rtype

bool

Point()
Return type

gp_Pnt

Root()
  • returns somme des fi*fi
    rtype

    float

property thisown

The membership flag

class BRepApprox_TheImpPrmSvSurfacesOfApprox(*args)

Bases: OCC.Core.ApproxInt.ApproxInt_SvSurfaces

Parameters

Surf1

type Surf1

BRepAdaptor_Surface

param Surf2

type Surf2

IntSurf_Quadric

rtype

None:param Surf1:

type Surf1

IntSurf_Quadric

param Surf2

type Surf2

BRepAdaptor_Surface

rtype

None

property thisown

The membership flag

class BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox(*args)

Bases: object

  • compute the solution point with the close point
    param Param

    type Param

    TColStd_Array1OfReal

    param S1

    type S1

    BRepAdaptor_Surface

    param S2

    type S2

    BRepAdaptor_Surface

    param TolTangency

    type TolTangency

    float

    rtype

    None* initialize the parameters to compute the solution point it ‘s possible to write to optimize: IntImp_Int2S inter(S1,S2,Func,TolTangency); math_FunctionSetRoot rsnld(inter.Function()); while …{ Param(1)=… Param(2)=… param(3)=… inter.Perform(Param,rsnld); }

    param S1

    type S1

    BRepAdaptor_Surface

    param S2

    type S2

    BRepAdaptor_Surface

    param TolTangency

    type TolTangency

    float

    rtype

    None

ChangePoint()
  • return the intersection point which is enable for changing.
    rtype

    IntSurf_PntOn2S

Direction()
  • Returns the tangent at the intersection line.
    rtype

    gp_Dir

DirectionOnS1()
  • Returns the tangent at the intersection line in the parametric space of the first surface.
    rtype

    gp_Dir2d

DirectionOnS2()
  • Returns the tangent at the intersection line in the parametric space of the second surface.
    rtype

    gp_Dir2d

Function()
  • return the math function which is used to compute the intersection
    rtype

    BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox

IsDone()
  • Returns True if the creation completed without failure.
    rtype

    bool

IsEmpty()
  • Returns True when there is no solution to the problem.
    rtype

    bool

IsTangent()
  • Returns True if the surfaces are tangent at the intersection point.
    rtype

    bool

Perform()
  • returns the best constant isoparametric to find the next intersection’s point +stores the solution point (the solution point is found with the close point to intersect the isoparametric with the other patch; the choice of the isoparametic is calculated)
    param Param

    type Param

    TColStd_Array1OfReal

    param Rsnld

    type Rsnld

    math_FunctionSetRoot

    rtype

    IntImp_ConstIsoparametric* returns the best constant isoparametric to find the next intersection’s point +stores the solution point (the solution point is found with the close point to intersect the isoparametric with the other patch; the choice of the isoparametic is given by ChoixIso)

    param Param

    type Param

    TColStd_Array1OfReal

    param Rsnld

    type Rsnld

    math_FunctionSetRoot

    param ChoixIso

    type ChoixIso

    IntImp_ConstIsoparametric

    rtype

    IntImp_ConstIsoparametric

Point()
  • Returns the intersection point.
    rtype

    IntSurf_PntOn2S

property thisown

The membership flag

class BRepApprox_TheMultiLineOfApprox(*args)

Bases: object

Return type

None* The class SvSurfaces is used when the approximation algorithm needs some extra points on the line <line>. A New line is then created which shares the same surfaces and functions. SvSurfaces is a deferred class which allows several implementations of this algorithm with different surfaces (bi-parametric ones, or implicit and biparametric ones) :param line: :type line: BRepApprox_ApproxLine :param PtrSvSurfaces: :type PtrSvSurfaces: Standard_Address :param NbP3d: :type NbP3d: int :param NbP2d: :type NbP2d: int :param ApproxU1V1: :type ApproxU1V1: bool :param ApproxU2V2: :type ApproxU2V2: bool :param xo: :type xo: float :param yo: :type yo: float :param zo: :type zo: float :param u1o: :type u1o: float :param v1o: :type v1o: float :param u2o: :type u2o: float :param v2o: :type v2o: float :param P2DOnFirst: :type P2DOnFirst: bool :param IndMin: default value is 0 :type IndMin: int :param IndMax: default value is 0 :type IndMax: int :rtype: None* No Extra points will be added on the current line :param line: :type line: BRepApprox_ApproxLine :param NbP3d: :type NbP3d: int :param NbP2d: :type NbP2d: int :param ApproxU1V1: :type ApproxU1V1: bool :param ApproxU2V2: :type ApproxU2V2: bool :param xo: :type xo: float :param yo: :type yo: float :param zo: :type zo: float :param u1o: :type u1o: float :param v1o: :type v1o: float :param u2o: :type u2o: float :param v2o: :type v2o: float :param P2DOnFirst: :type P2DOnFirst: bool :param IndMin: default value is 0 :type IndMin: int :param IndMax: default value is 0 :type IndMax: int :rtype: None

Dump()
  • Dump of the current multi-line.
    rtype

    None

FirstPoint()
Return type

int

LastPoint()
Return type

int

MakeMLBetween()
  • Tries to make a sub-line between <Low> and <High> points of this line by adding <NbPointsToInsert> new points
    param Low

    type Low

    int

    param High

    type High

    int

    param NbPointsToInsert

    type NbPointsToInsert

    int

    rtype

    BRepApprox_TheMultiLineOfApprox

MakeMLOneMorePoint()
  • Tries to make a sub-line between <Low> and <High> points of this line by adding one more point between (indbad-1)-th and indbad-th points
    param Low

    type Low

    int

    param High

    type High

    int

    param indbad

    type indbad

    int

    param OtherLine

    type OtherLine

    BRepApprox_TheMultiLineOfApprox

    rtype

    bool

NbP2d()
  • Returns the number of 2d points of a TheLine.
    rtype

    int

NbP3d()
  • Returns the number of 3d points of a TheLine.
    rtype

    int

Tangency()
  • Returns the 3d tangency points of the multipoint <MPointIndex> only when 3d points exist.
    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 MPointIndex

    type MPointIndex

    int

    param tabV2d

    type tabV2d

    TColgp_Array1OfVec2d

    rtype

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

    param MPointIndex

    type MPointIndex

    int

    param tabV

    type tabV

    TColgp_Array1OfVec

    param tabV2d

    type tabV2d

    TColgp_Array1OfVec2d

    rtype

    bool

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

    type MPointIndex

    int

    param tabPt

    type tabPt

    TColgp_Array1OfPnt

    rtype

    None* Returns the 2d points of the multipoint <MPointIndex> when only 2d points exist.

    param MPointIndex

    type MPointIndex

    int

    param tabPt2d

    type tabPt2d

    TColgp_Array1OfPnt2d

    rtype

    None* Returns the 3d and 2d points of the multipoint <MPointIndex>.

    param MPointIndex

    type MPointIndex

    int

    param tabPt

    type tabPt

    TColgp_Array1OfPnt

    param tabPt2d

    type tabPt2d

    TColgp_Array1OfPnt2d

    rtype

    None

WhatStatus()
Return type

Approx_Status

property thisown

The membership flag

class BRepApprox_TheMultiLineToolOfApprox

Bases: object

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

    type ML

    BRepApprox_TheMultiLineOfApprox

    param MPointIndex

    type MPointIndex

    int

    param tabV

    type tabV

    TColgp_Array1OfVec

    rtype

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

    param ML

    type ML

    BRepApprox_TheMultiLineOfApprox

    param MPointIndex

    type MPointIndex

    int

    param tabV2d

    type tabV2d

    TColgp_Array1OfVec2d

    rtype

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

    param ML

    type ML

    BRepApprox_TheMultiLineOfApprox

    param MPointIndex

    type MPointIndex

    int

    param tabV

    type tabV

    TColgp_Array1OfVec

    param tabV2d

    type tabV2d

    TColgp_Array1OfVec2d

    rtype

    bool

static Dump()
  • Dump of the current multi-line.
    param ML

    type ML

    BRepApprox_TheMultiLineOfApprox

    rtype

    None

static FirstPoint()
  • Returns the number of multipoints of the TheMultiLine.
    param ML

    type ML

    BRepApprox_TheMultiLineOfApprox

    rtype

    int

static LastPoint()
  • Returns the number of multipoints of the TheMultiLine.
    param ML

    type ML

    BRepApprox_TheMultiLineOfApprox

    rtype

    int

static MakeMLBetween()
  • Is called if WhatStatus returned ‘PointsAdded’.
    param ML

    type ML

    BRepApprox_TheMultiLineOfApprox

    param I1

    type I1

    int

    param I2

    type I2

    int

    param NbPMin

    type NbPMin

    int

    rtype

    BRepApprox_TheMultiLineOfApprox

static MakeMLOneMorePoint()
  • Is called when the Bezier curve contains a loop
    param ML

    type ML

    BRepApprox_TheMultiLineOfApprox

    param I1

    type I1

    int

    param I2

    type I2

    int

    param indbad

    type indbad

    int

    param OtherLine

    type OtherLine

    BRepApprox_TheMultiLineOfApprox

    rtype

    bool

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

    type ML

    BRepApprox_TheMultiLineOfApprox

    rtype

    int

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

    type ML

    BRepApprox_TheMultiLineOfApprox

    rtype

    int

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

    type ML

    BRepApprox_TheMultiLineOfApprox

    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

    BRepApprox_TheMultiLineOfApprox

    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

    BRepApprox_TheMultiLineOfApprox

    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

    BRepApprox_TheMultiLineOfApprox

    param MPointIndex

    type MPointIndex

    int

    param tabPt

    type tabPt

    TColgp_Array1OfPnt

    rtype

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

    param ML

    type ML

    BRepApprox_TheMultiLineOfApprox

    param MPointIndex

    type MPointIndex

    int

    param tabPt2d

    type tabPt2d

    TColgp_Array1OfPnt2d

    rtype

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

    param ML

    type ML

    BRepApprox_TheMultiLineOfApprox

    param MPointIndex

    type MPointIndex

    int

    param tabPt

    type tabPt

    TColgp_Array1OfPnt

    param tabPt2d

    type tabPt2d

    TColgp_Array1OfPnt2d

    rtype

    None

static WhatStatus()
Parameters

ML

type ML

BRepApprox_TheMultiLineOfApprox

param I1

type I1

int

param I2

type I2

int

rtype

Approx_Status

property thisown

The membership flag

class BRepApprox_ThePrmPrmSvSurfacesOfApprox(*args)

Bases: OCC.Core.ApproxInt.ApproxInt_SvSurfaces

Parameters

Surf1

type Surf1

BRepAdaptor_Surface

param Surf2

type Surf2

BRepAdaptor_Surface

rtype

None

property thisown

The membership flag

class BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox(*args)

Bases: OCC.Core.math.math_FunctionSetWithDerivatives

Return type

None:param PS: :type PS: BRepAdaptor_Surface :param IS: :type IS: IntSurf_Quadric :rtype: None:param IS: :type IS: IntSurf_Quadric :rtype: None

Direction2d()
Return type

gp_Dir2d

Direction3d()
Return type

gp_Vec

ISurface()
Return type

IntSurf_Quadric

IsTangent()
Return type

bool

PSurface()
Return type

BRepAdaptor_Surface

Point()
Return type

gp_Pnt

Root()
Return type

float

Set()
Parameters

PS

type PS

BRepAdaptor_Surface

rtype

None:param Tolerance:

type Tolerance

float

rtype

None

SetImplicitSurface()
Parameters

IS

type IS

IntSurf_Quadric

rtype

None

Tolerance()
  • Returns the value Tol so that if Abs(Func.Root())<Tol the function is considered null.
    rtype

    float

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()