discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Clearance for text

IO
Ian Oliver
Sun, May 14, 2017 1:41 PM

Hi, everyone.

I've just joined this list after using OpenSCAD for about four months.
Hopefully I've got the silly questions out of the way via hitting
docs/google, but let's see ...

I've just designed my first complex (for me) object in OpenSCAD and it's
1500 lines of code spread across 10 files that generates 18 objects that
when carefully assembled form a Thunderbird 1 model.

This craft has lots of text, which I'm creating by printing the text
separately, subtracting the text object from the object to make hole,
and then slotting it in afterwards. I'm also contouring the surface of
the text to match the curves of the shape, but that's detail.

The text is subtracted using this in the difference () -

for (y=TDV, z=TDV) // Dither to make larger hole with extra slowness!
translate ([0, TextClearancey, TextClearancez])
translate (VTVect) rotate (VRVect) BaseVText ();

TDV is set to [0, 0] for viewing and [-1, 1] for printing.

This subtracts four versions of the text, and kind of works, but it's
slow and isn't too great on letters with pointy bits.

I've also tried scaling the text up/down by a few percent (and
subtracting both) but as I'm printing strings, the characters "drift" by
the end. I could print individual characters with these scaled around
their centre, but I'd need to find a way to get their proportional spacings.

Note I can't just print the letters smaller as I need the outsides to be
smaller but holes in B's and O's to be bigger, and there is also that
surface contouring.

Any good ideas for an elegant/fast way of doing this?

Thanks

Hi, everyone. I've just joined this list after using OpenSCAD for about four months. Hopefully I've got the silly questions out of the way via hitting docs/google, but let's see ... I've just designed my first complex (for me) object in OpenSCAD and it's 1500 lines of code spread across 10 files that generates 18 objects that when carefully assembled form a Thunderbird 1 model. This craft has lots of text, which I'm creating by printing the text separately, subtracting the text object from the object to make hole, and then slotting it in afterwards. I'm also contouring the surface of the text to match the curves of the shape, but that's detail. The text is subtracted using this in the difference () - for (y=TDV, z=TDV) // Dither to make larger hole with extra slowness! translate ([0, TextClearance*y, TextClearance*z]) translate (VTVect) rotate (VRVect) BaseVText (); TDV is set to [0, 0] for viewing and [-1, 1] for printing. This subtracts four versions of the text, and kind of works, but it's slow and isn't too great on letters with pointy bits. I've also tried scaling the text up/down by a few percent (and subtracting both) but as I'm printing strings, the characters "drift" by the end. I could print individual characters with these scaled around their centre, but I'd need to find a way to get their proportional spacings. Note I can't just print the letters smaller as I need the outsides to be smaller but holes in B's and O's to be bigger, and there is also that surface contouring. Any good ideas for an elegant/fast way of doing this? Thanks
DM
doug moen
Sun, May 14, 2017 2:02 PM

Try using 'offset' to thicken the character strokes.

On Sunday, 14 May 2017, Ian Oliver lists@foxhill.co.uk wrote:

Hi, everyone.

I've just joined this list after using OpenSCAD for about four months.
Hopefully I've got the silly questions out of the way via hitting
docs/google, but let's see ...

I've just designed my first complex (for me) object in OpenSCAD and it's
1500 lines of code spread across 10 files that generates 18 objects that
when carefully assembled form a Thunderbird 1 model.

This craft has lots of text, which I'm creating by printing the text
separately, subtracting the text object from the object to make hole, and
then slotting it in afterwards. I'm also contouring the surface of the text
to match the curves of the shape, but that's detail.

The text is subtracted using this in the difference () -

for (y=TDV, z=TDV) // Dither to make larger hole with extra slowness!
translate ([0, TextClearancey, TextClearancez])
translate (VTVect) rotate (VRVect) BaseVText ();

TDV is set to [0, 0] for viewing and [-1, 1] for printing.

This subtracts four versions of the text, and kind of works, but it's slow
and isn't too great on letters with pointy bits.

I've also tried scaling the text up/down by a few percent (and subtracting
both) but as I'm printing strings, the characters "drift" by the end. I
could print individual characters with these scaled around their centre,
but I'd need to find a way to get their proportional spacings.

Note I can't just print the letters smaller as I need the outsides to be
smaller but holes in B's and O's to be bigger, and there is also that
surface contouring.

Any good ideas for an elegant/fast way of doing this?

Thanks


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

Try using 'offset' to thicken the character strokes. On Sunday, 14 May 2017, Ian Oliver <lists@foxhill.co.uk> wrote: > Hi, everyone. > > I've just joined this list after using OpenSCAD for about four months. > Hopefully I've got the silly questions out of the way via hitting > docs/google, but let's see ... > > I've just designed my first complex (for me) object in OpenSCAD and it's > 1500 lines of code spread across 10 files that generates 18 objects that > when carefully assembled form a Thunderbird 1 model. > > This craft has lots of text, which I'm creating by printing the text > separately, subtracting the text object from the object to make hole, and > then slotting it in afterwards. I'm also contouring the surface of the text > to match the curves of the shape, but that's detail. > > The text is subtracted using this in the difference () - > > for (y=TDV, z=TDV) // Dither to make larger hole with extra slowness! > translate ([0, TextClearance*y, TextClearance*z]) > translate (VTVect) rotate (VRVect) BaseVText (); > > TDV is set to [0, 0] for viewing and [-1, 1] for printing. > > This subtracts four versions of the text, and kind of works, but it's slow > and isn't too great on letters with pointy bits. > > I've also tried scaling the text up/down by a few percent (and subtracting > both) but as I'm printing strings, the characters "drift" by the end. I > could print individual characters with these scaled around their centre, > but I'd need to find a way to get their proportional spacings. > > Note I can't just print the letters smaller as I need the outsides to be > smaller but holes in B's and O's to be bigger, and there is also that > surface contouring. > > Any good ideas for an elegant/fast way of doing this? > > Thanks > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
IO
Ian Oliver
Sun, May 14, 2017 2:20 PM

On 2017-05-14 15:02, doug moen wrote:

Try using 'offset' to thicken the character strokes.

Pah, how had I missed that? Serves me right for my "stupid questions"
observation.

Anyway, I've implemented it in one file, and it's a bit of work to
propagate the offset down to my 2D objects, but it works very well.

Many thanks.

On 2017-05-14 15:02, doug moen wrote: > Try using 'offset' to thicken the character strokes. Pah, how had I missed that? Serves me right for my "stupid questions" observation. Anyway, I've implemented it in one file, and it's a bit of work to propagate the offset down to my 2D objects, but it works very well. Many thanks.
IO
Ian Oliver
Mon, May 15, 2017 7:46 PM

Anyway, I've implemented it in one file, and it's a bit of work to

propagate the offset down to my 2D objects, but it works very well.

Rendering time for most complex object down from 45 mins to 8 mins too!
Memory required dropped from 7GB at peak to 1,5GB, which is nice as my
box only has 4GB.

Thanks again.

> Anyway, I've implemented it in one file, and it's a bit of work to propagate the offset down to my 2D objects, but it works very well. Rendering time for most complex object down from 45 mins to 8 mins too! Memory required dropped from 7GB at peak to 1,5GB, which is nice as my box only has 4GB. Thanks again.
IO
Ian Oliver
Sat, May 27, 2017 5:02 PM

I've just designed my first complex (for me) object in OpenSCAD and
it's 1500 lines of code spread across 10 files that generates 18
objects that when carefully assembled form a Thunderbird 1 model.

About 2k lines when finished. Source here is anyone wants to see how I
split across multiple files and used makefiles. I'm still very much
learning!

https://www.thingiverse.com/thing:2323353

> > I've just designed my first complex (for me) object in OpenSCAD and > it's 1500 lines of code spread across 10 files that generates 18 > objects that when carefully assembled form a Thunderbird 1 model. > About 2k lines when finished. Source here is anyone wants to see how I split across multiple files and used makefiles. I'm still very much learning! https://www.thingiverse.com/thing:2323353
DM
doug moen
Sat, May 27, 2017 5:06 PM

Awesome model, thanks for sharing it with us.

On 27 May 2017 at 13:02, Ian Oliver lists@foxhill.co.uk wrote:

I've just designed my first complex (for me) object in OpenSCAD and it's
1500 lines of code spread across 10 files that generates 18 objects that
when carefully assembled form a Thunderbird 1 model.

About 2k lines when finished. Source here is anyone wants to see how I
split across multiple files and used makefiles. I'm still very much
learning!

https://www.thingiverse.com/thing:2323353


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

Awesome model, thanks for sharing it with us. On 27 May 2017 at 13:02, Ian Oliver <lists@foxhill.co.uk> wrote: > > >> I've just designed my first complex (for me) object in OpenSCAD and it's >> 1500 lines of code spread across 10 files that generates 18 objects that >> when carefully assembled form a Thunderbird 1 model. >> >> > About 2k lines when finished. Source here is anyone wants to see how I > split across multiple files and used makefiles. I'm still very much > learning! > > https://www.thingiverse.com/thing:2323353 > > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >