你可以从这里开始:
- ; To convert degrees to radians
- (defun DTR (D)
- (/ (* pi D) 180.0)
- );end of DTR
- (defun C:DISH ()
- ;User Input
- (setq CEN (getpoint "\nEnter center point of Vessel: "))
- (setq DIA (getreal "\nEnter Vessel Diameter (DIA): "))
- (setq IKR (getreal "\nEnter Internal Knuckle Radius (IKR): "))
- ; To get the points of Knuckle Radius
- (setq DIA2 (/ DIA 2))
- (setq PT1 (polar CEN (DTR 180) DIA2))
- (setq PT2 (polar PT1 (DTR 0) IKR))
- (setq PT3 (polar PT2 (DTR 120) IKR))
- (setq PT4 (polar CEN (DTR 0) DIA2))
- (setq PT5 (polar PT4 (DTR 180) IKR))
- (setq PT6 (polar PT5 (DTR 60) IKR))
- ; To draw the Dish
- (command "ARC" PT3 "C" PT2 PT1) ; Arc Start/Center/End
- (command "ARC" PT4 "C" PT5 PT6) ; Arc Start/Center/End
- (command "ARC" PT6 "E" PT3 "R" DIA) ; Arc Start/End/Radius
- );end of DISH
图纸应如下所示:
学习它,你就可以完成剩下的。祝你好运 |