大家好,我的lisp有问题。这里有人能帮我吗?这是我的问题:
我想用vla旋转我的物体,旋转一段时间,但是当你运行这个程序时,这条线会旋转很多,谁能帮帮我,谢谢了。
- (DEFUN C:TEST ()
- ;DRAW PLINE
- (SETQ P1 (GETPOINT "\nSpecify first point: ")
- P2 (POLAR P1 0 5.0)
- P3 (POLAR P2 (/ PI 2.0) 1.0)
- P-LST (APPLY 'APPEND (LIST P1 P2 P3))
- P-LST (VLAX-SAFEARRAY-FILL (VLAX-MAKE-SAFEARRAY VLAX-VBDOUBLE (CONS 0 (- (LENGTH P-LST) 1))) P-LST)
- )
- (SETQ OBJ (VLA-ADDPOLYLINE (VLA-GET-MODELSPACE (VLA-GET-ACTIVEDOCUMENT (VLAX-GET-ACAD-OBJECT))) P-LST))
- ;VLA-ROTATE
- (PRINC "\nSpecify second point: ")
- (WHILE (MEMBER (CAR (SETQ GR (GRREAD T 15 0))) '(5 2))
- (IF (LISTP (CADR GR))
- (VLA-ROTATE OBJ (VLAX-3D-POINT P1) (ANGLE P1 (CADR GR)))
- )
- (IF (= (CADR GR) 15)
- (SETVAR 'ORTHOMODE (- 1 (GETVAR 'ORTHOMODE)))
- )
- )
- )
|