There is an older but nice way to get text on cubes, cylinders, and
spheres: http://www.thingiverse.com/thing:16193
This utility should probably be re-writen with text().
2015-08-06 3:49 GMT+02:00 Chow Loong Jin hyperair@debian.org:
On Thu, Aug 06, 2015 at 09:47:57AM +0800, Chow Loong Jin wrote:
On Mon, Aug 03, 2015 at 12:19:15PM -0700, PYM wrote:
Hello,
I successfully created a ellipse shaped profile (thanks to the guys on
this
forum helping out!). Now i want to engrave text on the flat outside of
this
ring, but i cant figure out how i could do it. Anybody a good idea?
Its a
tough one, trust me.
Here's a starting point (untested):
for (i = [0:step:(1*quarter_segments/4)-step])
rotate (e_a (i), Z)
translate ([-e_r (i), -e_c (i), 0])
rotate (90, Z)
rotate (90, X)
linear_extrude (height)
text (t, valign = "center");
You'll need to figure out the formula for these functions:
e_r(i) gives you the radius from the center of your ellipse at that
specific
point.
e_a(i) gives you the angle from the X axis for that particular point.
You should be able to get the e_r(i) and e_a(i) by converting e(i)'s
coordinates
into polar coordinates.
e_c(i) gives you the partial circumference starting from i=0 until
current i.
I'm still not sure about the formula for this.
Here's an animation to help you picture what's going on here:
https://cloud.githubusercontent.com/assets/3725313/4020624/8d55c042-2ac3-11e4-82d6-48f3c5a8b15b.gif
Imagine that the red piece is your text. You need to emulate that with an
elliptical path.
--
Kind regards,
Loong Jin
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
stempeldergeschichte@googlemail.com karsten@rohrbach.de
P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.
P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.
Enjoy!
On 08/09/2015 12:39 AM, Peter Falke wrote:
There is an older but nice way to get text on cubes, cylinders, and
spheres: http://www.thingiverse.com/thing:16193
This utility should probably be re-writen with text().
It already is: https://github.com/brodykenrick/text_on_OpenSCAD
ciao,
Torsten.