Changes between Version 2 and Version 3 of Ticket #5705


Ignore:
Timestamp:
Oct 22, 2014, 3:22:25 AM (7 years ago)
Author:
ju420xt5z
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5705 – Description

    v2 v3  
    66The result I obtain is wrong (attached file "sampleb_output.dxf"), as can be verified in AutoCAD. Basically, one of the ellipses in the output has a wrong angle and its X coordinates are wrong. I would expect the same visual result as the input. The issue can also be seen when converting to a format other than DXF (for example SHP).
    77
    8 Doing some investigation inside the input DXF using a text editor, I saw that the ellipse that converts correctly has a Z extrusion axis value (group code 230) of 1.0, whereas the ellipse that was not converted correctly has a Z extrusion axis value of -1.0. I have then done a test when I reversed its Z extrusion axis (from -1.0 to 1.0) and switched+reversed the start and end angles (group codes 41 and 42) in attached file "sampleb_input-mod.dxf". Then the conversion of the previously incorrect ellipse is done correctly (attached file "sampleb_output-mod.dxf"). Visually, the input and ouput are the same.
     8Doing some investigation inside the input DXF using a text editor, I saw that the ellipse that converts correctly has a Z extrusion axis value (group code 230) of 1.0, whereas the ellipse that was not converted correctly has a Z extrusion axis value of -1.0. I have then done a test when I reversed its Z extrusion axis (from -1.0 to 1.0) and switched+reversed the start and end angles (group codes 41 and 42) in attached file "sampleb_input-mod.dxf". Then the conversion of the previously incorrect ellipse is done correctly (attached file "sampleb_output-mod.dxf"). Visually, the input and ouput are the same, as well as identical to the original input DXF file.
    99
    10 So it seems that, when the Z direction is -1, on top of having to rotate the points of the ellipse to align with the direction of major axis, the Y axis is also reversed. Maybe a transformation to the new coordinate system :
     10So it seems that, when the Z direction is -1, on top of having to rotate the points of the ellipse to align with the direction of major axis, the Y axis must also be reversed. Maybe a transformation to the new coordinate system :
    1111
    1212Direction of new X axis = endpoint of major axis