cart: empty [ Login ]

Calculate effective entity rotation

4/19/2023 11:24 AM

Hi! Is there any existing mechanism for calculating the effective rotation of some entity (including texts)? I know that there are many properties that affect the rotation, including the context of the entity, so it's obviously a complex task. However, perhaps you have some nifty util that can be useful? Regards, Per

4/19/2023 11:33 AM

Hi Per, No there isn't. Of an individual entity (without its context) you can get the DxfEntity.Transform. If you run the x-axis and y-axis through it, you can deduce how much they rotated. But note in general with insert/block transforms there could be non-uniform transformations and skewing going on, so it's not always to calculate a straightforward rotation. Also the rotation might be 3-dimensional. - Wout