这是一个方向,这个方向是用一个矢量表示的,在WCS中,X的方向就是(1 0 0)...根据矢量的算法,(0 0 0)到(0 10 0)的矢量就是后者减去前者,就是(0 10 0)...给你个程序参考一下:- (defun c:test( / ent pt1 pt2)
- (setq ent (car (entsel)))
- (setq pt1 (getpoint "选择点1:"))
- (setq pt2 (getpoint "选择点2:"))
- (setq dir (mapcar '- pt2 pt1))
- (VLA-AddRevolvedSolid (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object)))
- (vlax-ename->vla-object ent)
- (vlax-3d-point pt1)
- (vlax-3d-point dir)
- (* 2 pi))
- )
|