明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1822|回复: 3

一个关于求角度的问题

[复制链接]
发表于 2003-12-22 10:58:00 | 显示全部楼层 |阅读模式
用getangle来得到角度还必须在屏幕上点一下,但其实我那点的数据都有了,能不能不去屏幕点那一下啊,搞得程序被中断,很不爽
有没有别的函数直接通过线段的两端点就可以得到角度啊
发表于 2003-12-22 11:47:00 | 显示全部楼层
(angle pt1 pt2)
发表于 2003-12-22 11:52:00 | 显示全部楼层
計算兩點的角度在幫助文件中有
Returns an angle in radians of a line defined by two endpoints

(angle pt1 pt2)

Arguments

pt1

An endpoint.

pt2

An endpoint.

Return Values

An angle, in radians.

The angle is measured from the X axis of the current construction plane, in radians, with angles increasing in the counterclockwise direction. If 3D points are supplied, they are projected onto the current construction plane.

Examples

Command: (angle '(1.0 1.0) '(1.0 4.0))

1.5708

Command: (angle '(5.0 1.33) '(2.4 1.33))

3.14159

See Also

The Angular Conversion topic in the AutoLISP Developer's Guide.
 楼主| 发表于 2003-12-22 11:55:00 | 显示全部楼层
哦,原来是这样,呵呵,谢谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-10-2 06:30 , Processed in 0.180599 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表