delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2017/08/29/06:23:30

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Date: Tue, 29 Aug 2017 12:24:34 +0200 (CEST)
X-X-Sender: igor2 AT igor2priv
To: geda-user AT delorie DOT com
X-Debug: to=geda-user AT delorie DOT com from="gedau AT igor2 DOT repo DOT hu"
From: gedau AT igor2 DOT repo DOT hu
Subject: [geda-user] [pcb-rnd] working DXF exporter commited - anyone interested in an
importer?
Message-ID: <alpine.DEB.2.00.1708290851470.27212@igor2priv>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
MIME-Version: 1.0
Reply-To: geda-user AT delorie DOT com

Hi all,

1. What we have from now

pcb-rnd got a new dxf exporter. It exports the outline, plated drills, 
unplated drills, top copper, bottom copper, top silk and bottom silk; each 
of these in their own separate dxf layer. It is capable of exporting 
lines, arcs, holes, polygons (and this includes elements, texts, pins, 
pads, etc.).

The goal is not to provide a 100% reliable storage of PCB data, but 
to communicate with mechanical engineers who are interested in board 
dimensions and location of mounting holes.

THe code is very young yet; known bugs are:

- lines are round cap, so SMD pads will get rounded too (it would be 
relatively easy to fix that, but I first want to gauge user demand)

- it seems some implementations don't draw the solid fill hatch areas, I 
will probably draw a thin outline around them (will be a 10 minutes fix)

- filled circle (pin/via ring) is not really filled yet (will be trivial 
to fix).

A sample board in the native .lht format, exported to the old .pcb format 
and .dxf and a png rendered with librecad:

http://igor2.repo.hu/tmp/dxf/

The new feature is accessible from svn trunk; the next release in October 
will include it.

We've tested the output with librecad, freecad, solid works and aspire.

2. what we could have later - dxf importer, anyone interested?

In theory I could also write a basic, somewhat limited, strictly 2d dxf 
importer, if there's measurable active user demand (including will to 
contribute sample files on request).

This could be used for the other direction, when the mech eng designs the 
shape of the board and the location of the main components (e.g. 
connectors) and you want to import that for laying out the board around.


3. how it happened (full code rewrite)

This code is brand new. It does not depend on any external library. I 
started to write it from scratch yesterday. We used to have Bert's dxf 
HID, but that did not yield working output and it was large (4980 sloc vs. 
the new code that's only 520 sloc).

Before anyone says "not invented here syndrome": it took 5 and a half 
hours total, including the time I spent on understanding the basics of 
librecad and the dxf file format. I am sure fixing the ~5ksloc code would 
have taken a magnitude more. Learning the API of some largish dxf lib 
would have taken even longer. And the result wouldn't have been much 
better.

4. where to get it, how to try it

svn checkout svn://repo.hu/pcb-rnd/trunk

./configure --buildin-export_dxf

make

cd src && ./pcb-rnd


Testing & feedback are welcome.


Regards,

Igor2

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019