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)theCtheAbscissatheU0
- 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)theCtheAbscissatheU0
- 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)theToltheCtheAbscissatheU0
- 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)theToltheCtheAbscissatheU0
- 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)theCtheAbscissatheU0theUi
- 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)theCtheAbscissatheU0theUi
- 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)theCtheAbscissatheU0theUitheTol
- 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)theCtheAbscissatheU0theUitheTol
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)theCtheTol
- Length(theC: Adaptor2d_Curve2d, theTol: number): number
Computes the length of the 2D Curve with the given tolerance.
Parameters (2)theCtheTol
- Length(theC: Adaptor3d_Curve, theU1: number, theU2: number): number
Computes the length of the 3D Curve.
Parameters (3)theCtheU1theU2
- Length(theC: Adaptor2d_Curve2d, theU1: number, theU2: number): number
Computes the length of the 2D Curve.
Parameters (3)theCtheU1theU2
- Length(theC: Adaptor3d_Curve, theU1: number, theU2: number, theTol: number): number
Computes the length of the 3D Curve with the given tolerance.
Parameters (4)theCtheU1theU2theTol
- Length(theC: Adaptor2d_Curve2d, theU1: number, theU2: number, theTol: number): number
Computes the length of the Curve with the given tolerance.
Parameters (4)theCtheU1theU2theTol
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_AbscissaType
Properties(3)
GCPnts_DeflectionType
Properties(4)
GCPnts_DistFunction2dMV
The same as class GCPnts_DistFunction2d, but it can be used in minimization algorithms that requires multi variable function.
Instance methods(1)
- NbVariables(): number
Returns the number of variables of the function.
GCPnts_DistFunctionMV
The same as class GCPnts_DistFunction, but it can be used in minimization algorithms that requires multi variable function.
Instance methods(1)
- NbVariables(): number
Returns the number of variables of the function.
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.
- constructor(theC: Adaptor3d_Curve, theNbPoints: number): GCPnts_QuasiUniformAbscissa
Computes a uniform abscissa distribution of points on the 2D curve.
Parameters (2)theC—input 2D curvetheNbPoints—defines the number of desired points
- constructor(theC: Adaptor2d_Curve2d, theNbPoints: number): GCPnts_QuasiUniformAbscissa
Computes a uniform abscissa distribution of points on the 2D curve.
Parameters (2)theC—input 2D curvetheNbPoints—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 functionIsDone()to verify that the computation was successful, the functionNbPoints()to obtain the number of points of the computed distribution, and the functionParameter()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_Curve2dcurve) or a 3D curve from the package Geom (in the case of anAdaptor3d_Curvecurve), - and those required on the curve by the computation algorithm.
Parameters (4)theC—input 3D curvetheNbPoints—defines the number of desired pointstheU1—first parameter on curvetheU2—last parameter on curve
- the services provided by either a 2D curve from the package Geom2d (in the case of an
- 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 curvetheNbPoints—defines the number of desired pointstheU1—first parameter on curvetheU2—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 curvetheNbPoints—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 curvetheNbPoints—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 curvetheNbPoints—defines the number of desired pointstheU1—first parameter on curvetheU2—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 curvetheNbPoints—defines the number of desired pointstheU1—first parameter on curvetheU2—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)theCtheDeflectiontheContinuity
- constructor(theC: Adaptor2d_Curve2d, theDeflection: number, theContinuity?: GeomAbs_Shape): GCPnts_QuasiUniformDeflection
Computes a QuasiUniform Deflection distribution of points on the Curve.
Parameters (3)theCtheDeflectiontheContinuity
- 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)theCtheDeflectiontheU1theU2theContinuity
- 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_Curveor anAdaptor2d_Curve2dobject, and does not know the degree of continuity of the underlying curve).
Use the functionIsDone()to verify that the computation was successful, the functionNbPoints()to obtain the number of points of the computed distribution, and the functionParameter()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_Curve2dcurve) or a 3D curve from the package Geom (in the case of anAdaptor3d_Curvecurve), - and those required on the curve by the computation algorithm.
Parameters (5)theCtheDeflectiontheU1theU2theContinuity
Instance methods(9)
- Initialize(theC: Adaptor3d_Curve, theDeflection: number, theContinuity: GeomAbs_Shape): void
Initialize the algorithms with 3D curve and deflection.
Parameters (3)theCtheDeflectiontheContinuity
- Initialize(theC: Adaptor2d_Curve2d, theDeflection: number, theContinuity: GeomAbs_Shape): void
Initialize the algorithms with 2D curve and deflection.
Parameters (3)theCtheDeflectiontheContinuity
- 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)theCtheDeflectiontheU1theU2theContinuity
- 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_Curveor anAdaptor2d_Curve2dobject, and does not know the degree of continuity of the underlying curve).
Use the function IsDone to verify that the computation was successful, the functionNbPoints()to obtain the number of points of the computed distribution, and the functionParameter()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_Curve2dcurve) or a 3D curve from the package Geom (in the case of anAdaptor3d_Curvecurve), and those required on the curve by the computation algorithm.
Parameters (5)theCtheDeflectiontheU1theU2theContinuity
- 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
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) :
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:
Constructors(5)
Empty constructor.
See alsoInitialize()
- constructor(theC: Adaptor3d_Curve, theAngularDeflection: number, theCurvatureDeflection: number, theMinimumOfPoints?: number, theUTol?: number, theMinLen?: number): GCPnts_TangentialDeflection
Constructor for 3D curve.
Parameters (6)theC—3d curvetheAngularDeflection—angular deflection in radianstheCurvatureDeflection—linear deflectiontheMinimumOfPoints—minimum number of pointstheUTol—tolerance in curve parametric scopetheMinLen—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 curvetheAngularDeflection—angular deflection in radianstheCurvatureDeflection—linear deflectiontheMinimumOfPoints—minimum number of pointstheUTol—tolerance in curve parametric scopetheMinLen—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 curvetheFirstParameter—first parameter on curvetheLastParameter—last parameter on curvetheAngularDeflection—angular deflection in radianstheCurvatureDeflection—linear deflectiontheMinimumOfPoints—minimum number of pointstheUTol—tolerance in curve parametric scopetheMinLen—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 curvetheFirstParameter—first parameter on curvetheLastParameter—last parameter on curvetheAngularDeflection—angular deflection in radianstheCurvatureDeflection—linear deflectiontheMinimumOfPoints—minimum number of pointstheUTol—tolerance in curve parametric scopetheMinLen—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)theRadiustheLinearDeflectiontheAngularDeflectiontheMinLength
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 curvetheAngularDeflection—angular deflection in radianstheCurvatureDeflection—linear deflectiontheMinimumOfPoints—minimum number of pointstheUTol—tolerance in curve parametric scopetheMinLen—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 curvetheAngularDeflection—angular deflection in radianstheCurvatureDeflection—linear deflectiontheMinimumOfPoints—minimum number of pointstheUTol—tolerance in curve parametric scopetheMinLen—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 curvetheFirstParameter—first parameter on curvetheLastParameter—last parameter on curvetheAngularDeflection—angular deflection in radianstheCurvatureDeflection—linear deflectiontheMinimumOfPoints—minimum number of pointstheUTol—tolerance in curve parametric scopetheMinLen—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 curvetheFirstParameter—first parameter on curvetheLastParameter—last parameter on curvetheAngularDeflection—angular deflection in radianstheCurvatureDeflection—linear deflectiontheMinimumOfPoints—minimum number of pointstheUTol—tolerance in curve parametric scopetheMinLen—minimal length
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)thePnttheParamtheIsReplace
- NbPoints(): number
- Parameter(I: number): numberParameters (1)
I
- 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 curvetheAbscissa—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 curvetheNbPoints—defines the number of desired pointstheToler—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 curvetheAbscissa—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 curvetheNbPoints—defines the number of desired pointstheToler—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 curvetheAbscissa—abscissa (distance between two consecutive points)theU1—first parameter on curvetheU2—last parameter on curvetheToler—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 curvetheNbPoints—defines the number of desired pointstheU1—first parameter on curvetheU2—last parameter on curvetheToler—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 curvetheAbscissa—abscissa (distance between two consecutive points)theU1—first parameter on curvetheU2—last parameter on curvetheToler—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 curvetheNbPoints—defines the number of desired pointstheU1—first parameter on curvetheU2—last parameter on curvetheToler—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 curvetheAbscissa—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 curvetheNbPoints—defines the number of desired pointstheToler—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 curvetheAbscissa—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 curvetheNbPoints—defines the number of desired pointstheToler—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 curvetheAbscissa—abscissa (distance between two consecutive points)theU1—first parameter on curvetheU2—last parameter on curvetheToler—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 curvetheNbPoints—defines the number of desired pointstheU1—first parameter on curvetheU2—last parameter on curvetheToler—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 curvetheAbscissa—abscissa (distance between two consecutive points)theU1—first parameter on curvetheU2—last parameter on curvetheToler—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 curvetheNbPoints—defines the number of desired pointstheU1—first parameter on curvetheU2—last parameter on curvetheToler—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 curvetheDeflection—target deflectiontheWithControl—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 curvetheDeflection—target deflectiontheWithControl—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 curvetheDeflection—target deflectiontheU1—first parameter on curvetheU2—last parameter on curvetheWithControl—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 curvetheDeflection—target deflectiontheU1—first parameter on curvetheU2—last parameter on curvetheWithControl—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)theCtheDeflectiontheWithControl
- Initialize(theC: Adaptor2d_Curve2d, theDeflection: number, theWithControl: boolean): void
Initialize the algorithms with 2D curve and deflection.
Parameters (3)theCtheDeflectiontheWithControl
- Initialize(theC: Adaptor3d_Curve, theDeflection: number, theU1: number, theU2: number, theWithControl: boolean): void
Initialize the algorithms with 3D curve, deflection, parameter range.
Parameters (5)theCtheDeflectiontheU1theU2theWithControl
- 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 functionNbPoints()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_Curve2dcurve) or a 3D curve from the package Geom (in the case of anAdaptor3d_Curvecurve), - and those required on the curve by the computation algorithm.
Parameters (5)theCtheDeflectiontheU1theU2theWithControl
- 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
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.