<p>If you install inkscape, pstoedit and ghostscript version 9.21 (not the latest as pstoedit is incompatible)   you can get the file into a format that openscad can 
import using two commands in a cmd file </p>

<pre><code>"C:\Program Files\Inkscape\inkscape" -E "traffic lights.eps" "traffic lights.svg"
"C:\Program Files\pstoedit\pstoedit" -dt -f dxf:-polyaslines "traffic lights.eps" "traffic lights.dxf"
</code></pre>

<p>then in openscad</p>

<pre><code>linear_extrude(3) import ("traffic lights.dxf");
</code></pre>

<p>will import gives me </p>

<p><a href="https://i.sstatic.net/3BM0c.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/3BM0c.png" alt="openscad"></a></p>

<p>With a thickness of 3mm - you can see the model needs some scaling but its seems possible although - I can't see an option to scale based on color - </p>

CC BY-SA 3.0
2017-12-12T08:42:51.483Z
That's looking solid!
Joe
CC BY-SA 3.0
2018-01-10T06:44:10.137Z
Much more difficult to get different heights automatically based to different colors , I've got an algorithm of how to do it - get a files for each layer based on the colors - eg extract White, Green, Red, Blue and import - this all seems to work - but I have no way to automate the layer extraction
Ross
CC BY-SA 3.0
2017-12-05T10:45:41.053Z
2017-12-10T09:14:42.423Z
2017-12-10T09:14:42.423Z
Ross
<p>Nothing thats works via scripting BUT is really simple and easy.</p>

<ol>
<li>register on tinkercad.com (I know register is a bummer but its a great tool)</li>
<li>open a new design</li>
<li>import *.svg file</li>
<li>adjust height or size of the converted object</li>
<li>download .stl</li>
</ol>

<p>Thats going to take a while for 1000 files but its so simple, printing the stuff will take forever, so you´ve got some time :P</p>

<p>Edit: Maybe edit the topic to something like "SVG to STL conversion" which would make the thread more likely to be found.</p>

CC BY-SA 3.0
2017-12-05T23:23:28.390Z
2017-12-05T23:23:28.390Z
Nautis
<p>I work on communication devices for people with disabilities that prevent them from speaking.  This can be anything from a board with symbols on, to a relatively sophisticated app.  </p>

<p>Some potential users also have sight issues and have to distinguish symbols by feel (these particular users have cognitive disabilities and so braile isn't useful) .  Currently the solution is to, by hand, stick items onto the buttons. Like this: </p>

<p><a href="https://i.sstatic.net/cFS0d.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/cFS0d.png" alt="enter image description here"></a></p>

<p>This is effective, but takes a very long time.  </p>

<p>There exists open symbol libraries <a href="http://straight-street.com/" rel="nofollow noreferrer">like this</a>, that include nice svg images like <a href="https://www.dropbox.com/s/e5emeku99xxmeub/traffic%20lights.svg?dl=0" rel="nofollow noreferrer">this one</a> (not uploaded, because SO doesn't like svg, but here's the screenshot: </p>

<p><a href="https://i.sstatic.net/746CY.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/746CY.png" alt="enter image description here"></a></p>

<p>A friend converted some of these images into 3d prints like so: </p>

<p><a href="https://i.sstatic.net/Cv41n.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Cv41n.jpg" alt="enter image description here"></a></p>

<p>This was amazing, and useful, but I understand quite time-intensive for him - and there are thousands of these symbols.</p>

<p>Here's what I want to know: given that SVG is a relatively simple structure and the symbols are very simple, what are the steps for writing the script that says: "Take the svg, map it to a plane, raise everything that is black by 2mm, everything that is gray by 1mm and add height for the rest of the colours according to this table" ? </p>

<p>Bonus points for something that I can reasonably get going on a set of 10000 svg files and come back to later...</p>

CC BY-SA 3.0
2017-12-05T10:38:51.977Z
My thoughts would be something like openscad might simplify  this. It has a polygon basic operation and an extrude. First map the svg to a polygon then extrude the polygon. So the question then becomes how to map the svg to a set of points that are close enough to represent the shape. You could do this multiple times for each colour and then extrude by different heights.
Ross
<3d-design><stl>
SVG to STL conversion to make symbols recognisable for visually impaired users
Joe
# SVG to STL conversion to make symbols recognisable for visually impaired users

(Asked by: username_0 on 2017-12-05)

I work on communication devices for people with disabilities that prevent them from speaking. This can be anything from a board with symbols on, to a relatively sophisticated app.

Some potential users also have sight issues and have to distinguish symbols by feel (these particular users have cognitive disabilities and so braile isn't useful) . Currently the solution is to, by hand, stick items onto the buttons. Like this:

[![enter image description here](https://i.sstatic.net/cFS0d.png)](https://i.sstatic.net/cFS0d.png)

This is effective, but takes a very long time.

There exists open symbol libraries [like this](http://straight-street.com/), that include nice svg images like [this one](https://www.dropbox.com/s/e5emeku99xxmeub/traffic%20lights.svg?dl=0) (not uploaded, because SO doesn't like svg, but here's the screenshot:

[![enter image description here](https://i.sstatic.net/746CY.png)](https://i.sstatic.net/746CY.png)

A friend converted some of these images into 3d prints like so:

[![enter image description here](https://i.sstatic.net/Cv41n.jpg)](https://i.sstatic.net/Cv41n.jpg)

This was amazing, and useful, but I understand quite time-intensive for him - and there are thousands of these symbols.

Here's what I want to know: given that SVG is a relatively simple structure and the symbols are very simple, what are the steps for writing the script that says: "Take the svg, map it to a plane, raise everything that is black by 2mm, everything that is gray by 1mm and add height for the rest of the colours according to this table" ?

Bonus points for something that I can reasonably get going on a set of 10000 svg files and come back to later...

**Tags:** 3d-design, stl

> **Comments:**
> **username_1**: My thoughts would be something like openscad might simplify  this. It has a polygon basic operation and an extrude. First map the svg to a polygon then extrude the polygon. So the question then becomes how to map the svg to a set of points that are close enough to represent the shape. You could do this multiple times for each colour and then extrude by different heights.  

---

## 2 answers

### Answer by username_1 on 2017-12-05. Score: 2

If you install inkscape, pstoedit and ghostscript version 9.21 (not the latest as pstoedit is incompatible) you can get the file into a format that openscad can
import using two commands in a cmd file

```
"C:\Program Files\Inkscape\inkscape" -E "traffic lights.eps" "traffic lights.svg"
"C:\Program Files\pstoedit\pstoedit" -dt -f dxf:-polyaslines "traffic lights.eps" "traffic lights.dxf"

```

then in openscad

```
linear_extrude(3) import ("traffic lights.dxf");

```

will import gives me

[![openscad](https://i.sstatic.net/3BM0c.png)](https://i.sstatic.net/3BM0c.png)

With a thickness of 3mm - you can see the model needs some scaling but its seems possible although - I can't see an option to scale based on color -

> **Comments:**
> **username_0**: That's looking solid!  
> **username_1**: Much more difficult to get different heights automatically based to different colors , I've got an algorithm of how to do it - get a files for each layer based on the colors - eg extract White, Green, Red, Blue and import - this all seems to work - but I have no way to automate the layer extraction  

---

### Answer by username_2 on 2017-12-05. Score: 0

Nothing thats works via scripting BUT is really simple and easy.

1. register on tinkercad.com (I know register is a bummer but its a great tool)
2. open a new design
3. import \*.svg file
4. adjust height or size of the converted object
5. download .stl

Thats going to take a while for 1000 files but its so simple, printing the stuff will take forever, so you´ve got some time :P

Edit: Maybe edit the topic to something like "SVG to STL conversion" which would make the thread more likely to be found.


---

