Begin with Command "BOX"

เป็นคำสั่งในชุดแรกๆเริ่มจากการเขียนตามหนังสือ
แล้วมาต่อยอดภายหลังครับ
(defun getinfo ()
(setq pt1 (getpoint "pick first corner:"))
(setq pt3 (getcorner pt1 "pick opposite corner:"))
)
(defun procinfo ()
(setq pt2 (list (car pt3) (cadr pt1)))
(setq pt4 (list (car pt1) (cadr pt3)))
)
(defun output()
(command "pline" pt1 pt2 pt3 pt4 "c")
)
(defun C:BOX1 (/ pt1 pt2 pt3 pt4)
(getinfo)
(procinfo)
(output)
)
(defun C:3DBOX (/ pt1 pt2 pt3 pt4 h)
(getinfo)
(setq h (getreal "Enter height of box: "))
(procinfo)
(output)
(command "change" "L" "" "P" "thickness" h ""
"3dface" pt1 pt2 pt3 pt4 ""
"3dface" ".xy" pt1 h ".xy" pt2 h
".xy" pt3 h ".xy" pt4 h ""
)
)
(defun C:3DWEDGE (/ pt1 pt2 pt3 pt4 h)
(getinfo)
(setq h (getreal "Enter height of wedge: "))
(procinfo)
(output)
(command "3dface" pt1 pt4 ".xy" pt4 h ".xy" pt1 h pt2 pt3 ""
"3dface" pt1 pt2 ".xy" pt1 h pt1 ""
"copy" "L" "" pt1 pt4
)
)

ไม่มีความคิดเห็น:

แสดงความคิดเห็น

คลังบทความของบล็อก