OpenCascade.js
API ReferenceModelingDataTKG3d

Adaptor3d

OCCT package Adaptor3d: Adaptor3d_Curve, Adaptor3d_CurveOnSurface, Adaptor3d_HSurfaceTool, Adaptor3d_HVertex, and 4 more bound classes.

Adaptor3d_Curve

Root class for 3D curves on which geometric algorithms work. An adapted curve is an interface between the services provided by a curve and those required of the curve by algorithms which use it. Two derived concrete classes are provided:

  • GeomAdaptor_Curve for a curve from the Geom package
  • Adaptor3d_CurveOnSurface for a curve lying on a surface from the Geom package.
    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(1)

Static methods(2)

Instance methods(36)

  • Shallow copy of adaptor.

  • FirstParameter(): number
  • LastParameter(): number
  • Returns the number of intervals for continuity . May be one if Continuity(me) >= .

    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): Adaptor3d_Curve

    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(theU: number): gp_Pnt

    Computes the point of parameter U on the curve.

    Parameters (1)
    • theU
  • D0(theU: number, theP: gp_Pnt): void

    Computes the point of parameter U on the curve.

    Parameters (2)
    • theU
    • theP
      Mutated in place; read the updated value from this argument after the call.
  • D1(theU: number, theP: gp_Pnt, theV: gp_Vec): 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)
    • theU
    • theP
      Mutated in place; read the updated value from this argument after the call.
    • theV
      Mutated in place; read the updated value from this argument after the call.
  • D2(theU: number, theP: gp_Pnt, theV1: gp_Vec, theV2: gp_Vec): 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)
    • theU
    • theP
      Mutated in place; read the updated value from this argument after the call.
    • theV1
      Mutated in place; read the updated value from this argument after the call.
    • theV2
      Mutated in place; read the updated value from this argument after the call.
  • D3(theU: number, theP: gp_Pnt, theV1: gp_Vec, theV2: gp_Vec, theV3: gp_Vec): 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)
    • theU
    • theP
      Mutated in place; read the updated value from this argument after the call.
    • theV1
      Mutated in place; read the updated value from this argument after the call.
    • theV2
      Mutated in place; read the updated value from this argument after the call.
    • theV3
      Mutated in place; read the updated value from this argument after the call.
  • DN(theU: number, theN: number): gp_Vec

    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)
    • theU
    • theN
  • Resolution(R3d: number): number

    Returns the parametric resolution corresponding to the real space resolution <R3d>.

    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
  • EvalD0(theU: number): gp_Pnt

    Computes the point of parameter U on the curve. Raises an exception on failure.

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

    Computes the point and first derivative at parameter U. Raises an exception on failure.

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

    Computes the point and first two derivatives at parameter U. Raises an exception on failure.

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

    Computes the point and first three derivatives at parameter U. Raises an exception on failure.

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

    Computes the Nth derivative at parameter U. Raises an exception on failure.

    Parameters (2)
    • theU
    • theN

Adaptor3d_CurveOnSurface

An interface between the services provided by a curve lying on a surface from the package Geom and those required of the curve by algorithms which use it. The curve is defined as a 2D curve from the Geom2d package, in the parametric space of the surface.

Constructors(3)

Static methods(2)

Instance methods(36)

Adaptor3d_HSurfaceTool

Constructors(1)

Static methods(42)

Adaptor3d_HVertex

Constructors(2)

Static methods(2)

Instance methods(6)

Adaptor3d_InterFunc

Used to find the points U(t) = U0 or V(t) = V0 in order to determine the Cn discontinuities of an Adpator_CurveOnSurface relatively to the discontinuities of the surface. Used to find the roots of the functions.

Constructors(1)

Instance methods(3)

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

    computes the value <F>of the function for the variable <X>. Returns True if the calculation were successfully done, False otherwise.

    Parameters (2)
    • X
    • F
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • F: updated value from the call.
  • Derivative(X: number, D: number): { returnValue: boolean; D: number }

    computes the derivative <D> of the function for the variable <X>. Returns True if the calculation were successfully done, False otherwise.

    Parameters (2)
    • X
    • D
    Returns

    A result object with fields:

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

    computes the value <F> and the derivative <D> of the function for the variable <X>. Returns True if the calculation were successfully done, False otherwise.

    Parameters (3)
    • X
    • F
    • D
    Returns

    A result object with fields:

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

Adaptor3d_IsoCurve

Defines an isoparametric curve on a surface. The type of isoparametric curve (U or V) is defined with the enumeration IsoType from GeomAbs if NoneIso is given an error is raised.

Constructors(4)

Static methods(2)

Instance methods(35)

Adaptor3d_Surface

Root class for surfaces on which geometric algorithms work. An adapted surface is an interface between the services provided by a surface and those required of the surface by algorithms which use it. A derived concrete class is provided: GeomAdaptor_Surface for a surface from the Geom package. The Surface class describes the standard behaviour of a surface for generic algorithms.
The Surface can be decomposed in intervals of any continuity in U and V using the method NbIntervals. A current interval can be set. Most of the methods apply to the current interval. Warning: All the methods are virtual and implemented with a raise to allow to redefined only the methods really used.
Polynomial coefficients of BSpline surfaces used for their evaluation are cached for better performance. Therefore these evaluations are not thread-safe and parallel evaluations need to be prevented.

Constructors(1)

Static methods(2)

Instance methods(54)

  • Shallow copy of adaptor.

  • FirstUParameter(): number
  • LastUParameter(): number
  • FirstVParameter(): number
  • LastVParameter(): number
  • Returns the number of U intervals for continuity . May be one if UContinuity(me) >= .

    Parameters (1)
    • S
  • Returns the number of V intervals for continuity . May be one if VContinuity(me) >= .

    Parameters (1)
    • S
  • Returns the intervals with the requested continuity in the U direction.

    Parameters (2)
    • T
      Mutated in place; read the updated value from this argument after the call.
    • S
  • Returns the intervals with the requested continuity in the V direction.

    Parameters (2)
    • T
      Mutated in place; read the updated value from this argument after the call.
    • S
  • UTrim(First: number, Last: number, Tol: number): Adaptor3d_Surface

    Returns a surface trimmed in the U direction 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
  • VTrim(First: number, Last: number, Tol: number): Adaptor3d_Surface

    Returns a surface trimmed in the V direction between parameters <First> and <Last>. <Tol> is used to test for 3d points confusion. If <First> >= <Last>.

    Parameters (3)
    • First
    • Last
    • Tol
  • IsUClosed(): boolean
  • IsVClosed(): boolean
  • IsUPeriodic(): boolean
  • UPeriod(): number
  • IsVPeriodic(): boolean
  • VPeriod(): number
  • Value(theU: number, theV: number): gp_Pnt

    Computes the point of parameters U,V on the surface. Tip: use GeomLib::NormEstim() to calculate surface normal at specified (U, V) point.

    Parameters (2)
    • theU
    • theV
  • D0(theU: number, theV: number, theP: gp_Pnt): void

    Computes the point of parameters U,V on the surface.

    Parameters (3)
    • theU
    • theV
    • theP
      Mutated in place; read the updated value from this argument after the call.
  • D1(theU: number, theV: number, theP: gp_Pnt, theD1U: gp_Vec, theD1V: gp_Vec): void

    Computes the point and the first derivatives on the surface. Raised if the continuity of the current intervals is not C1.
    Tip: use GeomLib::NormEstim() to calculate surface normal at specified (U, V) point.

    Parameters (5)
    • theU
    • theV
    • theP
      Mutated in place; read the updated value from this argument after the call.
    • theD1U
      Mutated in place; read the updated value from this argument after the call.
    • theD1V
      Mutated in place; read the updated value from this argument after the call.
  • D2(theU: number, theV: number, theP: gp_Pnt, theD1U: gp_Vec, theD1V: gp_Vec, theD2U: gp_Vec, theD2V: gp_Vec, theD2UV: gp_Vec): void

    Computes the point, the first and second derivatives on the surface. Raised if the continuity of the current intervals is not C2.

    Parameters (8)
    • theU
    • theV
    • theP
      Mutated in place; read the updated value from this argument after the call.
    • theD1U
      Mutated in place; read the updated value from this argument after the call.
    • theD1V
      Mutated in place; read the updated value from this argument after the call.
    • theD2U
      Mutated in place; read the updated value from this argument after the call.
    • theD2V
      Mutated in place; read the updated value from this argument after the call.
    • theD2UV
      Mutated in place; read the updated value from this argument after the call.
  • D3(theU: number, theV: number, theP: gp_Pnt, theD1U: gp_Vec, theD1V: gp_Vec, theD2U: gp_Vec, theD2V: gp_Vec, theD2UV: gp_Vec, theD3U: gp_Vec, theD3V: gp_Vec, theD3UUV: gp_Vec, theD3UVV: gp_Vec): void

    Computes the point, the first, second and third derivatives on the surface. Raised if the continuity of the current intervals is not C3.

    Parameters (12)
    • theU
    • theV
    • theP
      Mutated in place; read the updated value from this argument after the call.
    • theD1U
      Mutated in place; read the updated value from this argument after the call.
    • theD1V
      Mutated in place; read the updated value from this argument after the call.
    • theD2U
      Mutated in place; read the updated value from this argument after the call.
    • theD2V
      Mutated in place; read the updated value from this argument after the call.
    • theD2UV
      Mutated in place; read the updated value from this argument after the call.
    • theD3U
      Mutated in place; read the updated value from this argument after the call.
    • theD3V
      Mutated in place; read the updated value from this argument after the call.
    • theD3UUV
      Mutated in place; read the updated value from this argument after the call.
    • theD3UVV
      Mutated in place; read the updated value from this argument after the call.
  • DN(theU: number, theV: number, theNu: number, theNv: number): gp_Vec

    Computes the derivative of order Nu in the direction U and Nv in the direction V at the point P(U, V). Raised if the current U interval is not not CNu and the current V interval is not CNv. Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0.

    Parameters (4)
    • theU
    • theV
    • theNu
    • theNv
  • UResolution(R3d: number): number

    Returns the parametric U resolution corresponding to the real space resolution <R3d>.

    Parameters (1)
    • R3d
  • VResolution(R3d: number): number

    Returns the parametric V resolution corresponding to the real space resolution <R3d>.

    Parameters (1)
    • R3d
  • Returns the type of the surface: Plane, Cylinder, Cone, Sphere, Torus, BezierSurface, BSplineSurface, SurfaceOfRevolution, SurfaceOfExtrusion, OtherSurface.

  • UDegree(): number
  • NbUPoles(): number
  • VDegree(): number
  • NbVPoles(): number
  • NbUKnots(): number
  • NbVKnots(): number
  • IsURational(): boolean
  • IsVRational(): boolean
  • OffsetValue(): number
  • EvalD0(theU: number, theV: number): gp_Pnt

    Computes the point of parameters (U, V) on the surface. Raises an exception on failure.

    Parameters (2)
    • theU
    • theV
  • EvalD1(theU: number, theV: number): Geom_Surface_ResD1

    Computes the point and first partial derivatives at (U, V). Raises an exception on failure.

    Parameters (2)
    • theU
    • theV
  • EvalD2(theU: number, theV: number): Geom_Surface_ResD2

    Computes the point and partial derivatives up to 2nd order at (U, V). Raises an exception on failure.

    Parameters (2)
    • theU
    • theV
  • EvalD3(theU: number, theV: number): Geom_Surface_ResD3

    Computes the point and partial derivatives up to 3rd order at (U, V). Raises an exception on failure.

    Parameters (2)
    • theU
    • theV
  • EvalDN(theU: number, theV: number, theNu: number, theNv: number): gp_Vec

    Computes the derivative of order Nu in U and Nv in V at (U, V). Raises an exception on failure.

    Parameters (4)
    • theU
    • theV
    • theNu
    • theNv

Adaptor3d_TopolTool

This class provides a default topological tool, based on the Umin,Vmin,Umax,Vmax of an HSurface from Adaptor3d. All methods and fields may be redefined when inheriting from this class. This class is used to instantiate algorithms as Intersection, outlines,...

Constructors(2)

Static methods(3)

  • GetConeApexParam(theC: gp_Cone, theU: number, theV: number): { theU: number; theV: number }

    Computes the cone's apex parameters.

    Parameters (3)
    • theC
      conical surface
    • theU
      U parameter of cone's apex
    • theV
      V parameter of cone's apex
    Returns

    A result object with fields:

    • theU: U parameter of cone's apex
    • theV: V parameter of cone's apex
  • get_type_name(): string

Instance methods(32)

  • Initialize(): void
  • Parameters (1)
    • S
  • Parameters (1)
    • Curve
  • Init(): void
  • More(): boolean
  • Next(): void
  • MoreVertex(): boolean
  • NextVertex(): void
  • Classify(P: gp_Pnt2d, Tol: number, ReacdreOnPeriodic?: boolean): TopAbs_State
    Parameters (3)
    • P
    • Tol
    • ReacdreOnPeriodic
  • IsThePointOn(P: gp_Pnt2d, Tol: number, ReacdreOnPeriodic?: boolean): boolean
    Parameters (3)
    • P
    • Tol
    • ReacdreOnPeriodic
  • If the function returns the orientation of the arc. If the orientation is FORWARD or REVERSED, the arc is a "real" limit of the surface. If the orientation is INTERNAL or EXTERNAL, the arc is considered as an arc on the surface.

    Parameters (1)
    • C
  • Returns the orientation of the vertex V. The vertex has been found with an exploration on a given arc. The orientation is the orientation of the vertex on this arc.

    Parameters (1)
    • V
  • Returns True if the vertices V1 and V2 are identical. This method does not take the orientation of the vertices in account.

    Parameters (2)
    • V1
    • V2
  • Has3d(): boolean

    answers if arcs and vertices may have 3d representations, so that we could use Tol3d and Pnt methods.

  • returns 3d tolerance of the arc C

    Parameters (1)
    • C
  • returns 3d tolerance of the vertex V

    Parameters (1)
    • V
  • returns 3d point of the vertex V

    Parameters (1)
    • V
  • NbSamplesU(): number

    compute the sample-points for the intersections algorithms

  • NbSamplesV(): number

    compute the sample-points for the intersections algorithms

  • NbSamples(): number

    compute the sample-points for the intersections algorithms

  • return the set of U parameters on the surface obtained by the method SamplePnts

    Parameters (1)
    • theArray
      Mutated in place; read the updated value from this argument after the call.
  • return the set of V parameters on the surface obtained by the method SamplePnts

    Parameters (1)
    • theArray
      Mutated in place; read the updated value from this argument after the call.
  • SamplePoint(Index: number, P2d: gp_Pnt2d, P3d: gp_Pnt): void
    Parameters (3)
    • Index
    • P2d
    • P3d
  • DomainIsInfinite(): boolean
  • SamplePnts(theDefl: number, theNUmin: number, theNVmin: number): void

    Compute the sample-points for the intersections algorithms by adaptive algorithm for BSpline surfaces. For other surfaces algorithm is the same as in method ComputeSamplePoints(), but only fill arrays of U and V sample parameters;.

    Parameters (3)
    • theDefl
      a required deflection
    • theNUmin
      minimal nb points for U
    • theNVmin
      minimal nb points for V
  • BSplSamplePnts(theDefl: number, theNUmin: number, theNVmin: number): void

    Compute the sample-points for the intersections algorithms by adaptive algorithm for BSpline surfaces - is used in SamplePnts.

    Parameters (3)
    • theDefl
      required deflection
    • theNUmin
      minimal nb points for U
    • theNVmin
      minimal nb points for V
  • Returns true if provide uniform sampling of points.