TextEntity, Get rotation of the text


#1

Hello,
I wonder if it is possible to get the actual text rotation form textEntity.

Thanks in advance.


#2

Hi Miguel,

you could get the plane from the TextEntity, then compare its transform in relation to eg. the WorldXY plane. Decomposing the resulting transfrom to get just the rotation value can be quite challenging, there has been a topic about this here.

c.


#3

Thanks clement

I only work in Z=0, then the following code works for me.

Plane planoTexto = ((TextEntity) obj.Geometry).Plane;
Double angulo = RhinoMath.ToDegrees( Math.Atan2(planoTexto.XAxis.Y, planoTexto.XAxis.X));

Thanks again.