This is a proposal for a new format of .dxf output, which has been customized to be compatible with ROBO Master-Pro software. The new format is presented as an option, with the original format being the default. The original format uses a spline that has a knot vector (0,0,0,0,1,1,1,1), with 4 control points. It is faithful to the original Bezier spline, but it is not compatible with ROBO Master. ROBO Master software requires that the spline must have internal fit points in order to be editable, because it uses fit points, not control points, for editing. In addition, the ROBO Master software assumes that the curvature at the endpoints is zero.
To meet these requirements, the spline has been promoted to have the knot vector (0,0,0,0,u1,u2,1,1,1,1), with 6 control points, which is consistent with the native ROBO Master spline. The calculation proceeds in three steps:
- calculate 4 fit points using the values u = (0, 1/3, 2/3, 1) where u is the independent variable in the Bezier spline.
- calculate the knot vector values (u1, u2, 1) by setting them to be proportional to the cumulative path length between these four points. This is consistent with normal AutoCAD .dxf output, as well as ROBO Master .gsd output. It is an implementation of what is called the chord length method in Piegl (page 364).
- calculate constraints on the 6 control points by using the knot insertion equations of Piegl (page 143) to relate control points to fit points. This is not enough to specify the curve uniquely. The remainder of the specification comes from the fact that all (Open) ROBO Master splines have zero curvature at the endpoints. This is also consistent with an editing mode in AutoCAD in which the slopes at the endpoints are left unspecified. It has, however, the unfortunate consequence that the resulting spline is not compatible with the original Bezier spline. Typically this new spline will be "smoother" than the original curve, and there may be discontinuities in slope at the vertices. However, it is editable in ROBO Master, as intended.
Mathematical information is from "The NURBS Book" by Les Piegl and Wayne Tiller (Springer, 1995). Many thanks to Aaron Spike and the Cuft project: the program gsd2txt.py was used routinely to provide information on the .gsd format and compare it to .dxf data.
Any feedback would be greatly appreciated on whether this affects the actual cutting process, since that is the intent of this modification.
WOW!
I would very much appreciate if you could write out a more detailed explanation about the subsets of NURBs and how they relate. I think this information would be very helpful to whomever it is that decides to take the next stab at GSD files. If you have discovered any additional tidbits of the GSD format, please send me a patch with annotations for cuft.
How much inconsistent with the original beziers are these new NURBs? Can you attach some screenshots? Could we subdivide the beziers before turning them into NURBs to preserve the shape better? Is it possible to merge adjacent beziers into a single NURB?
Alvin, do you have commit rights to inkscape yet? How many patches have you submitted now?