Wednesday, December 24, 2008

Lisp: Everyone draws pipes don't they?

Of course they don't. I know that. Here is now made available, not exactly on a plate, a FREE, fun way to draw pipes. Not quite the end of drafting drudgery, but the start of the end!

Unfortunately, when I tried to put them on my blog all the lines ended up all over the place.

So I have made the decision to make the files available on a "request only" basis. That means you e-m-a-i-l me, asking for them, and I send them to you. (For free). I am trying to avoid the spammers here by saying think about blecouteur at xtra dot co dot nz.

In the process of testing: another snafu-the dialog box won't fit on the screen. This is because at work I have a big screen.....So I have now 2 dialog boxes to send you- one a chopped down one and one that is the full nine bananas. The small one does dairy pipes only-Grr...I will have to see about more columns...which can be done, it just makes life more complicated. It probably needs doing anyway. Try the full one called pipeset.dcl. if it does not work try the smaller one.

Every time I use this routine I am pleased at the appearance of pipes, as if by magic. There is a certain amount of ego stuff here, but I am at least honest enough to say that out there somewhere someone has done the same thing. (Probably a while ago.)

I had thought briefly of selling the combined routine, but they are very short routines, and any

capable lisp writer, if they had seen them being used, would be able to re-write them easily.

The idea is you run one routine initally to set the diameter of the pipe you want to be drawing.

The name of this routine is pipeset.lsp

Then you draw lines representing the pipe routes. Fiddle around with these to get them right.

Next, use pir.lsp to do the pipe radii. Unfortunately you have to do this elbow by elbow. One day I may make a routine to do this all in one hit.

Now comes the big moment: Set the routine pip.lsp onto that bunch of lines/arcs. That's right just select the damn lot all at once! Whoopee!....or it should be.

One of the routines uses a dialog box. This is contained in a separate file called a .dcl file.

The trick with this one is that the routine that accompanies it (pipeset.lsp), needs to know where you stuck it on your hard drive. You should be able to see the bit early on in the routine saying where the dialog file is kept.

Some people just get lazy and stick them all in the support directory, but this can be a pain if you upgrade.