晒晒我写的第一个LISP,画螺杆和螺母的,带注释(初学者参考用)
;设置螺杆颜色为真彩色的蓝色(command "color" "t" "0,0,255")
;关闭对象捕捉
(command "-osnap" "off")
;画螺杆
(command "polygon" "6" "0,0" "" "10")
(setq el (entlast))
(command "extrude" el "" "5" "0")
(command "circle" "0,0" "5")
(setq qq (entlast))
(command "extrude" qq "" "-30" "0")
(command "union" "all" "")
;设置螺母颜色为真彩色的品红
(command "color" "t" "255,0,255")
;画螺母
(command "polygon" "6" "0,0,-20" "" "10")
(setq ww (entlast))
(command "extrude" ww "" "5" "0")
(setq A (entlast))
(command "circle" "0,0,-20" "5")
(setq ee (entlast))
(command "extrude" ee "" "5" "0")
(setq B (entlast))
(command "subtract" A "" B "")
;体着色
(command "shademode" "g")
;打开对象捕捉的圆心、端点、节点、交点等
(command "-osnap" "cen,end,nod,int")
(command "view" "seiso")
(command "vpoint" VIEWDIR=1.0000,1.0000,1.0000)
要是弄个演示就好了
页:
[1]