TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: pedroantonio on July 19, 2018, 04:37:48 AM

Title: Foundation_Footings lisp?
Post by: pedroantonio on July 19, 2018, 04:37:48 AM
Hi i am trying to find  a Foundation_Footings lisp

1) Select the colum (the magenda close polyline)
2) Give the w and b or if is a corner colun give w,b,b1

And from the center of the colun create the footing like the photo 1

Thanks
Title: Re: Foundation_Footings lisp?
Post by: ribarm on July 21, 2018, 09:01:18 AM
Someone removed replies... I am 100% sure ronjonp replied and I think there were also more things to be seen...
Title: Re: Foundation_Footings lisp?
Post by: HasanCAD on July 22, 2018, 03:24:02 AM
Someone removed replies... I am 100% sure ronjonp replied and I think there were also more things to be seen...
I am sure too
I notced this issue more than one time
The replies removed
Title: Re: Foundation_Footings lisp?
Post by: ronjonp on July 24, 2018, 09:03:01 AM
I removed the code because it did not answer the question. It just offset the object outward at a given distance and the OP is asking about entering predefined distances relating to the results edges.
Title: Re: Foundation_Footings lisp?
Post by: pedroantonio on July 25, 2018, 04:39:55 AM
hI  ronjonp I don't want to write the distanses. I put the distanses because is not only an offset from the magenta line. it's an offset the enter of the magenta box. Fot example  w =1.60 and b 1.20

we have offet for the b  0.60 and offset for the w = 0.80 .
Title: Re: Foundation_Footings lisp?
Post by: ronjonp on July 25, 2018, 10:43:04 AM
hI  ronjonp I don't want to write the distanses. I put the distanses because is not only an offset from the magenta line. it's an offset the enter of the magenta box. Fot example  w =1.60 and b 1.20

we have offet for the b  0.60 and offset for the w = 0.80 .
Yup ... that's why I removed my code because it did not do that.
Title: Re: Foundation_Footings lisp?
Post by: ronjonp on July 25, 2018, 11:13:57 AM
It would help too if your examples were actually drawn to scale ... assuming this is what your last post was describing.

Title: Re: Foundation_Footings lisp?
Post by: pedroantonio on July 25, 2018, 01:54:38 PM
This is the correct example. The dimensions is not necessary
Title: Re: Foundation_Footings lisp?
Post by: CAB on July 26, 2018, 01:03:27 PM
Your L shaped column foundation does not look correct.I would expect B1 to be the same as W.So left side is B and bottom is B, top is W and right side is W.If the long sides are not equal then there would be a B (left) and B1 (bottom)It would be less likely that W would change.
Title: Re: Foundation_Footings lisp?
Post by: ronjonp on July 26, 2018, 01:04:41 PM
Your L shaped column foundation does not look correct.I would expect B1 to be the same as W.So left side is B and bottom is B, top is W and right side is W.If the long sides are not equal then there would be a B (left) and B1 (bottom)It would be less likely that W would change.
Didn't make sense to me either and it's rally hard to tell without a DWG.  :?
Title: Re: Foundation_Footings lisp?
Post by: BIGAL on July 26, 2018, 11:13:34 PM
The guy on the backhoe will dig a square footing !At the sizes shown it just would not make sense for the extra time involved. On a large footing the excavation cost and extra concrete would start to infuence. The time cutting reo would probably be more than the hole dig shape cost.
Title: Re: Foundation_Footings lisp?
Post by: jaydip on July 27, 2018, 01:46:47 AM
Hi I am new to autolisp and this forum I hope this what you want this lisp is for center columns if this is what you want can work for 2nd one. (command's can be replaced with entmake function ).
however I know below code is not same as you requested.. but I think by selecting close pline it will not work as 1st point of pline will not be always same (it can be bottom corner sometimes or it can be top left corner ... its up to how user has created it). experts please correct me if I am wrong... and I am not sure how can we get center of close pline by selecting it..... below code will work same as same as you want but it needed more user input.... I hoping for better code then this from experienced people.

Code - Auto/Visual Lisp: [Select]
  1. (defun c:footing ()
  2.         (setq pw (getdist "\nGet Horizontal length of Pedestal:")
  3.                   pb (getdist "\nGet Vertical length of Pedestal:")
  4.                   p1 (getpoint "\nProvide center of pedestal:")
  5.                   p2 (list (- (car p1) (/ pw 2)) (+ (cadr p1) (/ pb 2)))
  6.                   p3 (list (+ (car p2) pw) (cadr p2))
  7.                   p4 (list (car p3) (- (cadr p3) pb))
  8.                   p5 (list (car p2) (cadr p4))
  9.                   )
  10.         (setq w (getreal "\nProvide Horizontal length of footing:")
  11.                   b (getreal "\nProvide Vertical Length of footing:")
  12.                   p6 (list (- (car p1) (/ w 2)) (+ (cadr p1) (/ b 2)))
  13.                   p7 (list (+ (car p6) w) (cadr p6))
  14.                   p8 (list (car p7) (- (cadr p7) b))
  15.                   p9 (list (car p6) (cadr p8))
  16.                   )
  17.         (setq oldos (getvar "osmode"))
  18.         (setvar "osmode" 0)
  19.         (command "pline" p6 p7 p8 p9 "c")
  20.         (command "line" p2 p6 "" "line" p3 p7 "" "line" p4 p8 "" "line" p5 p9)
  21.         (setvar "osmode" oldos)
  22.         (princ)
  23.         )

thank you..

jay