天正逐点标注 TDIMMP
有大佬遇到过这种情况吗?
直接调用天正命令,总是出毛病,大佬们有木有好的思路。
求得坐标后逐点标注出来。
(defun c:gg()
(setvar "cmdecho" 0)
(setq osm (getvar "osmode"))
(setvar "osmode" 0)
(setq pa (getpoint "\n输入第一点:"))
(setq pab (polar pa 0 500))
(setq pb (polar pab 0 500))
(setq pbc (polar pb (* pi 0.5) 500))
(setq pc (polar pb (* pi 0.5) 1000))
(setq pcd (polar pc pi 500))
(setq pd (polar pc pi 1000))
(setq pad (polar pa (* pi 0.5) 500))
(command "TDIMMP" pa pab "" pb "" "")
(command "TDIMMP" pb pbc "" pc "" "")
(command "TDIMMP" pc pcd "" pd "" "")
(command "TDIMMP" pa pad "" pd "" "")
(command "rectang" pa pc)
(command "pline" pab pc "")
(setvar "osmode" osm)
)
(setq pa (getpoint "\n输入第一点:"))这句,pa可能是三维点,重新组合成二维的点,去掉第三坐标即可。
页:
[1]