I was experimenting with a way to turn a flat 2D line into a round 3D line and minkowski works great for this, here is the basic code:
Path_to_SVG_File ="";
Sphere_size=2;//[.1:.01:20]
width=.001;//[.001:.01:20]
Rotate_x=0;//[0:.01:360]
Rotate_y=0;//[0:.01:360]
Rotate_z=0;//[0:.01:360]
rotate([Rotate_x,Rotate_y,Rotate_z])
minkowski(){
linear_extrude(width,center=false)
import(Path_to_SVG_File,layer="layer1",$fn=100);
//sphere(Sphere_size,$fn=60);
rotate([0,90,0])
cylinder(.1,.1,.1,$fn=8);
}
Un comment the sphere line and comment out the rotate and cylinder lines to try it with a sphere.
I drew a line in Inkscape and rounded the corners like I did in the last post:
Minkowski is VERY slow with curves but there is a work around for it.
After you draw your line go to Path>Stroke to path and convert it to a path:
Then select the node tool and make sure all of your nodes for the line are selected, (they turn blue):
Then add more nodes to the line, this makes the line smooth when you straighten the segments, usually two or three clicks adds enough nodes:
Then straighten the segments and save the file:
Now when you import the svg into OpenSCAD it will be much faster.
Additionally it works best if the stroke size is smaller than the sphere size, unless you want a flat line with rounded edges.
I added a width adjustment to make handles:
Here is an example using a cylinder instead of a sphere, using a cylinder with minkowski is pretty fast compared to using a sphere:
There are a ton of options that can be added which I will probably do in a future post.