Big text with WRITE.SCAD

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Big text with WRITE.SCAD

guillef
This post has NOT been accepted by the mailing list yet.
Hello
I need quality with the letters  at  30mm, and the function $fn=100 don´t work with the
librery write.scad
have you any solution for solve this trouble.
Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Big text with WRITE.SCAD

runsun
Have u tried the built-in text() module ? It does response to $fn.
$ Runsun Pan, PhD
$ libs: scadx, doctest, faces(git), offline doc(git), runscad.py(2,git), editor of choice: CudaText ( OpenSCAD lexer); $ Tips; $ Snippets
tp3
Reply | Threaded
Open this post in threaded view
|

Re: Big text with WRITE.SCAD

tp3
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.


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|

Re: Big text with WRITE.SCAD

runsun
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: scadx, doctest, faces(git), offline doc(git), runscad.py(2,git), editor of choice: CudaText ( OpenSCAD lexer); $ Tips; $ Snippets
Reply | Threaded
Open this post in threaded view
|

Re: Big text with WRITE.SCAD

alexgibson
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 <[hidden email]> 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
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
tp3
Reply | Threaded
Open this post in threaded view
|

Re: Big text with WRITE.SCAD

tp3
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
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|

Re: Big text with WRITE.SCAD

clothbot
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 <[hidden email]> 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
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

signature.asc (506 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Big text with WRITE.SCAD

alexgibson
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:[hidden email]] 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 <[hidden email]> 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
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
tp3
Reply | Threaded
Open this post in threaded view
|

Re: Big text with WRITE.SCAD

tp3
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
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|

Re: Big text with WRITE.SCAD

alexgibson
I don't know how I missed that.  Thanks Torsten.

-----Original Message-----
From: Discuss [mailto:[hidden email]] On Behalf Of
Torsten Paul
Sent: 17 October 2015 19:44
To: [hidden email]
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
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org