几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   ObjectARX(C++) (http://www.dimcax.com/hust/forumdisplay.php?f=34)
-   -   【转帖】在arx中 如何获得角度值 (http://www.dimcax.com/hust/showthread.php?t=7261)

yang686526 2009-04-16 09:56 PM

【转帖】在arx中 如何获得角度值
 
在arx中 如何获得角度值
在arx中 如何获得角度值
在arx中 如何直接获得角度值
(360度格式,非弧度数值)
比如 输入15 ,即角度为15度
怎么没人能帮我?
arx有一个全局函数acutangle();
原型及解释如下,在arx的帮助中有:
ads_real
acutangle(
const ads_point pt1,
const ads_point pt2);
pt1description to come
pt2description 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.
不过返回的是弧度值,需要转换为角度值。
不好意思,函数名写错了,是acutangle,不是acutangle
您好像没看懂我的意思
应该是这样
从键盘输入 15 给参数 angle
则angle=15度,
就像输入ads_real 一样的


好象不能直接做,但是你可以从程序里,将弧度值修改为角度值,然后赋 给一个变量,很简单的


所有的时间均为北京时间。 现在的时间是 09:59 PM.