discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

bend text

N
NateTG
Wed, Jul 11, 2018 10:35 PM

I extracted text geometry from postscript and then triangulated and deformed
that in userland

This rendered in about 10 seconds.

cylindertext.stl http://forum.openscad.org/file/t2140/cylindertext.stl

--
Sent from: http://forum.openscad.org/

I extracted text geometry from postscript and then triangulated and deformed that in userland This rendered in about 10 seconds. cylindertext.stl <http://forum.openscad.org/file/t2140/cylindertext.stl> -- Sent from: http://forum.openscad.org/
AP
Alexander Pruss
Mon, Jul 16, 2018 4:31 PM

"I don't think it is possible to know the horizontal extent of the text
string"

I just wrote a library that lets you get horizontal extents of text strings
for a number of common fonts: https://www.thingiverse.com/thing:3004457

--
Sent from: http://forum.openscad.org/

"I don't think it is possible to know the horizontal extent of the text string" I just wrote a library that lets you get horizontal extents of text strings for a number of common fonts: https://www.thingiverse.com/thing:3004457 -- Sent from: http://forum.openscad.org/
WA
William Adams
Mon, Jul 16, 2018 4:54 PM

"I don't think it is possible to know the horizontal extent of the text
string"

I just wrote a library that lets you get horizontal extents of text strings
for a number of common fonts: https://www.thingiverse.com/thing:3004457

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Or use TeX: https://graphicdesign.stackexchange.com/questions/31088/any-automated-system-to-compute-the-linear-length-of-a-letters-in-a-word-or-ph/31094#31094 On Mon, Jul 16, 2018 at 12:31 PM, Alexander Pruss <arpruss@gmail.com> wrote: > "I don't think it is possible to know the horizontal extent of the text > string" > > I just wrote a library that lets you get horizontal extents of text strings > for a number of common fonts: https://www.thingiverse.com/thing:3004457 > > > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
AP
Alexander Pruss
Sun, Jul 22, 2018 1:50 PM

Another way is to use Hershey fonts where you have full userland access to
the lines. I wrote a quick library that does full uv mapping of text.
https://www.thingiverse.com/thing:3010934

To fit to a circle of radius 20, do:

mapHershey("Hello World!", f="let(angle=-u180/(PIr),r1=r+v)
[r1cos(angle),r1sin(angle),0]", size=10, extraParameters=[["r",20]])
cylinder(d=1,h=5);

(The cylinder() at the end is the profile of the virtual stylus with which
the text is drawn.)

--
Sent from: http://forum.openscad.org/

Another way is to use Hershey fonts where you have full userland access to the lines. I wrote a quick library that does full uv mapping of text. https://www.thingiverse.com/thing:3010934 To fit to a circle of radius 20, do: mapHershey("Hello World!", f="let(angle=-u*180/(PI*r),r1=r+v) [r1*cos(angle),r1*sin(angle),0]", size=10, extraParameters=[["r",20]]) cylinder(d=1,h=5); (The cylinder() at the end is the profile of the virtual stylus with which the text is drawn.) -- Sent from: http://forum.openscad.org/