
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
(defun C:TH ()
(setvar "cmdecho" 0)
(setq osv (getvar "osmode"))
(setvar "osmode" 0)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq A (getpoint "\n Specify first corner of rectangle: "))
(initget (+ 1 2 4))
(setq B (getreal "\n Specify length: "))
(initget (+ 1 2 4))
(setq C (getreal "\n Specify width: "))
(initget (+ 1 2 4))
(setq L1 (getreal "\n Offset from the left side: "))
(initget (+ 1 4))
(setq L2 (getreal "\n Offset from first circle: "))
(initget (+ 1 2 4))
(initget 0 "Point")
(setq F (getreal "\n Specify diameter or [Point]: "))
(setq A2 (polar A 0 B))
(setq A3 (polar A2 (/ pi 2) C))
(setq A4 (polar A (/ pi 2) C))
(setq A5 (polar A 0 L1))
(setq C1 (polar A5 (/ pi 2) (/ C 2)))
(setq C2 (polar C1 0 L2))
(command ".pline" A A2 A3 A4 "close")
(setvar "regenmode" 1)
;;;;;;;;;;;;;;;;;;;;;;;;;
(cond
((= (strcase F) "P") (command ".point" C1 "" ".point" C2 ""))
((\= (strcase F) "P") (command ".circle" C1 "_d" F "" ".circle" C2 "_d" F ""))
)
;;;;;;;;;;;;;;;;;;;;;;
(setvar "osmode" osv)
(setvar "cmdecho" 1)
)
-----------------------------
There is something wrong with my lisp? I try I draw a rectange with 2 holes, Instead of holes I choose Point for it!
Solved! Go to Solution.