OpenCascade.js
API ReferenceModelingAlgorithmsTKHelix

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 the Perform() method to execute the specific approximation algorithm.

Instance methods(8)

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 approximation
  • HelixGeom_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)
    • aT1
    • aT2
    • aPitch
    • aRStart
    • aTaperAngle
    • bIsClockwise
  • 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)
    • aT1
    • aT2
    • aPitch
    • aRStart
    • aTaperAngle
    • bIsClockwise
    Returns

    A 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)

Static methods(2)

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)
    • aT1
    • aT2
    • aPitch
    • aRStart
    • aTaperAngle
    • aIsCW
  • FirstParameter(): number

    Gets first parameter.

  • LastParameter(): number

    Gets last parameter.

  • Gets continuity.

  • Gets number of intervals.

    Parameters (1)
    • S
  • 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.

  • EvalD0(theU: number): gp_Pnt

    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
  • EvalDN(theU: number, theN: number): gp_Vec

    Returns the derivative of order theN at parameter theU.

    Parameters (2)
    • theU
    • theN

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 aT1
    • aTaperAngle
      [in] Taper angle in radians (0 = cylindrical helix)
    • aIsCW
      [in] True for clockwise, false for counter-clockwise
    • aTol
      [in] Approximation tolerance
    • theMaxError
      [out] Maximum approximation error achieved
    Returns

    A result object with fields:

    • returnValue: 0 on success, error code otherwise
    • theBSpl: [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 approximate
    • theTol
      [in] Approximation tolerance
    • theCont
      [in] Required continuity (C0, C1, C2)
    • theMaxSeg
      [in] Maximum number of curve segments
    • theMaxDeg
      [in] Maximum degree of B-spline curve
    • theMaxError
      [out] Maximum approximation error achieved
    Returns

    A result object with fields:

    • returnValue: 0 on success, error code otherwise
    • theBSpl: [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.