02-01-2017 03:48 PM
Greetings,
I've parsed a DXF file to obtain the parameters defining a "SPLINE" entity. The main parameters are "Degree" (2), a 1D "Knots" array and a 1D array of "Control-Points" (where each element is an XYZ coordinate). From these inputs it should be possible to plot a curve.
FYI: The maximum Knot value (24.5) is about half the approximated curve-length (60.1 - sum of chords).
Has anyone developed code to plot the curve defined by these parameters (Degree, Knots, Control-points)?
Note: LabVIEW's B-Spline fitting function is not applicable to this problem.
Thanks!
Solved! Go to Solution.
02-01-2017 04:08 PM
If someone has written the B-Spline Plotting Program in LabVIEW in the form you require, I don't think they've posted it anywhere. However, if you do a Web search for Plot B-Spline, you can find several tutorials and discussions of how to do this. There is also a plotting function in Matlab which (if you have Matlab) you can examine and recode in LabVIEW (and I don't mean "call as a math script").
Bob Schor
02-01-2017 05:04 PM
Hi Bob,
I've spent many hours looking into this. Please let me know if you see a good example describing how to implement the "de Boors" algorithm in the XYZ context and using chord-length-generated Knots. Of course I've looked at the B-Spline wiki, also Wolfram (it doesn't help that there is at least one discrepancy between the two descriptions (see "degree" index in basis function definition).
Must the de Boor result be a scaler? If so, how to convert that scaler back into the XYZ domain?
02-01-2017 08:29 PM - edited 02-01-2017 08:31 PM
The MGI Spline toolkit has a VI which implements the de Boor's algorithm.
02-02-2017 03:03 PM
@GregSands wrote:
The MGI Spline toolkit has a VI which implements the de Boor's algorithm.
While I had a little trouble finding this on the MGI Website, opening VIPM and looking under the MGI entries quickly located MGI Spline.
Bob Schor
02-02-2017 06:23 PM
Thank you Bob & Greg.