0

I'm 3D printing an object from a s schematic of its cross-section.

Using inkscape I'm able to turn schematic into a vector graph consisting of 2 B-splines. But when it is imported into the CAM tool (Solid edge) as an DXF file, I found that the B-spline is converted into many disconnected line sections, which makes it unusable for CAM.

As a result, my only option is to just export the coordinate of the B-spline control points directly, as a spreadsheet or data table. But there is no such option in InkScape

enter image description here

So how should I do this?

2
  • I don't think this is a "graphic design" question. I could be wrong though.
    – Scott
    Mar 19 at 18:47
  • @Scott That's what joojaa is here for ;) Mar 20 at 3:17

2 Answers 2

1

Well first off, there are no B-splines SVG, they are Bézier splines. There is a B-spline filter in Inkscape but it fits Béziers to points. You therefore need to convert Béziers to B-splines.

Now this isn't a big deal all you need to do is each span act as one curve. Or if you have non-uniform b-splines, make a 3 degree curve and triplicate knots on every 4th control point just as if it was the endpoint of the curve, or just split each span. This converts Béziers to nonuniform B-splines.

Second, the datatable is in the SVG file itself, its just text. You can read it in the Inkscape editor or with a text editor on the file itself. You can find the control info per path in the p attribute. Inner workings explained by Mozilla here. Since each span is separate it may be easier just to export each span as separate curve.

PS: It may be less work to just directly read the SVG or, alternatively, a PDF into your CAD application. It seems weird that Solid Edge couldn't do this when most the competition can, including Creo, Catia, Fusion 360, FreeCAD etc.

1
  • 1
    You can read more on this here. But ne aware that there is a missslabeling in image 4 the knot colors got swapped.
    – joojaa
    Mar 19 at 21:46
0

The path data in an SVG is stored in plain text. All you need to do is save the SVG, and open up the file in a text editor, and locate the path tag, and the data.

Inkscape stores the original path data using its own XML inkscape:original -d to which it will apply the effect and create an equivalent Bézier path. BSplines are path effects in Inkscape.

Although BSplines are supported in Inkscape, they aren't part of the SVG proper, as the format doesn't support them. I don't honestly think it's possible to export the BSplines as a DXF. You might be better using actual CAD software for this. Inkscape is at heart an SVG editor. Any support it has for outputting to CAD formats is likely to be very basic.

Here's an example of what you will find. The first set of path data d is the path after the effect has been applied. The inkscape-original path data, is for the BSpline path itself.

<path
       style="fill:none;stroke:#000000;stroke-width:0.264583;stroke-linecap:square;paint-order:fill markers stroke;stop-color:#000000"
       d="m 76.061089,67.68532 c 15.091613,-13.959712 40.596181,-14.110627 52.895581,0.151221 12.2994,14.261848 11.39393,42.935059 5.35721,69.647129 -6.03672,26.71207 -17.20418,51.46157 -26.48537,64.51562 -9.281194,13.05405 -16.675861,14.41226 -25.730888,1.65988 C 73.042595,190.90679 62.327871,164.04453 59.309543,136.72865 56.291216,109.41277 60.969476,81.645031 76.061089,67.68532 Z"
       id="path857"
       inkscape:path-effect="#path-effect859"
       inkscape:original-d="m 65.647866,53.876524 c 25.504838,-0.150651 51.009404,-0.301564 76.513714,-0.452744 -0.90524,28.674618 -1.81071,57.34783 -2.71646,86.02134 -11.16764,24.75076 -22.3351,49.50027 -33.50305,74.25 -7.394699,1.35852 -14.789366,2.71673 -22.184449,4.0747 C 73.042731,190.90674 62.328009,164.04447 51.612805,137.1814 56.291516,109.41282 60.969776,81.645082 65.647866,53.876524 Z" />
1
  • Op can just open it in freecad and export as step or iges
    – joojaa
    Mar 21 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.