OpenCascade.js
API ReferenceModelingDataTKGeomBase

Extrema

OCCT package Extrema: Extrema_Curve2dTool, Extrema_CurveTool, Extrema_ElementType, Extrema_ExtAlgo, and 37 more bound classes.

Extrema_Curve2dTool

Constructors(1)

Static methods(28)

Extrema_CurveTool

Constructors(1)

Static methods(27)

Extrema_ExtCC

It calculates all the distance between two curves. These distances can be maximum or minimum.

Constructors(3)

Instance methods(15)

  • Initialize(C1: Adaptor3d_Curve, C2: Adaptor3d_Curve, TolC1: number, TolC2: number): void

    Initializes but does not perform algorithm.

    Parameters (4)
    • C1
    • C2
    • TolC1
    • TolC2
  • Initialize(C1: Adaptor3d_Curve, C2: Adaptor3d_Curve, U1: number, U2: number, V1: number, V2: number, TolC1: number, TolC2: number): void

    Initializes but does not perform algorithm.

    Parameters (8)
    • C1
    • C2
    • U1
    • U2
    • V1
    • V2
    • TolC1
    • TolC2
  • SetCurve(theRank: number, C: Adaptor3d_Curve): void
    Parameters (2)
    • theRank
    • C
  • SetCurve(theRank: number, C: Adaptor3d_Curve, Uinf: number, Usup: number): void
    Parameters (4)
    • theRank
    • C
    • Uinf
    • Usup
  • SetRange(theRank: number, Uinf: number, Usup: number): void
    Parameters (3)
    • theRank
    • Uinf
    • Usup
  • SetTolerance(theRank: number, Tol: number): void
    Parameters (2)
    • theRank
    • Tol
  • Perform(): void
  • IsDone(): boolean

    Returns True if the distances are found.

  • NbExt(): number

    Returns the number of extremum distances.

  • IsParallel(): boolean

    Returns True if the two curves are parallel.

  • SquareDistance(N?: number): number

    Returns the value of the Nth extremum square distance.

    Parameters (1)
    • N
  • Points(N: number, P1: Extrema_POnCurv, P2: Extrema_POnCurv): void

    Returns the points of the Nth extremum distance. P1 is on the first curve, P2 on the second one.

    Parameters (3)
    • N
    • P1
      Mutated in place; read the updated value from this argument after the call.
    • P2
      Mutated in place; read the updated value from this argument after the call.
  • TrimmedSquareDistances(dist11: number, distP12: number, distP21: number, distP22: number, P11: gp_Pnt, P12: gp_Pnt, P21: gp_Pnt, P22: gp_Pnt): { dist11: number; distP12: number; distP21: number; distP22: number }

    if the curve is a trimmed curve, dist11 is a square distance between the point on C1 of parameter FirstParameter and the point of parameter FirstParameter on C2.

    Parameters (8)
    • dist11
    • distP12
    • distP21
    • distP22
    • P11
      Mutated in place; read the updated value from this argument after the call.
    • P12
      Mutated in place; read the updated value from this argument after the call.
    • P21
      Mutated in place; read the updated value from this argument after the call.
    • P22
      Mutated in place; read the updated value from this argument after the call.
    Returns

    A result object with fields:

    • dist11: updated value from the call.
    • distP12: updated value from the call.
    • distP21: updated value from the call.
    • distP22: updated value from the call.
  • SetSingleSolutionFlag(theSingleSolutionFlag: boolean): void

    Set flag for single extrema computation. Works on parametric solver only.

    Parameters (1)
    • theSingleSolutionFlag
  • Get flag for single extrema computation. Works on parametric solver only.

Extrema_ExtCC2d

It calculates all the distance between two curves. These distances can be maximum or minimum.

Constructors(3)

Instance methods(10)

  • Initialize(C2: Adaptor2d_Curve2d, V1: number, V2: number, TolC1?: number, TolC2?: number): void

    initializes the fields.

    Parameters (5)
    • C2
    • V1
    • V2
    • TolC1
    • TolC2
  • Perform(C1: Adaptor2d_Curve2d, U1: number, U2: number): void
    Parameters (3)
    • C1
    • U1
    • U2
  • IsDone(): boolean

    Returns True if the distances are found.

  • NbExt(): number

    Returns the number of extremum distances.

  • IsParallel(): boolean

    Returns True if the two curves are parallel.

  • SquareDistance(N?: number): number

    Returns the value of the Nth extremum square distance.

    Parameters (1)
    • N
  • Points(N: number, P1: Extrema_POnCurv2d, P2: Extrema_POnCurv2d): void

    Returns the points of the Nth extremum distance. P1 is on the first curve, P2 on the second one.

    Parameters (3)
    • N
    • P1
      Mutated in place; read the updated value from this argument after the call.
    • P2
      Mutated in place; read the updated value from this argument after the call.
  • TrimmedSquareDistances(dist11: number, distP12: number, distP21: number, distP22: number, P11: gp_Pnt2d, P12: gp_Pnt2d, P21: gp_Pnt2d, P22: gp_Pnt2d): { dist11: number; distP12: number; distP21: number; distP22: number }

    if the curve is a trimmed curve, dist11 is a square distance between the point on C1 of parameter FirstParameter and the point of parameter FirstParameter on C2.

    Parameters (8)
    • dist11
    • distP12
    • distP21
    • distP22
    • P11
      Mutated in place; read the updated value from this argument after the call.
    • P12
      Mutated in place; read the updated value from this argument after the call.
    • P21
      Mutated in place; read the updated value from this argument after the call.
    • P22
      Mutated in place; read the updated value from this argument after the call.
    Returns

    A result object with fields:

    • dist11: updated value from the call.
    • distP12: updated value from the call.
    • distP21: updated value from the call.
    • distP22: updated value from the call.
  • SetSingleSolutionFlag(theSingleSolutionFlag: boolean): void

    Set flag for single extrema computation. Works on parametric solver only.

    Parameters (1)
    • theSingleSolutionFlag
  • Get flag for single extrema computation. Works on parametric solver only.

Extrema_ExtCS

It calculates all the extremum distances between a curve and a surface. These distances can be minimum or maximum.

Constructors(3)

Instance methods(8)

  • Initialize(S: Adaptor3d_Surface, TolC: number, TolS: number): void

    Initializes the fields of the algorithm.

    Parameters (3)
    • S
    • TolC
    • TolS
  • Initialize(S: Adaptor3d_Surface, Uinf: number, Usup: number, Vinf: number, Vsup: number, TolC: number, TolS: number): void

    Initializes the fields of the algorithm.

    Parameters (7)
    • S
    • Uinf
    • Usup
    • Vinf
    • Vsup
    • TolC
    • TolS
  • Perform(C: Adaptor3d_Curve, Uinf: number, Usup: number): void

    Computes the distances. An exception is raised if the fields have not been initialized.

    Parameters (3)
    • C
    • Uinf
    • Usup
  • IsDone(): boolean

    Returns True if the distances are found.

  • IsParallel(): boolean

    Returns True if the curve is on a parallel surface.

  • NbExt(): number

    Returns the number of extremum distances.

  • SquareDistance(N: number): number

    Returns the value of the Nth resulting square distance.

    Parameters (1)
    • N
  • Points(N: number, P1: Extrema_POnCurv, P2: Extrema_POnSurf): void

    Returns the point of the Nth resulting distance.

    Parameters (3)
    • N
    • P1
      Mutated in place; read the updated value from this argument after the call.
    • P2
      Mutated in place; read the updated value from this argument after the call.

Extrema_ExtElC

It calculates all the distance between two elementary curves. These distances can be maximum or minimum.

Constructors(7)

Instance methods(5)

  • IsDone(): boolean

    Returns True if the distances are found.

  • IsParallel(): boolean

    Returns True if the two curves are parallel.

  • NbExt(): number

    Returns the number of extremum distances.

  • SquareDistance(N?: number): number

    Returns the value of the Nth extremum square distance.

    Parameters (1)
    • N
  • Points(N: number, P1: Extrema_POnCurv, P2: Extrema_POnCurv): void

    Returns the points of the Nth extremum distance. P1 is on the first curve, P2 on the second one.

    Parameters (3)
    • N
    • P1
      Mutated in place; read the updated value from this argument after the call.
    • P2
      Mutated in place; read the updated value from this argument after the call.

Extrema_ExtElC2d

It calculates all the distance between two elementary curves. These distances can be maximum or minimum.

Constructors(10)

Instance methods(5)

  • IsDone(): boolean

    Returns True if the distances are found.

  • IsParallel(): boolean

    Returns True if the two curves are parallel.

  • NbExt(): number

    Returns the number of extremum distances.

  • SquareDistance(N?: number): number

    Returns the value of the Nth extremum square distance.

    Parameters (1)
    • N
  • Points(N: number, P1: Extrema_POnCurv2d, P2: Extrema_POnCurv2d): void

    Returns the points of the Nth extremum distance. P1 is on the first curve, P2 on the second one.

    Parameters (3)
    • N
    • P1
      Mutated in place; read the updated value from this argument after the call.
    • P2
      Mutated in place; read the updated value from this argument after the call.

Extrema_ExtElCS

It calculates all the distances between a curve and a surface. These distances can be maximum or minimum.

Constructors(12)

Instance methods(16)

Extrema_ExtElSS

It calculates all the distances between 2 elementary surfaces. These distances can be maximum or minimum.

Constructors(7)

Instance methods(11)

Extrema_ExtPElC

It calculates all the distances between a point and an elementary curve. These distances can be minimum or maximum.

Constructors(6)

  • constructor(P: gp_Pnt, C: gp_Lin, Tol: number, Uinf: number, Usup: number): Extrema_ExtPElC

    Calculates the extremum distance between the point P and the segment [Uinf,Usup] of the line C.

    Parameters (5)
    • P
    • C
    • Tol
    • Uinf
    • Usup
  • constructor(P: gp_Pnt, C: gp_Circ, Tol: number, Uinf: number, Usup: number): Extrema_ExtPElC

    Calculates the 2 extremum distances between the point P and the segment [Uinf,Usup] of the circle C. Tol is used to determine if P is on the axis of the circle or if an extremum is on an endpoint of the segment. If P is on the axis of the circle, there are infinite solution then IsDone(me)=False. The conditions on the Uinf and Usup are:<= Uinf <= 2.*PI and Usup > Uinf. If Usup > Uinf + 2.*PI, then only the solutions in the range [Uinf,Uinf+2.*PI[ are computed.

    Parameters (5)
    • P
    • C
    • Tol
    • Uinf
    • Usup
  • constructor(P: gp_Pnt, C: gp_Elips, Tol: number, Uinf: number, Usup: number): Extrema_ExtPElC

    Calculates the 4 extremum distances between the point P and the segment [Uinf,Usup] of the ellipse C. Tol is used to determine if the point is on the axis of the ellipse and if the major radius is equal to the minor radius or if an extremum is on an endpoint of the segment. If P is on the axis of the ellipse, there are infinite solution then IsDone(me)=False. The conditions on the Uinf and Usup are:<= Uinf <= 2.*PI and Usup > Uinf. If Usup > Uinf + 2.*PI, then only the solutions in the range [Uinf,Uinf+2.*PI[ are computed.

    Parameters (5)
    • P
    • C
    • Tol
    • Uinf
    • Usup
  • constructor(P: gp_Pnt, C: gp_Hypr, Tol: number, Uinf: number, Usup: number): Extrema_ExtPElC

    Calculates the extremum distances between the point P and the segment [Uinf,Usup] of the hyperbola C. Tol is used to determine if two solutions u and v are identical; the condition is: dist(C(u),C(v)) < Tol.

    Parameters (5)
    • P
    • C
    • Tol
    • Uinf
    • Usup
  • constructor(P: gp_Pnt, C: gp_Parab, Tol: number, Uinf: number, Usup: number): Extrema_ExtPElC

    Calculates the 4 extremum distances between the point P and the segment [Uinf,Usup] of the parabola C. Tol is used to determine if two solutions u and v are identical; the condition is: dist(C(u),C(v)) < Tol.

    Parameters (5)
    • P
    • C
    • Tol
    • Uinf
    • Usup

Instance methods(10)

  • Perform(P: gp_Pnt, C: gp_Lin, Tol: number, Uinf: number, Usup: number): void
    Parameters (5)
    • P
    • C
    • Tol
    • Uinf
    • Usup
  • Perform(P: gp_Pnt, C: gp_Circ, Tol: number, Uinf: number, Usup: number): void
    Parameters (5)
    • P
    • C
    • Tol
    • Uinf
    • Usup
  • Perform(P: gp_Pnt, C: gp_Elips, Tol: number, Uinf: number, Usup: number): void
    Parameters (5)
    • P
    • C
    • Tol
    • Uinf
    • Usup
  • Perform(P: gp_Pnt, C: gp_Hypr, Tol: number, Uinf: number, Usup: number): void
    Parameters (5)
    • P
    • C
    • Tol
    • Uinf
    • Usup
  • Perform(P: gp_Pnt, C: gp_Parab, Tol: number, Uinf: number, Usup: number): void
    Parameters (5)
    • P
    • C
    • Tol
    • Uinf
    • Usup
  • IsDone(): boolean

    True if the distances are found.

  • NbExt(): number

    Returns the number of extremum distances.

  • SquareDistance(N: number): number

    Returns the value of the Nth extremum square distance.

    Parameters (1)
    • N
  • IsMin(N: number): boolean

    Returns True if the Nth extremum distance is a minimum.

    Parameters (1)
    • N
  • Returns the point of the Nth extremum distance.

    Parameters (1)
    • N

Extrema_ExtPElC2d

It calculates all the distances between a point and an elementary curve. These distances can be minimum or maximum.

Constructors(6)

  • constructor(P: gp_Pnt2d, C: gp_Lin2d, Tol: number, Uinf: number, Usup: number): Extrema_ExtPElC2d

    Calculates the extremum distance between the point P and the segment [Uinf,Usup] of the line L.

    Parameters (5)
    • P
    • C
    • Tol
    • Uinf
    • Usup
  • constructor(P: gp_Pnt2d, C: gp_Circ2d, Tol: number, Uinf: number, Usup: number): Extrema_ExtPElC2d

    Calculates the 2 extremum distances between the point P and the segment [Uinf,Usup] of the circle C. Tol is used to determine if P is on the axis of the circle or if an extremum is on an endpoint of the segment. If P is on the axis of the circle, there are infinite solution then IsDone(me)=False. The conditions on the Uinf and Usup are:<= Uinf <= 2.*PI and Usup > Uinf. If Usup > Uinf + 2.*PI, then only the solutions in the range [Uinf,Uinf+2.*PI[ are computed.

    Parameters (5)
    • P
    • C
    • Tol
    • Uinf
    • Usup
  • constructor(P: gp_Pnt2d, C: gp_Elips2d, Tol: number, Uinf: number, Usup: number): Extrema_ExtPElC2d

    Calculates the 4 extremum distances between the point P and the segment [Uinf,Usup] of the ellipse C. Tol is used to determine if the point is on the axis of the ellipse and if the major radius is equal to the minor radius or if an extremum is on an endpoint of the segment. If P is on the axis of the ellipse, there are infinite solution then IsDone(me)=False. The conditions on the Uinf and Usup are:<= Uinf <= 2.*PI and Usup > Uinf. If Usup > Uinf + 2.*PI, then only the solutions in the range [Uinf,Uinf+2.*PI[ are computed.

    Parameters (5)
    • P
    • C
    • Tol
    • Uinf
    • Usup
  • constructor(P: gp_Pnt2d, C: gp_Hypr2d, Tol: number, Uinf: number, Usup: number): Extrema_ExtPElC2d

    Calculates the extremum distances between the point P and the segment [Uinf,Usup] of the hyperbola C. Tol is used to determine if two solutions u and v are identical; the condition is: dist(C(u),C(v)) < Tol.

    Parameters (5)
    • P
    • C
    • Tol
    • Uinf
    • Usup
  • constructor(P: gp_Pnt2d, C: gp_Parab2d, Tol: number, Uinf: number, Usup: number): Extrema_ExtPElC2d

    Calculates the 4 extremum distances between the point P and the segment [Uinf,Usup] of the parabola C. Tol is used to determine if two solutions u and v are identical; the condition is: dist(C(u),C(v)) < Tol.

    Parameters (5)
    • P
    • C
    • Tol
    • Uinf
    • Usup

Instance methods(10)

  • Perform(P: gp_Pnt2d, L: gp_Lin2d, Tol: number, Uinf: number, Usup: number): void
    Parameters (5)
    • P
    • L
    • Tol
    • Uinf
    • Usup
  • Perform(P: gp_Pnt2d, C: gp_Circ2d, Tol: number, Uinf: number, Usup: number): void
    Parameters (5)
    • P
    • C
    • Tol
    • Uinf
    • Usup
  • Perform(P: gp_Pnt2d, C: gp_Elips2d, Tol: number, Uinf: number, Usup: number): void
    Parameters (5)
    • P
    • C
    • Tol
    • Uinf
    • Usup
  • Perform(P: gp_Pnt2d, C: gp_Hypr2d, Tol: number, Uinf: number, Usup: number): void
    Parameters (5)
    • P
    • C
    • Tol
    • Uinf
    • Usup
  • Perform(P: gp_Pnt2d, C: gp_Parab2d, Tol: number, Uinf: number, Usup: number): void
    Parameters (5)
    • P
    • C
    • Tol
    • Uinf
    • Usup
  • IsDone(): boolean

    True if the distances are found.

  • NbExt(): number

    Returns the number of extremum distances.

  • SquareDistance(N: number): number

    Returns the value of the Nth extremum square distance.

    Parameters (1)
    • N
  • IsMin(N: number): boolean

    Returns True if the Nth extremum distance is a minimum.

    Parameters (1)
    • N
  • Returns the point of the Nth extremum distance.

    Parameters (1)
    • N

Extrema_ExtPElS

It calculates all the extremum distances between a point and a surface. These distances can be minimum or maximum.

Constructors(6)

Instance methods(9)

Extrema_ExtPExtS

It calculates all the extremum (minimum and maximum) distances between a point and a linear extrusion surface.

Constructors(3)

Static methods(2)

Instance methods(7)

Extrema_ExtPRevS

It calculates all the extremum (minimum and maximum) distances between a point and a surface of revolution.

Constructors(3)

Static methods(2)

Instance methods(7)

Extrema_ExtPS

It calculates all the extremum distances between a point and a surface. These distances can be minimum or maximum.

Constructors(3)

  • constructor(P: gp_Pnt, S: Adaptor3d_Surface, TolU: number, TolV: number, F?: Extrema_ExtFlag, A?: Extrema_ExtAlgo): Extrema_ExtPS

    It calculates all the distances. NbU and NbV are used to locate the close points to find the zeros. They must be great enough such that if there is N extrema, there will be N extrema between P and the grid. TolU et TolV are used to determine the conditions to stop the iterations; at the iteration number n: (Un - Un-1) < TolU and (Vn - Vn-1) < TolV .

    Parameters (6)
    • P
    • S
    • TolU
    • TolV
    • F
    • A
  • constructor(P: gp_Pnt, S: Adaptor3d_Surface, Uinf: number, Usup: number, Vinf: number, Vsup: number, TolU: number, TolV: number, F?: Extrema_ExtFlag, A?: Extrema_ExtAlgo): Extrema_ExtPS

    It calculates all the distances. NbU and NbV are used to locate the close points to find the zeros. They must be great enough such that if there is N extrema, there will be N extrema between P and the grid. TolU et TolV are used to determine the conditions to stop the iterations; at the iteration number n: (Un - Un-1) < TolU and (Vn - Vn-1) < TolV .

    Parameters (10)
    • P
    • S
    • Uinf
    • Usup
    • Vinf
    • Vsup
    • TolU
    • TolV
    • F
    • A

Instance methods(9)

  • Initialize(S: Adaptor3d_Surface, Uinf: number, Usup: number, Vinf: number, Vsup: number, TolU: number, TolV: number): void

    Initializes the fields of the algorithm.

    Parameters (7)
    • S
    • Uinf
    • Usup
    • Vinf
    • Vsup
    • TolU
    • TolV
  • Perform(P: gp_Pnt): void

    Computes the distances. An exception is raised if the fields have not been initialized.

    Parameters (1)
    • P
  • IsDone(): boolean

    Returns True if the distances are found.

  • NbExt(): number

    Returns the number of extremum distances.

  • SquareDistance(N: number): number

    Returns the value of the Nth resulting square distance.

    Parameters (1)
    • N
  • Returns the point of the Nth resulting distance.

    Parameters (1)
    • N
  • TrimmedSquareDistances(dUfVf: number, dUfVl: number, dUlVf: number, dUlVl: number, PUfVf: gp_Pnt, PUfVl: gp_Pnt, PUlVf: gp_Pnt, PUlVl: gp_Pnt): { dUfVf: number; dUfVl: number; dUlVf: number; dUlVl: number }

    if the surface is a trimmed surface, dUfVf is a square distance between
    and the point of parameter FirstUParameter and FirstVParameter <PUfVf>. dUfVl is a square distance between
    and the point of parameter FirstUParameter and LastVParameter <PUfVl>. dUlVf is a square distance between
    and the point of parameter LastUParameter and FirstVParameter <PUlVf>. dUlVl is a square distance between
    and the point of parameter LastUParameter and LastVParameter <PUlVl>.

    Parameters (8)
    • dUfVf
    • dUfVl
    • dUlVf
    • dUlVl
    • PUfVf
      Mutated in place; read the updated value from this argument after the call.
    • PUfVl
      Mutated in place; read the updated value from this argument after the call.
    • PUlVf
      Mutated in place; read the updated value from this argument after the call.
    • PUlVl
      Mutated in place; read the updated value from this argument after the call.
    Returns

    A result object with fields:

    • dUfVf: updated value from the call.
    • dUfVl: updated value from the call.
    • dUlVf: updated value from the call.
    • dUlVl: updated value from the call.
  • Parameters (1)
    • F
  • Parameters (1)
    • A

Extrema_ExtSS

It calculates all the extremum distances between two surfaces. These distances can be minimum or maximum.

Constructors(3)

Instance methods(7)

  • Initialize(S2: Adaptor3d_Surface, Uinf2: number, Usup2: number, Vinf2: number, Vsup2: number, TolS1: number): void

    Initializes the fields of the algorithm.

    Parameters (6)
    • S2
    • Uinf2
    • Usup2
    • Vinf2
    • Vsup2
    • TolS1
  • Perform(S1: Adaptor3d_Surface, Uinf1: number, Usup1: number, Vinf1: number, Vsup1: number, TolS1: number): void

    Computes the distances. An exception is raised if the fields have not been initialized.

    Parameters (6)
    • S1
    • Uinf1
    • Usup1
    • Vinf1
    • Vsup1
    • TolS1
  • IsDone(): boolean

    Returns True if the distances are found.

  • IsParallel(): boolean

    Returns True if the surfaces are parallel.

  • NbExt(): number

    Returns the number of extremum distances.

  • SquareDistance(N: number): number

    Returns the value of the Nth resulting square distance.

    Parameters (1)
    • N
  • Points(N: number, P1: Extrema_POnSurf, P2: Extrema_POnSurf): void

    Returns the point of the Nth resulting distance.

    Parameters (3)
    • N
    • P1
      Mutated in place; read the updated value from this argument after the call.
    • P2
      Mutated in place; read the updated value from this argument after the call.

Extrema_FuncExtCS

Function to find extrema of the distance between a curve and a surface.

Constructors(2)

Instance methods(14)

Extrema_FuncExtSS

Function to find extrema of the distance between two surfaces.

Constructors(2)

Instance methods(11)

Extrema_FuncPSDist

Functional for search of extremum of the square Euclidean distance between point P and surface S, starting from approximate solution (u0, v0).
The class inherits math_MultipleVarFunctionWithGradient and thus is intended for use in math_BFGS algorithm.
The criteria is: F = SquareDist(P, S(u, v)) - > min
The first derivative are: F1(u,v) = (S(u,v) - P) * Su F2(u,v) = (S(u,v) - P) * Sv
Su and Sv are first derivatives of the surface, * symbol means dot product.

Constructors(1)

Instance methods(4)

  • NbVariables(): number

    Number of variables.

  • Value(X: math_Vector, F: number): { returnValue: boolean; F: number }

    Value.

    Parameters (2)
    • X
    • F
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • F: updated value from the call.
  • Gradient(X: math_Vector, G: math_Vector): boolean

    Gradient.

    Parameters (2)
    • X
    • G
  • Values(X: math_Vector, F: number, G: math_Vector): { returnValue: boolean; F: number }

    Value and gradient.

    Parameters (3)
    • X
    • F
    • G
    Returns

    A result object with fields:

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

Extrema_FuncPSNorm

Functional for search of extremum of the distance between point P and surface S, starting from approximate solution (u0, v0).
The class inherits math_FunctionSetWithDerivatives and thus is intended for use in math_FunctionSetRoot algorithm .
Denoting derivatives of the surface S(u,v) by u and v, respectively, as Su and Sv, the two functions to be nullified are:
F1(u,v) = (S - P) * Su F2(u,v) = (S - P) * Sv
The derivatives of the functional are:
Duf1(u,v) = Su^2 + (S-P) * Suu; Dvf1(u,v) = Su * Sv + (S-P) * Suv Duf2(u,v) = Sv * Su + (S-P) * Suv = Dvf1 Dvf2(u,v) = Sv^2 + (S-P) * Svv
Here * denotes scalar product, and ^2 is square power.

Constructors(2)

Instance methods(11)

  • sets the field mysurf of the function.

    Parameters (1)
    • S
  • SetPoint(P: gp_Pnt): void

    sets the field mysurf of the function.

    Parameters (1)
    • P
  • NbVariables(): number

    Returns the number of variables of the function.

  • NbEquations(): number

    Returns the number of equations of the function.

  • Value(X: math_Vector, F: math_Vector): boolean

    Calculate Fi(U,V).

    Parameters (2)
    • X
    • F
  • Derivatives(X: math_Vector, D: math_Matrix): boolean

    Calculate Fi'(U,V).

    Parameters (2)
    • X
    • D
  • Values(X: math_Vector, F: math_Vector, D: math_Matrix): boolean

    Calculate Fi(U,V) and Fi'(U,V).

    Parameters (3)
    • X
    • F
    • D
  • GetStateNumber(): number

    Save the found extremum.

  • NbExt(): number

    Return the number of found extrema.

  • SquareDistance(N: number): number

    Return the value of the Nth distance.

    Parameters (1)
    • N
  • Returns the Nth extremum.

    Parameters (1)
    • N

Extrema_GenExtCS

It calculates all the extremum distances between acurve and a surface. These distances can be minimum or maximum.

Constructors(3)

  • Empty constructor.

  • constructor(C: Adaptor3d_Curve, S: Adaptor3d_Surface, NbT: number, NbU: number, NbV: number, Tol1: number, Tol2: number): Extrema_GenExtCS

    It calculates all the distances. The function F(u,v)=distance(S1(u1,v1),S2(u2,v2)) has an extremum when gradient(F)=0. The algorithm searches all the zeros inside the definition ranges of the surfaces. NbU and NbV are used to locate the close points on the surface and NbT on the curve to find the zeros.

    Parameters (7)
    • C
    • S
    • NbT
    • NbU
    • NbV
    • Tol1
    • Tol2
  • constructor(C: Adaptor3d_Curve, S: Adaptor3d_Surface, NbT: number, NbU: number, NbV: number, tmin: number, tsup: number, Umin: number, Usup: number, Vmin: number, Vsup: number, Tol1: number, Tol2: number): Extrema_GenExtCS

    It calculates all the distances. The function F(u,v)=distance(P,S(u,v)) has an extremum when gradient(F)=0. The algorithm searches all the zeros inside the definition ranges of the surface. NbT,NbU and NbV are used to locate the close points to find the zeros.

    Parameters (13)
    • C
    • S
    • NbT
    • NbU
    • NbV
    • tmin
    • tsup
    • Umin
    • Usup
    • Vmin
    • Vsup
    • Tol1
    • Tol2

Instance methods(9)

  • Initialize(S: Adaptor3d_Surface, NbU: number, NbV: number, Tol2: number): void
    Parameters (4)
    • S
    • NbU
    • NbV
    • Tol2
  • Initialize(S: Adaptor3d_Surface, NbU: number, NbV: number, Umin: number, Usup: number, Vmin: number, Vsup: number, Tol2: number): void
    Parameters (8)
    • S
    • NbU
    • NbV
    • Umin
    • Usup
    • Vmin
    • Vsup
    • Tol2
  • Perform(C: Adaptor3d_Curve, NbT: number, Tol1: number): void

    the algorithm is done with S An exception is raised if the fields have not been initialized.

    Parameters (3)
    • C
    • NbT
    • Tol1
  • Perform(C: Adaptor3d_Curve, NbT: number, tmin: number, tsup: number, Tol1: number): void

    the algorithm is done with C An exception is raised if the fields have not been initialized.

    Parameters (5)
    • C
    • NbT
    • tmin
    • tsup
    • Tol1
  • IsDone(): boolean

    Returns True if the distances are found.

  • NbExt(): number

    Returns the number of extremum distances.

  • SquareDistance(N: number): number

    Returns the value of the Nth resulting square distance.

    Parameters (1)
    • N
  • Returns the point of the Nth resulting distance.

    Parameters (1)
    • N
  • Returns the point of the Nth resulting distance.

    Parameters (1)
    • N

Extrema_GenExtPS

It calculates all the extremum distances between a point and a surface. These distances can be minimum or maximum.

Constructors(3)

  • Empty constructor.

  • constructor(P: gp_Pnt, S: Adaptor3d_Surface, NbU: number, NbV: number, TolU: number, TolV: number, F?: Extrema_ExtFlag, A?: Extrema_ExtAlgo): Extrema_GenExtPS

    It calculates all the distances. The function F(u,v)=distance(P,S(u,v)) has an extremum when gradient(F)=0. The algorithm searches all the zeros inside the definition ranges of the surface. NbU and NbV are used to locate the close points to find the zeros. They must be great enough such that if there is N extrema, there will be N extrema between P and the grid. TolU et TolV are used to determine the conditions to stop the iterations; at the iteration number n: (Un - Un-1) < TolU and (Vn - Vn-1) < TolV .

    Parameters (8)
    • P
    • S
    • NbU
    • NbV
    • TolU
    • TolV
    • F
    • A
  • constructor(P: gp_Pnt, S: Adaptor3d_Surface, NbU: number, NbV: number, Umin: number, Usup: number, Vmin: number, Vsup: number, TolU: number, TolV: number, F?: Extrema_ExtFlag, A?: Extrema_ExtAlgo): Extrema_GenExtPS

    It calculates all the distances. The function F(u,v)=distance(P,S(u,v)) has an extremum when gradient(F)=0. The algorithm searches all the zeros inside the definition ranges of the surface. NbU and NbV are used to locate the close points to find the zeros. They must be great enough such that if there is N extrema, there will be N extrema between P and the grid. TolU et TolV are used to determine the conditions to stop the iterations; at the iteration number n: (Un - Un-1) < TolU and (Vn - Vn-1) < TolV .

    Parameters (12)
    • P
    • S
    • NbU
    • NbV
    • Umin
    • Usup
    • Vmin
    • Vsup
    • TolU
    • TolV
    • F
    • A

Instance methods(9)

  • Initialize(S: Adaptor3d_Surface, NbU: number, NbV: number, TolU: number, TolV: number): void
    Parameters (5)
    • S
    • NbU
    • NbV
    • TolU
    • TolV
  • Initialize(S: Adaptor3d_Surface, NbU: number, NbV: number, Umin: number, Usup: number, Vmin: number, Vsup: number, TolU: number, TolV: number): void
    Parameters (9)
    • S
    • NbU
    • NbV
    • Umin
    • Usup
    • Vmin
    • Vsup
    • TolU
    • TolV
  • Perform(P: gp_Pnt): void

    the algorithm is done with the point P. An exception is raised if the fields have not been initialized.

    Parameters (1)
    • P
  • Parameters (1)
    • F
  • Parameters (1)
    • A
  • IsDone(): boolean

    Returns True if the distances are found.

  • NbExt(): number

    Returns the number of extremum distances.

  • SquareDistance(N: number): number

    Returns the value of the Nth resulting square distance.

    Parameters (1)
    • N
  • Returns the point of the Nth resulting distance.

    Parameters (1)
    • N

Extrema_GenExtSS

It calculates all the extremum distances between two surfaces. These distances can be minimum or maximum.

Constructors(3)

  • Empty constructor.

  • constructor(S1: Adaptor3d_Surface, S2: Adaptor3d_Surface, NbU: number, NbV: number, Tol1: number, Tol2: number): Extrema_GenExtSS

    It calculates all the distances. The function F(u,v)=distance(S1(u1,v1),S2(u2,v2)) has an extremum when gradient(F)=0. The algorithm searches all the zeros inside the definition ranges of the surfaces. NbU and NbV are used to locate the close points to find the zeros.

    Parameters (6)
    • S1
    • S2
    • NbU
    • NbV
    • Tol1
    • Tol2
  • constructor(S1: Adaptor3d_Surface, S2: Adaptor3d_Surface, NbU: number, NbV: number, U1min: number, U1sup: number, V1min: number, V1sup: number, U2min: number, U2sup: number, V2min: number, V2sup: number, Tol1: number, Tol2: number): Extrema_GenExtSS

    It calculates all the distances. The function F(u,v)=distance(P,S(u,v)) has an extremum when gradient(F)=0. The algorithm searches all the zeros inside the definition ranges of the surface. NbU and NbV are used to locate the close points to find the zeros.

    Parameters (14)
    • S1
    • S2
    • NbU
    • NbV
    • U1min
    • U1sup
    • V1min
    • V1sup
    • U2min
    • U2sup
    • V2min
    • V2sup
    • Tol1
    • Tol2

Instance methods(9)

  • Initialize(S2: Adaptor3d_Surface, NbU: number, NbV: number, Tol2: number): void
    Parameters (4)
    • S2
    • NbU
    • NbV
    • Tol2
  • Initialize(S2: Adaptor3d_Surface, NbU: number, NbV: number, U2min: number, U2sup: number, V2min: number, V2sup: number, Tol2: number): void
    Parameters (8)
    • S2
    • NbU
    • NbV
    • U2min
    • U2sup
    • V2min
    • V2sup
    • Tol2
  • Perform(S1: Adaptor3d_Surface, Tol1: number): void

    the algorithm is done with S1 An exception is raised if the fields have not been initialized.

    Parameters (2)
    • S1
    • Tol1
  • Perform(S1: Adaptor3d_Surface, U1min: number, U1sup: number, V1min: number, V1sup: number, Tol1: number): void

    the algorithm is done withS1 An exception is raised if the fields have not been initialized.

    Parameters (6)
    • S1
    • U1min
    • U1sup
    • V1min
    • V1sup
    • Tol1
  • IsDone(): boolean

    Returns True if the distances are found.

  • NbExt(): number

    Returns the number of extremum distances.

  • SquareDistance(N: number): number

    Returns the value of the Nth resulting square distance.

    Parameters (1)
    • N
  • Returns the point of the Nth resulting distance.

    Parameters (1)
    • N
  • Returns the point of the Nth resulting distance.

    Parameters (1)
    • N

Extrema_GenLocateExtCS

With two close points it calculates the distance between two surfaces. This distance can be a minimum or a maximum.

Constructors(2)

Instance methods(5)

Extrema_GenLocateExtPS

With a close point, it calculates the distance between a point and a surface. Criteria type is defined in "Perform" method.

Constructors(1)

Static methods(1)

  • IsMinDist(theP: gp_Pnt, theS: Adaptor3d_Surface, theU0: number, theV0: number): boolean

    Returns True if UV point theU0, theV0 is point of local minimum of square distance between point theP and points theS(U, V), U, V are in small area around theU0, theV0.

    Parameters (4)
    • theP
    • theS
    • theU0
    • theV0

Instance methods(4)

  • Perform(theP: gp_Pnt, theU0: number, theV0: number, isDistanceCriteria?: boolean): void

    Calculates the extrema between the point and the surface using a close point. The close point is defined by the parameter values theU0 and theV0. Type of the algorithm depends on the isDistanceCriteria flag. If flag value is false - normal projection criteria will be used. If flag value is true - distance criteria will be used.

    Parameters (4)
    • theP
    • theU0
    • theV0
    • isDistanceCriteria
  • IsDone(): boolean

    Returns True if the distance is found.

  • SquareDistance(): number

    Returns the value of the extremum square distance.

  • Returns the point of the extremum distance.

Extrema_GenLocateExtSS

With two close points it calculates the distance between two surfaces. This distance can be a minimum or a maximum.

Constructors(2)

  • constructor(S1: Adaptor3d_Surface, S2: Adaptor3d_Surface, U1: number, V1: number, U2: number, V2: number, Tol1: number, Tol2: number): Extrema_GenLocateExtSS

    Calculates the distance with two close points. The close points are defined by the parameter values (U1,V1) for S1 and (U2,V2) for S2. The function F(u1,v1,u2,v2)=distance(S1(u1,v1),S2(u2,v2)) has an extremun when gradient(F)=0. The algorithm searches a zero near the close points.

    Parameters (8)
    • S1
    • S2
    • U1
    • V1
    • U2
    • V2
    • Tol1
    • Tol2

Instance methods(5)

Extrema_GlobOptFuncCCC0

This class implements function which calculate Eucluidean distance between point on curve and point on other curve in case of C1 and C2 continuity is C0.

Constructors(2)

Instance methods(2)

  • NbVariables(): number

    Returns the number of variables of the function.

  • Value(X: math_Vector, F: number): { returnValue: boolean; F: number }

    Computes the values of the Functions <F> for the variable <X>. returns True if the computation was done successfully, otherwise false.

    Parameters (2)
    • X
    • F
    Returns

    A result object with fields:

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

Extrema_GlobOptFuncCCC1

This class implements function which calculate Eucluidean distance between point on curve and point on other curve in case of C1 and C2 continuity is C1.

Constructors(2)

Instance methods(4)

  • NbVariables(): number

    Returns the number of variables of the function.

  • Value(X: math_Vector, F: number): { returnValue: boolean; F: number }

    Computes the values of the Functions <F> for the variable <X>. Returns True if the computation was done successfully, False otherwise.

    Parameters (2)
    • X
    • F
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • F: updated value from the call.
  • Gradient(X: math_Vector, G: math_Vector): boolean

    Computes the gradient <G> of the functions for the variable <X>. Returns True if the computation was done successfully, False otherwise.

    Parameters (2)
    • X
    • G
  • Values(X: math_Vector, F: number, G: math_Vector): { returnValue: boolean; F: number }

    computes the value <F> and the gradient <G> of the functions for the variable <X>. Returns True if the computation was done successfully, False otherwise.

    Parameters (3)
    • X
    • F
    • G
    Returns

    A result object with fields:

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

Extrema_GlobOptFuncCCC2

This class implements function which calculate Eucluidean distance between point on curve and point on other curve in case of C1 and C2 continuity is C2.

Constructors(2)

Instance methods(5)

  • NbVariables(): number

    returns the number of variables of the function.

  • Value(X: math_Vector, F: number): { returnValue: boolean; F: number }

    computes the values of the Functions <F> for the variable <X>. Returns True if the computation was done successfully, False otherwise.

    Parameters (2)
    • X
    • F
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • F: updated value from the call.
  • Gradient(X: math_Vector, G: math_Vector): boolean

    computes the gradient <G> of the functions for the variable <X>. Returns True if the computation was done successfully, False otherwise.

    Parameters (2)
    • X
    • G
  • Values(X: math_Vector, F: number, G: math_Vector): { returnValue: boolean; F: number }

    computes the value <F> and the gradient <G> of the functions for the variable <X>. Returns True if the computation was done successfully, False otherwise.

    Parameters (3)
    • X
    • F
    • G
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • F: updated value from the call.
  • Values(X: math_Vector, F: number, G: math_Vector, H: math_Matrix): { returnValue: boolean; F: number }

    computes the value <F>, the gradient <G> and the hessian <H> of the functions for the variable <X>. Returns True if the computation was done successfully, False otherwise.

    Parameters (4)
    • X
    • F
    • G
    • H
    Returns

    A result object with fields:

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

Extrema_GlobOptFuncConicS

This class implements function which calculate square Eucluidean distance between point on surface and nearest point on Conic.

Constructors(3)

Instance methods(4)

  • LoadConic(S: Adaptor3d_Curve, theTf: number, theTl: number): void
    Parameters (3)
    • S
    • theTf
    • theTl
  • NbVariables(): number

    Returns the number of variables of the function.

  • Value(X: math_Vector, F: number): { returnValue: boolean; F: number }

    Computes the values of the Functions <F> for the variable <X>. returns True if the computation was done successfully, otherwise false.

    Parameters (2)
    • X
    • F
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • F: updated value from the call.
  • ConicParameter(theUV: math_Vector): number

    Parameter of conic for point on surface defined by theUV.

    Parameters (1)
    • theUV

Extrema_GlobOptFuncCQuadric

This class implements function which calculate square Eucluidean distance between point on surface and nearest point on Conic.

Constructors(3)

Instance methods(4)

  • LoadQuad(S: Adaptor3d_Surface, theUf: number, theUl: number, theVf: number, theVl: number): void
    Parameters (5)
    • S
    • theUf
    • theUl
    • theVf
    • theVl
  • NbVariables(): number

    Returns the number of variables of the function.

  • Value(X: math_Vector, F: number): { returnValue: boolean; F: number }

    Computes the values of the Functions <F> for the variable <X>. returns True if the computation was done successfully, otherwise false.

    Parameters (2)
    • X
    • F
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • F: updated value from the call.
  • QuadricParameters(theCT: math_Vector, theUV: math_Vector): void

    Parameters of quadric for point on curve defined by theCT.

    Parameters (2)
    • theCT
    • theUV

Extrema_GlobOptFuncCS

This class implements function which calculate square Eucluidean distance between point on curve and point on surface in case of continuity is C2.

Constructors(1)

Instance methods(5)

  • NbVariables(): number

    returns the number of variables of the function.

  • Value(X: math_Vector, F: number): { returnValue: boolean; F: number }

    computes the values of the Functions <F> for the variable <X>. Returns True if the computation was done successfully, False otherwise.

    Parameters (2)
    • X
    • F
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • F: updated value from the call.
  • Gradient(X: math_Vector, G: math_Vector): boolean

    computes the gradient <G> of the functions for the variable <X>. Returns True if the computation was done successfully, False otherwise.

    Parameters (2)
    • X
    • G
  • Values(X: math_Vector, F: number, G: math_Vector): { returnValue: boolean; F: number }

    computes the value <F> and the gradient <G> of the functions for the variable <X>. Returns True if the computation was done successfully, False otherwise.

    Parameters (3)
    • X
    • F
    • G
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • F: updated value from the call.
  • Values(X: math_Vector, F: number, G: math_Vector, H: math_Matrix): { returnValue: boolean; F: number }

    computes the value <F>, the gradient <G> and the hessian <H> of the functions for the variable <X>. Returns True if the computation was done successfully, False otherwise.

    Parameters (4)
    • X
    • F
    • G
    • H
    Returns

    A result object with fields:

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

Extrema_LocateExtCC

It calculates the distance between two curves with a close point; these distances can be maximum or minimum.

Constructors(1)

  • Calculates the distance with a close point. The close point is defined by a parameter value on each curve. The function F(u,v)=distance(C1(u),C2(v)) has an extremun when gradient(f)=0. The algorithm searches the zero near the close point.

    Parameters (4)
    • C1
    • C2
    • U0
    • V0

Instance methods(3)

  • IsDone(): boolean

    Returns True if the distance is found.

  • SquareDistance(): number

    Returns the value of the extremum square distance.

  • Returns the points of the extremum distance. P1 is on the first curve, P2 on the second one.

    Parameters (2)
    • P1
      Mutated in place; read the updated value from this argument after the call.
    • P2
      Mutated in place; read the updated value from this argument after the call.

Extrema_LocateExtCC2d

It calculates the distance between two curves with a close point; these distances can be maximum or minimum.

Constructors(1)

  • Calculates the distance with a close point. The close point is defined by a parameter value on each curve. The function F(u,v)=distance(C1(u),C2(v)) has an extremun when gradient(f)=0. The algorithm searches the zero near the close point.

    Parameters (4)
    • C1
    • C2
    • U0
    • V0

Instance methods(3)

  • IsDone(): boolean

    Returns True if the distance is found.

  • SquareDistance(): number

    Returns the value of the extremum square distance.

  • Returns the points of the extremum distance. P1 is on the first curve, P2 on the second one.

    Parameters (2)
    • P1
      Mutated in place; read the updated value from this argument after the call.
    • P2
      Mutated in place; read the updated value from this argument after the call.

Extrema_POnCurv2d

Definition of a point on 2D curve.

Constructors(2)

Instance methods(3)

Extrema_POnSurf

Definition of a point on surface.

Constructors(2)

Instance methods(3)

  • Returns the 3d point.

  • SetParameters(theU: number, theV: number, thePnt: gp_Pnt): void

    Sets the params of current POnSurf instance. (e.g. to the point to be projected).

    Parameters (3)
    • theU
    • theV
    • thePnt
  • Parameter(theU: number, theV: number): { theU: number; theV: number }

    Returns the parameter values on the surface.

    Parameters (2)
    • theU
    • theV
    Returns

    A result object with fields:

    • theU: updated value from the call.
    • theV: updated value from the call.

Extrema_POnSurfParams

Data container for point on surface parameters. These parameters are required to compute an initial approximation for extrema computation.

Constructors(2)

Instance methods(6)

  • SetSqrDistance(theSqrDistance: number): void

    Sets the square distance from this point to another one (e.g. to the point to be projected).

    Parameters (1)
    • theSqrDistance
  • GetSqrDistance(): number

    Query the square distance from this point to another one.

  • SetElementType(theElementType: Extrema_ElementType): void

    Sets the element type on which this point is situated.

    Parameters (1)
    • theElementType
  • Query the element type on which this point is situated.

  • SetIndices(theIndexU: number, theIndexV: number): void

    Sets the U and V indices of an element that contains this point.

    Parameters (2)
    • theIndexU
    • theIndexV
  • GetIndices(theIndexU: number, theIndexV: number): { theIndexU: number; theIndexV: number }

    Query the U and V indices of an element that contains this point.

    Parameters (2)
    • theIndexU
    • theIndexV
    Returns

    A result object with fields:

    • theIndexU: updated value from the call.
    • theIndexV: updated value from the call.