OpenCascade.js
API ReferenceModelingDataTKG2d

Geom2dAdaptor

OCCT package Geom2dAdaptor: Geom2dAdaptor, Geom2dAdaptor_Curve.

Geom2dAdaptor

this package contains the geometric definition of 2d curves compatible with the Adaptor package templates.

Constructors(1)

Static methods(1)

  • Inherited from GHCurve. Provides a curve handled by reference. Creates a 2d curve from a HCurve2d. This cannot process the OtherCurves.

    Parameters (1)
    • HC

Geom2dAdaptor_Curve

An interface between the services provided by any curve from the package Geom2d and those required of the curve by algorithms which use it.
Polynomial coefficients of BSpline curves used for their evaluation are cached for better performance. Therefore these evaluations are not thread-safe and parallel evaluations need to be prevented.

Constructors(3)

Static methods(2)

Instance methods(41)

  • Shallow copy of adaptor.

  • Reset(): void

    Reset currently loaded curve (undone Load()).

  • Load(theCurve: Geom2d_Curve): void
    Parameters (1)
    • theCurve
  • Load(theCurve: Geom2d_Curve, theUFirst: number, theULast: number): void

    Standard_ConstructionError is raised if theUFirst > theULast + Precision::PConfusion().

    Parameters (3)
    • theCurve
    • theUFirst
    • theULast
  • IsInitialized(): boolean

    Returns true if the adaptor has been loaded with a curve.

  • FirstParameter(): number
  • LastParameter(): number
  • If necessary, breaks the curve in intervals of continuity . And returns the number of intervals.

    Parameters (1)
    • S
  • 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): Adaptor2d_Curve2d

    Returns a curve equivalent of <me> between parameters <First> and <Last>. <Tol> is used to test for 3d points confusion. If <First> >= <Last>.

    Parameters (3)
    • First
    • Last
    • Tol
  • IsClosed(): boolean
  • IsPeriodic(): boolean
  • Period(): number
  • Value(U: number): gp_Pnt2d

    Computes the point of parameter U on the curve.

    Parameters (1)
    • U
  • D0(U: number, P: gp_Pnt2d): void

    Computes the point of parameter U.

    Parameters (2)
    • U
    • P
      Mutated in place; read the updated value from this argument after the call.
  • D1(U: number, P: gp_Pnt2d, V: gp_Vec2d): void

    Computes the point of parameter U on the curve with its first derivative. Raised if the continuity of the current interval is not C1.

    Parameters (3)
    • U
    • P
      Mutated in place; read the updated value from this argument after the call.
    • V
      Mutated in place; read the updated value from this argument after the call.
  • D2(U: number, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d): void

    Returns the point P of parameter U, the first and second derivatives V1 and V2. Raised if the continuity of the current interval is not C2.

    Parameters (4)
    • U
    • P
      Mutated in place; read the updated value from this argument after the call.
    • V1
      Mutated in place; read the updated value from this argument after the call.
    • V2
      Mutated in place; read the updated value from this argument after the call.
  • D3(U: number, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d, V3: gp_Vec2d): void

    Returns the point P of parameter U, the first, the second and the third derivative. Raised if the continuity of the current interval is not C3.

    Parameters (5)
    • U
    • P
      Mutated in place; read the updated value from this argument after the call.
    • V1
      Mutated in place; read the updated value from this argument after the call.
    • V2
      Mutated in place; read the updated value from this argument after the call.
    • V3
      Mutated in place; read the updated value from this argument after the call.
  • DN(U: number, N: number): gp_Vec2d

    The returned vector gives the value of the derivative for the order of derivation N. Raised if the continuity of the current interval is not CN. Raised if N < 1.

    Parameters (2)
    • U
    • N
  • Resolution(R3d: number): number

    returns the parametric resolution

    Parameters (1)
    • R3d
  • Returns the type of the curve in the current interval: Line, Circle, Ellipse, Hyperbola, Parabola, BezierCurve, BSplineCurve, OtherCurve.

  • Degree(): number
  • IsRational(): boolean
  • NbPoles(): number
  • NbKnots(): number
  • NbSamples(): number
  • EvalD0(theU: number): gp_Pnt2d

    Point evaluation. Raises an exception on failure.

    Parameters (1)
    • theU
  • EvalD1(theU: number): Geom2d_Curve_ResD1

    D1 evaluation. Raises an exception on failure.

    Parameters (1)
    • theU
  • EvalD2(theU: number): Geom2d_Curve_ResD2

    D2 evaluation. Raises an exception on failure.

    Parameters (1)
    • theU
  • EvalD3(theU: number): Geom2d_Curve_ResD3

    D3 evaluation. Raises an exception on failure.

    Parameters (1)
    • theU
  • EvalDN(theU: number, theN: number): gp_Vec2d

    DN evaluation. Raises an exception on failure.

    Parameters (2)
    • theU
    • theN