dxf importer fails to import correctly #49593

Closed
opened 2016-10-07 06:38:34 +02:00 by mathieu menuet · 10 comments

System Information
all vendors

Blender Version
Broken: 2.78

Short description of error
Some files won't import completely. The importer crashes before finishing.

Exact steps for others to reproduce the error
Try to import this file: bug 2.7z. The original files gave 2 different errors, maybe the crash logs can help: error dxf 2.txt error dxf.txt

**System Information** all vendors **Blender Version** Broken: 2.78 **Short description of error** Some files won't import completely. The importer crashes before finishing. **Exact steps for others to reproduce the error** Try to import this file: [bug 2.7z](https://archive.blender.org/developer/F374935/bug_2.7z). The original files gave 2 different errors, maybe the crash logs can help: [error dxf 2.txt](https://archive.blender.org/developer/F374936/error_dxf_2.txt) [error dxf.txt](https://archive.blender.org/developer/F374937/error_dxf.txt)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @bliblubli

Added subscriber: @bliblubli
Lukas Treyer was assigned by Bastien Montagne 2016-10-07 09:50:04 +02:00
Member

Your file has a spline with two point having the same location. The importer should actually handle this; for some reason it didn't.

2f3e4104de5a: convert.py line 178: it checked for the distance between two points, which would also allow to check for two points that are very close (replace the "0" with something very small). Now it also checks directly whether two points are the same.

@bliblu bli: be aware that you need to use the scale option if you import geometry that is that large or was generated in other units than meter. --> the unit scale option is available in the geo referencing panel. I had to use a scale of 0.001 to successfully import your file.

Your file has a spline with two point having the same location. The importer should actually handle this; for some reason it didn't. 2f3e4104de5a: convert.py line 178: it checked for the distance between two points, which would also allow to check for two points that are very close (replace the "0" with something very small). Now it also checks directly whether two points are the same. @bliblu bli: be aware that you need to use the scale option if you import geometry that is that large or was generated in other units than meter. --> the unit scale option is available in the geo referencing panel. I had to use a scale of 0.001 to successfully import your file.
Author

Thanks :) Fix works for the one error. Note that there is no such big object visible in the original file nor in the DXF when opened with our CAD program, it looks like one point was moved to 0,0,0. The original file being in Germany thus thousands of kilometers away from 0,0,0, it may be what makes the object so big.
I have an narrowed down file with the second error triggering a crash in our production file. bug 3.dxf.zip

Thanks :) Fix works for the one error. Note that there is no such big object visible in the original file nor in the DXF when opened with our CAD program, it looks like one point was moved to 0,0,0. The original file being in Germany thus thousands of kilometers away from 0,0,0, it may be what makes the object so big. I have an narrowed down file with the second error triggering a crash in our production file. [bug 3.dxf.zip](https://archive.blender.org/developer/F375165/bug_3.dxf.zip)
Author

@cnd would be good to add this fix to 2.78a :)

@cnd would be good to add this fix to 2.78a :)
Member

commit 1b58a90cd418 should solve your issues with bug 3.dxf.

Are you able to test it, so we can close this issue?

If you have an object that is far far away from 0,0,0 consider using the "Center geometry to scene" option. It's only available if your scene does not have a custom property "latitude" and "longitude" (a geo reference).

commit [1b58a90cd418 ](https://developer.blender.org/rBA1b58a90cd418bf07df8a9c411dbdaa8698a905ae) should solve your issues with bug 3.dxf. Are you able to test it, so we can close this issue? If you have an object that is far far away from 0,0,0 consider using the "Center geometry to scene" option. It's only available if your scene does not have a custom property "latitude" and "longitude" (a geo reference).
Author

Problem solved, thank you :)

Problem solved, thank you :)
Member

Added subscriber: @BrendonMurphy

Added subscriber: @BrendonMurphy
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Member

closing as resolved

closing as resolved
Sign in to join this conversation.
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-addons#49593
No description provided.