discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] difference() shown in preview but not rendered

RP
Ronaldo Persiano
Wed, Feb 14, 2018 7:20 PM

I don't know where I had my mind. Offset would not preclude the difference
to get an outline. Sorry about that.

Em 14 de fev de 2018 5:08 PM, "Ronaldo Persiano" rcmpersiano@gmail.com
escreveu:

I have no way to test your code now but it seems the trouble is the
difference() inside magic_text. If your intention is to have an outline of
the symbol \ue625 it may be simpler to do an offset()  of it instead of the
difference().

I don't know where I had my mind. Offset would not preclude the difference to get an outline. Sorry about that. Em 14 de fev de 2018 5:08 PM, "Ronaldo Persiano" <rcmpersiano@gmail.com> escreveu: I have no way to test your code now but it seems the trouble is the difference() inside magic_text. If your intention is to have an outline of the symbol \ue625 it may be simpler to do an offset() of it instead of the difference().
MK
Marius Kintel
Fri, Feb 16, 2018 4:54 AM

On Feb 14, 2018, at 2:20 PM, Ronaldo Persiano rcmpersiano@gmail.com wrote:

I don't know where I had my mind. Offset would not preclude the difference to get an outline. Sorry about that.

Otoh, offset may help clean up self-intersections.
This seems to do the trick:

difference() {
offset(-0.1) text(text = "\ue625”, size = size, halign = "center”, valign = "center”, font="mana:style=Regular");
offset(-1) text(text = "\ue625”, size = size, halign = "center”, valign = "center”, font="mana:style=Regular");
}

In this case, you could also wrap the text in a module as it’s the exact same symbol instantiated twice.

-Marius

> On Feb 14, 2018, at 2:20 PM, Ronaldo Persiano <rcmpersiano@gmail.com> wrote: > > I don't know where I had my mind. Offset would not preclude the difference to get an outline. Sorry about that. > Otoh, offset may help clean up self-intersections. This seems to do the trick: difference() { offset(-0.1) text(text = "\ue625”, size = size, halign = "center”, valign = "center”, font="mana:style=Regular"); offset(-1) text(text = "\ue625”, size = size, halign = "center”, valign = "center”, font="mana:style=Regular"); } In this case, you could also wrap the text in a module as it’s the exact same symbol instantiated twice. -Marius
MK
Marius Kintel
Fri, Feb 16, 2018 4:57 AM

Another trick:

You can "use <mana.ttf>” directly in the scad file. This allows you to distribute the ttf file with your OpenSCAD file and you won’t have to install the font system-wide.

-Marius

Another trick: You can "use <mana.ttf>” directly in the scad file. This allows you to distribute the ttf file with your OpenSCAD file and you won’t have to install the font system-wide. -Marius