yang611 发表于 2006-8-25 22:56:00

在arx中 如何获得角度值

在arx中 如何直接获得角度值
(360度格式,非弧度数值)
比如 输入15 ,即角度为15度

yang611 发表于 2006-8-28 15:28:00

怎么没人能帮我?

mjtppf 发表于 2006-8-28 15:43:00

ARX有一个全局函数AcUtAngle();
原型及解释如下,在ARX的帮助中有:
ads_real
acutAngle(
const ads_point pt1,
const ads_point pt2);
pt1
Description to comept2
Description to come
Finds the angle between a line and the current X axis.
Returns the angle of the line defined by pt1 and pt2. The acutAngle() function measures the angle from the X axis of the current User Coordinate System (UCS), with the angle increasing in the counterclockwise direction. It returns the value in radians. This function treats pt1 and pt2 as two-dimensional points; it ignores their Z coordinates, in effect projecting the line onto the current construction plane.
不过返回的是弧度值,需要转换为角度值。

mjtppf 发表于 2006-8-28 15:44:00

不好意思,函数名写错了,是acutAngle,不是AcUtAngle

yang611 发表于 2006-8-29 16:55:00

您好像没看懂我的意思
应该是这样
从键盘输入 15 给参数 angle
则angle=15度,
就像输入ads_real 一样的


nc2t 发表于 2006-8-30 10:44:00

好象不能直接做,但是你可以从程序里,将弧度值修改为角度值,然后赋 给一个变量,很简单的
页: [1]
查看完整版本: 在arx中 如何获得角度值