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
136 stars 31 forks source link

how do I just do regular LTR text on the side of a cylinder? #5

Closed jdawgaz closed 5 years ago

jdawgaz commented 8 years ago

use <text_on/text_on.scad>

rad1 = 30; rad2 = rad1;

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

this scrunches up all the text, I just want regular text LTR that you can read on the side of a cylinder.

brodykenrick commented 8 years ago

I think you want to set direction as "ltr" - left to right not ttb - top to bottom

brodykenrick commented 8 years ago

Check out the examples for text_on_cylinder.scad

jdawgaz commented 8 years ago

ok, I have been. I want readable text going horizontally around the cylinder on the side of the cylinder. I cannot find a way to do that.

brodykenrick commented 8 years ago

Do the examples work? Does the example (examples/text_on_cylinder.scad) render the same as the image in the readme.md for you?

https://github.com/brodykenrick/text_on_OpenSCAD/raw/master/examples/text_on_cylinder.scad.png

jdawgaz commented 8 years ago

yes, they appear to work. I have as yet, to find a way to do normal text horizontally on the side of the cylinder. Something like attached (that I did with Write.scad) Can you help me out?

cup_as_image

brodykenrick commented 8 years ago

Use the example for rotate = 30 but use rotate = 0.

jdawgaz commented 8 years ago

ok, I did that:

use <text_on/text_on.scad>

//A cylinder with unequal top and bottom radii (a truncated cone) rad1=10; rad2=30; translate([0,100,-25]) { %cylinder(r1=rad1, r2=rad2,h=40);

text_on_cylinder("rotate = 0, east = 90",[0,0,0],r1=rad1,r2=rad2,h=40,spacing=1.2,rotate=0,eastwest=90,updown=15); }

//The reverse slanty cylinder of the above translate([-75,100,-25]) { %cylinder(r1=rad2, r2=rad1,h=40); text_on_cylinder("rotate = 0, east = 90",[0,0,0],r1=rad2,r2=rad1,h=40,spacing=1.2,rotate=0,eastwest=90); }

//A normal cylinder translate([0,0,-20]) { %cylinder(r=20,h=40, center=false); text_on_cylinder("rotate = 0, east = 90",[0,0,0],r=20,h=40,spacing=1.2,rotate=0,eastwest=90); }

//A centered cylinder translate([-75,-75,0]) { %cylinder(r=20,h=40, center=true);

%text_on_cylinder("rotate = 0, east = 90, cyl_center",[0,0,0],r=20,h=40,spacing=1.2,rotate=0,eastwest=90,cylinder_center=true); }

I changed all rotate=30 to rotate=0, the following snapshot just focuses on one of the cylinders, but all 4 of them look the same.

But I still get wierdness. I am using OpenSCAD version 2015.11.15 (git a7ee1f2) on OSx, if that matters. The text is unreadable.

text_problem_rotate0

Romankornfeld commented 8 years ago

This i have also on the last Mac OSX Version from SCAD, while on a windows version this works completely OK. Some Scad Versions before it worked also on MacOS.

thunfischbrot commented 8 years ago

Same issue here on Windows, Version 2015.03-2: 2015-12-21 14_35_51-text_on_cylinder_simpler scad_ - openscad