# Chamfered 3D text

22 messages
12
Open this post in threaded view
|

## Chamfered 3D text

 George Hartzell wrote: > I think I just connected the dots to a big reason to work with in the > 2D space: text is a 2d object and you can't mix it with 3d objects > like cubes.... Speaking of which, I haven't yet found a decent solution to produce engraved / embossed text where the 3D effect is chamfered rather than extruded out at a straight perpendicular. I can produce a base layer of 2D text, and using "offset" I can produce the smaller (still 2D) version that sits at the other end of the "extrusion" but what I can't do is join those two 2D objects to make a solid. Do I have to resort to interpolating at multiple different vertical positions and sizes to progressively dig out the text? That does work, but produces a much higher surface count than simply joining the two 2D polygons together vertex-by-vertex would. For 3D printing it's kinda OK, because I can set the interpolation on the Z axis to match the print resolution, but if I wanted proper smooth polygons for other purposes it doesn't look great, either. Ray -- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: Chamfered 3D text

 AFAIK, there is no neat way to do it in OpenSCAD. An approximation may be built with minkowski: it is time-consuming, generates more vertices than needed and rounds the character corners.chanfer_text("Text","Liberation Sans:style=Bold", 2, 10);module chanfer_text(text, font, h, ang) {  d = h*tan(ang);  minkowski(){    linear_extrude(height=h*0.0001)      offset(-d)        text(text, font=font);        linear_extrude(height=h,scale=h*0.0001)      circle(d);  }}The offset may be suppressed depending on what you want.2018-02-06 7:48 GMT-02:00 RayBellis :George Hartzell wrote: > I think I just connected the dots to a big reason to work with in the > 2D space: text is a 2d object and you can't mix it with 3d objects > like cubes.... Speaking of which, I haven't yet found a decent solution to produce engraved / embossed text where the 3D effect is chamfered rather than extruded out at a straight perpendicular. I can produce a base layer of 2D text, and using "offset" I can produce the smaller (still 2D) version that sits at the other end of the "extrusion" but what I can't do is join those two 2D objects to make a solid. Do I have to resort to interpolating at multiple different vertical positions and sizes to progressively dig out the text? That does work, but produces a much higher surface count than simply joining the two 2D polygons together vertex-by-vertex would. For 3D printing it's kinda OK, because I can set the interpolation on the Z axis to match the print resolution, but if I wanted proper smooth polygons for other purposes it doesn't look great, either. Ray -- Sent from: http://forum.openscad.org/ _______________________________________________ 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
Open this post in threaded view
|

## Re: Chamfered 3D text

Open this post in threaded view
|

## Re: Chamfered 3D text

 This is what I came up with.   I didn't try printing with it yet, but I think it would work: module Embossed(step = 0.05, height = 1, grad = 0.5) {         for (z = [ 0 : step : height ]) {                 translate([0, 0, z])                 linear_extrude(height = step)                 offset(delta = -z * grad, chamfer = true)                 children();         } }; -- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: Chamfered 3D text

 This is a standard solution. Unhappily, besides the staircase surface, it is more time-consuming than using minkowski because of the union of many objects. It doesn't round corners, though.2018-02-06 11:35 GMT-02:00 RayBellis :This is what I came up with.   I didn't try printing with it yet, but I think it would work: module Embossed(step = 0.05, height = 1, grad = 0.5) {         for (z = [ 0 : step : height ]) {                 translate([0, 0, z])                 linear_extrude(height = step)                 offset(delta = -z * grad, chamfer = true)                 children();         } }; -- Sent from: http://forum.openscad.org/ _______________________________________________ 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
Open this post in threaded view
|

## Re: Chamfered 3D text

Open this post in threaded view
|

## Re: Chamfered 3D text

Open this post in threaded view
|

## Re: Chamfered 3D text

Open this post in threaded view
|

## Re: Chamfered 3D text

Open this post in threaded view
|

## Re: Chamfered 3D text

 In reply to this post by alexgibson @GibsonI guess your second text call should have the same parameters as the first one: text_height instead of text_depth*2.Anyway, I think you will get the same result with a simpler code:module admg_chamfered_text1(some_text_here,text_height,text_depth,chamfer_depth,chamfer_width){  minkowski() {    linear_extrude(text_depth*2)      text(some_text_here,text_height,valign="center",halign="center");    cylinder(chamfer_depth,r1=chamfer_width,r2=0);  }}2018-02-06 21:12 GMT-02:00 Alex Gibson :Here’s my solution to the same problem, using Minkowski… _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: Chamfered 3D text

Open this post in threaded view
|

## Extrusion offset rather than taper

 In reply to this post by Whosawhatsis > The linear extrude function has a "scale" parameter that can scale one end > of the extrusion. It seems like a logical and useful addition to this > would be an "offset" parameter, that would do the same thing, but offset > the other end instead of scaling. It would solve this problem and many > others. I totally agree. For my sigil, which I intend to cast, I need all cut-out vertical walls to be slightly tapered, so that the final wax image does not break when the sigil is taken off. An offset parameter rather than a taper parameter would greatly help for detachable casting models. -- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: Extrusion offset rather than taper

 Yes, being able to offset an extrusion (such that each edge within the 2D polygon is offset relative to itself rather than from the shape's overall center c.f. how scale works) would be *very* useful. -- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: Extrusion offset rather than taper

 I am quite sure this has been discussed before but I couldn't find the thread. The idea was rejected (or perhaps postponed)  exactly because the issues that may arise from offset  An offset may change the number of vertices and the topology of a shape. A connected set may become disconnected and holes may disappear. As the proponent, Whosawwhatis, said: " Of course, it might take some consideration, obviously, to ensure that it correctly handles areas that become zero-thickness (or negative-thickness) when a negative value for offset it used, as well as ensuring that the resulting object remains manifold when areas merge or holes close up. This makes it more complicated to implement than the existing scale parameter, but I think it would be a worthwhile addition." 2018-02-07 11:57 GMT-02:00 RayBellis :Yes, being able to offset an extrusion (such that each edge within the 2D polygon is offset relative to itself rather than from the shape's overall center c.f. how scale works) would be *very* useful. -- Sent from: http://forum.openscad.org/ _______________________________________________ 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
Open this post in threaded view
|

## Re: Extrusion offset rather than taper

 In the area in which I work professionally, we call that "letting perfection be the enemy of the good". In other words, just because it might not work in all conceivable situations, doesn't mean it shouldn't be done. -- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: Chamfered 3D text

 In reply to this post by alexgibson ​Gibson said: " Rather than being the minkowski sum of the letters and a cone so that the top surface is the original letter, and letters get wider and with rounded corners, instead I’m using minkowski() to make the equivalent of a tool path to subtract from the letters – the chamfering reduces the top surface and the outer edges of letters are the original font. "Thank you, now I understood your code. It avoids to round "convex letter vertices" although the "concave vertices" are rounded what is less noticeable. Nice solution. _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: Extrusion offset rather than taper

Open this post in threaded view
|

## Re: Extrusion offset rather than taper

 This is something that could - in principle - be done in userspace if the font geometry information were available. I'm not sure how hard it would be to make a '2Drender()' or 'textgeometry()'.   Failing that, I guess you could scrape character geometry from postscript into a library. -- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: Extrusion offset rather than taper

 I think I'm getting the 'fins' from floating point rounding, and I have a workaround, but it's a bit of a chore to implement. roof.scad   beveleda.stl   -- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org