I'm working in a C# program that reads *.dxf files and calculates each entity's length. At this moment I can get almost all entities' lengths except for the spline.
After reading the document, I get a list of spline control points, a knots vector and the degree of the curve, like below:
Control Points
(1209.38, 2349.97)
(981.23, 1786.57)
(1414.02, 1346.80)
(1927.99, 1475.88)
(2282.55, 2010.90)
(2855.24, 2176.91)
(3276.81, 1713.33)
(3101.50, 1170.94)
(2509.71, 1140.27)
(1944.97, 772.71)
(2547.01, 778.13)
(2762.70, 582.84)
Knots vector
[0.00, 0.00, 0.00, 0.00, 648.95, 1468.25, 2588.90, 3362.22, 4111.19,
4863.87, 5446.02, 6369.53, 6560.23, 6560.23, 6560.23, 6560.23]
Degree: 3 / Order: 4
My question is, with that information, which algorithm or method should I use to get the length of the spline?