home *** CD-ROM | disk | FTP | other *** search
/ Share Gallery 1 / share_gal_1.zip / share_gal_1 / GR / GR505.ZIP / LSP.EXE / DIAM.LSP < prev    next >
Text File  |  1988-06-13  |  716b  |  22 lines

  1. ; DIAM.LSP.  This AutoLIPS function allows you to quickly draw a diameter
  2. ; through a circle.  First, pick the circle, then an angle for the line.
  3. ; Use ORTHO mode to draw lines at exact 0 or 90 degree angles.
  4. ;
  5. ; Frank A. Himsl, c/o LanStart Inc.,
  6. ; 504 Iroquois Shore Rd., Oakville, Ontario, CANADA L6H 3K4
  7. ; Voice: (416) 842-2730
  8. ; Compuserve: 71521,1241
  9. ;
  10. (defun C:DIAM (/ pt1 ang ctr tc)
  11.  (setq tc (entget (car (entsel "\nPick circle, angle: "))))
  12.  (if (= (cdr (assoc 0 tc)) "CIRCLE")
  13.   (progn
  14.    (setq
  15.      ctr (cdr (assoc 10 tc))
  16.      ang (getangle ctr)
  17.      tc (cdr (assoc 40 tc)))
  18.    (command "line" (polar ctr ang tc) (polar ctr (+ pi ang) tc) ""))
  19.   (prompt "\nNot a circle\n")
  20.  )
  21. )
  22.