- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a lisp that draws a slot to 2 points. Can someone tell me why i can't pick a perpendicular point on a line as my second point?
Added my lisp routine here:
;This lisp will draw a slot center to center with a 1" diameter. SAH
(defun c:FH1 (/ cntr1 cntr2 pt1 pt2 pt3 pt4 a b c )
(setq cntr1 (getpoint "\nPick start of slot: ")) ;pt1 = first point
(setq cntr2 (getpoint "\nPick end of slot: ")) ;pt2 = end point
(setq b (angle cntr1 cntr2)) 😜 = angle
(setq c (distance cntr1 cntr2)) ;c = length
(setq pt1 (polar cntr1 (- b (/ pi 2)) 0.5)) ;(dtr 90.0) = (/ pi 2)
(setq pt2 (polar cntr2 (- b (/ pi 2)) 0.5))
(setq pt3 (polar cntr2 (+ b (/ pi 2)) 0.5))
(setq pt4 (polar cntr1 (+ b (/ pi 2)) 0.5)) ;0.5 is the radius
(SETVAR "PLINEWID" 0)
(COMMAND "PLINE" pt1 pt2 "A" pt3 "L" pt4 "A" "CL" "")
(princ "the center to center length is ") (princ c) (terpri)
(princ "the angle of the slot is ") (prompt (angtos b 1 5))(princ)
)
(princ)
Solved! Go to Solution.