Bob Jamison wrote:
One of the new features of this release is the exporting of SVG Paths to Bezier prisms for POVRay. I think that if you compare an SVG file with the Bezier segments that it generates, then you will probably have a good idea how to do the same for DXF.
I took a quick look. It seems the Bezier segments in the POV files are still Beziers. DXF does NURBs. Now I am completely clueless, but from what I understand. Beziers are special case NURBs. I guess I need to know, "when is a NURB a Bezier?" So that I can make fullfleged NURBs from the beziers I have.
The main idea is that you must change the MoveTo/LineTo/CurveTo data to a set of Splines, each with the start point and its control point(s), and the end point and its control point(s).
Correct. And I do have a working version that breaks a path into many NURBs one for each bezier segment. Works great. I was hoping to not break the paths apart. If I could do them in a single spline they would hang together and be easier to move and edit.
Alan Horkan wrote:
Dia has basic SVG import and also allows DXF Export, which might be of some use to you even if only to see how the conversions should work.
Dia breaks curves into little autonomous lines on export to DXF, but thanks for the suggestion.
I realise you probably want to do this yourself programmatically but for what it is worth I may as well suggest some alternatives.
Thanks, I do want to do this myself programmatically. Partly for my own enlightenment. But mostly to add to my little arsenal of tools. I want to build a solid body guitar plan generator online. It started with microtonal multiscaled fretboards in SVG, PDF and DXF: http://www.fretfind.ekips.org/2d/index.php
And now I'm working on body shapes: http://www.ekips.org/comp/prog/paths/patheditor.php
You can see where I'm at on that page. If you compare the output of "Make Single page PDF" and "Make Good DXF" for one of those paths you will see that they match but that each part of the curve is separate in the DXF. "Make Bad DXF" is my latest trial at combinig the Beziers in a single SPLINE. It makes one curve for each continuous path segment but the curves does look very much like the original path (eg in the PDF).
Thanks again for the suggestions. Aaron Spike