Curve Technologies
There are two different technologies for representing curves.
BSpline Curves
BSpline Curves are accessed via IBSplineCurve_DG interface. Use IObjectGenerator_DG >
Create("BSplineCurve_DG") >
IBSplineCurve_DG to create a standalone curve.
Curves, defining geometry of BRep edges, can be accessed via IBRepEdge_DG.GetCurve() > IBSplineCurve_DG.
To add a new BSpline Curve to the scene the curve has to be wrapped into a BRepEdge first (one of methods):
IObjectGenerator_DG >
Create1("BRepEdge_DG", iCurve) >
IBRepShape_DG
> IModel_DG.AddBRepShape();
See CreateSpline() in Curves sample for an example.
See also: BSpline Curves, ICircle_DG
Native DG Kernel curves
These curves are considered deprecated, but can still be useful as a simple alternative
Native curves are not entities, which means they are not part of any DG Kernel model by itself and lack many of the relevant properties like parent or children, but they can be wrapped in a LineEntity (See below).
Native curves implement ICurve
interface.
To add a geometric curve to the model wrap the curve into a
LineEntity:
See also: Free-form Curves,
Arc Spline Curves, Pipes sample,
|