Geom2dEval
OCCT package Geom2dEval: Geom2dEval_AHTBezierCurve, Geom2dEval_ArchimedeanSpiralCurve, Geom2dEval_CircleInvoluteCurve, Geom2dEval_LogarithmicSpiralCurve,…
Geom2dEval_AHTBezierCurve
2D Algebraic-Hyperbolic-Trigonometric Bezier curve. Uses a mixed basis: {1, t, ..., t^k, sinh(alphat), cosh(alphat), sin(betat), cos(betat)}. The number of basis functions = algDegree + 1 + 2*(alpha>0) + 2*(beta>0) must equal NbPoles. Parameter range: [0, 1].
Constructors(2)
- constructor(thePoles: NCollection_Array1_gp_Pnt2d, theAlgDegree: number, theAlpha: number, theBeta: number): Geom2dEval_AHTBezierCurve
Non-rational constructor.
Parameters (4)thePoles—control pointstheAlgDegree—algebraic polynomial degree (>= 0)theAlpha—hyperbolic frequency (>= 0, 0 = no hyperbolic terms)theBeta—trigonometric frequency (>= 0, 0 = no trig terms)
- constructor(thePoles: NCollection_Array1_gp_Pnt2d, theWeights: NCollection_Array1_double, theAlgDegree: number, theAlpha: number, theBeta: number): Geom2dEval_AHTBezierCurve
Rational constructor.
Parameters (5)thePoles—control pointstheWeights—weights for each pole (must be > 0)theAlgDegree—algebraic polynomial degree (>= 0)theAlpha—hyperbolic frequency (>= 0, 0 = no hyperbolic terms)theBeta—trigonometric frequency (>= 0, 0 = no trig terms)
Static methods(2)
- get_type_name(): string
Instance methods(25)
Returns the array of poles.
Returns the array of weights.
- AlgDegree(): number
Returns the algebraic polynomial degree.
- Alpha(): number
Returns the hyperbolic frequency parameter.
- Beta(): number
Returns the trigonometric frequency parameter.
- NbPoles(): number
Returns the number of poles.
- IsRational(): boolean
Returns true if the curve is rational (has explicit weights).
Returns the start point of the curve (at parameter 0).
Returns the end point of the curve (at parameter 1).
- Reverse(): void
Reversal is not supported for this eval curve.
- ReversedParameter(U: number): number
Reversal is not supported for this eval curve.
Parameters (1)U
- FirstParameter(): number
Returns the value of the first parameter: 0.0.
- LastParameter(): number
Returns the value of the last parameter: 1.0.
- IsClosed(): boolean
Returns true if the curve is closed.
- IsPeriodic(): boolean
Returns false. The AHT-Bezier curve is not periodic.
Returns GeomAbs_CN.
- IsCN(N: number): boolean
Returns true for any N. The AHT-Bezier curve is infinitely differentiable.
Parameters (1)N
Computes the point at parameter U.
Parameters (1)U
- EvalD1(U: number): Geom2d_Curve_ResD1
Computes the point and first derivative at parameter U.
Parameters (1)U
- EvalD2(U: number): Geom2d_Curve_ResD2
Computes the point and first two derivatives at parameter U.
Parameters (1)U
- EvalD3(U: number): Geom2d_Curve_ResD3
Computes the point and first three derivatives at parameter U.
Parameters (1)U
Computes the N-th derivative at parameter U.
Parameters (2)U—the parameter valueN—the derivative order (must be >= 1)
Returnsthe N-th derivative vector
Transformation is not supported for this eval geometry.
Parameters (1)T
Creates a new object which is a copy of this curve.
Geom2dEval_ArchimedeanSpiralCurve
Describes a 2D Archimedean spiral curve. The polar equation is r = a + b*t, where a is the initial radius and b is the growth rate per radian.
The parametric equation is:
where:
- O, XDir are from the local coordinate system,
- YDir is the perpendicular to XDir,
- a is the initial radius (>= 0),
- b is the growth rate per radian (> 0).
The parameter range is [0, +inf). The curve is neither periodic nor closed.
Constructors(1)
- constructor(thePosition: gp_Ax2d, theInitialRadius: number, theGrowthRate: number): Geom2dEval_ArchimedeanSpiralCurve
Creates an Archimedean spiral.
Parameters (3)thePosition—the local coordinate systemtheInitialRadius—the initial radius (must be >= 0)theGrowthRate—the growth rate per radian (must be > 0)
Static methods(2)
- get_type_name(): string
Instance methods(19)
Returns the local coordinate system.
- InitialRadius(): number
Returns the initial radius.
- GrowthRate(): number
Returns the growth rate per radian.
- Reverse(): void
Reversal is not supported for this eval curve.
- ReversedParameter(U: number): number
Reversal is not supported for this eval curve.
Parameters (1)U
- FirstParameter(): number
Returns 0.
- LastParameter(): number
Returns
Precision::Infinite(). - IsClosed(): boolean
Returns false.
- IsPeriodic(): boolean
Returns false.
Returns GeomAbs_CN.
- IsCN(N: number): boolean
Returns true for any N >= 0.
Parameters (1)N
Computes the point at parameter U.
Parameters (1)U
- EvalD1(U: number): Geom2d_Curve_ResD1
Computes the point and first derivative at parameter U.
Parameters (1)U
- EvalD2(U: number): Geom2d_Curve_ResD2
Computes the point and first two derivatives at parameter U.
Parameters (1)U
- EvalD3(U: number): Geom2d_Curve_ResD3
Computes the point and first three derivatives at parameter U.
Parameters (1)U
Computes the N-th derivative at parameter U.
Parameters (2)UN
Transformation is not supported for this eval geometry.
Parameters (1)T
Creates a new object which is a copy of this curve.
Geom2dEval_CircleInvoluteCurve
Describes a 2D involute of a circle. Critical for gear tooth profiles.
The parametric equation is:
where:
- O, XDir are from the local coordinate system,
- YDir is the perpendicular to XDir,
- R is the base circle radius (> 0).
The parameter range is [0, +inf). At t=0, the curve starts on the base circle. D1(0) = (0,0) (cusp). |D1(t)| = R*t (speed linear in parameter).
Constructors(1)
- constructor(thePosition: gp_Ax2d, theRadius: number): Geom2dEval_CircleInvoluteCurve
Creates an involute of a circle.
Parameters (2)thePosition—the local coordinate systemtheRadius—the base circle radius (must be > 0)
Static methods(2)
- get_type_name(): string
Instance methods(18)
Returns the local coordinate system.
- Radius(): number
Returns the base circle radius.
- Reverse(): void
Reversal is not supported for this eval curve.
- ReversedParameter(U: number): number
Reversal is not supported for this eval curve.
Parameters (1)U
- FirstParameter(): number
Returns 0.
- LastParameter(): number
Returns
Precision::Infinite(). - IsClosed(): boolean
Returns false.
- IsPeriodic(): boolean
Returns false.
Returns GeomAbs_CN.
- IsCN(N: number): boolean
Returns true for any N >= 0.
Parameters (1)N
Computes the point at parameter U.
Parameters (1)U
- EvalD1(U: number): Geom2d_Curve_ResD1
Computes the point and first derivative at parameter U.
Parameters (1)U
- EvalD2(U: number): Geom2d_Curve_ResD2
Computes the point and first two derivatives at parameter U.
Parameters (1)U
- EvalD3(U: number): Geom2d_Curve_ResD3
Computes the point and first three derivatives at parameter U.
Parameters (1)U
Computes the N-th derivative at parameter U.
Parameters (2)UN
Transformation is not supported for this eval geometry.
Parameters (1)T
Creates a new object which is a copy of this curve.
Geom2dEval_LogarithmicSpiralCurve
Describes a 2D logarithmic (equiangular) spiral curve. The polar equation is r = aexp(bt).
The parametric equation is:
where:
- O, XDir are from the local coordinate system,
- YDir is the perpendicular to XDir,
- a is the scale factor (> 0),
- b is the growth exponent (> 0).
The parameter range is (-inf, +inf). The angle between tangent and radial direction is constant = atan(1/b).
Constructors(1)
- constructor(thePosition: gp_Ax2d, theScale: number, theGrowthExponent: number): Geom2dEval_LogarithmicSpiralCurve
Creates a logarithmic spiral.
Parameters (3)thePosition—the local coordinate systemtheScale—the scale factor (must be > 0)theGrowthExponent—the growth exponent (must be > 0)
Static methods(2)
- get_type_name(): string
Instance methods(20)
Returns the local coordinate system.
- Scale(): number
Returns the scale factor.
Returns the scale factor.
Parameters (2)PS
- GrowthExponent(): number
Returns the growth exponent.
- Reverse(): void
Reversal is not supported for this eval curve.
- ReversedParameter(U: number): number
Reversal is not supported for this eval curve.
Parameters (1)U
- FirstParameter(): number
Returns -
Precision::Infinite(). - LastParameter(): number
Returns
Precision::Infinite(). - IsClosed(): boolean
Returns false.
- IsPeriodic(): boolean
Returns false.
Returns GeomAbs_CN.
- IsCN(N: number): boolean
Returns true for any N >= 0.
Parameters (1)N
Computes the point at parameter U.
Parameters (1)U
- EvalD1(U: number): Geom2d_Curve_ResD1
Computes the point and first derivative at parameter U.
Parameters (1)U
- EvalD2(U: number): Geom2d_Curve_ResD2
Computes the point and first two derivatives at parameter U.
Parameters (1)U
- EvalD3(U: number): Geom2d_Curve_ResD3
Computes the point and first three derivatives at parameter U.
Parameters (1)U
Computes the N-th derivative at parameter U.
Parameters (2)UN
Transformation is not supported for this eval geometry.
Parameters (1)T
Creates a new object which is a copy of this curve.
Geom2dEval_RepCurveDesc_Base
Static methods(2)
- get_type_name(): string
Instance methods(2)
- GetKind(): Geom2dEval_RepCurveDesc_Base_Kind
Properties(1)
Geom2dEval_RepCurveDesc_DerivBounded
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(2)
- GetKind(): Geom2dEval_RepCurveDesc_Base_Kind
Properties(1)
Geom2dEval_RepCurveDesc_Domain1d
Constructors(1)
Instance methods(1)
- Contains(theU: number): booleanParameters (1)
theU
Properties(2)
Geom2dEval_RepCurveDesc_Full
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(2)
- GetKind(): Geom2dEval_RepCurveDesc_Base_Kind
Geom2dEval_RepCurveDesc_Map1d
Constructors(1)
Instance methods(3)
- IsIdentity(): boolean
- IsValid(): boolean
- Map(theU: number): numberParameters (1)
theU
Properties(2)
Geom2dEval_RepCurveDesc_Mapped
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(2)
- GetKind(): Geom2dEval_RepCurveDesc_Base_Kind
Properties(3)
Geom2dEval_SineWaveCurve
Describes a 2D sine wave curve.
The parametric equation is:
where:
- O, XDir, YDir are from the local coordinate system (
gp_Ax2dgives XDir, YDir is the perpendicular), - A is the amplitude (> 0),
- omega is the angular frequency (> 0),
- phi is the phase shift.
The parameter range is (-inf, +inf). The curve is not periodic.
Constructors(1)
- constructor(thePosition: gp_Ax2d, theAmplitude: number, theOmega: number, thePhase?: number): Geom2dEval_SineWaveCurve
Creates a 2D sine wave curve.
Parameters (4)thePosition—the local coordinate systemtheAmplitude—the wave amplitude (must be > 0)theOmega—the angular frequency (must be > 0)thePhase—the phase shift (default 0)
Static methods(2)
- get_type_name(): string
Instance methods(20)
Returns the local coordinate system.
- Amplitude(): number
Returns the amplitude.
- Omega(): number
Returns the angular frequency.
- Phase(): number
Returns the phase shift.
- Reverse(): void
Reversal is not supported for this eval curve.
- ReversedParameter(U: number): number
Reversal is not supported for this eval curve.
Parameters (1)U
- FirstParameter(): number
Returns -
Precision::Infinite(). - LastParameter(): number
Returns
Precision::Infinite(). - IsClosed(): boolean
Returns false.
- IsPeriodic(): boolean
Returns false.
Returns GeomAbs_CN.
- IsCN(N: number): boolean
Returns true for any N >= 0.
Parameters (1)N
Computes the point at parameter U.
Parameters (1)U
- EvalD1(U: number): Geom2d_Curve_ResD1
Computes the point and first derivative at parameter U.
Parameters (1)U
- EvalD2(U: number): Geom2d_Curve_ResD2
Computes the point and first two derivatives at parameter U.
Parameters (1)U
- EvalD3(U: number): Geom2d_Curve_ResD3
Computes the point and first three derivatives at parameter U.
Parameters (1)U
Computes the N-th derivative at parameter U.
Parameters (2)UN
Transformation is not supported for this eval geometry.
Parameters (1)T
Creates a new object which is a copy of this curve.
Geom2dEval_TBezierCurve
2D Trigonometric Bezier curve. Uses a trigonometric Bernstein-like basis over the space {1, sin(alphat), cos(alphat), ..., sin(nalphat), cos(nalphat)}.
The parameter domain is [0, Pi/alpha]. The number of control points is 2*n + 1 for order n.
The alpha parameter controls the frequency of the trigonometric basis. A T-Bezier curve of order n with poles P_0, P_1, ..., P_{2n} is:
where:
- T_0(t) = 1
- T_{2k-1}(t) = sin(k * alpha * t), for k = 1..n
- T_{2k}(t) = cos(k * alpha * t), for k = 1..n
For rational curves, each pole is weighted:
Constructors(2)
- constructor(thePoles: NCollection_Array1_gp_Pnt2d, theAlpha: number): Geom2dEval_TBezierCurve
Constructs a non-rational T-Bezier curve from poles and alpha.
Parameters (2)thePoles—control points (1-based, size must be odd >= 3)theAlpha—frequency parameter (must be > 0)
- constructor(thePoles: NCollection_Array1_gp_Pnt2d, theWeights: NCollection_Array1_double, theAlpha: number): Geom2dEval_TBezierCurve
Constructs a rational T-Bezier curve.
Parameters (3)thePoles—control points (1-based, size must be odd >= 3)theWeights—weights (same size as poles, all > 0)theAlpha—frequency parameter (must be > 0)
Static methods(2)
- get_type_name(): string
Instance methods(24)
Returns the poles array.
Returns the weights array (empty if non-rational).
- Alpha(): number
Returns the frequency parameter alpha.
- NbPoles(): number
Returns the number of poles.
- Order(): number
Returns the trigonometric order n (NbPoles = 2*n + 1).
- IsRational(): boolean
Returns true if the curve is rational.
Returns the start point C(0).
Returns the end point C(Pi/alpha).
- Reverse(): void
Reversal is not supported for this eval curve.
- ReversedParameter(U: number): number
Reversal is not supported for this eval curve.
Parameters (1)U
- FirstParameter(): number
Returns the first parameter value: 0.0.
- LastParameter(): number
Returns the last parameter value: Pi/alpha.
- IsClosed(): boolean
Returns true if StartPoint and EndPoint coincide.
- IsPeriodic(): boolean
Returns false. T-Bezier curves are not periodic.
Returns GeomAbs_CN. T-Bezier curves are infinitely differentiable.
- IsCN(N: number): boolean
Returns true for all N. T-Bezier curves are infinitely differentiable.
Parameters (1)N
Computes the point C(U).
Parameters (1)U
- EvalD1(U: number): Geom2d_Curve_ResD1
Computes the point and first derivative at U.
Parameters (1)U
- EvalD2(U: number): Geom2d_Curve_ResD2
Computes the point and first two derivatives at U.
Parameters (1)U
- EvalD3(U: number): Geom2d_Curve_ResD3
Computes the point and first three derivatives at U.
Parameters (1)U
Computes the N-th derivative at U.
Parameters (2)U—parameter valueN—derivative order (must be >= 1)
Returnsthe N-th derivative vector
Transformation is not supported for this eval geometry.
Parameters (1)T
Creates a new object which is a copy of this T-Bezier curve.