brodykenrick / text_on_OpenSCAD

A library for putting customised "text on" 3D shapes in OpenSCAD with changeable fonts, languages/scripts, text direction.
GNU Lesser General Public License v2.1
141 stars 31 forks source link

Clock Face Text #3

Closed unkerjay closed 8 years ago

unkerjay commented 9 years ago

I've got the latest OpenSCAD http://files.openscad.org/OpenSCAD-2015.03for Linux put the latest version of text_on_circle.scad and text_on.scad in the same directory and changed the reference like this:

use

here's my problem:

text_on_circle(t="123456789",r=r,font="DejaVuSansCondensed",spacing=3);

works fine.

How do I apply more than single digits? Ex: 10, 11, 12?

Thanx

Romankornfeld commented 9 years ago

t=str("10","11","12")

2015-04-17 17:51 GMT+02:00 unkerjay notifications@github.com:

I've got the latest OpenSCAD http://files.openscad.org/OpenSCAD-2015.03for Linux put the latest version of text_on_circle.scad and text_on.scad in the same directory and changed the reference like this:

use

here's my problem:

text_on_circle(t="123456789",r=r,font="DejaVuSansCondensed",spacing=3);

works fine.

How do I apply more than single digits? Ex: 10, 11, 12?

Thanx

— Reply to this email directly or view it on GitHub https://github.com/brodykenrick/text_on_OpenSCAD/issues/3.

[image: me]Roman Kornfeld roman.kornfeld@gmail.com | TEL: +43 699 18200286 | Meidlgasse 11/6/26, 1110 Wien | kornfeld.cityinfopoint.com

unkerjay commented 9 years ago

Tried this:

(doesn't work)

use

r=20; rotate([45,0,0]) { translate([0,0,0]) { %circle(r=r);

text_on_circle(t=str("123456789","10","11","12"),r=r,font="DejaVuSansCondensed",spacing=5);

} }

unkerjay commented 9 years ago

Tried this:

(doesn't work either):

use

r=20; rotate([45,0,0]) { translate([0,0,0]) { %circle(r=r);

text_on_circle(t=str("1","2","3","4","5","6","7","8","9","10","11","12"),r=r,font="DejaVuSansCondensed",spacing=5);

} }

Romankornfeld commented 9 years ago

Misunderstood you. try this

use <text_on/text_on.scad>;

r1=20;

%circle(r=r1);

for ( i = [1 : 1 : 12] ) { rotate( -i * 360 / 12, [0, 0, 1]) translate([0, 2, 0]) text_on_circle(t=str(i),r=r1,font="DejaVuSansCondensed",spacing=1); }

unkerjay commented 9 years ago

Works like a charm!

Another feather in your cap.

Thanx.