本帖最后由 kucha007 于 2023-2-8 00:17 编辑
;自己解决了√
 - (Defun C:TT nil
- (defun K:ROTATEPT (PT Center Ang)
- (polar Center (+ (angle Center PT) Ang) (distance Center PT))
- )
- (setq p1 (getpoint "\n→请选择旋转中心: "))
- (setq p2 (getpoint p1 "\n→请选择X轴正方向: "))
- (setq Ang (Angle P1 p2))
- (setq vc (getvar "VIEWCTR");视图中心UCS
- vs (getvar "VIEWSIZE");当前视图高度
- )
- (command "point" vc )
- (setq CS (trans (K:ROTATEPT vc p1 Ang) 1 0));WCS
- (command "_.UCS" "_Z" (Angtos Ang 0 15))
- (command "_.PLAN" "_C")
- (while (> (getvar "CMDACTIVE") 0) (command PAUSE));等待前面的命令完成
- (command "_.ZOOM" "_C" (trans CS 0 1) vs)
- (command "point" (trans CS 0 1))
- )
|