 - ;;椭圆中心标记
- ;;用highflybir的程序改造一下
- (defun HH:ELLIPSEMark (ent / DXF MAJ P1 P10 P2 P3 P4 PTB PTD SS)
- (setq dxf (entget ent))
- (setq p10 (cdr (assoc 10 dxf)))
- (if (and (setq ss (ssget "_C"
- p10
- p10
- (list '(-4 . "<or") '(0 . "LINE") '(-4 . "<and")
- '(0 . "LWPOLYLINE") '(90 . 2)
- '(-4 . "and>") '(-4 . "or>")
- )
- )
- )
- (> (sslength ss) 1)
- )
- nil
- (progn
- (setq maj (cdr (assoc 11 dxf)))
- (setq ptb (vlax-curve-getPointAtParam ent (* pi 0.5)))
- (setq ptd (vlax-curve-getPointAtParam ent (* pi 1.5)))
- (setq p1 (mapcar '- ptd maj))
- (setq p2 (mapcar '+ ptd maj))
- (setq p3 (mapcar '+ ptb maj))
- (setq p4 (mapcar '- ptb maj))
- (entmake (list (cons 0 "LINE") (cons 10 p1) (cons 11 p3)))
- (entmake (list (cons 0 "LINE") (cons 10 p2) (cons 11 p4)))
- )
- )
- )
- (defun C:W5 (/ EN)
- (setq ent (car (entsel)))
- (HH:ELLIPSEMark ent)
- (princ)
- )
|