Quantcast

Clearance for text

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Clearance for text

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

Re: Clearance for text

doug.moen
Try using 'offset' to thicken the character strokes.

On Sunday, 14 May 2017, Ian Oliver <[hidden email]> 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
[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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Clearance for text

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


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

Re: Clearance for text

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


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

Re: Clearance for text

Gadgetmind
In reply to this post by Gadgetmind

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

Re: Clearance for text

doug.moen
Awesome model, thanks for sharing it with us.

On 27 May 2017 at 13:02, Ian Oliver <[hidden email]> 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
[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
Loading...