Anyone have some code to make a font use a V groove for the letters?
I'm looking to put some text on the bottom surface, and don't want to have supports.
So a Font with a steep V shape for depth.
On 2/17/2020 7:14 PM, John Lussmyer wrote:
Anyone have some code to make a font use a V groove for the letters?
I'm looking to put some text on the bottom surface, and don't want to have supports.
So a Font with a steep V shape for depth.
That would be hard. I don't think you could use standard text()
mechanisms to do it.
The problem is that the various layers are not straightforward
transformations of one another.
Consider an H. At the bottom layer, there's some center-to-center
separation between the two vertical bars. Call it W. Each bar is a
certain thickness. Call that T.
You want T to scale down on successive layers, but you do not want W
to scale down.
You want the proportions of the letters to change on different layers,
with the strokes getting thinner but the basic shape of the letter
staying the same size. (Maybe you'd want the strokes that end, the tops
and bottoms of the vertical bars, to get a little shorter so that you're
slanted in that direction too.)
How big do you want your letters to be? You might be able to get away
with just bridging.
Before text() there was a font library written in OpenSCAD. Maybe it
had enough control to be able to tweak the stroke thickness without
otherwise changing the shape or size of the letters.
For a different problem - text on a vertical surface - I had a
general-purpose answer. I'd extrude the text some thickness T, then T
minus a little, shifted down a little, et cetera. The result was that
each stroke had a 45° bevel under it.
Is that what you want?
r = 1.5;
minkowski(){
linear_extrude(3,scale=0.01) circle(r,$fn=16);
linear_extrude(0.1)
text("st",spacing=1.4,size=10);
}
Well, then be patient. This little code with just 2 letters required 55 sec
in my computer to preview! After that, the render was a breeze.
Before doing the minkowski adjust the text spacing by offsetting the text
with the radius of the circle. The slope will be extrusion height over the
circle radius.
If you're using an extrusion type printer, you should be able to bridge over
the text if is has vertical walls unless you make the text enormous.
But if you really want to pursue V-groove text, it seems like what's needed
is the modify the text with offset(). The problem is that you can't connect
(concave) offset text with the original to create the groove. (If writing
were convex then hull() would do the trick.) This process would be possible
if you had your text as a set of points, or as vectors using the offset()
function I wrote that takes a point list and performs the offset operation
on it.
--
Sent from: http://forum.openscad.org/
Another way to do this would be to use a font which is open, break up the
geometry, and then blend the inner and outer parts together.
Or, model this in a CAM tool which supports V carving and can export an STL.
--
Sent from: http://forum.openscad.org/
In this topic
http://forum.openscad.org/DXF-to-quot-3D-printable-quot-lines-with-thickness-td22235.html
I show how I did this with LibreCad and DXF files, and there are some good
suggestions of other approaches as well in the same topic.
--
Sent from: http://forum.openscad.org/
On 2/18/2020 5:02 AM, adrianv wrote:
But if you really want to pursue V-groove text, it seems like what's needed is the modify the text with offset().
Ah! You're right!
John, here's something for you to play with.
res = 2; // Levels per unit height
slope=0.2; // Units out per vertical unit
size=20; // Height of font
height=10; // Height of extruded letters
levels = height * res;
for (i=[0:levels-1]) {
linear_extrude(height=(height-i/res))
offset((i/res)*slope)
text("hello", size=size);
}
I have wanted to play with something similar. The issue is this will be
read from the bottom, so each letter has to be flipped over. If you just
rotate the slope goes the wrong way. So how do you make the letter
appear backwards?
Lee
On 2/18/2020 12:54 PM, Jordan Brown wrote:
res = 2; // Levels per unit height
slope=0.2; // Units out per vertical unit
size=20; // Height of font
height=10; // Height of extruded letters
levels = height * res;
for (i=[0:levels-1]) {
linear_extrude(height=(height-i/res))
offset((i/res)*slope)
text("hello", size=size);
}
Ready made script to play with via customizer at https://www.thingiverse.com/thing:3089014
Note that all the fonts listed there would need to be installed locally to work. Thingiverse has most Google fonts installed.
ciao,
Torsten.
On 18 Feb 2020 at 13:10, Lee A wrote:
I have wanted to play with something similar. The issue is this will be
read from the bottom, so each letter has to be flipped over. If you just
rotate the slope goes the wrong way. So how do you make the letter
appear backwards?
Just add a rotate() before the text.
res = 2; // Levels per unit height
slope=0.2; // Units out per vertical unit
size=20; // Height of font
height=10; // Height of extruded letters
levels = height * res;
for (i=[0:levels-1]) {
linear_extrude(height=(height-i/res))
offset((i/res)*slope)
rotate([180,0,0])
text("hello", size=size);
}