DXF File Import Error #75349

Open
opened 2020-04-03 16:13:22 +02:00 by Gato Nico · 14 comments

System Information
Operating system: Windows 10 Home 64bit
Graphics card: NVIDIA GeForce GT 740M

Blender Version
Blender v2.82.7

When I try to import some DXF the following error appears:

Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\io_import_dxf\__init__.py", line 542, in execute
    proj_dxf, proj_scn, self.represent_thickness_and_width, self.import_atts, dxf_unit_scale)
  File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\io_import_dxf\__init__.py", line 120, in read
    errors = do.entities(os.path.basename(filename).replace(".dxf", ""), new_scene)
  File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\io_import_dxf\dxfimport\do.py", line 1627, in entities
    self.combined_objects((en for en in self.dwg.modelspace() if is_.combined_entity(en)), scene)
  File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\io_import_dxf\dxfimport\do.py", line 1531, in combined_objects
    o = self._call_object_types(TYPE, by_att, group, name, scene, False)
  File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\io_import_dxf\dxfimport\do.py", line 1380, in _call_object_types
    o = type_func(entity, scene, name)
  File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\io_import_dxf\dxfimport\do.py", line 1256, in object_mesh
    dxftype(en, bm)
  File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\io_import_dxf\dxfimport\do.py", line 618, in mesh
    bm.edges.new([bm.verts[edge[0]], bm.verts[edge[1]]])
ValueError: edges.new(): this edge exists

location: <unknown location>:-1

With some others DXF files it works well. Dont know what it can be.

Thank you!

**System Information** Operating system: Windows 10 Home 64bit Graphics card: NVIDIA GeForce GT 740M **Blender Version** Blender v2.82.7 When I try to import some DXF the following error appears: ``` Traceback (most recent call last): File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\io_import_dxf\__init__.py", line 542, in execute proj_dxf, proj_scn, self.represent_thickness_and_width, self.import_atts, dxf_unit_scale) File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\io_import_dxf\__init__.py", line 120, in read errors = do.entities(os.path.basename(filename).replace(".dxf", ""), new_scene) File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\io_import_dxf\dxfimport\do.py", line 1627, in entities self.combined_objects((en for en in self.dwg.modelspace() if is_.combined_entity(en)), scene) File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\io_import_dxf\dxfimport\do.py", line 1531, in combined_objects o = self._call_object_types(TYPE, by_att, group, name, scene, False) File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\io_import_dxf\dxfimport\do.py", line 1380, in _call_object_types o = type_func(entity, scene, name) File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\io_import_dxf\dxfimport\do.py", line 1256, in object_mesh dxftype(en, bm) File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\io_import_dxf\dxfimport\do.py", line 618, in mesh bm.edges.new([bm.verts[edge[0]], bm.verts[edge[1]]]) ValueError: edges.new(): this edge exists location: <unknown location>:-1 ``` With some others DXF files it works well. Dont know what it can be. Thank you!
Author

Added subscriber: @Carlignacio

Added subscriber: @Carlignacio
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

Could you please share your DXF file (so we can reproduce)?

Could you please share your DXF file (so we can reproduce)?
Author

Of course, the file is the following.

FENCES.dxf

Thank you for the quick response.

Of course, the file is the following. [FENCES.dxf](https://archive.blender.org/developer/F8446040/FENCES.dxf) Thank you for the quick response.
Member

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'
Member

Will confirm for now, but it still needs to be checked if this is actually an error in the DXF (or an issue with the importer).

Will confirm for now, but it still needs to be checked if this is actually an error in the DXF (or an issue with the importer).

Added subscriber: @jamjchai

Added subscriber: @jamjchai

I can open the file in AutoCAD, although I cannot make sense of the drawing. I can recognize some fence sections, however they are not regular. Is there a screen shot of the expected out put?

Annotation 2020-05-29 200613.png

Annotation 2020-05-29 200444.png

Annotation 2020-05-29 200320.png

Annotation 2020-05-29 201549.png

I can open the file in AutoCAD, although I cannot make sense of the drawing. I can recognize some fence sections, however they are not regular. Is there a screen shot of the expected out put? ![Annotation 2020-05-29 200613.png](https://archive.blender.org/developer/F8564181/Annotation_2020-05-29_200613.png) ![Annotation 2020-05-29 200444.png](https://archive.blender.org/developer/F8564180/Annotation_2020-05-29_200444.png) ![Annotation 2020-05-29 200320.png](https://archive.blender.org/developer/F8564179/Annotation_2020-05-29_200320.png) ![Annotation 2020-05-29 201549.png](https://archive.blender.org/developer/F8564187/Annotation_2020-05-29_201549.png)

Added subscriber: @ntcue

Added subscriber: @ntcue

Hi. I am getting the same error:

Traceback (most recent call last):
  File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/__init__.py", line 541, in execute
    proj_dxf, proj_scn, self.represent_thickness_and_width, self.import_atts, dxf_unit_scale)
  File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/__init__.py", line 119, in read
    errors = do.entities(os.path.basename(filename).replace(".dxf", ""), new_scene)
  File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 1628, in entities
    self.separated_entities((en for en in self.dwg.modelspace() if is_.separated_entity(en)), scene)
  File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 1605, in separated_entities
    _do_it(en)
  File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 1592, in _do_it
    o = self._call_object_types(en.dxftype, [en], group, name, scene, separated=True)
  File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 1380, in _call_object_types
    o = type_func(entity, scene, name)
  File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 1047, in insert
    entity.invisible, recursion_level)
  File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 865, in block_linked_object
    insert = self.insert(INSERT, scene, None, group, invisible, recursion_level + 1)
  File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 1047, in insert
    entity.invisible, recursion_level)
  File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 865, in block_linked_object
    insert = self.insert(INSERT, scene, None, group, invisible, recursion_level + 1)
  File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 1047, in insert
    entity.invisible, recursion_level)
  File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 856, in block_linked_object
    objects += self.combined_objects(bc, scene, "BL|" + name, group)
  File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 1531, in combined_objects
    o = self._call_object_types(TYPE, by_att, group, name, scene, False)
  File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 1380, in _call_object_types
    o = type_func(entity, scene, name)
  File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 1256, in object_mesh
    dxftype(en, bm)
  File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 618, in mesh
    bm.edges.new([bm.verts[edge[0]], bm.verts[edge[1]]])
ValueError: edges.new(): this edge exists

location: <unknown location>:-1

I was trying to import this DXF file: https://www.viasit.com/fileadmin/user_upload/Arbeitsplatz/Drumback_Arbeitsplatzstuhl/Downloads/Drumback_450-1002_-_480-1002_DXF.zip
The link is located here: https://www.viasit.com/de/produkte/stuehle/drumback-arbeitsplatzstuhl

The result is an incomplete chair:
grafik.png

Is there a simple workaround for this? What about a simple try-except-block? Or will this result in an other error?

Hi. I am getting the same error: ``` Traceback (most recent call last): File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/__init__.py", line 541, in execute proj_dxf, proj_scn, self.represent_thickness_and_width, self.import_atts, dxf_unit_scale) File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/__init__.py", line 119, in read errors = do.entities(os.path.basename(filename).replace(".dxf", ""), new_scene) File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 1628, in entities self.separated_entities((en for en in self.dwg.modelspace() if is_.separated_entity(en)), scene) File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 1605, in separated_entities _do_it(en) File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 1592, in _do_it o = self._call_object_types(en.dxftype, [en], group, name, scene, separated=True) File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 1380, in _call_object_types o = type_func(entity, scene, name) File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 1047, in insert entity.invisible, recursion_level) File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 865, in block_linked_object insert = self.insert(INSERT, scene, None, group, invisible, recursion_level + 1) File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 1047, in insert entity.invisible, recursion_level) File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 865, in block_linked_object insert = self.insert(INSERT, scene, None, group, invisible, recursion_level + 1) File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 1047, in insert entity.invisible, recursion_level) File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 856, in block_linked_object objects += self.combined_objects(bc, scene, "BL|" + name, group) File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 1531, in combined_objects o = self._call_object_types(TYPE, by_att, group, name, scene, False) File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 1380, in _call_object_types o = type_func(entity, scene, name) File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 1256, in object_mesh dxftype(en, bm) File "/snap/blender/43/2.83/scripts/addons/io_import_dxf/dxfimport/do.py", line 618, in mesh bm.edges.new([bm.verts[edge[0]], bm.verts[edge[1]]]) ValueError: edges.new(): this edge exists location: <unknown location>:-1 ``` I was trying to import this DXF file: https://www.viasit.com/fileadmin/user_upload/Arbeitsplatz/Drumback_Arbeitsplatzstuhl/Downloads/Drumback_450-1002_-_480-1002_DXF.zip The link is located here: https://www.viasit.com/de/produkte/stuehle/drumback-arbeitsplatzstuhl The result is an incomplete chair: ![grafik.png](https://archive.blender.org/developer/F8773106/grafik.png) Is there a simple workaround for this? What about a simple try-except-block? Or will this result in an other error?

Added subscriber: @elnaria

Added subscriber: @elnaria

Hi, I could import DXF what you said.
ac_bl.png

  1. Open file on AutoCAD.
  2. Select all.
  3. EXPLODE several times until faces become simply 3D meshes.
  4. Export.

I think there is some trouble at mapping DXF to blender model.

Hi, I could import DXF what you said. ![ac_bl.png](https://archive.blender.org/developer/F8807496/ac_bl.png) 1. Open file on AutoCAD. 2. Select all. 3. EXPLODE several times until faces become simply 3D meshes. 4. Export. I think there is some trouble at mapping DXF to blender model.

Sorry, I do not own AutoCAD. It is also not available for Linux as I know. I just wanted to add more information to this bug report.

Sorry, I do not own AutoCAD. It is also not available for Linux as I know. I just wanted to add more information to this bug report.
Sign in to join this conversation.
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#75349
No description provided.