Problems with DXF export

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

Problems with DXF export

Chris Wundram
I'm trying to use the Export to DXF feature and I am having problems
with the results.  When you try to open the file with any of the CAD
programs I've tried (AutoCAD. DraftSight, and CorelDraw) I get a
message that the DXF is invalid and can't be read.  In fact the only
thing I was able to open the DXF with was InkScape.  Does anyone know
of a workaround for this that will let me use the DXF files?  Right
now I have to open it in inkscape, save it to PDF, open the PDF in
Corel Draw, and then save that as a DXF, and then open that in
AutoCad, which works, but it converts all of the polylines into
splines.

Reply | Threaded
Open this post in threaded view
|

Re: Problems with DXF export

clothbot
Which OS and version of OpenSCAD?  Are you able to share the OpenSCAD source file in question?

Andrew.

On 2011-05-11, at 3:55 PM, Chris Wundram wrote:

I'm trying to use the Export to DXF feature and I am having problems
with the results.  When you try to open the file with any of the CAD
programs I've tried (AutoCAD. DraftSight, and CorelDraw) I get a
message that the DXF is invalid and can't be read.  In fact the only
thing I was able to open the DXF with was InkScape.  Does anyone know
of a workaround for this that will let me use the DXF files?  Right
now I have to open it in inkscape, save it to PDF, open the PDF in
Corel Draw, and then save that as a DXF, and then open that in
AutoCad, which works, but it converts all of the polylines into
splines.
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad

--

Makerbot Number Nine... #9... 0x09... 0o11... 0b1001... 
http://clothbot.com/wiki/MakerBotNumberNine



Reply | Threaded
Open this post in threaded view
|

Re: Problems with DXF export

Chris Wundram
In reply to this post by Chris Wundram
>Which OS and version of OpenSCAD?  Are you able to share the OpenSCAD source file in question?


I used 11.04 on Windows 7 32bit.  For a sample, if I use the following
one-line openscad program

square(size=10);

It will generate the following DXF file, which does not load.  I've
been playing around with this, and it looks line changing $ACADVER
from AC1015 to AC1009 will get the files to load in draftsight.  I
will try it with AutoCad tonight.


----<snip>----
  0
SECTION
  2
HEADER
  9
$ACADVER
  1
AC1015
  0
ENDSEC
  0
SECTION
  2
BLOCKS
  0
ENDSEC
  0
SECTION
  2
ENTITIES
  0
LWPOLYLINE
  8
0
  90
5
  70
1
 10
0.000000
 20
0.000000
 10
0.000000
 20
10.000000
 10
10.000000
 20
10.000000
 10
10.000000
 20
0.000000
 10
0.000000
 20
0.000000
  0
ENDSEC
  0
SECTION
  2
OBJECTS
  0
DICTIONARY
  0
ENDSEC
  0
EOF

Reply | Threaded
Open this post in threaded view
|

Re: Problems with DXF export

myglc2
In reply to this post by clothbot
I had similar problems with an earlier release of openSCAD but they seem resolved in the latest Mac version (11.04 I think). I can recommend CADuntu for opening dxf's
George
By mobile - please 4give typos

On May 11, 2011, at 4:31 PM, Andrew Plumb <[hidden email]> wrote:

Which OS and version of OpenSCAD?  Are you able to share the OpenSCAD source file in question?

Andrew.

On 2011-05-11, at 3:55 PM, Chris Wundram wrote:

I'm trying to use the Export to DXF feature and I am having problems
with the results.  When you try to open the file with any of the CAD
programs I've tried (AutoCAD. DraftSight, and CorelDraw) I get a
message that the DXF is invalid and can't be read.  In fact the only
thing I was able to open the DXF with was InkScape.  Does anyone know
of a workaround for this that will let me use the DXF files?  Right
now I have to open it in inkscape, save it to PDF, open the PDF in
Corel Draw, and then save that as a DXF, and then open that in
AutoCad, which works, but it converts all of the polylines into
splines.
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad

--

Makerbot Number Nine... #9... 0x09... 0o11... 0b1001... 
http://clothbot.com/wiki/MakerBotNumberNine



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

Re: Problems with DXF export

kintel
Administrator
In reply to this post by Chris Wundram
Hi,

It looks like we were missing the TABLES section for DXF files. Apparently, this is required by AutoCAD 2000 and later.
I've tried to fix this and have attached the current output from OpenSCAD for your test file.
Could you check if this works for you?

-Marius






square.dxf (700 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Problems with DXF export

Chris Wundram
Didn't work.  I was able to get it into autocad by working on the file
a bit (changed the version in notepad++ and then loaded it into
draftsight and saved it as a dxf), and then I saved it out again from
autocad in the most basic DXF format.  This is the output.



On Thu, May 19, 2011 at 6:05 AM, Marius Kintel <[hidden email]> wrote:

> Hi,
>
> It looks like we were missing the TABLES section for DXF files. Apparently, this is required by AutoCAD 2000 and later.
> I've tried to fix this and have attached the current output from OpenSCAD for your test file.
> Could you check if this works for you?
>
> -Marius
>
>
>
>
>
>
>

square4.dxf (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Problems with DXF export

kintel
Administrator
Hi,

I've reverted the DXF export to the old behavior. This is tested to work both for AutoCAD and Solidworks.
The drawback is that I had to kill support for LWPOLYLINE. This can be fixed in the future by using an external DXF library to export DXF files.

 -Marius