3D model for stamp fabrication

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

3D model for stamp fabrication

Fram
I'm trying to create 3D model to print a stamp. I started with Inkscape SVG
file with some text converted in single path in it. Then I convert it into
DXF format with plugin for Inkscape. Then I import it into OpenSCAD and
extrude the stamp. The problem is that the stamp should have a cone-like
shape. The letters must become thick at the bottom. I did't find the way to
this using extrude command so I sliced the model into a set of layers and
applied different offset values to each layer. But the result has a lot of
artifacts. Is there another way to do it instead of slicing?

for(i=[0:30]){
    translate( [0, 0, 0.7*i/30] )
linear_extrude(height = 0.7/30, convexity = 10,scale=1,slices = 1)
offset(r = 0.2*i/30)
   
import(file = "drawing1.dxf",center = true,scale=1.5);
}
translate( [-2,-2,0.7] )
cube(size = [50,50,0.2]);

Here is the DXF file that I used https://cloud.mail.ru/public/3kaU/3w7h3czN1

<http://forum.openscad.org/file/t2613/2.png>




--
Sent from: http://forum.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
|

Re: 3D model for stamp fabrication

frankv
Change the scale value in linear_extrude to something other than 1.  https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/2D_to_3D_Extrusion#Scale


On Tue, Jul 30, 2019 at 2:11 PM Fram <[hidden email]> wrote:
I'm trying to create 3D model to print a stamp. I started with Inkscape SVG
file with some text converted in single path in it. Then I convert it into
DXF format with plugin for Inkscape. Then I import it into OpenSCAD and
extrude the stamp. The problem is that the stamp should have a cone-like
shape. The letters must become thick at the bottom. I did't find the way to
this using extrude command so I sliced the model into a set of layers and
applied different offset values to each layer. But the result has a lot of
artifacts. Is there another way to do it instead of slicing?

for(i=[0:30]){
    translate( [0, 0, 0.7*i/30] )
linear_extrude(height = 0.7/30, convexity = 10,scale=1,slices = 1)
offset(r = 0.2*i/30)

import(file = "drawing1.dxf",center = true,scale=1.5);
}
translate( [-2,-2,0.7] )
cube(size = [50,50,0.2]);

Here is the DXF file that I used https://cloud.mail.ru/public/3kaU/3w7h3czN1

<http://forum.openscad.org/file/t2613/2.png>




--
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
Reply | Threaded
Open this post in threaded view
|

Re: 3D model for stamp fabrication

Fram
Unfortunately scale works with respect to single point in the model. This
leads to distortion (see the attached picture).
<http://forum.openscad.org/file/t2613/3.png>



--
Sent from: http://forum.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
|

Re: 3D model for stamp fabrication

frankv
If you do a linear_extrude of each letter separately, you may be able to control the distortion adequately?

On Tue, 30 Jul 2019, 17:13 Fram, <[hidden email]> wrote:
Unfortunately scale works with respect to single point in the model. This
leads to distortion (see the attached picture).
<http://forum.openscad.org/file/t2613/3.png>



--
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
Reply | Threaded
Open this post in threaded view
|

Re: 3D model for stamp fabrication

nophead
Perhaps minkowski with a cone. Probably slow but I think it should work.

On Tue, 30 Jul 2019 at 07:19, Frank van der Hulst <[hidden email]> wrote:
If you do a linear_extrude of each letter separately, you may be able to control the distortion adequately?

On Tue, 30 Jul 2019, 17:13 Fram, <[hidden email]> wrote:
Unfortunately scale works with respect to single point in the model. This
leads to distortion (see the attached picture).
<http://forum.openscad.org/file/t2613/3.png>



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

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

Re: 3D model for stamp fabrication

Fram
Not at all. The scale has a different effect. The inner parts of the letters
will also lean outward. I'd like them to lean in. More like an offset
action.



--
Sent from: http://forum.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
|

Re: 3D model for stamp fabrication

cbernhardt
Reply | Threaded
Open this post in threaded view
|

Re: 3D model for stamp fabrication

Fram
Similar. The only difference is that the letters should have an initial
thickness at the top and expand to the bottom.



--
Sent from: http://forum.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
|

Re: 3D model for stamp fabrication

acwest
In reply to this post by nophead
As far as I can tell, Minkowski with a cone is about the only easy way to do it

On Tue, 30 Jul 2019, 02:29 nop head, <[hidden email]> wrote:
Perhaps minkowski with a cone. Probably slow but I think it should work.

On Tue, 30 Jul 2019 at 07:19, Frank van der Hulst <[hidden email]> wrote:
If you do a linear_extrude of each letter separately, you may be able to control the distortion adequately?

On Tue, 30 Jul 2019, 17:13 Fram, <[hidden email]> wrote:
Unfortunately scale works with respect to single point in the model. This
leads to distortion (see the attached picture).
<http://forum.openscad.org/file/t2613/3.png>



--
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
_______________________________________________
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
|

Re: 3D model for stamp fabrication

OpenSCAD mailing list
In reply to this post by Fram

Apparently, there's a "thingi" out there that does what you require!

">

OpenSCAD based of course.
On Monday, July 29, 2019, 10:11:58 PM EDT, Fram <[hidden email]> wrote:


I'm trying to create 3D model to print a stamp. I started with Inkscape SVG
file with some text converted in single path in it. Then I convert it into
DXF format with plugin for Inkscape. Then I import it into OpenSCAD and
extrude the stamp. The problem is that the stamp should have a cone-like
shape. The letters must become thick at the bottom. I did't find the way to
this using extrude command so I sliced the model into a set of layers and
applied different offset values to each layer. But the result has a lot of
artifacts. Is there another way to do it instead of slicing?

for(i=[0:30]){
    translate( [0, 0, 0.7*i/30] )
linear_extrude(height = 0.7/30, convexity = 10,scale=1,slices = 1)
offset(r = 0.2*i/30)
   
import(file = "drawing1.dxf",center = true,scale=1.5);
}
translate( [-2,-2,0.7] )
cube(size = [50,50,0.2]);

Here is the DXF file that I used https://cloud.mail.ru/public/3kaU/3w7h3czN1





--

_______________________________________________
OpenSCAD mailing list

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

1564494049262blob.jpg (295K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: 3D model for stamp fabrication

OpenSCAD mailing list
In reply to this post by Fram
An update on the previously posted link to the Thingiverse chamfered text
generator.

It accepts font names not listed in the file, as long as they are installed
on your computer.
You can get "mirrored" text required for a stamp by entering a scale number
less than one.
Doing so removes the binding plate from the bottom of the letters and also
spaces out the letters, but you can adjust kerning in the file. For the
binding plate, one simply adds a flat cube at the appropriate location. The
original binding plate should be neutralized by zeroing out that value in
the cod.

I don't have the smarts to analyze the creator's code, but the one negative
that jumps out is that a dot on a period is going to be on a slanted stalk,
a not particularly strong structure in the 3D printed world, but also one
that could be manually modified with some experimentation.



--
Sent from: http://forum.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
|

Re: 3D model for stamp fabrication

Fram
This script also use SCALE so the result is not what I need. As you can see
in the pictures bellow all walls are outward
<http://forum.openscad.org/file/t2613/3.png>  

I will try Minkowsky



--
Sent from: http://forum.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
|

Re: 3D model for stamp fabrication

cbernhardt
More like this?

<http://forum.openscad.org/file/t1309/russian2.jpg>



--
Sent from: http://forum.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
|

Re: 3D model for stamp fabrication

Fram
Yes, like this.



--
Sent from: http://forum.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
|

Re: 3D model for stamp fabrication

cbernhardt
I could not figure out how to do it inside OpenSCAD so I did it in AutoCAD.
I traced the letters in AutoCAD and created polylines of the outlines of the
letters.
Then I offset the polylines and moved the offset polylines up (+Z) by 3mm or
whatever letter height I needed.  Many years ago I wrote a routine in
AutoCAD that produces a TIN (Triangulated Irregular Network, similar to a
Delaunay triangulation) which creates 3DFACEs like what you have in an STL
file.  I used this routine to create a TIN of the letter.   I also wrote a
routine that produces an STL file from the TIN.

Are the letters in your DXF file all that you need or do you need an entire
alphabet?
If an entire alphabet, do you have a Truetype font file of the alphabet?
I can create STL files of each letter if that would help you.

The “curved” parts of the letters in your DXF file are made of rather long
line segments that I can also “smooth” if you wish (see attachment).
Send me an email if interested.
Charles

<http://forum.openscad.org/file/t1309/russian5.jpg>



--
Sent from: http://forum.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
|

Re: 3D model for stamp fabrication

adrianv
I wrote an offset() function that operates on a list of coordinates.  Using
this function you can compute the offset and place the offset points at a
different z, and then use polyhedron to link everything together.    It's
sort of messy, though, because of all the internal holes in text.  And you
have to have your data in OpenSCAD as a list of values, not as geometry.  
It runs in 0s, so no time issues.  

<http://forum.openscad.org/file/t2477/star1.png>
<http://forum.openscad.org/file/t2477/star2.png>

Here's a code example:

include<BOSL2/std.scad>

outside = reverse(star(d=10, id=5, n=7));  
inside = offset(outside, delta=-1, closed=true);

shrink_outside = offset(outside, delta=-.4, closed=true, return_faces=true);
grow_inside = offset(inside, delta=0.4, closed=true, return_faces=true);

outside_pts = concat(path3d(outside,0),path3d(shrink_outside[0],1));
inside_pts = concat(path3d(inside,-.01), path3d(grow_inside[0],1.01));

outside_faces = concat(shrink_outside[1],
[reverse(list_range(len(outside)))],
                       [add_scalar(list_range(len(outside)),len(outside))]);
inside_faces = concat(grow_inside[1], [reverse(list_range(len(outside)))],
                       [add_scalar(list_range(len(outside)),len(outside))]);

difference(){
  polyhedron(points = outside_pts, faces = outside_faces,convexity=10);
  polyhedron(points = inside_pts, faces = inside_faces,convexity=10);
}


Hmmm.  With minkowski() it's going to be hard (impossible?) to avoid
rounding over the source geometry.  I took a stab at that, continuing my
example above.

$fn=32;
minkowski(){
  linear_extrude(height=.01)
    offset(delta=-.4)
      difference(){
        polygon(outside);
        polygon(inside);
    }
  cylinder(r2=.2,r1=.5, h=1);
}

So that gives rounded edges and takes 16 seconds to run.   Actually I had in
my head that I was trying to shrink the shape from the given shape, but
maybe I have it backwards and you want to grow the shape?   I also don't
know if you want or don't want rounding.   (The above solution can produce
rounding if you want it, but it needs to be reworked to grow the shape
rather than shrink it, or the rounding is on the inside.)  

$fn=32;
minkowski(){
  linear_extrude(height=.01)
      difference(){
        polygon(outside);
        polygon(inside);
    }
  cylinder(r2=.2,r1=0, h=1);
}

<http://forum.openscad.org/file/t2477/star3.png>

That's faster, taking 8s.





--
Sent from: http://forum.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
|

Re: 3D model for stamp fabrication

Ronaldo


That's faster, taking 8s.
 
Yes, it is fast for a few polygon points. The following code using the primitive text() takes 2 min in my computer:

h = 2;          // letter height
s = 6;          // leter size
slope = 7;      // cone slope
$fn = 12;       // slope cone resolution
text = "Abcd";  // text content and font
font = "Segoe Script";

minkowski() {
  cylinder(r1=h/slope,r2=0,h=h);
  linear_extrude(height=0.01)
    text(text,font = font, size=s);
}

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Stamp.PNG (30K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: 3D model for stamp fabrication

adrianv
Perhaps I wasn't clear:  I was alarmed that it took 8s with just the simple
star polygon.  It suggested that real text might take an unpleasantly long
time.   Though I have suffered with a model that takes 15 minutes, so I
suppose slow doesn't mean you can't do it.   My solution by constructing a
polyhedron from a computed offset is much faster.  But you need access to
the coordinates of the path.  


Ronaldo wrote

> That's faster, taking 8s.
>>
>
> Yes, it is fast for a few polygon points. The following code using the
> primitive text() takes 2 min in my computer:
>
> h = 2;          // letter height
> s = 6;          // leter size
> slope = 7;      // cone slope
> $fn = 12;       // slope cone resolution
> text = "Abcd";  // text content and font
> font = "Segoe Script";
>
> minkowski() {
>   cylinder(r1=h/slope,r2=0,h=h);
>   linear_extrude(height=0.01)
>     text(text,font = font, size=s);
> }
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
>
> Stamp.PNG (30K)
> &lt;http://forum.openscad.org/attachment/27093/0/Stamp.PNG&gt;





--
Sent from: http://forum.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
|

Re: 3D model for stamp fabrication

Fram
In reply to this post by cbernhardt
In general, I want this to work for any 2D geometry, not just text. I need to
convert vector graphics into printing plates.


cbernhardt wrote

> Are the letters in your DXF file all that you need or do you need an
> entire
> alphabet?
> If an entire alphabet, do you have a Truetype font file of the alphabet?
> I can create STL files of each letter if that would help you.
>
>
> &lt;http://forum.openscad.org/file/t1309/russian5.jpg&gt; 
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org





--
Sent from: http://forum.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
|

Re: 3D model for stamp fabrication

cbernhardt
Fram wrote
> In general, I want this to work for any 2D geometry, not just text. I need
> to
> convert vector graphics into printing plates.

Renaldo's Minkowski method will also work with an extruded DXF file.  The
attached picture is an example taken from your DXF file.  A much more
elegant solution than my approach.  Just hope you have a fast computer.
<http://forum.openscad.org/file/t1309/russian6.jpg>




--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org