第二版我有时间的时候会做hatch
- ; this use the extrim command to trim shape
- ; By Alan H Jan 2012
- (setq obj (car (entsel "\nPick pline or circle")))
- ; should do a object test here
- (setq pt1 (Getpoint "\nPick Line start point"))
- (setq pt2 (Getpoint pt1 "\nPick end point"))
- (command "line" pt1 pt2 "")
- (setq gap (getreal "\nEnter spacing"))
- (setq pt3 (getpoint "\nPick 1st cross point"))
- (setq pt4 (getpoint pt3 "\nPick 2nd cross point"))
- (setq dist (distance pt3 pt4))
- (setq x (fix (/ dist gap)))
- (setq newpt (strcat (rtos gap 2 2) ",0.0"))
- (repeat x (command "copy" "L" "" "0,0" newpt))
- (load "Extrim")
- (etrim obj pt1)
- ; work out hatch points work in progress
- ;(setq ss (ssget "F" (list pt3 pt4)))
- ; now cen pts as list
- (setq obj nil
- pt1 nil)
|