SmApiCreateHelix#

Defined in SM_API/inc/SmApiCurves.h

SmApiStatus SmApiCreateHelix(
const SmPoint3d &crOrigin,
double dHeight,
double dRadiusStart,
double dRadiusEnd,
double dNumTurns,
SmBoolean bRightHanded,
double dTolerance,
SmBSplineCurve *&rpResult,
)#

Every input is validated against a finite domain before the fitter runs; any out-of-domain value returns SM_ERR_INVALID_INPUT with rpResult == NULL. dTolerance is a hard contract: the achieved maximum 3D deviation from the analytic helix is verified after the fit, and if it exceeds dTolerance the call returns SM_ERR_NOT_WITHIN_TOLERANCE with rpResult == NULL. Fractional dNumTurns is accepted, but below ~1 turn the helix winds steeply (nearly straight): a tight dTolerance may be unmeetable (returning SM_ERR_NOT_WITHIN_TOLERANCE) and such paths may be rejected by SmApiCreatePipeSweep. Prefer dNumTurns >= 1 for a reliable sweep path.

Parameters:
  • crOrigin – [in ]: Base point (finite); helix runs along +Z over [Z, Z+dHeight]

  • dHeight – [in ]: Axial length along +Z. Range [1e-7, 1e18]

  • dRadiusStart – [in ]: Radius at the base. Range [1e-7, 1e18] (zero rejected)

  • dRadiusEnd – [in ]: Radius at the top; != start gives a cone. Range [1e-7, 1e18]

  • dNumTurns – [in ]: 360-degree turns over the height (fractions OK). Range [1e-7, 124.25]

  • bRightHanded – [in ]: TRUE = right handed, FALSE = left handed

  • dTolerance – [in ]: Max deviation of the B-spline fit from the true helix. Range [1e-6, 1e18]

  • rpResult –

    [out]: Resulting SmBSplineCurve; set to NULL and only valid when

    : the returned SmApiStatus is SM_SUCCESS