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 > Free-Form Curves
Free Form Curves

Free Form Curves

Free-form curves are defined by arrays of 3D points called Data Points or Data Array. To be continuous the curve is interpolated between data points. Data points do not have to be spaced evenly. Two consecutive points in the array must be different.

InterpolationDegree is an important property of a free-form curve. It determines how curve points are calculated between data points. The greater is InterpolationDegree the more smooth the curve appears. In calculation of internal point InterpolationDegree+1 points are taken into account, which means that the curve has to have at least InterpolationDegree+1 data points. By default InterpolationDegree is 1, in which case the curve is approximated by straight segments between data points.

The software assumes that the curve is smooth. If the modelled curve has sharp angles it still can be approximated, but InterpolationDegree has to be set to 1. It is recommended to (nearly) duplicate the angle point by adding another point very close  to it, but not coinciding.

Free-form curves can be accessed by ICurveFreeForm interface.

Free-form curves are Geometric Curves, hence they implement ICurve interface..

When Closed property is set to true the Data Array is assumed to represent a closed curve (continuous loop).

To create a free-from curve:

1. Call Create or Create2 method of IDIObjectGenerator with parameter eType set to eObjTypeFreeFormCurve member of EObjectType enumeration.

2. Query ICurveFreeForm from IUnknown returned by the Create(2) method

3. Obtain IArray3D of the Data Array with a call to ICurveFreeForm.GetData

4. Use IArray3D.SetCount and IArray3D.Set to set size and enter points in the array

5. Select or tune in value for the InterpolationDegree property most appropriate for the application.

Performance note: Higher degree of interpolation makes relevant calculations little slower, but allow using fewer data points, which can actually result in better performance. It is recommended to make few experiments to find appropriate settings.

See also:  Pipes sample,