OpenCascade.js
API ReferenceModelingDataTKGeomBase

GCPnts

OCCT package GCPnts: GCPnts_AbscissaPoint, GCPnts_AbscissaType, GCPnts_DeflectionType, GCPnts_DistFunction2dMV, and 6 more bound classes.

GCPnts_AbscissaPoint

Provides an algorithm to compute a point on a curve situated at a given distance from another point on the curve, the distance being measured along the curve (curvilinear abscissa on the curve). This algorithm is also used to compute the length of a curve. An AbscissaPoint object provides a framework for:

  • defining the point to compute
  • implementing the construction algorithm
  • consulting the result.

Constructors(9)

  • Empty constructor.

  • constructor(theC: Adaptor3d_Curve, theAbscissa: number, theU0: number): GCPnts_AbscissaPoint

    The algorithm computes a point on a curve at the distance theAbscissa from the point of parameter theU0.

    Parameters (3)
    • theC
    • theAbscissa
    • theU0
  • constructor(theC: Adaptor2d_Curve2d, theAbscissa: number, theU0: number): GCPnts_AbscissaPoint

    The algorithm computes a point on a curve at the distance theAbscissa from the point of parameter theU0.

    Parameters (3)
    • theC
    • theAbscissa
    • theU0
  • constructor(theTol: number, theC: Adaptor3d_Curve, theAbscissa: number, theU0: number): GCPnts_AbscissaPoint

    The algorithm computes a point on a curve at the distance theAbscissa from the point of parameter theU0 with the given tolerance.

    Parameters (4)
    • theTol
    • theC
    • theAbscissa
    • theU0
  • constructor(theTol: number, theC: Adaptor2d_Curve2d, theAbscissa: number, theU0: number): GCPnts_AbscissaPoint

    The algorithm computes a point on a curve at the distance theAbscissa from the point of parameter theU0 with the given tolerance.

    Parameters (4)
    • theTol
    • theC
    • theAbscissa
    • theU0
  • constructor(theC: Adaptor3d_Curve, theAbscissa: number, theU0: number, theUi: number): GCPnts_AbscissaPoint

    The algorithm computes a point on a curve at the distance theAbscissa from the point of parameter theU0. theUi is the starting value used in the iterative process which find the solution, it must be close to the final solution.

    Parameters (4)
    • theC
    • theAbscissa
    • theU0
    • theUi
  • constructor(theC: Adaptor2d_Curve2d, theAbscissa: number, theU0: number, theUi: number): GCPnts_AbscissaPoint

    The algorithm computes a point on a curve at the distance theAbscissa from the point of parameter theU0. theUi is the starting value used in the iterative process which find the solution, it must be closed to the final solution.

    Parameters (4)
    • theC
    • theAbscissa
    • theU0
    • theUi
  • constructor(theC: Adaptor3d_Curve, theAbscissa: number, theU0: number, theUi: number, theTol: number): GCPnts_AbscissaPoint

    The algorithm computes a point on a curve at the distance theAbscissa from the point of parameter theU0. theUi is the starting value used in the iterative process which find the solution, it must be close to the final solution.

    Parameters (5)
    • theC
    • theAbscissa
    • theU0
    • theUi
    • theTol
  • constructor(theC: Adaptor2d_Curve2d, theAbscissa: number, theU0: number, theUi: number, theTol: number): GCPnts_AbscissaPoint

    The algorithm computes a point on a curve at the distance theAbscissa from the point of parameter theU0. theUi is the starting value used in the iterative process which find the solution, it must be close to the final solution.

    Parameters (5)
    • theC
    • theAbscissa
    • theU0
    • theUi
    • theTol

Static methods(8)

  • Length(theC: Adaptor3d_Curve): number

    Computes the length of the 3D Curve.

    Parameters (1)
    • theC
  • Length(theC: Adaptor2d_Curve2d): number

    Computes the length of the 2D Curve.

    Parameters (1)
    • theC
  • Length(theC: Adaptor3d_Curve, theTol: number): number

    Computes the length of the 3D Curve with the given tolerance.

    Parameters (2)
    • theC
    • theTol
  • Length(theC: Adaptor2d_Curve2d, theTol: number): number

    Computes the length of the 2D Curve with the given tolerance.

    Parameters (2)
    • theC
    • theTol
  • Length(theC: Adaptor3d_Curve, theU1: number, theU2: number): number

    Computes the length of the 3D Curve.

    Parameters (3)
    • theC
    • theU1
    • theU2
  • Length(theC: Adaptor2d_Curve2d, theU1: number, theU2: number): number

    Computes the length of the 2D Curve.

    Parameters (3)
    • theC
    • theU1
    • theU2
  • Length(theC: Adaptor3d_Curve, theU1: number, theU2: number, theTol: number): number

    Computes the length of the 3D Curve with the given tolerance.

    Parameters (4)
    • theC
    • theU1
    • theU2
    • theTol
  • Length(theC: Adaptor2d_Curve2d, theU1: number, theU2: number, theTol: number): number

    Computes the length of the Curve with the given tolerance.

    Parameters (4)
    • theC
    • theU1
    • theU2
    • theTol

Instance methods(2)

  • IsDone(): boolean

    True if the computation was successful, False otherwise. IsDone is a protection against:

    • non-convergence of the algorithm
    • querying the results before computation.
  • Parameter(): number

    Returns the parameter on the curve of the point solution of this algorithm. Exceptions StdFail_NotDone if the computation was not successful, or was not done.

GCPnts_QuasiUniformAbscissa

This class provides an algorithm to compute a uniform abscissa distribution of points on a curve, i.e. a sequence of equidistant points. The distance between two consecutive points is measured along the curve.
The distribution is defined by a number of points.

Constructors(5)

  • Constructs an empty algorithm. To define the problem to be solved, use the function Initialize.

  • Computes a uniform abscissa distribution of points on the 2D curve.

    Parameters (2)
    • theC
      input 2D curve
    • theNbPoints
      defines the number of desired points
  • Computes a uniform abscissa distribution of points on the 2D curve.

    Parameters (2)
    • theC
      input 2D curve
    • theNbPoints
      defines the number of desired points
  • constructor(theC: Adaptor3d_Curve, theNbPoints: number, theU1: number, theU2: number): GCPnts_QuasiUniformAbscissa

    Computes a uniform abscissa distribution of points on the part of curve limited by the two parameter values theU1 and theU2, where Abscissa is the curvilinear distance between two consecutive points of the distribution. The first point of the distribution is either the origin of curve or the point of parameter theU1.
    The following points are computed such that the curvilinear distance between two consecutive points is equal to Abscissa. The last point of the distribution is either the end point of curve or the point of parameter theU2.
    However the curvilinear distance between this last point and the point just preceding it in the distribution is, of course, generally not equal to Abscissa.
    Use the function IsDone() to verify that the computation was successful, the function NbPoints() to obtain the number of points of the computed distribution, and the function Parameter() to read the parameter of each point.
    Warning The roles of theU1 and theU2 are inverted if theU1 > theU2. Warning theC is an adapted curve, that is, an object which is an interface between:

    • the services provided by either a 2D curve from the package Geom2d (in the case of an Adaptor2d_Curve2d curve) or a 3D curve from the package Geom (in the case of an Adaptor3d_Curve curve),
    • and those required on the curve by the computation algorithm.
    Parameters (4)
    • theC
      input 3D curve
    • theNbPoints
      defines the number of desired points
    • theU1
      first parameter on curve
    • theU2
      last parameter on curve
  • constructor(theC: Adaptor2d_Curve2d, theNbPoints: number, theU1: number, theU2: number): GCPnts_QuasiUniformAbscissa

    Computes a Uniform abscissa distribution of points on a part of the 2D curve.

    Parameters (4)
    • theC
      input 2D curve
    • theNbPoints
      defines the number of desired points
    • theU1
      first parameter on curve
    • theU2
      last parameter on curve

Instance methods(7)

  • Initialize(theC: Adaptor3d_Curve, theNbPoints: number): void

    Initialize the algorithms with 3D curve and target number of points.

    Parameters (2)
    • theC
      input 3D curve
    • theNbPoints
      defines the number of desired points
  • Initialize(theC: Adaptor2d_Curve2d, theNbPoints: number): void

    Initialize the algorithms with 2D curve and target number of points.

    Parameters (2)
    • theC
      input 2D curve
    • theNbPoints
      defines the number of desired points
  • Initialize(theC: Adaptor3d_Curve, theNbPoints: number, theU1: number, theU2: number): void

    Initialize the algorithms with 3D curve, target number of points and curve parameter range.

    Parameters (4)
    • theC
      input 3D curve
    • theNbPoints
      defines the number of desired points
    • theU1
      first parameter on curve
    • theU2
      last parameter on curve
  • Initialize(theC: Adaptor2d_Curve2d, theNbPoints: number, theU1: number, theU2: number): void

    Initialize the algorithms with 2D curve, target number of points and curve parameter range.

    Parameters (4)
    • theC
      input 2D curve
    • theNbPoints
      defines the number of desired points
    • theU1
      first parameter on curve
    • theU2
      last parameter on curve
  • IsDone(): boolean

    Returns true if the computation was successful. IsDone is a protection against:

    • non-convergence of the algorithm
    • querying the results before computation.
  • NbPoints(): number

    Returns the number of points of the distribution computed by this algorithm. This value is either:

    • the one imposed on the algorithm at the time of construction (or initialization), or
    • the one computed by the algorithm when the curvilinear distance between two consecutive points of the distribution is imposed on the algorithm at the time of construction (or initialization). Exceptions StdFail_NotDone if this algorithm has not been initialized, or if the computation was not successful.
  • Parameter(Index: number): number

    Returns the parameter of the point of index Index in the distribution computed by this algorithm. Warning Index must be greater than or equal to 1, and less than or equal to the number of points of the distribution. However, pay particular attention as this condition is not checked by this function. Exceptions StdFail_NotDone if this algorithm has not been initialized, or if the computation was not successful.

    Parameters (1)
    • Index

GCPnts_QuasiUniformDeflection

This class computes a distribution of points on a curve. The points may respect the deflection. The algorithm is not based on the classical prediction (with second derivative of curve), but either on the evaluation of the distance between the mid point and the point of mid parameter of the two points, or the distance between the mid point and the point at parameter 0.5 on the cubic interpolation of the two points and their tangents.
Note: this algorithm is faster than a GCPnts_UniformDeflection algorithm, and is able to work with non-"C2" continuous curves. However, it generates more points in the distribution.

Constructors(5)

  • Constructs an empty algorithm. To define the problem to be solved, use the function Initialize().

  • constructor(theC: Adaptor3d_Curve, theDeflection: number, theContinuity?: GeomAbs_Shape): GCPnts_QuasiUniformDeflection

    Computes a QuasiUniform Deflection distribution of points on the Curve.

    Parameters (3)
    • theC
    • theDeflection
    • theContinuity
  • constructor(theC: Adaptor2d_Curve2d, theDeflection: number, theContinuity?: GeomAbs_Shape): GCPnts_QuasiUniformDeflection

    Computes a QuasiUniform Deflection distribution of points on the Curve.

    Parameters (3)
    • theC
    • theDeflection
    • theContinuity
  • constructor(theC: Adaptor3d_Curve, theDeflection: number, theU1: number, theU2: number, theContinuity?: GeomAbs_Shape): GCPnts_QuasiUniformDeflection

    Computes a QuasiUniform Deflection distribution of points on a part of the Curve.

    Parameters (5)
    • theC
    • theDeflection
    • theU1
    • theU2
    • theContinuity
  • constructor(theC: Adaptor2d_Curve2d, theDeflection: number, theU1: number, theU2: number, theContinuity?: GeomAbs_Shape): GCPnts_QuasiUniformDeflection

    Computes a QuasiUniform Deflection distribution of points on a part of the Curve. This and the above algorithms compute a distribution of points:

    • on the curve theC, or
    • on the part of curve theC limited by the two parameter values theU1 and theU2, where the deflection resulting from the distributed points is not greater than theDeflection.
      The first point of the distribution is either the origin of curve theC or the point of parameter theU1. The last point of the distribution is either the end point of curve theC or the point of parameter theU2.
      Intermediate points of the distribution are built such that the deflection is not greater than theDeflection. Using the following evaluation of the deflection: if Pi and Pj are two consecutive points of the distribution, respectively of parameter ui and uj on the curve, the deflection is the distance between:
    • the mid-point of Pi and Pj (the center of the chord joining these two points)
    • and the point of mid-parameter of these two points (the point of parameter [(ui+uj) / 2] on curve theC). theContinuity, defaulted to GeomAbs_C1, gives the degree of continuity of the curve theC. (Note that C is an Adaptor3d_Curve or an Adaptor2d_Curve2d object, and does not know the degree of continuity of the underlying curve).
      Use the function IsDone() to verify that the computation was successful, the function NbPoints() to obtain the number of points of the computed distribution, and the function Parameter() to read the parameter of each point.
      Warning
    • The roles of theU1 and theU2 are inverted if theU1 > theU2.
    • Derivative functions on the curve are called according to theContinuity. An error may occur if theContinuity is greater than the real degree of continuity of the curve.
      Warning theC is an adapted curve, i.e. an object which is an interface between:
    • the services provided by either a 2D curve from the package Geom2d (in the case of an Adaptor2d_Curve2d curve) or a 3D curve from the package Geom (in the case of an Adaptor3d_Curve curve),
    • and those required on the curve by the computation algorithm.
    Parameters (5)
    • theC
    • theDeflection
    • theU1
    • theU2
    • theContinuity

Instance methods(9)

  • Initialize(theC: Adaptor3d_Curve, theDeflection: number, theContinuity: GeomAbs_Shape): void

    Initialize the algorithms with 3D curve and deflection.

    Parameters (3)
    • theC
    • theDeflection
    • theContinuity
  • Initialize(theC: Adaptor2d_Curve2d, theDeflection: number, theContinuity: GeomAbs_Shape): void

    Initialize the algorithms with 2D curve and deflection.

    Parameters (3)
    • theC
    • theDeflection
    • theContinuity
  • Initialize(theC: Adaptor3d_Curve, theDeflection: number, theU1: number, theU2: number, theContinuity: GeomAbs_Shape): void

    Initialize the algorithms with 3D curve, deflection and parameter range.

    Parameters (5)
    • theC
    • theDeflection
    • theU1
    • theU2
    • theContinuity
  • Initialize(theC: Adaptor2d_Curve2d, theDeflection: number, theU1: number, theU2: number, theContinuity: GeomAbs_Shape): void

    Initialize the algorithms with theC, theDeflection, theU1, theU2. This and the above algorithms initialize (or reinitialize) this algorithm and compute a distribution of points:

    • on the curve theC, or
    • on the part of curve theC limited by the two parameter values theU1 and theU2, where the deflection resulting from the distributed points is not greater than theDeflection.
      The first point of the distribution is either the origin of curve theC or the point of parameter theU1. The last point of the distribution is either the end point of curve theC or the point of parameter theU2.
      Intermediate points of the distribution are built in such a way that the deflection is not greater than theDeflection. Using the following evaluation of the deflection: if Pi and Pj are two consecutive points of the distribution, respectively of parameter ui and uj on the curve, the deflection is the distance between:
    • the mid-point of Pi and Pj (the center of the chord joining these two points)
    • and the point of mid-parameter of these two points (the point of parameter [(ui+uj) / 2] on curve theC). theContinuity, defaulted to GeomAbs_C1, gives the degree of continuity of the curve theC. (Note that C is an Adaptor3d_Curve or an Adaptor2d_Curve2d object, and does not know the degree of continuity of the underlying curve).
      Use the function IsDone to verify that the computation was successful, the function NbPoints() to obtain the number of points of the computed distribution, and the function Parameter() to read the parameter of each point.
      Warning
    • The roles of theU1 and theU2 are inverted if theU1 > theU2.
    • Derivative functions on the curve are called according to theContinuity. An error may occur if theContinuity is greater than the real degree of continuity of the curve.
      Warning theC is an adapted curve, i.e. an object which is an interface between:
    • the services provided by either a 2D curve from the package Geom2d (in the case of an Adaptor2d_Curve2d curve) or a 3D curve from the package Geom (in the case of an Adaptor3d_Curve curve), and those required on the curve by the computation algorithm.
    Parameters (5)
    • theC
    • theDeflection
    • theU1
    • theU2
    • theContinuity
  • IsDone(): boolean

    Returns true if the computation was successful. IsDone is a protection against:

    • non-convergence of the algorithm
    • querying the results before computation.
  • NbPoints(): number

    Returns the number of points of the distribution computed by this algorithm. Exceptions StdFail_NotDone if this algorithm has not been initialized, or if the computation was not successful.

  • Parameter(Index: number): number

    Returns the parameter of the point of index Index in the distribution computed by this algorithm. Warning Index must be greater than or equal to 1, and less than or equal to the number of points of the distribution. However, pay particular attention as this condition is not checked by this function. Exceptions StdFail_NotDone if this algorithm has not been initialized, or if the computation was not successful.

    Parameters (1)
    • Index
  • Value(Index: number): gp_Pnt

    Returns the point of index Index in the distribution computed by this algorithm. Warning Index must be greater than or equal to 1, and less than or equal to the number of points of the distribution. However, pay particular attention as this condition is not checked by this function. Exceptions StdFail_NotDone if this algorithm has not been initialized, or if the computation was not successful.

    Parameters (1)
    • Index
  • Deflection(): number

    Returns the deflection between the curve and the polygon resulting from the points of the distribution computed by this algorithm. This is the value given to the algorithm at the time of construction (or initialization). Exceptions StdFail_NotDone if this algorithm has not been initialized, or if the computation was not successful.

GCPnts_TangentialDeflection

Computes a set of points on a curve from package Adaptor3d such as between two successive points P1(u1)and P2(u2) :

.||P1P3^P3P2||/||P1P3||*||P3P2||<AngularDeflection .||P1P2^P1P3||/||P1P2||<CurvatureDeflection

where P3 is the point of abscissa ((u1+u2)/2), with u1 the abscissa of the point P1 and u2 the abscissa of the point P2.
^ is the cross product of two vectors, and ||P1P2|| the magnitude of the vector P1P2.
The conditions AngularDeflection > gp::Resolution() and CurvatureDeflection > gp::Resolution() must be satisfied at the construction time.
A minimum number of points can be fixed for a linear or circular element. Example:

occ::handle<Geom_BezierCurve>aCurve=newGeom_BezierCurve(thePoles); GeomAdaptor_CurveaCurveAdaptor(aCurve); doubleaCDeflect=0.01;//Curvaturedeflection doubleanADeflect=0.09;//Angulardeflection GCPnts_TangentialDeflectionaPointsOnCurve; aPointsOnCurve.Initialize(aCurveAdaptor,anADeflect,aCDeflect); for(inti=1;i<=aPointsOnCurve.NbPoints();++i) { doubleaU=aPointsOnCurve.Parameter(i); gp_PntaPnt=aPointsOnCurve.Value(i); }

Constructors(5)

  • Empty constructor.

    See also
    • Initialize()
  • constructor(theC: Adaptor3d_Curve, theAngularDeflection: number, theCurvatureDeflection: number, theMinimumOfPoints?: number, theUTol?: number, theMinLen?: number): GCPnts_TangentialDeflection

    Constructor for 3D curve.

    Parameters (6)
    • theC
      3d curve
    • theAngularDeflection
      angular deflection in radians
    • theCurvatureDeflection
      linear deflection
    • theMinimumOfPoints
      minimum number of points
    • theUTol
      tolerance in curve parametric scope
    • theMinLen
      minimal length
  • constructor(theC: Adaptor2d_Curve2d, theAngularDeflection: number, theCurvatureDeflection: number, theMinimumOfPoints?: number, theUTol?: number, theMinLen?: number): GCPnts_TangentialDeflection

    Constructor for 2D curve.

    Parameters (6)
    • theC
      2d curve
    • theAngularDeflection
      angular deflection in radians
    • theCurvatureDeflection
      linear deflection
    • theMinimumOfPoints
      minimum number of points
    • theUTol
      tolerance in curve parametric scope
    • theMinLen
      minimal length
  • constructor(theC: Adaptor3d_Curve, theFirstParameter: number, theLastParameter: number, theAngularDeflection: number, theCurvatureDeflection: number, theMinimumOfPoints?: number, theUTol?: number, theMinLen?: number): GCPnts_TangentialDeflection

    Constructor for 2D curve with restricted range.

    Parameters (8)
    • theC
      2d curve
    • theFirstParameter
      first parameter on curve
    • theLastParameter
      last parameter on curve
    • theAngularDeflection
      angular deflection in radians
    • theCurvatureDeflection
      linear deflection
    • theMinimumOfPoints
      minimum number of points
    • theUTol
      tolerance in curve parametric scope
    • theMinLen
      minimal length
  • constructor(theC: Adaptor2d_Curve2d, theFirstParameter: number, theLastParameter: number, theAngularDeflection: number, theCurvatureDeflection: number, theMinimumOfPoints?: number, theUTol?: number, theMinLen?: number): GCPnts_TangentialDeflection

    Constructor for 2D curve with restricted range.

    Parameters (8)
    • theC
      2d curve
    • theFirstParameter
      first parameter on curve
    • theLastParameter
      last parameter on curve
    • theAngularDeflection
      angular deflection in radians
    • theCurvatureDeflection
      linear deflection
    • theMinimumOfPoints
      minimum number of points
    • theUTol
      tolerance in curve parametric scope
    • theMinLen
      minimal length

Static methods(1)

  • ArcAngularStep(theRadius: number, theLinearDeflection: number, theAngularDeflection: number, theMinLength: number): number

    Computes angular step for the arc using the given parameters.

    Parameters (4)
    • theRadius
    • theLinearDeflection
    • theAngularDeflection
    • theMinLength

Instance methods(8)

  • Initialize(theC: Adaptor3d_Curve, theAngularDeflection: number, theCurvatureDeflection: number, theMinimumOfPoints: number, theUTol: number, theMinLen: number): void

    Initialize algorithm for 3D curve.

    Parameters (6)
    • theC
      3d curve
    • theAngularDeflection
      angular deflection in radians
    • theCurvatureDeflection
      linear deflection
    • theMinimumOfPoints
      minimum number of points
    • theUTol
      tolerance in curve parametric scope
    • theMinLen
      minimal length
  • Initialize(theC: Adaptor2d_Curve2d, theAngularDeflection: number, theCurvatureDeflection: number, theMinimumOfPoints: number, theUTol: number, theMinLen: number): void

    Initialize algorithm for 2D curve.

    Parameters (6)
    • theC
      2d curve
    • theAngularDeflection
      angular deflection in radians
    • theCurvatureDeflection
      linear deflection
    • theMinimumOfPoints
      minimum number of points
    • theUTol
      tolerance in curve parametric scope
    • theMinLen
      minimal length
  • Initialize(theC: Adaptor3d_Curve, theFirstParameter: number, theLastParameter: number, theAngularDeflection: number, theCurvatureDeflection: number, theMinimumOfPoints: number, theUTol: number, theMinLen: number): void

    Initialize algorithm for 3D curve with restricted range.

    Parameters (8)
    • theC
      3d curve
    • theFirstParameter
      first parameter on curve
    • theLastParameter
      last parameter on curve
    • theAngularDeflection
      angular deflection in radians
    • theCurvatureDeflection
      linear deflection
    • theMinimumOfPoints
      minimum number of points
    • theUTol
      tolerance in curve parametric scope
    • theMinLen
      minimal length
  • Initialize(theC: Adaptor2d_Curve2d, theFirstParameter: number, theLastParameter: number, theAngularDeflection: number, theCurvatureDeflection: number, theMinimumOfPoints: number, theUTol: number, theMinLen: number): void

    Initialize algorithm for 2D curve with restricted range.

    Parameters (8)
    • theC
      2d curve
    • theFirstParameter
      first parameter on curve
    • theLastParameter
      last parameter on curve
    • theAngularDeflection
      angular deflection in radians
    • theCurvatureDeflection
      linear deflection
    • theMinimumOfPoints
      minimum number of points
    • theUTol
      tolerance in curve parametric scope
    • theMinLen
      minimal length
  • AddPoint(thePnt: gp_Pnt, theParam: number, theIsReplace?: boolean): number

    Add point to already calculated points (or replace existing) Returns index of new added point or founded with parametric tolerance (replaced if theIsReplace is true).

    Parameters (3)
    • thePnt
    • theParam
    • theIsReplace
  • NbPoints(): number
  • Parameter(I: number): number
    Parameters (1)
    • I
  • Value(I: number): gp_Pnt
    Parameters (1)
    • I

GCPnts_UniformAbscissa

This class allows to compute a uniform distribution of points on a curve (i.e. the points will all be equally distant).

Constructors(9)

  • creation of a indefinite UniformAbscissa

  • constructor(theC: Adaptor3d_Curve, theAbscissa: number, theToler?: number): GCPnts_UniformAbscissa

    Computes a uniform abscissa distribution of points on the 3D curve.

    Parameters (3)
    • theC
      input curve
    • theAbscissa
      abscissa (distance between two consecutive points)
    • theToler
      used for more precise calculation of curve length (Precision::Confusion() by default)
  • constructor(theC: Adaptor3d_Curve, theNbPoints: number, theToler?: number): GCPnts_UniformAbscissa

    Computes a uniform abscissa distribution of points on the 2D Curve.

    Parameters (3)
    • theC
      input curve
    • theNbPoints
      defines the number of desired points
    • theToler
      used for more precise calculation of curve length (Precision::Confusion() by default)
  • constructor(theC: Adaptor2d_Curve2d, theAbscissa: number, theToler?: number): GCPnts_UniformAbscissa

    Computes a uniform abscissa distribution of points on the 2D curve.

    Parameters (3)
    • theC
      input curve
    • theAbscissa
      abscissa (distance between two consecutive points)
    • theToler
      used for more precise calculation of curve length (Precision::Confusion() by default)
  • constructor(theC: Adaptor2d_Curve2d, theNbPoints: number, theToler?: number): GCPnts_UniformAbscissa

    Computes a uniform abscissa distribution of points on the 2D Curve.

    Parameters (3)
    • theC
      input curve
    • theNbPoints
      defines the number of desired points
    • theToler
      used for more precise calculation of curve length (Precision::Confusion() by default)
  • constructor(theC: Adaptor3d_Curve, theAbscissa: number, theU1: number, theU2: number, theToler?: number): GCPnts_UniformAbscissa

    Computes a Uniform abscissa distribution of points on a part of the 3D Curve.

    Parameters (5)
    • theC
      input curve
    • theAbscissa
      abscissa (distance between two consecutive points)
    • theU1
      first parameter on curve
    • theU2
      last parameter on curve
    • theToler
      used for more precise calculation of curve length (Precision::Confusion() by default)
  • constructor(theC: Adaptor3d_Curve, theNbPoints: number, theU1: number, theU2: number, theToler?: number): GCPnts_UniformAbscissa

    Computes a Uniform abscissa distribution of points on a part of the 2D Curve.

    Parameters (5)
    • theC
      input curve
    • theNbPoints
      defines the number of desired points
    • theU1
      first parameter on curve
    • theU2
      last parameter on curve
    • theToler
      used for more precise calculation of curve length (Precision::Confusion() by default)
  • constructor(theC: Adaptor2d_Curve2d, theAbscissa: number, theU1: number, theU2: number, theToler?: number): GCPnts_UniformAbscissa

    Computes a Uniform abscissa distribution of points on a part of the 2D Curve.

    Parameters (5)
    • theC
      input curve
    • theAbscissa
      abscissa (distance between two consecutive points)
    • theU1
      first parameter on curve
    • theU2
      last parameter on curve
    • theToler
      used for more precise calculation of curve length (Precision::Confusion() by default)
  • constructor(theC: Adaptor2d_Curve2d, theNbPoints: number, theU1: number, theU2: number, theToler?: number): GCPnts_UniformAbscissa

    Computes a Uniform abscissa distribution of points on a part of the 2D Curve.

    Parameters (5)
    • theC
      input curve
    • theNbPoints
      defines the number of desired points
    • theU1
      first parameter on curve
    • theU2
      last parameter on curve
    • theToler
      used for more precise calculation of curve length (Precision::Confusion() by default)

Instance methods(12)

  • Initialize(theC: Adaptor3d_Curve, theAbscissa: number, theToler: number): void

    Initialize the algorithms with 3D curve, Abscissa, and Tolerance.

    Parameters (3)
    • theC
      input curve
    • theAbscissa
      abscissa (distance between two consecutive points)
    • theToler
      used for more precise calculation of curve length (Precision::Confusion() by default)
  • Initialize(theC: Adaptor3d_Curve, theNbPoints: number, theToler: number): void

    Initialize the algorithms with 2D curve, number of points, and Tolerance.

    Parameters (3)
    • theC
      input curve
    • theNbPoints
      defines the number of desired points
    • theToler
      used for more precise calculation of curve length (Precision::Confusion() by default)
  • Initialize(theC: Adaptor2d_Curve2d, theAbscissa: number, theToler: number): void

    Initialize the algorithms with 2D curve, Abscissa, and Tolerance.

    Parameters (3)
    • theC
      input curve
    • theAbscissa
      abscissa (distance between two consecutive points)
    • theToler
      used for more precise calculation of curve length (Precision::Confusion() by default)
  • Initialize(theC: Adaptor2d_Curve2d, theNbPoints: number, theToler: number): void

    Initialize the algorithms with 2D curve, number of points, and Tolerance.

    Parameters (3)
    • theC
      input curve
    • theNbPoints
      defines the number of desired points
    • theToler
      used for more precise calculation of curve length (Precision::Confusion() by default)
  • Initialize(theC: Adaptor3d_Curve, theAbscissa: number, theU1: number, theU2: number, theToler: number): void

    Initialize the algorithms with 3D curve, Abscissa, Tolerance, and parameter range.

    Parameters (5)
    • theC
      input curve
    • theAbscissa
      abscissa (distance between two consecutive points)
    • theU1
      first parameter on curve
    • theU2
      last parameter on curve
    • theToler
      used for more precise calculation of curve length (Precision::Confusion() by default)
  • Initialize(theC: Adaptor3d_Curve, theNbPoints: number, theU1: number, theU2: number, theToler: number): void

    Initialize the algorithms with 2D curve, number of points, Tolerance, and parameter range.

    Parameters (5)
    • theC
      input curve
    • theNbPoints
      defines the number of desired points
    • theU1
      first parameter on curve
    • theU2
      last parameter on curve
    • theToler
      used for more precise calculation of curve length (Precision::Confusion() by default)
  • Initialize(theC: Adaptor2d_Curve2d, theAbscissa: number, theU1: number, theU2: number, theToler: number): void

    Initialize the algorithms with 2D curve, Abscissa, Tolerance, and parameter range.

    Parameters (5)
    • theC
      input curve
    • theAbscissa
      abscissa (distance between two consecutive points)
    • theU1
      first parameter on curve
    • theU2
      last parameter on curve
    • theToler
      used for more precise calculation of curve length (Precision::Confusion() by default)
  • Initialize(theC: Adaptor2d_Curve2d, theNbPoints: number, theU1: number, theU2: number, theToler: number): void

    Initialize the algorithms with 2D curve, number of points, Tolerance, and parameter range.

    Parameters (5)
    • theC
      input curve
    • theNbPoints
      defines the number of desired points
    • theU1
      first parameter on curve
    • theU2
      last parameter on curve
    • theToler
      used for more precise calculation of curve length (Precision::Confusion() by default)
  • IsDone(): boolean
  • NbPoints(): number
  • Parameter(Index: number): number

    returns the computed Parameter of index <Index>.

    Parameters (1)
    • Index
  • Abscissa(): number

    Returns the current abscissa, i.e. the distance between two consecutive points.

GCPnts_UniformDeflection

Provides an algorithm to compute a distribution of points on a 'C2' continuous curve. The algorithm respects a criterion of maximum deflection between the curve and the polygon that results from the computed points. Note: This algorithm is relatively time consuming. A GCPnts_QuasiUniformDeflection algorithm is quicker; it can also work with non-'C2' continuous curves, but it generates more points in the distribution.

Constructors(5)

  • Constructs an empty algorithm. To define the problem to be solved, use the function Initialize.

  • constructor(theC: Adaptor3d_Curve, theDeflection: number, theWithControl?: boolean): GCPnts_UniformDeflection

    Computes a uniform Deflection distribution of points on the curve.

    Parameters (3)
    • theC
      input 3D curve
    • theDeflection
      target deflection
    • theWithControl
      when TRUE, the algorithm controls the estimate deflection
  • constructor(theC: Adaptor2d_Curve2d, theDeflection: number, theWithControl?: boolean): GCPnts_UniformDeflection

    Computes a uniform Deflection distribution of points on the curve.

    Parameters (3)
    • theC
      input 2D curve
    • theDeflection
      target deflection
    • theWithControl
      when TRUE, the algorithm controls the estimate deflection
  • constructor(theC: Adaptor3d_Curve, theDeflection: number, theU1: number, theU2: number, theWithControl?: boolean): GCPnts_UniformDeflection

    Computes a Uniform Deflection distribution of points on a part of the curve.

    Parameters (5)
    • theC
      input 3D curve
    • theDeflection
      target deflection
    • theU1
      first parameter on curve
    • theU2
      last parameter on curve
    • theWithControl
      when TRUE, the algorithm controls the estimate deflection
  • constructor(theC: Adaptor2d_Curve2d, theDeflection: number, theU1: number, theU2: number, theWithControl?: boolean): GCPnts_UniformDeflection

    Computes a Uniform Deflection distribution of points on a part of the curve.

    Parameters (5)
    • theC
      input 2D curve
    • theDeflection
      target deflection
    • theU1
      first parameter on curve
    • theU2
      last parameter on curve
    • theWithControl
      when TRUE, the algorithm controls the estimate deflection

Instance methods(9)

  • Initialize(theC: Adaptor3d_Curve, theDeflection: number, theWithControl: boolean): void

    Initialize the algorithms with 3D curve and deflection.

    Parameters (3)
    • theC
    • theDeflection
    • theWithControl
  • Initialize(theC: Adaptor2d_Curve2d, theDeflection: number, theWithControl: boolean): void

    Initialize the algorithms with 2D curve and deflection.

    Parameters (3)
    • theC
    • theDeflection
    • theWithControl
  • Initialize(theC: Adaptor3d_Curve, theDeflection: number, theU1: number, theU2: number, theWithControl: boolean): void

    Initialize the algorithms with 3D curve, deflection, parameter range.

    Parameters (5)
    • theC
    • theDeflection
    • theU1
    • theU2
    • theWithControl
  • Initialize(theC: Adaptor2d_Curve2d, theDeflection: number, theU1: number, theU2: number, theWithControl: boolean): void

    Initialize the algorithms with curve, deflection, parameter range. This and the above methods initialize (or reinitialize) this algorithm and compute a distribution of points:

    • on the curve theC, or
    • on the part of curve theC limited by the two parameter values theU1 and theU2, where the maximum distance between theC and the polygon that results from the points of the distribution is not greater than theDeflection. The first point of the distribution is either the origin of curve theC or the point of parameter theU1. The last point of the distribution is either the end point of curve theC or the point of parameter theU2.
      Intermediate points of the distribution are built using interpolations of segments of the curve limited at the 2nd degree.
      The construction ensures, in a first step, that the chordal deviation for this interpolation of the curve is less than or equal to theDeflection. However, it does not ensure that the chordal deviation for the curve itself is less than or equal to theDeflection. To do this a check is necessary, which may generate (second step) additional intermediate points. This check is time consuming, and can be avoided by setting theWithControl to false. Note that by default theWithControl is true and check is performed.
      Use the function IsDone to verify that the computation was successful, the function NbPoints() to obtain the number of points of the computed distribution, and the function Parameter to read the parameter of each point.
      Warning
    • theC is necessary, 'C2' continuous. This property is not checked at construction time.
    • The roles of theU1 and theU2 are inverted if theU1 > theU2.
      Warning theC is an adapted curve, i.e. an object which is an interface between:
    • the services provided by either a 2D curve from the package Geom2d (in the case of an Adaptor2d_Curve2d curve) or a 3D curve from the package Geom (in the case of an Adaptor3d_Curve curve),
    • and those required on the curve by the computation algorithm.
    Parameters (5)
    • theC
    • theDeflection
    • theU1
    • theU2
    • theWithControl
  • IsDone(): boolean

    Returns true if the computation was successful. IsDone is a protection against:

    • non-convergence of the algorithm
    • querying the results before computation.
  • NbPoints(): number

    Returns the number of points of the distribution computed by this algorithm. Exceptions StdFail_NotDone if this algorithm has not been initialized, or if the computation was not successful.

  • Parameter(Index: number): number

    Returns the parameter of the point of index Index in the distribution computed by this algorithm. Warning Index must be greater than or equal to 1, and less than or equal to the number of points of the distribution. However, pay particular attention as this condition is not checked by this function. Exceptions StdFail_NotDone if this algorithm has not been initialized, or if the computation was not successful.

    Parameters (1)
    • Index
  • Value(Index: number): gp_Pnt

    Returns the point of index Index in the distribution computed by this algorithm. Warning Index must be greater than or equal to 1, and less than or equal to the number of points of the distribution. However, pay particular attention as this condition is not checked by this function. Exceptions StdFAil_NotDone if this algorithm has not been initialized, or if the computation was not successful.

    Parameters (1)
    • Index
  • Deflection(): number

    Returns the deflection between the curve and the polygon resulting from the points of the distribution computed by this algorithm. This value is the one given to the algorithm at the time of construction (or initialization). Exceptions StdFail_NotDone if this algorithm has not been initialized, or if the computation was not successful.