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
140 stars 30 forks source link

Any way to curve along a cylinder vertically? #7

Closed thestumbler closed 6 years ago

thestumbler commented 8 years ago

Any way to get text to follow the curve of a cylinder when it is rotated 90 degrees?
In this snippet, you can see it appears flat, and doesn't curve along the surface of the cylinder.

rad1=3; rad2=3; %cylinder(r1=rad1,r2=rad2,h=40, $fn=100); //Partially visible "base" object text_on_cylinder(t="Text",r1=rad1,r2=rad2,h=40, rotate=90, font="Liberation Mono", direction="ttb", size=5);

brodykenrick commented 8 years ago

Hi Chris,

If I understand you correctly then the simplest way I can think of doing this is to use the text sitting "flat" as you mention and then to create a separate sphere of slightly larger radius to cut off the text with the spherical curvature you seem to be after.

I am not using this code currently so can't execute your sample but if you post images of your results I can provide my thoughts.

Cheers, Brody On Wed, 18 May 2016 at 10:39, Chris Lott notifications@github.com wrote:

Any way to get text to follow the curve of a cylinder when it is rotated 90 degrees?

In this snippet, you can see it appears flat, and doesn't curve along the surface of the cylinder.

rad1=3; rad2=3; %cylinder(r1=rad1,r2=rad2,h=40, $fn=100); //Partially visible "base" object text_on_cylinder(t="Text",r1=rad1,r2=rad2,h=40, rotate=90, font="Liberation Mono", direction="ttb", size=5);

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/brodykenrick/text_on_OpenSCAD/issues/7

brodykenrick commented 8 years ago

I meant cylinder on the cutting shape. See the examples for how this was done with a sphere - see rounded.