几何实用程序
一组函数使应用程序能够获取几何信息。该函数求两点之间的距离,求一条线与当前 UCS 的 X 轴(在 XY 平面中)之间的角度,并通过极坐标(相对于初始点)求点。与大多数 ObjectARX 函数不同,这些函数不返回状态值。该函数查找两条线的交点;如果找到与规范匹配的点,则返回。acutDistance()acutAngle()acutPolar() acdbInters()RTNORM 注意:与 不同的是,此组中的函数只是计算点、线或角度值,而实际上不查询当前图形。acedOsnap()
以下示例代码片段显示了对几何实用程序函数的一些简单调用。 ads_point pt1, pt2; ads_point base, endpt; ads_real rads, length; . . // Initialize pt1 and pt2. . // Return the angle in the XY plane of the current UCS, in radians. rads = acutAngle(pt1, pt2); // Return distance in 3D space. length = acutDistance(pt1, pt2); base[X] = 1.0; base[Y] = 7.0; base[Z] = 0.0; acutPolar(base, rads, length, endpt); 对 的调用设置到一个点,该点与 (1,7) 的距离与 的距离相同,并且该点与 X 轴的夹角与 和 之间的夹角相同。acutPolar()endptpt1pt2pt1pt2 父主题: |
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-3-5 17:44
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.