Approx
OCCT package Approx: Approx_BSplineApproxInterp, Approx_Curve2d, Approx_Curve3d, Approx_CurveOnSurface, and 10 more bound classes.
Approx_BSplineApproxInterp
Constrained least-squares B-spline curve approximation with exact interpolation constraints.
This class fits a B-spline curve through a set of 3D points, where each point can be either approximated (in the least-squares sense) or exactly interpolated. Selected interpolation points can additionally be marked as "kinks" - the solver then inserts high-multiplicity knots at the corresponding parameters to preserve C0 discontinuities.
The algorithm solves a KKT (Karush-Kuhn-Tucker) saddle-point system:
where:
- A is the basis matrix for approximated points
- C is the basis matrix for interpolated points
- L encodes continuity constraints (C1/C2 for closed curves)
- x are the control point coordinates
- l, m are Lagrange multipliers
Usage:
Constructors(1)
- constructor(thePoints: NCollection_Array1_gp_Pnt, theNbControlPts: number, theDegree?: number, theContinuousIfClosed?: boolean): Approx_BSplineApproxInterp
Creates a constrained approximation solver.
Parameters (4)thePoints—array of 3D points to fit (1-based indexing)theNbControlPts—desired number of control points for the B-splinetheDegree—degree of the B-spline (default 3)theContinuousIfClosed—if true, enforces C2 continuity for closed curves
Instance methods(14)
- InterpolatePoint(thePointIndex: number, theWithKink?: boolean): void
Marks a point to be exactly interpolated rather than approximated.
Parameters (2)thePointIndex—0-based index of the pointtheWithKink—if true, a kink (C0 break) is inserted at this parameter
- Perform(): void
Performs the fit using automatically computed parameters. Parameters are computed from input points using current parametrization alpha.
- Perform(theParams: NCollection_Array1_double): void
Performs the fit with given parameters.
Parameters (1)theParams—parameter values for each point (size must match point count)
- PerformOptimal(theMaxIter: number): void
Performs the fit with iterative parameter optimization using automatically computed initial parameters.
Parameters (1)theMaxIter—maximum number of optimization iterations
- PerformOptimal(theParams: NCollection_Array1_double, theMaxIter: number): void
Performs the fit with iterative parameter optimization. Parameters of approximated points are re-projected onto the curve after each iteration to improve the fit.
Parameters (2)theParams—initial parameter valuestheMaxIter—maximum number of optimization iterations
- IsDone(): boolean
Returns true if the fit was successfully computed.
Returns the resulting B-spline curve.
- MaxError(): number
Returns the maximum approximation error (distance at approximated points).
- SetParametrizationAlpha(theAlpha: number): void
Sets the parametrization power for automatic parameter computation. 0.0 = uniform, 0.5 = centripetal (default), 1.0 = chord-length.
Parameters (1)theAlpha—parametrization exponent in [0, 1]
- SetMinPivot(theMinPivot: number): void
Sets the minimum pivot value for the Gauss solver. Matrices with pivots below this threshold are treated as singular.
Parameters (1)theMinPivot—minimum pivot threshold (default 1e-20)
- SetClosedTolerance(theRelTol: number): void
Sets the relative tolerance for detecting closed curves. Closedness is detected when first/last points are within theRelTol * (bounding box diagonal).
Parameters (1)theRelTol—relative tolerance (default 1e-12)
- SetKnotInsertionTolerance(theTol: number): void
Sets the tolerance for detecting duplicate knot positions during insertion.
Parameters (1)theTol—knot matching tolerance (default 1e-4)
- SetConvergenceTolerance(theTol: number): void
Sets the convergence tolerance for parameter optimization. Optimization stops when relative error reduction falls below this value.
Parameters (1)theTol—convergence tolerance (default 1e-3)
- SetProjectionTolerance(theTol: number): void
Sets the tolerance for point projection onto curve during optimization.
Parameters (1)theTol—projection accuracy (default 1e-6)
Approx_Curve2d
Makes an approximation for HCurve2d from Adaptor3d.
Constructors(1)
- constructor(C2D: Adaptor2d_Curve2d, First: number, Last: number, TolU: number, TolV: number, Continuity: GeomAbs_Shape, MaxDegree: number, MaxSegments: number): Approx_Curve2dParameters (8)
C2DFirstLastTolUTolVContinuityMaxDegreeMaxSegments
Instance methods(5)
- IsDone(): boolean
- HasResult(): boolean
- MaxError2dU(): number
- MaxError2dV(): number
Approx_Curve3d
Constructors(1)
- constructor(Curve: Adaptor3d_Curve, Tol3d: number, Order: GeomAbs_Shape, MaxSegments: number, MaxDegree: number): Approx_Curve3d
Approximation of a curve with respect of the required tolerance Tol3D.
Parameters (5)CurveTol3dOrderMaxSegmentsMaxDegree
Instance methods(4)
- IsDone(): boolean
returns true if the approximation has been done within required tolerance
- HasResult(): boolean
returns true if the approximation did come out with a result that is not NECESSARILY within the required tolerance
- MaxError(): number
returns the Maximum Error (>0 when an approximation has been done, 0 if no approximation)
Approx_CurveOnSurface
Approximation of curve on surface.
Constructors(2)
- constructor(theC2D: Adaptor2d_Curve2d, theSurf: Adaptor3d_Surface, theFirst: number, theLast: number, theTol: number): Approx_CurveOnSurface
This constructor does not call perform method.
Parameters (5)theC2D—2D Curve to be approximated in 3D.theSurf—Surface where 2D curve is located.theFirst—Last parameter of resulting curve.theLasttheTol—Computation tolerance.
- constructor(C2D: Adaptor2d_Curve2d, Surf: Adaptor3d_Surface, First: number, Last: number, Tol: number, Continuity: GeomAbs_Shape, MaxDegree: number, MaxSegments: number, Only3d?: boolean, Only2d?: boolean): Approx_CurveOnSurface
This constructor calls perform method. This constructor is deprecated.
DeprecatedParameters (10)C2DSurfFirstLastTolContinuityMaxDegreeMaxSegmentsOnly3dOnly2d
Instance methods(8)
- IsDone(): boolean
- HasResult(): boolean
- MaxError3d(): number
- MaxError2dU(): number
- MaxError2dV(): number
returns the maximum errors relatively to the U component or the V component of the 2d Curve
- Perform(theMaxSegments: number, theMaxDegree: number, theContinuity: GeomAbs_Shape, theOnly3d?: boolean, theOnly2d?: boolean): void
Constructs the 3d curve. Input parameters are ignored when the input curve is U-isoline or V-isoline.
Parameters (5)theMaxSegments—Maximal number of segments in the resulting spline.theMaxDegree—Maximal degree of the result.theContinuity—Resulting continuity.theOnly3d—Determines building only 3D curve.theOnly2d—Determines building only 2D curve.
Approx_CurvilinearParameter
Approximation of a Curve to make its parameter be its curvilinear abscissa. If the curve is a curve on a surface S, C2D is the corresponding Pcurve, we consider the curve is given by its representation.
If the curve is a curve on 2 surfaces S1 and S2 and C2D1 C2D2 are the two corresponding Pcurve, we consider the curve is given by its representation
Constructors(3)
- constructor(C3D: Adaptor3d_Curve, Tol: number, Order: GeomAbs_Shape, MaxDegree: number, MaxSegments: number): Approx_CurvilinearParameter
case of a free 3D curve
Parameters (5)C3DTolOrderMaxDegreeMaxSegments
- constructor(C2D: Adaptor2d_Curve2d, Surf: Adaptor3d_Surface, Tol: number, Order: GeomAbs_Shape, MaxDegree: number, MaxSegments: number): Approx_CurvilinearParameter
case of a curve on one surface
Parameters (6)C2DSurfTolOrderMaxDegreeMaxSegments
- constructor(C2D1: Adaptor2d_Curve2d, Surf1: Adaptor3d_Surface, C2D2: Adaptor2d_Curve2d, Surf2: Adaptor3d_Surface, Tol: number, Order: GeomAbs_Shape, MaxDegree: number, MaxSegments: number): Approx_CurvilinearParameter
case of a curve on two surfaces
Parameters (8)C2D1Surf1C2D2Surf2TolOrderMaxDegreeMaxSegments
Instance methods(8)
- IsDone(): boolean
- HasResult(): boolean
returns the Bspline curve corresponding to the reparametrized 3D curve
- MaxError3d(): number
returns the maximum error on the reparametrized 3D curve
returns the BsplineCurve representing the reparametrized 2D curve on the first surface (case of a curve on one or two surfaces)
- MaxError2d1(): number
returns the maximum error on the first reparametrized 2D curve
returns the BsplineCurve representing the reparametrized 2D curve on the second surface (case of a curve on two surfaces)
- MaxError2d2(): number
returns the maximum error on the second reparametrized 2D curve
Approx_CurvlinFunc
defines an abstract curve with curvilinear parametrization
Constructors(3)
- constructor(C: Adaptor3d_Curve, Tol: number): Approx_CurvlinFuncParameters (2)
CTol
- constructor(C2D: Adaptor2d_Curve2d, S: Adaptor3d_Surface, Tol: number): Approx_CurvlinFuncParameters (3)
C2DSTol
- constructor(C2D1: Adaptor2d_Curve2d, C2D2: Adaptor2d_Curve2d, S1: Adaptor3d_Surface, S2: Adaptor3d_Surface, Tol: number): Approx_CurvlinFuncParameters (5)
C2D1C2D2S1S2Tol
Static methods(2)
- get_type_name(): string
Instance methods(15)
- SetTol(Tol: number): void
--Purpose Update the tolerance to used
Parameters (1)Tol
- FirstParameter(): number
- LastParameter(): number
- NbIntervals(S: GeomAbs_Shape): number
Returns the number of intervals for continuity . May be one if Continuity(me) >= .
Parameters (1)S
- Intervals(T: NCollection_Array1_double, S: GeomAbs_Shape): void
Stores in <T> the parameters bounding the intervals of continuity .
The array must provide enough room to accommodate for the parameters. i.e. T.Length() >NbIntervals()Parameters (2)T—Mutated in place; read the updated value from this argument after the call.S
- Trim(First: number, Last: number, Tol: number): void
if First < 0 or Last > 1
Parameters (3)FirstLastTol
- Length(): void
Computes length of the curve.
- Length(C: Adaptor3d_Curve, FirstU: number, LasrU: number): number
Computes length of the curve segment.
Parameters (3)C—Mutated in place; read the updated value from this argument after the call.FirstULasrU
- GetLength(): number
- GetUParameter(C: Adaptor3d_Curve, S: number, NumberOfCurve: number): number
returns original parameter corresponding S. if Case == 1 computation is performed on myC2D1 and mySurf1, otherwise it is done on myC2D2 and mySurf2.
Parameters (3)C—Mutated in place; read the updated value from this argument after the call.SNumberOfCurve
- GetSParameter(U: number): number
returns original parameter corresponding S.
Parameters (1)U
- EvalCase1(S: number, Order: number, Result: NCollection_Array1_double): boolean
if myCase != 1
Parameters (3)SOrderResult—Mutated in place; read the updated value from this argument after the call.
- EvalCase2(S: number, Order: number, Result: NCollection_Array1_double): boolean
if myCase != 2
Parameters (3)SOrderResult—Mutated in place; read the updated value from this argument after the call.
- EvalCase3(S: number, Order: number, Result: NCollection_Array1_double): boolean
if myCase != 3
Parameters (3)SOrderResult—Mutated in place; read the updated value from this argument after the call.
Approx_FitAndDivide
Constructors(2)
- constructor(degreemin?: number, degreemax?: number, Tolerance3d?: number, Tolerance2d?: number, cutting?: boolean, FirstC?: AppParCurves_Constraint, LastC?: AppParCurves_Constraint): Approx_FitAndDivide
Initializes the fields of the algorithm.
Parameters (7)degreemindegreemaxTolerance3dTolerance2dcuttingFirstCLastC
- constructor(Line: AppCont_Function, degreemin?: number, degreemax?: number, Tolerance3d?: number, Tolerance2d?: number, cutting?: boolean, FirstC?: AppParCurves_Constraint, LastC?: AppParCurves_Constraint): Approx_FitAndDivide
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.
Parameters (8)LinedegreemindegreemaxTolerance3dTolerance2dcuttingFirstCLastC
Instance methods(13)
- Perform(Line: AppCont_Function): void
runs the algorithm after having initialized the fields.
Parameters (1)Line
- SetDegrees(degreemin: number, degreemax: number): void
changes the degrees of the approximation.
Parameters (2)degreemindegreemax
- SetTolerances(Tolerance3d: number, Tolerance2d: number): void
Changes the tolerances of the approximation.
Parameters (2)Tolerance3dTolerance2d
- SetConstraints(FirstC: AppParCurves_Constraint, LastC: AppParCurves_Constraint): void
Changes the constraints of the approximation.
Parameters (2)FirstCLastC
- SetMaxSegments(theMaxSegments: number): void
Changes the max number of segments, which is allowed for cutting.
Parameters (1)theMaxSegments
- SetInvOrder(theInvOrder: boolean): void
Set inverse order of degree selection: if theInvOrdr = true, current degree is chosen by inverse order - from maxdegree to mindegree. By default inverse order is used.
Parameters (1)theInvOrder
- SetHangChecking(theHangChecking: boolean): void
Set value of hang checking flag if this flag = true, possible hang of algorithm is checked and algorithm is forced to stop. By default hang checking is used.
Parameters (1)theHangChecking
- IsAllApproximated(): boolean
returns False if at a moment of the approximation, the status NoApproximation has been sent by the user when more points were needed.
- IsToleranceReached(): boolean
returns False if the status NoPointsAdded has been sent.
- Error(Index: number, tol3d: number, tol2d: number): { tol3d: number; tol2d: number }
returns the tolerances 2d and 3d of the <Index> MultiCurve.
Parameters (3)Indextol3dtol2d
ReturnsA result object with fields:
tol3d: updated value from the call.tol2d: updated value from the call.
- NbMultiCurves(): number
Returns the number of MultiCurve doing the approximation of the MultiLine.
- Value(Index?: number): AppParCurves_MultiCurve
returns the approximation MultiCurve of range <Index>.
Parameters (1)Index
- Parameters(Index: number, firstp: number, lastp: number): { firstp: number; lastp: number }Parameters (3)
Indexfirstplastp
Approx_FitAndDivide2d
Constructors(2)
- constructor(degreemin?: number, degreemax?: number, Tolerance3d?: number, Tolerance2d?: number, cutting?: boolean, FirstC?: AppParCurves_Constraint, LastC?: AppParCurves_Constraint): Approx_FitAndDivide2d
Initializes the fields of the algorithm.
Parameters (7)degreemindegreemaxTolerance3dTolerance2dcuttingFirstCLastC
- constructor(Line: AppCont_Function, degreemin?: number, degreemax?: number, Tolerance3d?: number, Tolerance2d?: number, cutting?: boolean, FirstC?: AppParCurves_Constraint, LastC?: AppParCurves_Constraint): Approx_FitAndDivide2d
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.
Parameters (8)LinedegreemindegreemaxTolerance3dTolerance2dcuttingFirstCLastC
Instance methods(13)
- Perform(Line: AppCont_Function): void
runs the algorithm after having initialized the fields.
Parameters (1)Line
- SetDegrees(degreemin: number, degreemax: number): void
changes the degrees of the approximation.
Parameters (2)degreemindegreemax
- SetTolerances(Tolerance3d: number, Tolerance2d: number): void
Changes the tolerances of the approximation.
Parameters (2)Tolerance3dTolerance2d
- SetConstraints(FirstC: AppParCurves_Constraint, LastC: AppParCurves_Constraint): void
Changes the constraints of the approximation.
Parameters (2)FirstCLastC
- SetMaxSegments(theMaxSegments: number): void
Changes the max number of segments, which is allowed for cutting.
Parameters (1)theMaxSegments
- SetInvOrder(theInvOrder: boolean): void
Set inverse order of degree selection: if theInvOrdr = true, current degree is chosen by inverse order - from maxdegree to mindegree. By default inverse order is used.
Parameters (1)theInvOrder
- SetHangChecking(theHangChecking: boolean): void
Set value of hang checking flag if this flag = true, possible hang of algorithm is checked and algorithm is forced to stop. By default hang checking is used.
Parameters (1)theHangChecking
- IsAllApproximated(): boolean
returns False if at a moment of the approximation, the status NoApproximation has been sent by the user when more points were needed.
- IsToleranceReached(): boolean
returns False if the status NoPointsAdded has been sent.
- Error(Index: number, tol3d: number, tol2d: number): { tol3d: number; tol2d: number }
returns the tolerances 2d and 3d of the <Index> MultiCurve.
Parameters (3)Indextol3dtol2d
ReturnsA result object with fields:
tol3d: updated value from the call.tol2d: updated value from the call.
- NbMultiCurves(): number
Returns the number of MultiCurve doing the approximation of the MultiLine.
- Value(Index?: number): AppParCurves_MultiCurve
returns the approximation MultiCurve of range <Index>.
Parameters (1)Index
- Parameters(Index: number, firstp: number, lastp: number): { firstp: number; lastp: number }Parameters (3)
Indexfirstplastp
Approx_MCurvesToBSpCurve
Constructors(1)
Instance methods(6)
- Reset(): void
- Append(MC: AppParCurves_MultiCurve): voidParameters (1)
MC
- Perform(): void
- Perform(TheSeq: NCollection_Sequence_AppParCurves_MultiCurve): voidParameters (1)
TheSeq
return the composite MultiCurves as a MultiBSpCurve.
return the composite MultiCurves as a MultiBSpCurve.
Approx_ParametrizationType
Properties(3)
Approx_SameParameter
Approximation of a PCurve on a surface to make its parameter be the same that the parameter of a given 3d reference curve.
Constructors(3)
- constructor(C3D: Geom_Curve, C2D: Geom2d_Curve, S: Geom_Surface, Tol: number): Approx_SameParameter
Warning: the C3D and C2D must have the same parametric domain.
Parameters (4)C3DC2DSTol
- constructor(C3D: Adaptor3d_Curve, C2D: Geom2d_Curve, S: Adaptor3d_Surface, Tol: number): Approx_SameParameter
Warning: the C3D and C2D must have the same parametric domain.
Parameters (4)C3DC2DSTol
- constructor(C3D: Adaptor3d_Curve, C2D: Adaptor2d_Curve2d, S: Adaptor3d_Surface, Tol: number): Approx_SameParameter
Warning: the C3D and C2D must have the same parametric domain.
Parameters (4)C3DC2DSTol
Instance methods(6)
- IsDone(): booleanReturns
.false. if calculations failed, .true. if calculations succeed
- TolReached(): numberReturns
tolerance (maximal distance) between 3d curve and curve on surface, generated by 2d curve and surface.
- IsSameParameter(): boolean
Tells whether the original data had already the same parameter up to the tolerance : in that case nothing is done.
Returns the 2D curve that has the same parameter as the 3D curve once evaluated on the surface up to the specified tolerance.
Returns the 3D curve that has the same parameter as the 3D curve once evaluated on the surface up to the specified tolerance.
Returns the 3D curve on surface that has the same parameter as the 3D curve up to the specified tolerance.
Approx_Status
Properties(3)
Approx_SweepApproximation
Approximation of an Surface S(u,v) (and eventually associate 2d Curves) defined by section's law.
This surface is defined by a function F(u, v) where Ft(u) = F(u, t) is a bspline curve. To use this algorithm, you have to implement Ft(u) as a derivative class of Approx_SweepFunction. This algorithm can be used by blending, sweeping...
Constructors(1)
- Parameters (1)
Func
Instance methods(25)
- Perform(First: number, Last: number, Tol3d: number, BoundTol: number, Tol2d: number, TolAngular: number, Continuity?: GeomAbs_Shape, Degmax?: number, Segmax?: number): void
Perform the Approximation [First, Last] : Approx_SweepApproximation.cdl Tol3d : Tolerance to surface approximation Tol2d : Tolerance used to perform curve approximation Normally the 2d curve are approximated with a tolerance given by the resolution on support surfaces, but if this tolerance is too large Tol2d is used.
TolAngular : Tolerance (in radian) to control the angle between tangents on the section law and tangent of iso-v on approximated surface Continuity : The continuity in v waiting on the surface Degmax : The maximum degree in v required on the surface Segmax : The maximum number of span in v required on the surface Warning : The continuity ci can be obtained only if Ft is Ci.Parameters (9)FirstLastTol3dBoundTolTol2dTolAngularContinuityDegmaxSegmax
- Eval(Parameter: number, DerivativeRequest: number, First: number, Last: number, Result: number): { returnValue: number; Result: number }
The EvaluatorFunction from AdvApprox;.
Parameters (5)ParameterDerivativeRequestFirstLastResult
ReturnsA result object with fields:
returnValue: the C++ return valueResult: updated value from the call.
- IsDone(): boolean
returns if we have an result
- SurfShape(UDegree: number, VDegree: number, NbUPoles: number, NbVPoles: number, NbUKnots: number, NbVKnots: number): { UDegree: number; VDegree: number; NbUPoles: number; NbVPoles: number; NbUKnots: number; NbVKnots: number }Parameters (6)
UDegreeVDegreeNbUPolesNbVPolesNbUKnotsNbVKnots
- Surface(TPoles: NCollection_Array2_gp_Pnt, TWeights: NCollection_Array2_double, TUKnots: NCollection_Array1_double, TVKnots: NCollection_Array1_double, TUMults: NCollection_Array1_int, TVMults: NCollection_Array1_int): voidParameters (6)
TPolesTWeightsTUKnotsTVKnotsTUMultsTVMults
- UDegree(): number
- VDegree(): number
- MaxErrorOnSurf(): number
returns the maximum error in the surface approximation.
- AverageErrorOnSurf(): number
returns the average error in the surface approximation.
- NbCurves2d(): number
- Curves2dShape(Degree: number, NbPoles: number, NbKnots: number): { Degree: number; NbPoles: number; NbKnots: number }Parameters (3)
DegreeNbPolesNbKnots
- Curve2d(Index: number, TPoles: NCollection_Array1_gp_Pnt2d, TKnots: NCollection_Array1_double, TMults: NCollection_Array1_int): voidParameters (4)
IndexTPolesTKnotsTMults
- Curves2dDegree(): number
- Curve2dPoles(Index: number): NCollection_Array1_gp_Pnt2dParameters (1)
Index
- Max2dError(Index: number): number
returns the maximum error of the <Index> 2d curve approximation.
Parameters (1)Index
- Average2dError(Index: number): number
returns the average error of the <Index> 2d curve approximation.
Parameters (1)Index
- TolCurveOnSurf(Index: number): number
returns the maximum 3d error of the <Index> 2d curve approximation on the Surface.
Parameters (1)Index
Approx_SweepFunction
defined the function used by SweepApproximation to perform sweeping application.
Static methods(2)
- get_type_name(): string
Instance methods(18)
- D0(Param: number, First: number, Last: number, Poles: NCollection_Array1_gp_Pnt, Poles2d: NCollection_Array1_gp_Pnt2d, Weigths: NCollection_Array1_double): boolean
compute the section for v = param
Parameters (6)ParamFirstLastPoles—Mutated in place; read the updated value from this argument after the call.Poles2d—Mutated in place; read the updated value from this argument after the call.Weigths—Mutated in place; read the updated value from this argument after the call.
- D1(Param: number, First: number, Last: number, Poles: NCollection_Array1_gp_Pnt, DPoles: NCollection_Array1_gp_Vec, Poles2d: NCollection_Array1_gp_Pnt2d, DPoles2d: NCollection_Array1_gp_Vec2d, Weigths: NCollection_Array1_double, DWeigths: NCollection_Array1_double): boolean
compute the first derivative in v direction of the section for v = param Warning : It used only for C1 or C2 approximation
Parameters (9)ParamFirstLastPoles—Mutated in place; read the updated value from this argument after the call.DPoles—Mutated in place; read the updated value from this argument after the call.Poles2d—Mutated in place; read the updated value from this argument after the call.DPoles2d—Mutated in place; read the updated value from this argument after the call.Weigths—Mutated in place; read the updated value from this argument after the call.DWeigths—Mutated in place; read the updated value from this argument after the call.
- D2(Param: number, First: number, Last: number, Poles: NCollection_Array1_gp_Pnt, DPoles: NCollection_Array1_gp_Vec, D2Poles: NCollection_Array1_gp_Vec, Poles2d: NCollection_Array1_gp_Pnt2d, DPoles2d: NCollection_Array1_gp_Vec2d, D2Poles2d: NCollection_Array1_gp_Vec2d, Weigths: NCollection_Array1_double, DWeigths: NCollection_Array1_double, D2Weigths: NCollection_Array1_double): boolean
compute the second derivative in v direction of the section for v = param Warning : It used only for C2 approximation
Parameters (12)ParamFirstLastPoles—Mutated in place; read the updated value from this argument after the call.DPoles—Mutated in place; read the updated value from this argument after the call.D2Poles—Mutated in place; read the updated value from this argument after the call.Poles2d—Mutated in place; read the updated value from this argument after the call.DPoles2d—Mutated in place; read the updated value from this argument after the call.D2Poles2d—Mutated in place; read the updated value from this argument after the call.Weigths—Mutated in place; read the updated value from this argument after the call.DWeigths—Mutated in place; read the updated value from this argument after the call.D2Weigths—Mutated in place; read the updated value from this argument after the call.
- Nb2dCurves(): number
get the number of 2d curves to approximate.
- SectionShape(NbPoles: number, NbKnots: number, Degree: number): { NbPoles: number; NbKnots: number; Degree: number }
get the format of an section
Parameters (3)NbPolesNbKnotsDegree
ReturnsA result object with fields:
NbPoles: updated value from the call.NbKnots: updated value from the call.Degree: updated value from the call.
- Knots(TKnots: NCollection_Array1_double): void
get the Knots of the section
Parameters (1)TKnots—Mutated in place; read the updated value from this argument after the call.
- Mults(TMults: NCollection_Array1_int): void
get the Multplicities of the section
Parameters (1)TMults—Mutated in place; read the updated value from this argument after the call.
- IsRational(): boolean
Returns if the sections are rational or not.
- NbIntervals(S: GeomAbs_Shape): number
Returns the number of intervals for continuity . May be one if Continuity(me) >= .
Parameters (1)S
- Intervals(T: NCollection_Array1_double, S: GeomAbs_Shape): void
Stores in <T> the parameters bounding the intervals of continuity .
The array must provide enough room to accommodate for the parameters. i.e. T.Length() >NbIntervals()Parameters (2)T—Mutated in place; read the updated value from this argument after the call.S
- SetInterval(First: number, Last: number): void
Sets the bounds of the parametric interval on the function This determines the derivatives in these values if the function is not Cn.
Parameters (2)FirstLast
- Resolution(Index: number, Tol: number, TolU: number, TolV: number): { TolU: number; TolV: number }
Returns the resolutions in the sub-space 2d <Index> This information is useful to find a good tolerance in 2d approximation.
Parameters (4)IndexTolTolUTolV
ReturnsA result object with fields:
TolU: updated value from the call.TolV: updated value from the call.
- GetTolerance(BoundTol: number, SurfTol: number, AngleTol: number, Tol3d: NCollection_Array1_double): void
Returns the tolerance to reach in approximation to satisfy. BoundTol error at the Boundary AngleTol tangent error at the Boundary (in radian) SurfTol error inside the surface.
Parameters (4)BoundTolSurfTolAngleTolTol3d—Mutated in place; read the updated value from this argument after the call.
- SetTolerance(Tol3d: number, Tol2d: number): void
Is useful, if (me) have to run numerical algorithm to perform D0, D1 or D2.
Parameters (2)Tol3dTol2d
Get the barycentre of Surface. An very poor estimation is sufficient. This information is useful to perform well conditioned rational approximation. Warning: Used only if <me> IsRational.
- MaximalSection(): number
Returns the length of the greater section. This information is useful to G1's control. Warning: With an little value, approximation can be slower.
- GetMinimalWeight(Weigths: NCollection_Array1_double): void
Compute the minimal value of weight for each poles in all sections. This information is useful to control error in rational approximation. Warning: Used only if <me> IsRational.
Parameters (1)Weigths—Mutated in place; read the updated value from this argument after the call.