October 3, 2024
Description
The attached OpenSCAD code can take a SVG file and extrude it around a polygon defined by a series of points.
Caveat: You may need to use a “Development Snapshot” version of OpenSCAD and enable “manifold” to get this to work properly.
The code extrudes the SVG for each segment, rotates and positions it, then clips it so that it mates with adjacent segments at the bisecting angle.
The included profile SVG looks like this:
If you want to make your own profile, keep in mind the left side of the SVG will become the outside edge of the frame.
If you want to use your own polygon for the outline, you just need to create a set of x,y coordinates to define one. Best to list them in a clockwise direction starting at the top.
I've included two STL files as examples: a tree and a coffin.
License:
Creative Commons — Attribution