OpenCascade.js
API ReferenceModelingDataTKG3d

AdvApprox

OCCT package AdvApprox: AdvApprox_ApproxAFunction, AdvApprox_Cutting, AdvApprox_DichoCutting, AdvApprox_EvaluatorFunction, and 3 more bound classes.

AdvApprox_ApproxAFunction

this approximate a given function

Constructors(2)

  • constructor(Num1DSS: number, Num2DSS: number, Num3DSS: number, OneDTol: NCollection_HArray1_double, TwoDTol: NCollection_HArray1_double, ThreeDTol: NCollection_HArray1_double, First: number, Last: number, Continuity: GeomAbs_Shape, MaxDeg: number, MaxSeg: number, Func: AdvApprox_EvaluatorFunction): AdvApprox_ApproxAFunction

    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 (12)
    • Num1DSS
    • Num2DSS
    • Num3DSS
    • OneDTol
    • TwoDTol
    • ThreeDTol
    • First
    • Last
    • Continuity
    • MaxDeg
    • MaxSeg
    • Func
  • constructor(Num1DSS: number, Num2DSS: number, Num3DSS: number, OneDTol: NCollection_HArray1_double, TwoDTol: NCollection_HArray1_double, ThreeDTol: NCollection_HArray1_double, First: number, Last: number, Continuity: GeomAbs_Shape, MaxDeg: number, MaxSeg: number, Func: AdvApprox_EvaluatorFunction, CutTool: AdvApprox_Cutting): AdvApprox_ApproxAFunction

    Approximation with user method of cutting.

    Parameters (13)
    • Num1DSS
    • Num2DSS
    • Num3DSS
    • OneDTol
    • TwoDTol
    • ThreeDTol
    • First
    • Last
    • Continuity
    • MaxDeg
    • MaxSeg
    • Func
    • CutTool

Static methods(1)

Instance methods(18)

AdvApprox_Cutting

to choose the way of cutting in approximation

Instance methods(1)

  • Value(a: number, b: number, cuttingvalue: number): { returnValue: boolean; cuttingvalue: number }
    Parameters (3)
    • a
    • b
    • cuttingvalue

AdvApprox_EvaluatorFunction

Interface for a class implementing a function to be approximated by AdvApprox_ApproxAFunction.

Instance methods(1)

  • Evaluate(Dimension: number, StartEnd: [number, number], Parameter: number, DerivativeRequest: number, Result: number, ErrorCode: number): void

    Function evaluation method to be defined by descendant.

    Parameters (6)
    • Dimension
    • StartEnd
    • Parameter
    • DerivativeRequest
    • Result
    • ErrorCode

AdvApprox_PrefAndRec

inherits class Cutting; contains a list of preferential points (pi)i and a list of Recommended points used in cutting management. if Cutting is necessary in [a,b], we cut at the di nearest from (a+b)/2

Constructors(1)

Instance methods(1)

  • Value(a: number, b: number, cuttingvalue: number): { returnValue: boolean; cuttingvalue: number }

    cuting value is

    • the recommended point nerest of (a+b)/2 if pi is in ]a,b[ or else
    • the preferential point nearest of (a+b) / 2 if pi is in ](ra+b)/(r+1) , (a+rb)/(r+1)[ where r = Weight
    • or (a+b)/2 else.
    Parameters (3)
    • a
    • b
    • cuttingvalue
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • cuttingvalue: updated value from the call.

AdvApprox_SimpleApprox

Approximate a function on an interval [First,Last] The result is a simple polynomial whose degree is as low as possible to satisfy the required tolerance and the maximum degree. The maximum error and the average error resulting from approximating the function by the polynomial are computed.

Constructors(1)

Instance methods(10)