congcong发表于2003-12-19 13:43:008楼的兄台的程序是算出经过了几个象限,而我只要求程序能告诉我这段圆弧经过哪几个“象限点”即可,而不管它是经过哪几个象限。 - (defun test (ent / vla-obj cen rad plst i)
- (setq cen (cdr (assoc 10 (entget ent)))
- rad (cdr (assoc 40 (entget ent)))
- vla-obj (vlax-ename->vla-object ent)
- )
- (setq i 0.)
- (while (< i (* pi 2))
- (setq p (polar cen i rad))
- (if (vlax-curve-getparamatpoint vla-obj p)
- (if plst
- (setq plst (append (list p) plst))
- (setq plst (list p))
- )
- )
- (setq i (+ i (/ pi 2)))
- )
- plst
- )
|