Page MenuHome

DXF Importer - custom scale - problem with arcs
Closed, ResolvedPublic


System Information
Win7 64bit, Nvidia GTX 560

Blender Version
Broken: 2.72 official
Worked: didn't test

Short description of error
When trying to import 2D drawing with custom scale (usually 0.001 to get mm to m) the arcs scale properly but they are moved to a different place (usually closer to the object center). With scale 1 the import works as it should.
There is also minor problem with the input field - it is not a numeric field and therefore it does not accept numbers with comma as a separator. If you input number like 1,3 it is not automaticaly converted and you get an error during the import.

Exact steps for others to reproduce the error

Import the attached file with the DXF importer with scale "1".
The geometry is huge but correct.
Import the file again with the scale "0,001"
You get an error.
Import the file again with the scale "0.001"
The scale is correct but the arcs are not in the correct position.

Event Timeline

Marek Moravec (marek) added a project: Add-ons.
Marek Moravec (marek) set Type to Bug.
Marek Moravec (marek) created this task.
Marek Moravec (marek) raised the priority of this task from to Needs Triage by Developer.

As for the numeric import: the inputs are treated as strings, since in Blender numeric inputs tend to end up being 0.99999999 instead of 1.0. If I treat everything as strings and convert the strings in python "1.0" remains "1.0". I can check if I can replace comas with points in the strings. But do you really need it? BTW if I type 0,7 in any other numeric Blender field, I get 7.0 instead of 0.7 (tested it with location.z). So I don't think I need to do something about it.
Concerning the arcs: I will look at it and try to fix it in the next days.

The numeric input: I use czech keyboard layout and on the numpad there is coma instead of a dot next to the "0" key. Everywhere in Blender it works so that if I input a value using the coma on my numpad (not the other one which is on the main keyboard) it automaticaly inserts a dot.
It is not a big deal but it would be nice if the input of numbers would be consistent.

Thank you marek for noticing me of this error. It should be solved now. The commit is here:

Thank you Lucas for solving the error!