2010年,作为对直肠司令部的模仿。。。
- (defun c:arec ( / an ar p1 x )
- (if
- (and
- (setq p1 (getpoint "\nSpecify first corner point: "))
- (progn (initget 6)
- (setq ar (getreal "\nSpecify Area for Rectangle: "))
- )
- (progn (initget "Length Width")
- (setq an (getkword "\nCalculate rectangle dimensions based on [Length/Width] <Length>: "))
- (if (eq "Width" an)
- (setq x (getdist "\nSpecify rectangle width: " p1))
- (setq x (getdist "\nSpecify rectangle length: "p1))
- )
- )
- )
- (command "_.rectang" "_non" p1 "_non"
- (polar
- (polar p1 (if (eq "Width" an) 0. (/ pi 2.)) x)
- (if (eq "Width" an) (/ pi 2.) 0.)
- (/ ar x)
- )
- )
- )
- (princ)
- )
|