This evening I’ve been working on some 3D design where I’m trying to create a moderately complex shape with a degree of rounding. I already had the basic design worked out in Inkscape but, if you simply import an SVG image into OpenSCAD, you can’t apply any profile to the top and bottom edges. For that you need the shape expressed as a path.
I spent some time looking into a library called PathBuilder. I figured out how to extract the path details from an SVG file and load them up as a shape but got stuck on converting the file into a valid path that I could use tools like BOSL2’s offset_sweep on. In other words, after a long period of messing around, I wasn’t really any further forward than just importing the SVG.
In the end, I turned to “turtle” graphics to work out my path. For what I did, I probably would have been better off just manually setting up the points but the turtle approach would allow me more control over creating more complex shapes like arcs rather than just jumping through a series of [x,y] points. Anyway, job done… I think. I’ll let the test piece finish off overnight and then I can test it in the morning.