[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Schematic Capture to dxf File - using gEDA, Inkscape, and pstoedit



Hmmm... interesting.  I gave your post a quick skim, and will have to go back to read it in detail when I have more time.

A while back I created a flow to convert the paste layer to laser cutter code for the creation of solder paste stencils.  My path was:
1. print .ps from pcb
2. pstoedit to create a dxf file
3. minor adjustments in QCad, which has the side benefit of cleaning up pstoedit's cheezy .dxf file into something pretty clean.
4. my own code to convert .dxf to laser cutter vectors.  For a .dxf reader, I use the GPL'd dxflib that is part of QCad.

Note that the essential difference between your goal and my goal is which pcb layer we are starting with.  We both want gerber strokes converted into dxf outlines.

Re: your comments on strokes. In Postscript, you define a pen and and and end-cap style, and then stroke paths that have been created.  Now, in some ways, this is similar to gerbers where you define an aperture and stroke it.  In either case, you need to get the outline of the the path.

What I've always wanted to do for my stencil program is read the gerbers directly.  At the time I originally did my path, that wasn't practical, but the gerbv team has done a major rewrite since then, and in the process library-ified the gerber reader.  So.... I believe the best method for getting gerber to dxf now is:

1. Read gerber using the gerbv library
2. <insert magic here to create vector outlines of gerber strokes and flashes>
3. Write dxf using QCad's dxflib.

As to the "magic" part... perhaps the 2D constructive solid geometry (CSG) portions of the CGAL library or the OpenCascade library could be used to good effect.  I haven't looked deeply at either of them, but I've been skimming over the 3D portion of CGAL, and there you can do CSG unions of various globs and then ask for a mesh back for the hull.  I suspect if you poked around the 2D portion of the library you would find the equivalent functionality, ie: CSG unions of 2D shapes, and then ask for the outline back as vectors.  It's worth a look.  OpenCascade probably has something similar.

-dave

On Jan 19, 2010, at 8:56 PM, dfro@xxxxxxxxx wrote:

> Hey everyone,
> 
> I just created a thread on cnczone.com, which I want to bring to your attention. I titled it, "Schematic Capture to dxf File - using gEDA, Inkscape, and pstoedit":
> 
> http://www.cnczone.com/forums/showthread.php?t=97677
> 
> I think I have worked out a good software tool chain to create .dxf files for milling pcb's. It starts with the gEDA suite of software, uses Inkscape, and then pstoedit.
> 
> Please, let me know what you think.
> 
> Thanks,
> Dave
> 
> 
> _______________________________________________
> geda-user mailing list
> geda-user@xxxxxxxxxxxxxx
> http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
> 



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user