3Dpart design with OpenSCAD #107: Puffy text.

2 min read
By Bob
3Dpart design with OpenSCAD #107: Puffy text.

Recently I was experimenting with a way to expand certain items using a move-able "pillow" shape so I can make some different designs but I hit a wall and wasn't getting anything to work like I wanted it to, usually I will just set the project to the side and come back to it later or I will do a google search to see if anyone has come up with an idea, while the post I came across really didn't have a lot to do with what I was trying to achieve I thought the math and approach was interesting, here is the post:

linear_extrude with ease-in?
by u/cd7k in openscad

Full credit to Stone Age Sculptor for the parts of their code I used for this, Here is the code:

//

text="1234";
Font="";
$fn=60;//[3:10:100]
size=10;//[1:.01:200]
height=100;//[30:.01:400]
Spacing=1;//[1:.01:4]
Puff=1;//[0:.01:3]


module Puffy_text(){
 p=[for(a=[0:120:360])[1-cos(a),a/(height)]];
 minkowski(){
 rotate_extrude()
 polygon(p);
 sphere(Puff);
 linear_extrude(0.1)
 text(text,size=size,font=Font,halign="center",valign="center",spacing=Spacing,direction="ltr");
}}


Puffy_text();

Despite minkowski() being slow this is actually pretty fast until you get past about 40 with $fn, but even with it at 100 it has taken less than 20 seconds for most text I have tested, here are some different results:

I am still experimenting with using this with an svg made with Inkscape instead of a polygon and I will be making another post about it soon.