DXF : the format from HELL - Page 1
Forum section: electronics / general

author: free_electron
author_rank: Super Contributor
timestamp: December 23, 2015, 09:25:07 pm
content: I am frequently having problems with DXF format.Does anyone know of a good piece of software ( FREE , as in zero cost ). to do the following :- Specify the origin in a dxf file ( move the 0.0 point)- convert anything that is NOT a line (splines, polyllines, arcs, ellipticals, beziers ) to approximations using line segments.- blow away fontsi can do most of it using solidworks but even then it sometimes still fails as i don't know how to reset the origin of a dxf drawing.the problem is multifold- i get DXF files that exported from CAD programs that don't really write correct DXF to begin with.- there is oodles of variants of DXF and this causes additional problems, so these files come in different flavors.- in the end, all i need is a simple ,line segment only dxf file in old R12 format so i can load this as the board outline. any complex object such as polylines , splines ,curves are not understood by the PCb software . PCB software only know ARCS ( non elliptical arcs ) and line segments.I have no control over the generating software. i need a translator tool

author: KJDS
author_rank: Super Contributor
timestamp: December 23, 2015, 09:43:43 pm
content: You're right about DXF being a frustrating format. I suspect you won't find a tool that will do everything you want, probably your best bet would be to bring it into Autocad 2D or similar, put what you want onto a separate layer, delete everything else then employ someone cheap to construct your outline carefully on another layer and export that layer only.Alternatively, I have seen some wonderful tools created for use with Autocad using LISP.

author: janoc
author_rank: Super Contributor
timestamp: December 23, 2015, 10:02:27 pm
content: Yay, welcome to the world of CAD "standards" where every tool speaks its own variant of the format.Doesn't MeshLab handle DXF too? You may also want to try Blender or FreeCAD.

author: 0xdeadbeef
author_rank: Super Contributor
timestamp: December 23, 2015, 10:20:36 pm
content: You could giveQCADa try. I own the commercial "pro" version which is pretty cheap (33€) but there is also a free version.Conversion of complex objects (including text and splines) to lines is easily possible by "breaking up" the object. Creates a lot of lines though.Moving the origin is not directly possible, but you can move the complete drawing instead - which is essentially the same.Just select all and "cut with reference", then select the origin. Now simply paste at the new origin.

author: krish2487
author_rank: Frequent Contributor
timestamp: December 24, 2015, 04:05:47 pm
content: You could give draftsight a try.It is a zero cost alternative to autocad. It is based on the ARES commander.and yes, made by 3DS systems.

author: free_electron
author_rank: Super Contributor
timestamp: December 25, 2015, 12:48:45 am
content: Quote from: krish2487 on December 24, 2015, 04:05:47 pmIll take a look at that.Redrawing is out of the question.The problem is that the board i am working on is a very complex flex / rigid board. It was designed in catia, unfolded ( flattened) then the conour saved as dxf. This creates very complex curves. Most cad tools don't even understand those. The file loads fine in solidworks. Re-saving with the option to conert to polylines still creates curves. Camtastic can read those but cannot convert them to gerber or export them to pcb. Half of the lines disappear.I went aroun the problem by exporting a step file but that took over half an hour to load in solidworks, blow away what was n ot needed and resave so i could pull it into altium. That did work perfectly fine. From the step i could define the board outline including all holes in one mouseclick.But there has to be a simpler , faster way. In any case DXF is a bastard of a format. I never like autocad and any of the autodesk products. Convoluted , bass ackward software.I'm waiting for the parasolid plugin for altium. That'l solve a lot. Parasolid files are much smaller than step.

author: IconicPCB
author_rank: Super Contributor
timestamp: December 25, 2015, 01:38:48 pm
content: I can read in DXF and output Gerbers.Send a sample for a trial pass.

author: MT
author_rank: Super Contributor
timestamp: December 25, 2015, 07:43:05 pm
content: Quote from: free_electron on December 23, 2015, 09:25:07 pmThank you very much for bringing up childhood Mechanic to PCB design traumas!Back in the day( mid 90'es) we had so much problem with DXF format incompatibility we simply overruled company dictates andexported drawings into Postscript and later PDF when it became available using multiple software's and "in house" written formattranslators. So happy i dont have to be involved in DXF hell crap anymore ever again! I remember HPGL also made a stint in thatmess!What about detouring from one format to the other via several programs?http://bayareacircuits.com/pcb-creator/http://bayareacircuits.com/wp-content/uploads/2013/12/DXFtoGerberConversionGuide_rev2_12-10-13.pdf

author: station240
author_rank: Unknown
timestamp: February 01, 2016, 10:16:14 am
content: There used to be good software for converting between various 3d formats, which also did some 2D ones as well.One was 3D Exploration.I say used to be, as they messed it up by taking it from a cheap program everyone bought, to an expensive one with less usability.3D file formats are one area where it's really obvious the software industry need to grow up more. Imagine if cars and petrol pumps had different interpretations of how big the nozzle should be.

author: HAL-42b
author_rank: Frequent Contributor
timestamp: February 01, 2016, 10:27:55 am
content: Dassault's own DraftSight is free and is a full 2D CAD in its own right.It also works on Linux which is a major plus for me. Big improvement over QCAD.Exporting in .eps format in that package automatically converted the fonts into tessellated polygons. It is quite possible it does the same to curves.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: February 01, 2016, 11:07:04 am
content: +100000! DXF is the most nonstandard standard I've ever come across - a total mess.Every time I get a DXF from a client I need to either ask them to re-send in the most early/primitive format they can, or try feeding it (or the PDF they also sent) in random permutations through Inkscape, Qcad, Corel Draw and/or Camtastic and hping the scale doesn't get mangled.Inkscape often borks and suggests feeding through QCad & saving as an early version, but Qcad doesn't seem to offer this option ( is this a paid-for feature?)OK I use old PCB software (PCAD2006) but it's way more trouble than it ought to be.In most cases all I need is to get it in as a template to then place parts over it & generate board outlines etc.A problem is I don't do it often enough to remember what works. I think I managed to break up Polylines somehow last time but splines are often a problem.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 01, 2016, 11:14:35 am
content: Regarding PCB layout, I've never had a problem as I've always had 3D STEP files import okay. Guessing that's not much help though...Tim

author: HighVoltage
author_rank: Super Contributor
timestamp: February 01, 2016, 11:33:56 am
content: I am dealing a lot with DXF as well it it is not fun from time to timeDepending on the problems, I have found the following tools to work well:ProgeCADCorelDrawAutoCAD LT(But sorry, no free tools that I know of)Sometimes it helps to fix a problem, by importing the DXF into Solidworks, then save it in to a different format, open it again and save it as a new DXF. Sometimes I am surprised that it still works.From time to time I am getting now Chinese versions of DXF files and they are more evil that any other I have seen and require several programs to get them to work in SolidWorks for instance.

author: 0xdeadbeef
author_rank: Super Contributor
timestamp: February 01, 2016, 06:26:37 pm
content: Quote from: mikeselectricstuff on February 01, 2016, 11:07:04 amThe free community edition of QCad can only read/write DXF R15. The 33€ "Professional" version uses a Teigha plugin which allows reading/writing a large variety of DXF/DWG formats.IMHO, this and the better SVG export alone are a good reason to buy the Pro version.All the features/differences are shown here:http://qcad.org/en/qcad-documentation/qcad-features