New DXF Importer in 2.72 struggles with "minimal DXF" (by Paul Bourke) - was OK before. #42216

Closed
opened 2014-10-14 04:13:15 +02:00 by Eric Roger · 11 comments

System Information
Windows 7 64-bit (with NVIDIA GeForce GT 610) and Windows Vista 32-bit

Blender Version
Broken: 2.72 95182d1
Worked: Blender 2.71

Description
I've been using a 'minimal' DXF file template as mentioned by Paul Bourke (see http:*paulbourke.net/dataformats/dxf/min3d.html - Appendix 2 at the bottom and the extracted Minimal_dxf_test.dxf) that I'd happily been using as a basis for a project up to version 2.71 (set of 3d lines -> DXF generator program written in C# -> Blender import). But this minimal DXF doesn't import successfully with the recent (and very advanced-looking) DXF importer in Blender 2.72. The same applies for the DXF files I generated. I've tried many combinations of the import parameters/checkboxes, but the Python scripts always report initialisation failures.I don't think there is any point in me sending any other more complex DXF files (they just have more 3D objects, the structure of the file header is exactly the same).

It's difficult to tell whether this is really a bug as this importer must have been thoroughly tested, but I would be VERY keen to know what needs to be added to this minimal DXF to keep the import scripts happy. Or if there is a free DXF-generating piece of software out there that I can use to replicate the testing done on the Blender 2.72 DXF importer, please let me know. That way I'll replicate the 3D scene in this minimal DXF file from that software, and publish my findings here.

The minimal DXF file assumes that there is only one layer used (8-1), one colour (62-1), no lights, no camera, and just basic 3D objects. This gives me a nice simple way to 'program' a 3D scene as can be done in POVRay.

Exact steps for others to reproduce the error

  1. Save the attachment to the disk.
  2. Ensure the new DXF Importer is available in the User Preferences (File > User Preferences > Addons > Ensure 'Import-Export: Import AutoCAD DXF Format (.dxf)' is checked).
  3. Import the file saved in step 1 (File > Import > AutoCAD DXF). The Options under 'Import DXf v.0.8.5' don't seem to matter at all. Failure guaranteed.
**System Information** Windows 7 64-bit (with NVIDIA GeForce GT 610) and Windows Vista 32-bit **Blender Version** Broken: 2.72 95182d1 Worked: Blender 2.71 **Description** I've been using a 'minimal' DXF file template as mentioned by Paul Bourke (see [http:*paulbourke.net/dataformats/dxf/min3d.html ](http:*paulbourke.net/dataformats/dxf/min3d.html) - Appendix 2 at the bottom and the extracted [Minimal_dxf_test.dxf](https://archive.blender.org/developer/F116565/Minimal_dxf_test.dxf)) that I'd happily been using as a basis for a project up to version 2.71 (set of 3d lines -> DXF generator program written in C# -> Blender import). But this minimal DXF doesn't import successfully with the recent (and very advanced-looking) DXF importer in Blender 2.72. The same applies for the DXF files I generated. I've tried many combinations of the import parameters/checkboxes, but the Python scripts always report initialisation failures.I don't think there is any point in me sending any other more complex DXF files (they just have more 3D objects, the structure of the file header is exactly the same). It's difficult to tell whether this is really a bug as this importer must have been thoroughly tested, but I would be VERY keen to know what needs to be added to this minimal DXF to keep the import scripts happy. Or if there is a free DXF-generating piece of software out there that I can use to replicate the testing done on the Blender 2.72 DXF importer, please let me know. That way I'll replicate the 3D scene in this minimal DXF file from that software, and publish my findings here. The minimal DXF file assumes that there is only one layer used (8-1), one colour (62-1), no lights, no camera, and just basic 3D objects. This gives me a nice simple way to 'program' a 3D scene as can be done in POVRay. **Exact steps for others to reproduce the error** 1. Save the attachment to the disk. 2. Ensure the new DXF Importer is available in the User Preferences (File > User Preferences > Addons > Ensure 'Import-Export: Import AutoCAD DXF Format (.dxf)' is checked). 3. Import the file saved in step 1 (File > Import > AutoCAD DXF). The Options under 'Import DXf v.0.8.5' don't seem to matter at all. Failure guaranteed.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @Eroger

Added subscriber: @Eroger
Author

Sorry this defect should be part of the Addons. I only became aware of this category after I'd raised it.

Sorry this defect should be part of the Addons. I only became aware of this category after I'd raised it.
Lukas Treyer was assigned by Sergey Sharybin 2014-10-14 09:09:15 +02:00

Added subscriber: @Sergey

Added subscriber: @Sergey

Lukas, guess this one is for you?

Lukas, guess this one is for you?
Member

Yes. I will have a look at it.

Yes. I will have a look at it.
Member

Since your error messages are thrown by the dxfgrabber library I was in contact with its author. Short answer: DXF versions before DXF12 (AC1009) are not supported. I replaced AC1006 with AC1009 in your file and it works. BUT: we still don't know how this might behave. Since there is no complete documentation of any DXF version older than AC1009, those old versions are not supported by dxfgrabber. Any version other than DXF12 therefore gets treated as DXF13, which causes your errors.
I propose you change AC1006 to AC1009 and do some further tests. If everything works fine, we are happy. Otherwise I would propose to make your files conform with DXF12.

Can you please report back on your tests here?

Since your error messages are thrown by the dxfgrabber library I was in contact with its author. Short answer: DXF versions before DXF12 (AC1009) are not supported. I replaced AC1006 with AC1009 in your file and it works. BUT: we still don't know how this might behave. Since there is no complete documentation of any DXF version older than AC1009, those old versions are not supported by dxfgrabber. Any version other than DXF12 therefore gets treated as DXF13, which causes your errors. I propose you change AC1006 to AC1009 and do some further tests. If everything works fine, we are happy. Otherwise I would propose to make your files conform with DXF12. Can you please report back on your tests here?
Author

Thank you for this. I'm happy to just change the version in the files, I was not religiously attached to it.

I'll report on my testing tonight, but I don't expect any particular problems (the DXF primitives I use are very basic).

Thank you for this. I'm happy to just change the version in the files, I was not religiously attached to it. I'll report on my testing tonight, but I don't expect any particular problems (the DXF primitives I use are very basic).
Author

I confirm that the testing was all good with the version updated in the DXF files, following your instructions.

May I suggest a test for any unsupported DXF version in the importing script, so that an informative error message is visible to the user? This would have avoided this bug/task from being raised.

Many thanks for your swift response.

I confirm that the testing was all good with the version updated in the DXF files, following your instructions. May I suggest a test for any unsupported DXF version in the importing script, so that an informative error message is visible to the user? This would have avoided this bug/task from being raised. Many thanks for your swift response.
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Member
Commited as blender/blender-addons@68e4b7e6bf
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 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#42216
No description provided.