OCC.AdvApprox module

This package provides algorithms approximating a functionthat can be multidimensional creating in the end aBSpline function with the required continuity

class AdvApprox_ApproxAFunction(*args)

Bases: object

  • Constructs approximator tool. //! Warning: the Func should be valid reference to object of type inherited from class EvaluatorFunction from Approx with life time longer than that of the approximator tool; //! the result should be formatted in the following way : <–Num1DSS–> <–2 * Num2DSS–> <–3 * Num3DSS–> R[0] …. R[Num1DSS]….. R[Dimension-1] //! the order in which each Subspace appears should be consistent with the tolerances given in the create function and the results will be given in that order as well that is : Curve2d(n) will correspond to the nth entry described by Num2DSS, Curve(n) will correspond to the nth entry described by Num3DSS The same type of schema applies to the Poles1d, Poles2d and Poles.
Parameters:
  • Num1DSS (int) –
  • Num2DSS (int) –
  • Num3DSS (int) –
  • OneDTol (Handle_TColStd_HArray1OfReal &) –
  • TwoDTol (Handle_TColStd_HArray1OfReal &) –
  • ThreeDTol (Handle_TColStd_HArray1OfReal &) –
  • First (float) –
  • Last (float) –
  • Continuity (GeomAbs_Shape) –
  • MaxDeg (int) –
  • MaxSeg (int) –
  • Func (AdvApprox_EvaluatorFunction &) –
Return type:

None

  • Approximation with user methode of cutting
Parameters:
  • Num1DSS (int) –
  • Num2DSS (int) –
  • Num3DSS (int) –
  • OneDTol (Handle_TColStd_HArray1OfReal &) –
  • TwoDTol (Handle_TColStd_HArray1OfReal &) –
  • ThreeDTol (Handle_TColStd_HArray1OfReal &) –
  • First (float) –
  • Last (float) –
  • Continuity (GeomAbs_Shape) –
  • MaxDeg (int) –
  • MaxSeg (int) –
  • Func (AdvApprox_EvaluatorFunction &) –
  • CutTool (AdvApprox_Cutting &) –
Return type:

None

static Approximation()
Parameters:
  • TotalDimension (int) –
  • TotalNumSS (int) –
  • LocalDimension (TColStd_Array1OfInteger &) –
  • First (float) –
  • Last (float) –
  • Evaluator (AdvApprox_EvaluatorFunction &) –
  • CutTool (AdvApprox_Cutting &) –
  • ContinuityOrder (int) –
  • NumMaxCoeffs (int) –
  • MaxSegments (int) –
  • TolerancesArray (TColStd_Array1OfReal &) –
  • code_precis (int) –
  • NumCurves (int &) –
  • NumCoeffPerCurveArray (TColStd_Array1OfInteger &) –
  • LocalCoefficientArray (TColStd_Array1OfReal &) –
  • IntervalsArray (TColStd_Array1OfReal &) –
  • ErrorMaxArray (TColStd_Array1OfReal &) –
  • AverageErrorArray (TColStd_Array1OfReal &) –
  • ErrorCode (int &) –
Return type:

void

AverageError()
  • returns the error as is in the algorithms
Parameters:
  • Dimension (int) –
  • Dimension
  • Index (int) –
Return type:

Handle_TColStd_HArray1OfReal

Return type:

float

Degree()
Return type:int
DumpToString()

AdvApprox_ApproxAFunction_DumpToString(AdvApprox_ApproxAFunction self) -> std::string

HasResult()
Return type:bool
IsDone()
Return type:bool
Knots()
Return type:Handle_TColStd_HArray1OfReal
MaxError()
  • returns the error as is in the algorithms
Parameters:
  • Dimension (int) –
  • Dimension
  • Index (int) –
Return type:

Handle_TColStd_HArray1OfReal

Return type:

float

Multiplicities()
Return type:Handle_TColStd_HArray1OfInteger
NbKnots()
Return type:int
NbPoles()
  • as the name says
Return type:int
NumSubSpaces()
Parameters:Dimension (int) –
Return type:int
Poles()
  • – returns the poles from the algorithms as is
Return type:Handle_TColgp_HArray2OfPnt
  • returns the poles at Index from the 3d subspace
Parameters:
Return type:

None

Poles1d()
  • returns the poles from the algorithms as is
Return type:Handle_TColStd_HArray2OfReal
  • returns the poles at Index from the 1d subspace
Parameters:
  • Index (int) –
  • P (TColStd_Array1OfReal &) –
Return type:

None

Poles2d()
  • returns the poles from the algorithms as is
Return type:Handle_TColgp_HArray2OfPnt2d
  • returns the poles at Index from the 2d subspace
Parameters:
Return type:

None

thisown

The membership flag

AdvApprox_ApproxAFunction_Approximation()
Parameters:
  • TotalDimension (int) –
  • TotalNumSS (int) –
  • LocalDimension (TColStd_Array1OfInteger &) –
  • First (float) –
  • Last (float) –
  • Evaluator (AdvApprox_EvaluatorFunction &) –
  • CutTool (AdvApprox_Cutting &) –
  • ContinuityOrder (int) –
  • NumMaxCoeffs (int) –
  • MaxSegments (int) –
  • TolerancesArray (TColStd_Array1OfReal &) –
  • code_precis (int) –
  • NumCurves (int &) –
  • NumCoeffPerCurveArray (TColStd_Array1OfInteger &) –
  • LocalCoefficientArray (TColStd_Array1OfReal &) –
  • IntervalsArray (TColStd_Array1OfReal &) –
  • ErrorMaxArray (TColStd_Array1OfReal &) –
  • AverageErrorArray (TColStd_Array1OfReal &) –
  • ErrorCode (int &) –
Return type:

void

class AdvApprox_Cutting(*args, **kwargs)

Bases: object

Delete()
Return type:void
Value()
Parameters:
  • a (float) –
  • b (float) –
  • cuttingvalue (float &) –
Return type:

bool

thisown

The membership flag

class AdvApprox_DichoCutting(*args)

Bases: OCC.AdvApprox.AdvApprox_Cutting

Return type:None
thisown

The membership flag

class AdvApprox_PrefAndRec(*args)

Bases: OCC.AdvApprox.AdvApprox_Cutting

Parameters:
  • RecomendedCut (TColStd_Array1OfReal &) –
  • PrefferedCut (TColStd_Array1OfReal &) –
  • Weight (float) – default value is 5
Return type:

None

thisown

The membership flag

class AdvApprox_PrefCutting(*args)

Bases: OCC.AdvApprox.AdvApprox_Cutting

Parameters:CutPnts (TColStd_Array1OfReal &) –
Return type:None
thisown

The membership flag

class AdvApprox_SimpleApprox(*args)

Bases: object

Parameters:
  • TotalDimension (int) –
  • TotalNumSS (int) –
  • Continuity (GeomAbs_Shape) –
  • WorkDegree (int) –
  • NbGaussPoints (int) –
  • JacobiBase (Handle_PLib_JacobiPolynomial &) –
  • Func (AdvApprox_EvaluatorFunction &) –
Return type:

None

AverageError()
Parameters:Index (int) –
Return type:float
Coefficients()
  • returns the coefficients in the Jacobi Base
Return type:Handle_TColStd_HArray1OfReal
Degree()
Return type:int
DifTab()
Return type:Handle_TColStd_HArray1OfReal
DumpToString()

AdvApprox_SimpleApprox_DumpToString(AdvApprox_SimpleApprox self) -> std::string

FirstConstr()
  • returns the constraints at First
Return type:Handle_TColStd_HArray2OfReal
IsDone()
Return type:bool
LastConstr()
  • returns the constraints at Last
Return type:Handle_TColStd_HArray2OfReal
MaxError()
Parameters:Index (int) –
Return type:float
Perform()
  • Constructs approximator tool. //! Warning: the Func should be valid reference to object of type inherited from class EvaluatorFunction from Approx with life time longer than that of the approximator tool;
Parameters:
  • LocalDimension (TColStd_Array1OfInteger &) –
  • LocalTolerancesArray (TColStd_Array1OfReal &) –
  • First (float) –
  • Last (float) –
  • MaxDegree (int) –
Return type:

None

SomTab()
Return type:Handle_TColStd_HArray1OfReal
thisown

The membership flag

class SwigPyIterator(*args, **kwargs)

Bases: object

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

The membership flag

value()
new_instancemethod(func, inst, cls)
register_handle(handle, base_object)

Inserts the handle into the base object to prevent memory corruption in certain cases