Exchange Forum > AutoLISP and Visual LISP
Not experienced enough to do
Page 1 of 2
1 2
Not experienced enough to do

#1

One Shot
Join Date:
04-23-2008
I have these 2 lisp routines that creates Brick Jack Arches and a Brick Arch in 2D. I would like to modify these lisps, but it is far more involved than my Lisp experience. I have been trying to learn lisp for the past 2 years. I get going and then I get pulled away each time.
 
What I would like to do is to have these lisp extrude out so they can be 3D. Please see below:
 
The Brick size is 3 5/8" x 2 1/4" x 8" with 3/8" joint.
The Keystone size is 4 3/4" thick.
 
I will send the second lisp this evening when I get home.
 
Please see the attachments for the example lisp and a dwg file to see what they look like.
 
Thank you,

Attachments  Brick_archs.zip  
Not experienced enough to do

#2

Bennett
Join Date:
07-26-2007
Keep on digging into it every chance you get! It will pay off in time.
I'll take a look at your attachment after work to see what I can figure out.
Not experienced enough to do

#3

One Shot
Join Date:
04-23-2008
Thank you very much!
Not experienced enough to do

#4

Bennett
Join Date:
07-26-2007
I looked into your attached lisp functions. The CurveJack-v3-2.lsp is great! The JackArchs.lsp ran smooth on the options for 4C and 4CK, but reported missing some blocks in the support path when I choose 3C and 3CK options. I don’t work in 3D, but I think it’s possible to create it in 3D. It would be quiet a project however.
Not experienced enough to do

#5

One Shot
Join Date:
04-23-2008
Quote:
I looked into your attached lisp functions. The CurveJack-v3-2.lsp is great! The JackArchs.lsp ran smooth on the
options for 4C and 4CK, but reported missing some blocks in the support path when I choose 3C and 3CK options.
I don’t work in 3D, but I think it’s possible to create it in 3D. It would be quiet a project however.
 
Thank you very much. The 3C & 3CK should work and it worked I ran it. For some reason the soldier course routine is not working within this lisp.
Not experienced enough to do

#6

Bennett
Join Date:
07-26-2007
I'll take another look at it around lunch and try to find out exactly where I was getting that error message. Have a great one.
Not experienced enough to do

#7

Bennett
Join Date:
07-26-2007
Here's where the code is crashing if I choose options 3C or 3CK.
The value for SDLIST is being setq to nil which is crashing the next "-block" part of the code.
I'll have to take a look into it next week.
 
Code:
(setq SDLIST (SOLDIER-CALC PT-LIST KEY-LIST BRICK))
(princ "\nSDLIST = ")(princ SDLIST);added to test code
(setq SSLIST (DRAWJACK PT-LIST KEY-LIST ARCH-TYPE))
(if (= ANSWER "Yes")
  (command "-block" BLOCK-NAME ANSWER BLOCK-INS SSLIST SDLIST "")
  (command "-block" BLOCK-NAME BLOCK-INS SSLIST SDLIST "")
)
SDLIST = nil
Not experienced enough to do

#8

One Shot
Join Date:
04-23-2008
Quote:
I'll take another look at it around lunch and try to find out exactly where I was getting that error message. Have a
great one. 
 
How is everything going?
Not experienced enough to do

#9

Bennett
Join Date:
07-26-2007
Ok, this took a while to debug. At the end of the defun named SOLDIER-CALC it needs SD-LIST as the last line of the defun.
 
Look for this defun:
Code:
(defun SOLDIER-CALC (PT-LIST KEY-LIST BRICK / ...
Goto the end of the defun. It should look like this:
Code:
 (setq SD-LIST (DRAW-SOLDIER-VER SOLDIER-LOWER SOLDIER-UPPER))
 (if (= (substr ARCH-TYPE 1 1) "4")
  (setq SD-LIST (DRAW-SOLDIER-HOR SOLDIER-LOWER SOLDIER-UPPER SD-LIST))
 )
)
Make it read like this:
Code:
 (setq SD-LIST (DRAW-SOLDIER-VER SOLDIER-LOWER SOLDIER-UPPER))
 (if (= (substr ARCH-TYPE 1 1) "4")
  (setq SD-LIST (DRAW-SOLDIER-HOR SOLDIER-LOWER SOLDIER-UPPER SD-LIST))
 )
 SD-LIST
)
Notice I added the SD-LIST before the last ")". What was happening was, that the if statement at the end only allowed the 4C and 4CK types to return the value for SD-LIST. The 3C and 3CK types were setq on the line before but the if statement messed it up.
The next defun following this section should be DRAW-SOLDIER-HOR.
Not experienced enough to do

#10

Zeanor
Join Date:
07-26-2007
Bennett,
He might also consider putting the setq SD-LIST for the 3C and 3CK inside the if statement. That way he wouldn't need the SD-LIST at the end.
 
Code:
 (if (= (substr ARCH-TYPE 1 1) "4")
  (setq SD-LIST (DRAW-SOLDIER-HOR SOLDIER-LOWER SOLDIER-UPPER SD-LIST))
  (setq SD-LIST (DRAW-SOLDIER-VER SOLDIER-LOWER SOLDIER-UPPER))
 )
)
Page 1 of 2
1 2