tflaherty
2005-05-17, 11:35 PM
I inherited this routine form the previous CAD Manager and I'm just trying to clean it up and document it. The below portion of the routine draws the drawer fronts on lower cabinets and the drawer pull. It all works fine, but I'm thinking there's got to be an easier and cleaner way of finding the insertion point for the drawer pull (see the line "(setq DPI..."
Thanks for your help
(setq D3 (sqrt 2))
(setq DIC1 (polar DC1 A D3))
(setq DIC3 (list (- (+ (car DC1) DW) 1) (+ (cadr CC3) 4.5)))
(setq DIC2 (list (car DIC1) (cadr DIC3)))
(setq DIC4 (list (car DIC3) (cadr DIC1)))
(command "line" DIC1 DIC2 DIC3 DIC4 "c")
(setq DPI (list (+ (/ (- (car DIC3) (car DIC2)) 2) (car DIC2)) (+ (cadr DIC1) 1)))
(command "circle" DPI ".5")
(command "line" DC1 DIC1 "")
(command "line" DC2 DIC2 "")
(command "line" DC3 DIC3 "")
(command "line" DC4 DIC4 "")
Thanks for your help
(setq D3 (sqrt 2))
(setq DIC1 (polar DC1 A D3))
(setq DIC3 (list (- (+ (car DC1) DW) 1) (+ (cadr CC3) 4.5)))
(setq DIC2 (list (car DIC1) (cadr DIC3)))
(setq DIC4 (list (car DIC3) (cadr DIC1)))
(command "line" DIC1 DIC2 DIC3 DIC4 "c")
(setq DPI (list (+ (/ (- (car DIC3) (car DIC2)) 2) (car DIC2)) (+ (cadr DIC1) 1)))
(command "circle" DPI ".5")
(command "line" DC1 DIC1 "")
(command "line" DC2 DIC2 "")
(command "line" DC3 DIC3 "")
(command "line" DC4 DIC4 "")