Have u tried the built-in text() module ? It does response to $fn.
$ Runsun Pan, PhD
$ libs: doctest , faces ( git ), offline doc ( git ),runscad.py( 1 , 2 , git );
$ tips: hash( 1 , 2 ), sweep , var , lerp , animGif
--
View this message in context: http://forum.openscad.org/Big-text-with-WRITE-SCAD-tp14157p14158.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
On 10/17/2015 03:07 PM, runsun wrote:
Have u tried the built-in text() module ? It does response to $fn.
There's also a write.scad version that is based on the text() builtin:
https://github.com/brodykenrick/text_on_OpenSCAD
ciao,
Torsten.
tp3 wrote
There's also a write.scad version that is based on the text() builtin:
https://github.com/brodykenrick/text_on_OpenSCAD
Note that that one still uses assign( ) and needs a lot of re-write.
$ Runsun Pan, PhD
$ libs: doctest , faces ( git ), offline doc ( git ),runscad.py( 1 , 2 , git );
$ tips: hash( 1 , 2 ), sweep , var , lerp , animGif
--
View this message in context: http://forum.openscad.org/Big-text-with-WRITE-SCAD-tp14157p14163.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Does there already exist the possibility to add center=true to centre the text? If not, I would find this immensely helpful.
Cheers
Alex
Tapped on my mobile phone.
On 17 Oct 2015, at 15:48, runsun runsun@gmail.com wrote:
tp3 wrote
There's also a write.scad version that is based on the text() builtin:
https://github.com/brodykenrick/text_on_OpenSCAD
Note that that one still uses assign( ) and needs a lot of re-write.
$ Runsun Pan, PhD
$ libs: doctest , faces ( git ), offline doc ( git ),runscad.py( 1 , 2 , git );
$ tips: hash( 1 , 2 ), sweep , var , lerp , animGif
--
View this message in context: http://forum.openscad.org/Big-text-with-WRITE-SCAD-tp14157p14163.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
On 10/17/2015 07:20 PM, Alex Gibson wrote:
Does there already exist the possibility to add center=true to centre
the text? If not, I would find this immensely helpful.
There is halign and valign which work based on the font properties
(the sizes defined for the glyphs in the font file).
There's currently no center that's based on the generated mesh vertices.
For mesh based positioning, I think something more general might be
useful, like an align() or pos(). There's an (meanwhile quite old)
pull request on github which has a pos() implementation, but that's
embedded in a huge change with lots of other stuff.
Similar to hull() or minkowski() this would have the side effect of
forcing the mesh calculation up to that point in the object tree so
it would have quite some impact on preview performance.
ciao,
Torsten.
When I need to fit an arbitrary-sized piece of text, I use the resize() function to bound either the width or the length (not both, to preserve the aspect ratio) of text(valign=“center”,halign=“center,…) and (re)position accordingly.
Andrew.
On Oct 17, 2015, at 1:29 PM, Torsten Paul Torsten.Paul@gmx.de wrote:
On 10/17/2015 07:20 PM, Alex Gibson wrote:
Does there already exist the possibility to add center=true to centre
the text? If not, I would find this immensely helpful.
There is halign and valign which work based on the font properties
(the sizes defined for the glyphs in the font file).
There's currently no center that's based on the generated mesh vertices.
For mesh based positioning, I think something more general might be
useful, like an align() or pos(). There's an (meanwhile quite old)
pull request on github which has a pos() implementation, but that's
embedded in a huge change with lots of other stuff.
Similar to hull() or minkowski() this would have the side effect of
forcing the mesh calculation up to that point in the object tree so
it would have quite some impact on preview performance.
ciao,
Torsten.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Thanks Andrew and Torsten.
Torsten, how do I invoke halign and valign please?
Andrew, I will try your suggestion - as it’s the main way I use text, and the resizing function is also useful, I will try to make a utility module and post it back here...
Cheers
Alex Gibson
admg consulting
• Project management
• Operations & Process improvement
• 3D Printing
-----Original Message-----
From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of Andrew Plumb
Sent: 17 October 2015 19:03
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] Big text with WRITE.SCAD
When I need to fit an arbitrary-sized piece of text, I use the resize() function to bound either the width or the length (not both, to preserve the aspect ratio) of text(valign=“center”,halign=“center,…) and (re)position accordingly.
Andrew.
On Oct 17, 2015, at 1:29 PM, Torsten Paul Torsten.Paul@gmx.de wrote:
On 10/17/2015 07:20 PM, Alex Gibson wrote:
Does there already exist the possibility to add center=true to centre
the text? If not, I would find this immensely helpful.
There is halign and valign which work based on the font properties
(the sizes defined for the glyphs in the font file).
There's currently no center that's based on the generated mesh vertices.
For mesh based positioning, I think something more general might be
useful, like an align() or pos(). There's an (meanwhile quite old)
pull request on github which has a pos() implementation, but that's
embedded in a huge change with lots of other stuff.
Similar to hull() or minkowski() this would have the side effect of
forcing the mesh calculation up to that point in the object tree so it
would have quite some impact on preview performance.
ciao,
Torsten.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
On 10/17/2015 08:40 PM, Alex Gibson wrote:
Torsten, how do I invoke halign and valign please?
text("hello!", 20, halign="center", valign="center");
See https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Text#Alignment
for all possible options.
ciao,
Torsten.
I don't know how I missed that. Thanks Torsten.
-----Original Message-----
From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of
Torsten Paul
Sent: 17 October 2015 19:44
To: discuss@lists.openscad.org
Subject: Re: [OpenSCAD] Big text with WRITE.SCAD
On 10/17/2015 08:40 PM, Alex Gibson wrote:
Torsten, how do I invoke halign and valign please?
text("hello!", 20, halign="center", valign="center");
See https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Text#Alignment
for all possible options.
ciao,
Torsten.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org