Inkscape to 2D STL

From base48
Jump to: navigation, search
  • Download & install https://github.com/martymcguire/inkscape-openscad-poly
  • Draw something
  • Convert all text to paths (select text, Path->Object to path)
  • Join the paths together (Edit->Select All, Path->Union (or Combine? not sure now ...))
  • (mirror?)
  • Save a Copy..., use OpenSCAD Polygons format
  • look at the resulting file and remember the name of the module

For example for

module rect2985() {
  polygon(points=
    [[-59.844, 54.700], [-36.460, 54.700], [-36.460, 31.316], [-59.844, 31.316]]
    , paths=
    [[0, 1, 2, 3, 0]]
    );}

the name of the module is rect2985 (the file will probably be much bigger).

  • create file in OpenSCAD that looks like this:
include </tmp/inkscape-image.scad>;

linear_extrude(height=0.1, center=true) rect2985();

Substitute your respective inkscape file and module name (as described above).

  • Render, Export as STL... if you're satisfied with the result