HelixGeom
OCCT package HelixGeom: HelixGeom_BuilderApproxCurve, HelixGeom_BuilderHelix, HelixGeom_BuilderHelixCoil, HelixGeom_BuilderHelixGen, and 2 more bound classes.
HelixGeom_BuilderApproxCurve
Base class for helix curve approximation algorithms.
This abstract class provides common functionality for approximating parametric helix curves using B-spline curves. It manages:
- Approximation tolerance and parameters
- Continuity requirements (C0, C1, C2)
- Maximum degree and number of segments
- Error and warning status reporting
- Result curve storage
Derived classes must implement thePerform()method to execute the specific approximation algorithm.
Instance methods(8)
- SetApproxParameters(aCont: GeomAbs_Shape, aMaxDegree: number, aMaxSeg: number): void
Sets approximation parameters.
Parameters (3)aContaMaxDegreeaMaxSeg
- SetTolerance(aTolerance: number): void
Sets approximation tolerance.
Parameters (1)aTolerance
- Tolerance(): number
Gets approximation tolerance.
- ToleranceReached(): number
Gets actual tolerance reached by approximation algorithm.
Gets sequence of BSpline curves representing helix coils.
- ErrorStatus(): number
Returns error status of algorithm.
- WarningStatus(): number
Returns warning status of algorithm.
- Perform(): void
Performs calculations. Must be redefined.
HelixGeom_BuilderHelix
Upper level class for geometrical algorithm of building helix curves using arbitrary axis.
Constructors(1)
Empty constructor.
Instance methods(3)
- SetPosition(aAx2: gp_Ax2): void
Sets coordinate axes for helix.
Parameters (1)aAx2
Gets coordinate axes for helix.
- Perform(): void
Performs calculations.
HelixGeom_BuilderHelixCoil
Implementation of algorithm for building helix coil with axis OZ.
Constructors(1)
Empty constructor.
Instance methods(1)
- Perform(): void
Performs calculations.
HelixGeom_BuilderHelixGen
Base class for helix curve building algorithms with parameter management.
This class extends HelixGeom_BuilderApproxCurve by adding helix-specific geometric parameters:
- Parameter range (T1, T2) - angular range in radians
- Pitch - vertical distance per full turn (2*PI radians)
- Start radius (RStart) - radius at parameter T1
- Taper angle - angle for radius variation (0 = cylindrical)
- Orientation - clockwise or counter-clockwise
Concrete implementations include: HelixGeom_BuilderHelix: Single helix approximationHelixGeom_BuilderHelixCoil: Multi-coil helix approximation
Instance methods(2)
- SetCurveParameters(aT1: number, aT2: number, aPitch: number, aRStart: number, aTaperAngle: number, bIsClockwise: boolean): void
Sets parameters for building helix curves.
Parameters (6)aT1aT2aPitchaRStartaTaperAnglebIsClockwise
- CurveParameters(aT1: number, aT2: number, aPitch: number, aRStart: number, aTaperAngle: number, bIsClockwise: boolean): { aT1: number; aT2: number; aPitch: number; aRStart: number; aTaperAngle: number; bIsClockwise: boolean }
Gets parameters for building helix curves.
Parameters (6)aT1aT2aPitchaRStartaTaperAnglebIsClockwise
ReturnsA result object with fields:
aT1: updated value from the call.aT2: updated value from the call.aPitch: updated value from the call.aRStart: updated value from the call.aTaperAngle: updated value from the call.bIsClockwise: updated value from the call.
HelixGeom_HelixCurve
Adaptor class for calculation of helix curves with analytical expressions.
This class provides parametric representation of helix curves including:
- Cylindrical helixes (constant radius)
- Tapered helixes (variable radius with taper angle)
- Both clockwise and counter-clockwise orientations
The helix is defined by parametric equations in cylindrical coordinates: - x(t) = r(t) * cos(t)
- y(t) = r(t) * sin(t) [* direction factor]
- z(t) = pitch * t / (2*PI) where r(t) = rStart + taper_factor * t
Constructors(1)
implementation of analytical expressions
Static methods(2)
- get_type_name(): string
Instance methods(16)
- Load(): void
Sets default values for parameters.
- Load(aT1: number, aT2: number, aPitch: number, aRStart: number, aTaperAngle: number, aIsCW: boolean): void
Sets helix parameters.
Parameters (6)aT1aT2aPitchaRStartaTaperAngleaIsCW
- FirstParameter(): number
Gets first parameter.
- LastParameter(): number
Gets last parameter.
Gets continuity.
- NbIntervals(S: GeomAbs_Shape): number
Gets number of intervals.
Parameters (1)S
- Intervals(T: NCollection_Array1_double, S: GeomAbs_Shape): void
Gets parametric intervals.
Parameters (2)T—Mutated in place; read the updated value from this argument after the call.S
- Resolution(R3d: number): number
Gets parametric resolution.
Parameters (1)R3d
- IsClosed(): boolean
Returns False.
- IsPeriodic(): boolean
Returns False.
- Period(): number
Returns 2*PI.
Computes the point of parameter theU on the curve.
Parameters (1)theU
- EvalD1(theU: number): Geom_Curve_ResD1
Computes the point and first derivative at parameter theU.
Parameters (1)theU
- EvalD2(theU: number): Geom_Curve_ResD2
Computes the point and first two derivatives at parameter theU.
Parameters (1)theU
Returns the derivative of order theN at parameter theU.
Parameters (2)theUtheN
HelixGeom_Tools
Static utility class providing approximation algorithms for helix curves.
This class contains static methods for:
- Converting analytical helix curves to B-spline approximations
- Generic curve approximation with specified tolerances and continuity
- High-quality approximation suitable for CAD/CAM applications
The approximation algorithms use advanced techniques to ensure: - Accurate representation within specified tolerances
- Smooth continuity (C0, C1, C2) as required
- Efficient B-spline parameterization
- Robust handling of edge cases
Constructors(1)
Static methods(2)
- ApprHelix(aT1: number, aT2: number, aPitch: number, aRStart: number, aTaperAngle: number, aIsCW: boolean, aTol: number, theMaxError: number): { returnValue: number; theBSpl: Geom_BSplineCurve; theMaxError: number; [Symbol.dispose](): void }
Approximates a parametric helix curve using B-spline representation.
Parameters (8)aT1—[in] Start parameter (angular position in radians)aT2—[in] End parameter (angular position in radians)aPitch—[in] Helix pitch (vertical distance per 2*PI radians)aRStart—[in] Starting radius at parameter aT1aTaperAngle—[in] Taper angle in radians (0 = cylindrical helix)aIsCW—[in] True for clockwise, false for counter-clockwiseaTol—[in] Approximation tolerancetheMaxError—[out] Maximum approximation error achieved
ReturnsA result object with fields:
returnValue: 0 on success, error code otherwisetheBSpl: [out] Resulting B-spline curve, owned by the returned envelope.theMaxError: [out] Maximum approximation error achieved
Dispose the returned envelope to release owned Handle fields.
- ApprCurve3D(theHC: Adaptor3d_Curve, theTol: number, theCont: GeomAbs_Shape, theMaxSeg: number, theMaxDeg: number, theMaxError: number): { returnValue: number; theBSpl: Geom_BSplineCurve; theMaxError: number; [Symbol.dispose](): void }
Approximates a generic 3D curve using B-spline representation.
Parameters (6)theHC—[in] Handle to the curve adaptor to approximatetheTol—[in] Approximation tolerancetheCont—[in] Required continuity (C0, C1, C2)theMaxSeg—[in] Maximum number of curve segmentstheMaxDeg—[in] Maximum degree of B-spline curvetheMaxError—[out] Maximum approximation error achieved
ReturnsA result object with fields:
returnValue: 0 on success, error code otherwisetheBSpl: [out] Resulting B-spline curve, owned by the returned envelope.theMaxError: [out] Maximum approximation error achieved
Dispose the returned envelope to release owned Handle fields.