KernelCAD Documentation

DInsight Home
Skip Navigation Links. Skip Navigation LinksHome Page > KernelCAD Components > Interfaces > Lines And Curves > IArcSpline3DCurve
IArcSpline3DCurve Interface

IArcSpline3DCurve Interface


IArcSpline3DCurve gives programmatic access to Arc Spline Curves. Objects implementing this interface also implement ICurveFreeForm

See also Pipes sampleInterface List

HRESULT GetSplineNormals(IArray3D** normals)


normals - [out, retval] The retuned array of spline normals. i-th element in the array in a normal vector of plane of i-th spline.


Returns array of spline normals. i-th element in the array in a normal vector of plane of i-th spline.

HRESULT GetCurvatureArray(IArrayNum** curvatures)


curvatures - [out, retval] array of curvatures one per spline


The method returns array of double numbers one per spline in the curve. The i-th number is curvature of i-th spline arc. IArrayNum.Set will fail with DISP_E_PARAMNOTOPTIONAL return if the curvature is too high and the arc would become invalid (geometrically impossible).

HRESULT GetSpline(int index, IArc** iArc)


index - [in] Index of the spline to be retrieved


Use this method to access more advanced properties of an individual spline in the curve.

HRESULT MakeSmoothModifyCurvatures()

Modifies spline normals and curvatures to make the whole curve smoothely interpolating the input points

HRESULT MakeSmoothAlternating(double curvature)

Assumes that on start the points data is already defined (see ICurveFreeForm) and the first section is straight. Modifies spline normals of every second section and sets its curvature to curvature so that the resulting curve is smooth. Points are also shifted along the previous straight section to make this possible. In case when two consequtive straight sections do not belong to a single plane an additional point is inserted and a two-arc spline is constructed to smoothely connect the straight sections