Open qgib opened 5 years ago
@jef-n: In 92e7faab665d1853191227c8aeb6c13a04c43537, you introduced a conversion of the angle
to radians when reading the DWG/DXF file by dividing the angle
by ARAD
, which is 57.295
.
In the same commit, you changed the expression for the text rotation from 360-angle*180.0/pi()
to 360-angle
, which would require the angle
to be in degrees.
I think that the expression should be 360-angle*180.0/pi()
(conversion of angle
from radians to degrees), but your commit implies that there were cases where this caused problems. Do you remember why the changes were introduced?
@jdugge Etienne ( @sigmoe ? ), @jef-n
I don't think there is a radians to degrees conversion problem. The angles are in radians and close to those of autocad.
I tried with the Rue Honoré de Balzac, and as far as i know, there is a problem only for one label which is angle is between 180 and 270 degrees (arithmetic). If i'm not wrong, label don't use arithmetic degrees.
I tested several expressions, here the screenshots:
For reference, the DWG opeend in autocad:
IIRC the interpretation of angles is different between versions of DWG and/or DXF vs DWG.
Author Name: Etienne MORO (Etienne MORO) Original Redmine Issue: 22000 Affected QGIS version: 3.4.7 Redmine category:dwg/dxf_import Assignee: Jürgen Fischer
When you import a DWG file using the command 'Import Layers from DWG/DXF', the texts (labels) get a wrong orientation. It's just because the expression associated to the orientation of the labels is not the correct. The right expression to use is: 360-(angle*180/pi()) whereas the expression used after import is: 360-angle The mistake is due to the fact that the field "angle" returns angles in radians, so they have to be converted in degrees. I've attached a DWG example to use for your tests.