Autocad DXF format import/export

Bug #170440 reported by Khiraly-users
16
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Wishlist
Squires

Bug Description

Hi!

Enhancement:
It would be really nice that inkscape could open .dxf
files and export to .svg files. Many CAD application
can only export to dxf as common format.
(adobe illustrator can open .dxf)

Best regards,
 Khiraly

Revision history for this message
Rickbeton (rickbeton) wrote :
Revision history for this message
Rickbeton (rickbeton) wrote :

See also http://dxlib.sf.net
(http://sourceforge.net/projects/dxflib) which might make
the implementation easier.

dxlib is an open source C++ library mainly for parsing DXFTM
files. QCad, CAM Expert and vec2web all use dxflib to import
DXF files. dxflib can also write DXF files, but you need to
have good knowledge of the DXF format to produce valid
output. GPL.

Revision history for this message
Horkana-users (horkana-users) wrote :

expanding this report to include both import and export so I
can close duplicate request.

Revision history for this message
Dudenas (dudenas) wrote :

DO IT!!!

Revision history for this message
Bug Importer (bug-importer) wrote :

I would be nice if Inkscape could open .dxf files and .gsd files. At the
very least, Inkscape should open the .dxf files it creates.

Thanks,
Ritta

vonHalenbach (lustik)
Changed in inkscape:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Jenő Berda (bigbilly) wrote :

I want to ask for the functionality to open or import DXF files too not just save. As I know the description of the format is open and it could be very useful for students starting to design small projects in electricity field.

Thank you!
Jenő

Revision history for this message
Mads Boserup Lauritsen (madsbola) wrote :

Hi

As an architect / urban planner it is essential to illustrate and paint the vector graphics created in a CAD-program.

AutoCad/IntelliCad can save the dxf-format but the only way of getting around this format and convert it to SVG, I found through OpenOffice Draw. (There are commercial programs that does the same)

It works quite fine, but I'm not sure if this is the optimal solution..

It would make Inkscape more interesting for business use (therefore donations) in the urban planning business, if import of DXF would be implemented in coming up releases of Inkscape.

Best regards,

Mads Boserup Lauritsen,
Denmark

Revision history for this message
Alvin Penner (apenner) wrote :

I'm working on it, I hope to have a preliminary prototype ready by Christmas ...
Alvin

Revision history for this message
Alexandre Prokoudine (alexandre-prokoudine) wrote :

@Alvin

May I hope that you work on it with UniConvertor and Vectorsection guys, who are up to same task?

Revision history for this message
Alvin Penner (apenner) wrote :

yes, I've seen the website for Vectorsection and I have the code for Uniconvertor and dxflib which QCad is based on. I'll definitely keep track of how these projects are progressing.
   What I would like to do is a very 'limited scope' project similar to the existing dxf cutting plotter output, enough to catch all the straightforward cases that are easily convertible from dxf to svg.

Revision history for this message
Andrew P. (japoth) wrote :

As a minimum, in the first attempt, Inkscape should be able to import LINE, POLYLINE, CIRCLE, ARC and POINT entities from a DXF file, even though color, linetype and line width information might be lost. Preserving layer information would be a big help, though not essential for a first cut. Just getting the shape geometries into Inkscape would be a tremendous help, as those could then be used for reconstructing solid shapes. I've written programs that output subsets of ASCII DXF files with just these capabilities, and that's usually been sufficient to get the job done. Also, consider being able to handle earlier versions of DXF files, back to AutoCAD Release 10 for DOS, as there are quite a few software packages that don't output the latest DXF versions.

Revision history for this message
Alvin Penner (apenner) wrote :

a proposal for .dxf input has been submitted at Bug 293940

any feedback would be greatly appreciated

Revision history for this message
Alvin Penner (apenner) wrote :

committed to svn at rev 20154

Revision history for this message
BostiG (bostjan-golez) wrote :

HI!

I tested. Works fine with points and labels by points. But it doesn't work with lines; I can not see (import) lines in Inkscape.

Regards

Revision history for this message
Alvin Penner (apenner) wrote :

could you submit a sample dxf file that illustrates the problem?

Revision history for this message
BostiG (bostjan-golez) wrote : Re: [Bug 170440] Re: Autocad DXF format import/export

HI!

This is example.

Regards,
Bostjan

On Wed, Dec 17, 2008 at 4:18 AM, Alvin Penner <email address hidden> wrote:

> could you submit a sample dxf file that illustrates the problem?
>
> --
> Autocad DXF format import/export
> https://bugs.launchpad.net/bugs/170440
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Inkscape: A Vector Drawing Tool: Confirmed
>
> Bug description:
> Hi!
>
> Enhancement:
> It would be really nice that inkscape could open .dxf
> files and export to .svg files. Many CAD application
> can only export to dxf as common format.
> (adobe illustrator can open .dxf)
>
> Best regards,
> Khiraly
>

--
---------------------------------------
http://golez.wordpress.com
http://www.pddramlje.si

Revision history for this message
Alvin Penner (apenner) wrote :

yes, I can see the problem. I think I can probably come up with a solution, but it may take a few weeks to get around to implementing it. I will report back here if I have a new result to report.

Revision history for this message
BostiG (bostjan-golez) wrote :

Thank you.

Regards,
Bostjan

On Wed, Dec 17, 2008 at 12:30 PM, Alvin Penner <email address hidden> wrote:

> yes, I can see the problem. I think I can probably come up with a
> solution, but it may take a few weeks to get around to implementing it.
> I will report back here if I have a new result to report.
>
> --
> Autocad DXF format import/export
> https://bugs.launchpad.net/bugs/170440
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Inkscape: A Vector Drawing Tool: Confirmed
>
> Bug description:
> Hi!
>
> Enhancement:
> It would be really nice that inkscape could open .dxf
> files and export to .svg files. Many CAD application
> can only export to dxf as common format.
> (adobe illustrator can open .dxf)
>
> Best regards,
> Khiraly
>

--
---------------------------------------
http://golez.wordpress.com
http://www.pddramlje.si

Revision history for this message
Alvin Penner (apenner) wrote :

okay, three issues were encountered :
- first, the linewidth was getting scaled down so low that it was zero.
- fixed in svn rev 20386, new file is attached here

Revision history for this message
Alvin Penner (apenner) wrote :

- second the file soci_mapi.dxf is in AutoCAD Release 12, which this extension does not support, only Release 13 and newer.
- third this file uses Blocks, which this extension does not support.

the workaround is to use QCad which is available from http://www.ribbonsoft.com/ as a free time-limited demo.

to convert the file use the procedure :
- load into QCad, choose menu item Select | Select All
- choose menu item Block | Explode
- save file, default format will be Release 13
- resulting file is attached

Revision history for this message
Alvin Penner (apenner) wrote :

load this dxf file into Inkscape to get this svg.

hth
Alvin

Revision history for this message
Alvin Penner (apenner) wrote :

    To the best of my knowledge, these issues have been resolved in the development version of Inkscape.
    If there is no objection, I am going to mark this as Fix Released.
    If you feel that there are still unresolved issues, please feel free to open a new bug report, or re-open this one.

Changed in inkscape:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.