3D part design with OpenSCAD #78: Easy tapered 3d text using roof()

An example of how to use roof() to make tapered 3d text.

2 min read
By Bob
3D part design with OpenSCAD #78: Easy tapered 3d text using roof()

For some applications it is handy to make text that slopes, here is the code:

Update: I made some changes to the original code so the text could be scaled without converting it to stl first and used the "straight" option for roof, some fonts have weird artifacts when you extrude them so I recommend picking another one if you need really tall letters for some reason..

/*[Beveled Text]*/
text="1234";
Font="";
size=10;//[1:.01:200]
height=1;//[1:.01:20]
Spacing=1;//[1:.01:12]
taper=.40; //[.01:.01:50]
length = len(text);
Offset=0;//[.01:.01:50])


module beveled_text(){
render(){
intersection(){
roof(method="straight"){
offset(delta=Offset,$fn=100)
text(text,size=size,font=Font,halign="center",valign="center",spacing=Spacing,direction="ltr");
}
cylinder(h=taper,d=length*400,center=true,$fn=4);
}}
}


scale([1,1,height])
beveled_text();

It takes some adjusting but I have gotten some good results:

Make sure to enable roof in Edit>Preferences>Features;

roof() is much faster than minkowsky(), and some fonts will definitely work better than others.