Author Topic: DXF : the format from HELL  (Read 8424 times)

0 Members and 1 Guest are viewing this topic.

Offline free_electronTopic starter

  • Super Contributor
  • ***
  • Posts: 8550
  • Country: us
    • SiliconValleyGarage
DXF : the format from HELL
« on: December 23, 2015, 09:25:07 pm »
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 fonts

i 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

Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline KJDS

  • Super Contributor
  • ***
  • Posts: 2442
  • Country: gb
    • my website holding page
Re: DXF : the format from HELL
« Reply #1 on: December 23, 2015, 09:43:43 pm »
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.


Offline janoc

  • Super Contributor
  • ***
  • Posts: 3908
  • Country: de
Re: DXF : the format from HELL
« Reply #2 on: December 23, 2015, 10:02:27 pm »
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.

 

Offline 0xdeadbeef

  • Super Contributor
  • ***
  • Posts: 1580
  • Country: de
Re: DXF : the format from HELL
« Reply #3 on: December 23, 2015, 10:20:36 pm »
You could give QCAD a 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.
Trying is the first step towards failure - Homer J. Simpson
 

Offline krish2487

  • Frequent Contributor
  • **
  • Posts: 545
  • Country: dk
Re: DXF : the format from HELL
« Reply #4 on: December 24, 2015, 04:05:47 pm »
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.

If god made us in his image,
and we are this stupid
then....
 

Offline free_electronTopic starter

  • Super Contributor
  • ***
  • Posts: 8550
  • Country: us
    • SiliconValleyGarage
Re: DXF : the format from HELL
« Reply #5 on: December 25, 2015, 12:48:45 am »
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.
Ill 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.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline IconicPCB

  • Super Contributor
  • ***
  • Posts: 1552
  • Country: au
Re: DXF : the format from HELL
« Reply #6 on: December 25, 2015, 01:38:48 pm »
I can read in DXF and output Gerbers.
Send a sample for a trial pass.
 

Offline MT

  • Super Contributor
  • ***
  • Posts: 1676
  • Country: aq
Re: DXF : the format from HELL
« Reply #7 on: December 25, 2015, 07:43:05 pm »
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 :
- convert anything that is NOT a line (splines, polyllines, arcs, ellipticals, beziers ) to approximations using line segments.
- blow away fonts
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

I have no control over the generating software. i need a translator tool

Thank 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 and
exported drawings into Postscript and later PDF when it became available using multiple software's and "in house" written format
translators. So happy i dont have to be involved in DXF hell crap anymore ever again! I remember HPGL also made a stint in that
mess!

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
« Last Edit: December 25, 2015, 08:04:35 pm by MT »
 

Offline station240

  • Supporter
  • ****
  • Posts: 967
  • Country: au
Re: DXF : the format from HELL
« Reply #8 on: February 01, 2016, 10:16:14 am »
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.
 

Offline HAL-42b

  • Frequent Contributor
  • **
  • Posts: 423
Re: DXF : the format from HELL
« Reply #9 on: February 01, 2016, 10:27:55 am »
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.
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 14060
  • Country: gb
    • Mike's Electric Stuff
Re: DXF : the format from HELL
« Reply #10 on: February 01, 2016, 11:07:04 am »
+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.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: DXF : the format from HELL
« Reply #11 on: February 01, 2016, 11:14:35 am »
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
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline HighVoltage

  • Super Contributor
  • ***
  • Posts: 5551
  • Country: de
Re: DXF : the format from HELL
« Reply #12 on: February 01, 2016, 11:33:56 am »
I am dealing a lot with DXF as well it it is not fun from time to time
Depending on the problems, I have found the following tools to work well:

ProgeCAD
CorelDraw
AutoCAD 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.
 
There are 3 kinds of people in this world, those who can count and those who can not.
 

Offline 0xdeadbeef

  • Super Contributor
  • ***
  • Posts: 1580
  • Country: de
Re: DXF : the format from HELL
« Reply #13 on: February 01, 2016, 06:26:37 pm »
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?)
The 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
Trying is the first step towards failure - Homer J. Simpson
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf