DG Kernel Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
Overview of the software
What is new
Licensing
Collapse ModelsModels
Collapse DG Kernel ComponentsDG Kernel Components
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Search Documentation


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 smoother 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 via the 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,

 

See also: Curves Overview, Native Curves