I would like to split splines of DXF files to lines and arcs in 2D for a graphic editor. From DXF file, I have extracted the following data:
- degree of spline curve
- number of knots and knot vectors
- number of control points and their coordinates
- number of fit points and their coordinates
Using the extracted data,
- start and end point of lines
- start and end point, center point, radius of arcs are needed to find.
I get confused which control points are controlling which knots by seeing the extracted data. I have found this paper about biarc curve fitting. Is it only for only two connected arc or useful for splines with so many knot points? But, it still needs tangents to calculate the points of arc. Which algorithms should I use to find the points of arcs and lines?