- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Friends,
I am practicing to wright the Lisp Code, i just follow the online guides of lisp coding and created it, but i need to improve it more, lisp code is pasted below. some formulas i highlighted in red below, other i will try to do in my won after your guidance.
I try to make the formula but its not works well.
anyone could help me on this?
(defun c:drill()
(setq ip (getpoint "\nBase Point : "))
(setq sd1 (getdist "\nShank Diameter1 : "))
(setq sd2 (getdist "\nShank Diameter2 : "))
(setq sl (getdist "\nShank Length : "))
(setq d1 (getdist "\nCutting Diameter : "))
(setq tl (getdist "\nTool Length : "))
(setq fl (getdist "\nFlute Length : "))
(setq cx (getangle "\nCone Angle : "))
(setq cy (getangle "\nChamfer Angle : "))
(setq xx (getangle "\nChamfer Angle : "))
(setq p1 (polar ip (dtr 90.0) 5)) ; 5 = (D2/2)
(setq p2 (polar p1 (dtr 135.0) 1.414214)) ; 1.414214 = ((sd1-sd2)/2)/sin45°)
(setq p3 (polar p2 (dtr 180.0) 52)) ; 52 = ((sd1-sd2)-sl)
(setq p4 (polar p3 (dtr 225.0) 1.414214)) ; ((sd1-d1)/2)/sin45°)
(setq p5 (polar p4 (dtr 180.0) 16))
(setq p6 (polar p5 (dtr 180.0) 27.11))
(setq p7 (polar p6 (dtr 240.0) 5.77))
(command "pline" ip p1 p2 p3 p4 p5 p6 p7 )
(princ)
)
(defun dtr(x)
(* pi (/ x 180.0))
)
(princ)
Best Regards..
Boopathy K
Solved! Go to Solution.