Spline to DXF
Hello,
I need to write a spline into DXF by an external app.
The spline is very simple: it's defined by 4 points (0,0) - (10,-1) - (20,2) - (30,3); of course, the spline goes through these points.
(No prescribed direction at the begin or at the end.)
The problem is:
how to calculate other points - knots and control points - of such spline, which are required to have DXF record?
(DXF code contains - among others - the following records: knots, control points, fit points of the spline.)
Any help would be appreciated.
Best regards,
Lukas
Comments
-
The Lisp API and the COM API provide access to this data. And I suppose the other APIs do as well. Alternatively you can use the _DxfOut command which has an _Entities option.
0 -
... I'm creating a program = the EXTERNAL APP (running out-of BCad scope) and I need this EXTERNAL APP (not BCad) to generate the DXF containing a spline.
The problem is rather mathematical - how to calculate the knot and control points in such way that BCad BE ABLE to read that DXF (containing that spline).
I guess that there is no option to NOT calculate knots or control points, e.g. to write a "simplified" spline DXF which would not contain knot/control points records and still BCad be able to read such DXF.0 -
Since you are posting in a BricsCAD forum, I assumed that you external application would interact with BricsCAD (via the COM interface).
You speak of 'the spline' as if it has a fixed shape. Is that the case?
It may be worth looking at 2D polylines (they can be splined).0