View Issue Details

IDProjectCategoryView StatusLast Update
0001584Draftpublic2014-07-20 16:07
Reporteretojpi Assigned Toyorik  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target Version0.15Fixed in Version0.15 
Summary0001584: Import DXF failure
DescriptionThe DXF import library fails to load a certain DXF file. Report view:

Draft workbench activated
DXF libraries not found. Downloading...
downloading https://raw.github.com/yorikvanhavre/Draft-dxf-importer/master/dxfColorMap.py ...
downloading https://raw.github.com/yorikvanhavre/Draft-dxf-importer/master/dxfImportObjects.py ...
downloading https://raw.github.com/yorikvanhavre/Draft-dxf-importer/master/dxfLibrary.py ...
downloading https://raw.github.com/yorikvanhavre/Draft-dxf-importer/master/dxfReader.py ...
opening /home/user/Documents/b2x0_enclosure/B210_PLATE_REV1.2_101113 NER.dxf...
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/freecad/Mod/Draft/importDXF.py", line 1318, in open
    processdxf(doc,filename)
  File "/usr/lib/freecad/Mod/Draft/importDXF.py", line 880, in processdxf
    drawing = dxfReader.readDXF(filename)
  File "/home/user/.FreeCAD/dxfReader.py", line 375, in readDXF
    obj.data = objectify(obj.data)
  File "/home/user/.FreeCAD/dxfImportObjects.py", line 1312, in objectify
    objects.append(type_map[item.type](item))
  File "/home/user/.FreeCAD/dxfImportObjects.py", line 938, in __init__
    discard, self.layer, discard_index = get_layer(obj.data)
  File "/home/user/.FreeCAD/dxfImportObjects.py", line 1278, in get_layer
    if item[0] == 8:
<type 'exceptions.AttributeError'>: Object instance has no attribute '__getitem__'
Steps To Reproduce1) Go to Draft workbench
2) Open file: "B210_PLATE_REV1.2_101113 NER.dxf"
3) Import fails
Additional InformationDXF file was too big to attach. It can be downloaded from Ettus Research here:
http://files.ettus.com/b2x0_enclosure/
http://files.ettus.com/b2x0_enclosure/b2x0_r1-4_plate_rev1.2_101113_ner.zip

The ZIP file contains a DXF and PDF file for faceplates for an electronic device enclosure.

FreeCAD info:

OS: Ubuntu 14.04 LTS
Platform: 64-bit
Version: 0.14.2935 (Git)
Branch: master
Hash: eab159b6ee675012bf79de838c206a311e911d85
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
SoQt version: 1.6.0a
OCC version: 6.7.0
TagsNo tags attached.
FreeCAD Information

Relationships

has duplicate 0001583 closedyorik File formats Import DXF failure 

Activities

etojpi

2014-06-17 19:09

reporter   ~0004753

Sorry, didn't meant to open 2 issues. File upload failed on the first one but I didn't realize it created the issue anyway. Please close 1583.

yorik

2014-06-17 22:08

administrator   ~0004755

Badly formatted DXF file apparently (objects without layers)... I'll add a workaround

yorik

2014-07-20 16:07

administrator   ~0004818

Fixed in latest DXF importer version.

Related Changesets

FreeCAD: master 72166cea

2014-07-11 23:34:28

yorik

Details Diff
Draft - updated DXF importer

* Updated the importer to v1.38 (several fixes from the Blender branch)
* Enabled export of Bezier curves
Affected Issues
0001584
mod - src/Mod/Draft/importDXF.py Diff File

Issue History

Date Modified Username Field Change
2014-06-17 19:07 etojpi New Issue
2014-06-17 19:09 etojpi Note Added: 0004753
2014-06-17 22:07 yorik Relationship added has duplicate 0001583
2014-06-17 22:08 yorik Note Added: 0004755
2014-06-17 22:08 yorik Assigned To => yorik
2014-06-17 22:08 yorik Status new => assigned
2014-07-06 15:10 yorik Project File formats => Draft
2014-07-06 15:26 yorik Target Version => 0.15
2014-07-20 16:07 yorik Changeset attached => FreeCAD Master master 72166cea
2014-07-20 16:07 yorik Note Added: 0004818
2014-07-20 16:07 yorik Status assigned => closed
2014-07-20 16:07 yorik Resolution open => fixed
2014-07-20 16:07 yorik Fixed in Version => 0.15