DXF Importer - custom scale - problem with arcs #42252

Closed
opened 2014-10-16 10:11:29 +02:00 by Marek Moravec · 10 comments

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
Suteren_01.dxf
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.

**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** [Suteren_01.dxf](https://archive.blender.org/developer/F117642/Suteren_01.dxf) 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.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @Traverso

Added subscriber: @Traverso
Lukas Treyer was assigned by Bastien Montagne 2014-10-16 13:28:47 +02:00

Added subscriber: @mont29

Added subscriber: @mont29
Member

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.

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.
Author

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.

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.

This issue was referenced by 570b7d94b3

This issue was referenced by 570b7d94b3b2414e376d9eddd4f3a2df1e4dbb88
Member

Changed status from 'Open' to: 'Resolved'

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

Closed by commit 570b7d94b3.

Closed by commit 570b7d94b3.
Member

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

Thank you marek for noticing me of this error. It should be solved now. The commit is here: http://git.blender.org/gitweb/gitweb.cgi/blender-addons.git/commit/570b7d94b3b2414e376d9eddd4f3a2df1e4dbb88
Author

Thank you Lucas for solving the error!

Thank you Lucas for solving the error!
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 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#42252
No description provided.