AutoLISP
Program For Drawing A Cabinet 10
Dimensioning
The Drawing
We have drawn the cabinet.
We have drawn the cabinet, the top of the cabinet, the drawers and
the handles of the drawers.
The
DRDIM Function
Now we are going to add
the dimensions to the drawing. See the DRDIN function. That function
is used for adding the dimensions
(defun drdim (pt wd nr oh
th)
(command "dimlinear"
pt
(setq
pt (polar pt 0 wd))
(polar
pt (* pi 1.5) 35)
)
(command "dimlinear"
pt
(setq
pt (polar pt
(*
pi 0.5)
(+
(* nr
125
)
25
)
)
pt
(polar pt 0 oh)
)
(polar
pt 0 35)
)
(command "dimlinear"
pt
(polar
pt (* pi 0.5) th)
(polar
pt 0 35)
)
(setq pt (list 0 0))
(command "dimlinear"
(setq pt (polar pt
(*
pi 0.5)
(+
(* nr
125
)
25
)
)
)
(polar
pt pi oh)
(polar
pt (* pi 1.5) 35)
)
)
How
The DRDIM Function Works
That is not too
complicated. We have set the dimension variables in the previous
function. So we can add the dimensions.
It is all a matter of
calculating where the points of the dimensions are. And using the
DIMLINEAR command.
That is important. The
dimensions are drawn on a distance that is 35 from the points that
were picked first.
I feel you understand how
the DRDIM function works. If you have any questions. Add a comment to
this post.
I will see your comment
and give an answer to your question. I will help you to get a better
understanding of the function.
Next
Posts
In the next posts I'm
going to give you the complete AutoLISP program. I will also talk
about how AutoLISP programming is done.
And I have a post that is
about my business. It is about Make AutoCAD Fast. I will tell you
what I or my business could do for you.
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