一种简便方法
(defun c:tt (/ ss p pc h s)
(if (setq p (getpoint "\nPoint: "))
(progn
(setq pc (getvar "viewctr")
h (getvar "viewsize")
)
(if (setq ss (ssget "F"
(list p (mapcar '+ pc (list 0.0 (/ h 2) 0.0)))
'((8 . "三角形"))
)
)
(progn
(setq s (ssadd))
(sssetfirst nil (ssadd (ssname ss 0) s))
)
)
)
)
(princ)
)