Monday, September 9, 2013

AutoLISP Program For Drawing A Cabinet 6


Drawing The Top


We have drawn the cabinet. Now we want to draw the top of the cabinet. We have entered the thickness of the top and we have entered the overhang.


The AutoLISP Function


(defun drtop (pt wd nr oh th)
(command "line" (setq pt (polar pt
(* pi 0.5)
(+ (* nr
(+ 100 25)
)
25
)
)
)
(setq pt (polar pt pi oh))
(setq pt (polar pt (* pi 0.5)
th
)
)
(setq pt (polar pt
0
(+ wd
(* oh 2)
)
)
)
(setq pt (polar pt
(* pi 1.5)
th
)
)
(polar pt pi oh)
""
)
)


For drawing the top of the cabinet we need the base point, the width of the cabinet, the number of drawers, the overhang, and the thickness.


That information is given to the function by the main AutoLISP program. Now the top of the cabinet can be drawn.


The start point of the top is calculated. And then the top of the cabinet is drawn using the LINE command.


How the function works. It is pretty clear. I don't think I need to give an extra explanation. Do you agree with me?


If you don't agree and you want an extra explanation. Let me know. Add a comment to this post. And I'll come back to you.


Next Post


In the next post I'm going to talk about drawing then drawers. The cabinet has got drawers. So we need to draw them.


Telling Others


Do you like what you have read? Do you know other people, that also could be interested in what I'm saying? Could you tell them about this blog?


Comment


In the mean time. If you have any questions. Or you want to tell me something. Feel free to add a comment to this blog.


I would love to hear from you. And when you come to me with a comment. I will give a reply to your question or remark.


YouTube


I have added videos to YouTube. The videos give examples of my AutoLISP programming work. You could engage me if you want.


If you are thinking of engaging me. Listen. I work for free. I write an AutoLISP program for you. You only pay when you are satisfied.


That is important. When you come to me with an AutoLISP programming job, you are not spending any money.


On YouTube you can find my videos here:


http://youtu.be/zgTWKo7DpeM
http://youtu.be/sd-sbyM3-d8
http://youtu.be/2yhk7G5KlAs
http://youtu.be/mEA6lymElqI
http://youtu.be/eyOdOTHPH-o
http://youtu.be/O8Zy6n9zS8Q
http://youtu.be/5sMBtfnnizk
http://youtu.be/QrmbXvmFa2o
http://youtu.be/4Ol-YpDC2MY
http://youtu.be/DWFke-Nie0E






No comments:

Post a Comment