KernelCAD Documentation

DInsight Home
Skip Navigation Links.
Start page
Quick Start
Installation
Overview of the software
What is new
Collapse KernelCAD ModelsKernelCAD Models
Collapse KernelCAD ComponentsKernelCAD Components
KernelCAD Control
KernelCAD .NET Control
Methods and Properties
Menu
Model Explorer
Birds Eye View
Programming
Direct User Access
Direct Operations
Interface Queries
Printing Support
Data Types
Modes of KernelCAD Control
DIObjectGenerator class
Properties
FlatObjectArray Poperty
Context
64 bit development
Dual Mode
Initialisation Context
Overlay Editor
Memory Management
Input validation
Collapse Advanced functionalityAdvanced functionality
Collapse InterfacesInterfaces
Alphabetical list
I3DGrid
I3DBugger
I3Dpt
IAxiBase
IAxis
IBoolSection
IBoolSectionEx
IBoundary
IColor
IConstraint
IData
IDiffSurface_KC
IDIFont
IDraw
IDrawUtil
IDraw2
IElem
IElement
IKCLine
ILightSource
ILocation
ILocationEx
IMaterial
IMetrics
IMetrics2
IModel
IModel2
IModelEx
IPatch
IKCPathCollisionDetector
IProfiles
IPropertyArray
IPropertyArray2
IStdShape
IStrip
ISurface
IText
ITexture
ITransform
IUnknown
Collapse Open Cascade TechnologyOpen Cascade Technology
Collapse DataData
Collapse MovementMovement
Collapse FramesFrames
Collapse Oriented ObjectsOriented Objects
Collapse SectionsSections
Collapse GeneralGeneral
Collapse Topological InterfacesTopological Interfaces
Collapse Viewing InterfacesViewing Interfaces
Collapse Lines And CurvesLines And Curves
Collapse Symmetry InterfacesSymmetry Interfaces
Collapse Clipping plane interfacesClipping plane interfaces
Collapse AlgorithmsAlgorithms
Collapse 2D Geometry2D Geometry
Collapse Programming Samples and TutorialsProgramming Samples and Tutorials
Collapse OverviewOverview
Collapse DeploymentDeployment
Collapse .NET Samples.NET Samples
Collapse C++ SamplesC++ Samples
Collapse Visual Basic SamplesVisual Basic Samples
Collapse Delphi SamplesDelphi Samples
Collapse 3D Debugger3D Debugger
Collapse DeploymentDeployment
Licensing
Model Viewer
Open C++ Source
Technical Support
Skip Navigation LinksHome Page > KernelCAD Models > Mathematical Objects > Curves > Arc Spline Curves
Arc Spline Curves

Arc Spline Curves

Arc Spline Curves are Free-form curves, which instead of interpolation between data points are defined by pieces of arcs (splines) connecting adjacent points. Each spline arc belong to its own plane (plane of the spline) passing trough the two points and which has normal defined by the user. 

When Arc Spline Curve has n data points it also has n-1 splines, one per each adjacent pair of points. Each spline has two properties: double Curvature and a 3D Normal vector. 

Plane of i-th spline is calculated as plane with i-th normal vector passing through i-th data point. Only direction orthogonal  to segment between ends of the spline, which are the i-th and i+1-th data points, (called segment of the spline)  is important in normal of the spline. That is why during object initialization normals are adjusted to make directions orthogonal to the segments and normalised (length modified to 1). Normal vector of  a spline must not be parallel to segment of the spline.

Note that because each spline has its own plane the resulting curve does not have to be flat or two dimensional.

When an arc has zero curvature and hence is a straight line there are many planes which can contain the line. In this case normal for the spline does not have to be defined.

The curve has parameterization by piecewise normalized natural parameter: for a given parameter t it corresponds to point with normalized natural parameter tLoc =  t - i on the i-th arc, where i = floor(t) is the integral part of t. t=2.5, for example is parameter of the point in the middle of the third arc.

Arc Spline Curves implement IArcSpline3DCurve interface.

To create an Arc Spline Curve:

1. call to Create(2) of IDIObjectGenerator interface with parameter eType set to eObjTypeArcSplineCurve member of EObjectType enumeration.

2. Cast or query IArcSpline3DCurve  from IUnknown returned from the above call.

2. Use ICurveFreeForm queried from ArcSpline3DCurve to define set of data points

3. Use IArray3D obtained with IArcSpline3DCurve.GetSplineNormals to access array of normals one per spline plane

4. Use IArrayNum obtained with IArcSpline3DCurve.GetCurvatureArray to modify curvature of arcs. By default curvature is zero, which represents a straight line.

Spline frames 

Each plane of spline has distinctive frame (frame of the spline)  associated with it: Origin of the frame is located at the first end of the spline arc. x axis belongs to the plane and directed towards the second end of the spline arc. y axis belongs to the plane too and  defined as orthogonal to x. direction of z axis coincides with normal of the plane.

Spline frames described above are useful for conversion between two dimensional coordinates of arcs in spline planes and 3D coordinates. The frames can be accessed by querying  IFrameArray from IArcSpline3DCurve. Obtained IFrame interface gives access (via query) to IFrameEx, which has ToLocal and ToGlobal methods.

IArcSpline3DCurve.GetSpline method gives access to IArc interface implemented by a single spline in the curve. The interface along with IArcEx accessed from it allow more detailed local calculations. Results of the calculations can be converted to/from 3D as described above.

See also:  Pipes sample