slab section profile polyline

slab section profile polyline

DC-MWA
Collaborator Collaborator
1,793 Views
6 Replies
Message 1 of 7

slab section profile polyline

DC-MWA
Collaborator
Collaborator

Hi all,

In need of a way to quickly draw a slab profile by user input. Maybe something similar I can use as a starting point?

See image of what I'm trying to achieve...

Capture.JPG

Thank you.

0 Likes
Accepted solutions (1)
1,794 Views
6 Replies
Replies (6)
Message 2 of 7

Sea-Haven
Mentor
Mentor

Happy to do something for you, but it would be from a commercial point of view, this is like question 1, I know question 2 3 4 5 will follow. I have 30 years experience and know the request will grow.

 

I am suggesting its more efficient to code multiple shapes as you have a consistent approach. 

 

The attached Pdf gives you an idea of some of the stuff I have done.

 

The input would be via a dialouge screen so its more descriptive rather than just line after line input. Beam cross sections are pretty straight forward. 

 

An example is a waffle slab just pick outside edge and waffles are placed including arcs in slab shape.

 

 

ScreenShot041.jpg

0 Likes
Message 3 of 7

DC-MWA
Collaborator
Collaborator

Well thank you for the reply.

Although... I primarily do custom homes in the evening. I use perimeter footings as shown, "T" footing with raised wood floor framing, stemwall and retaining walls now and then and that's about it. During the day, the commercial applications  I do vary so much from huge Mat slabs to caissons, and on and on... To many variations and applications to try and solve with one lisp program.

I am pretty much trying to streamline my residential applications so my drafter can get it right and do it fast.

0 Likes
Message 4 of 7

Moshe-A
Mentor
Mentor
Accepted solution

@DC-MWA  hi,

 

here is my version. of course it better done with  dialog box and this is on you Smiley LOL

 

enjoy

moshe

 

(defun C:SlabSec (/ set_defaults askReal ;local functions
		    sysvars^ slab-length slab-thickness left-beam-depth right-beam-depth p0 p1 p2 p3 p4 p5 p6)

 (defun set_defaults ()
  (mapcar
    '(lambda (var def)
      (if (= (getvar var) 0)
       (setvar var def)
      )
     ); lambda
    sysvars^
   '(1200.0 100.0 280.0 320.0)
  ); mapcar
 ); set_defaults
  
 (defun askReal (msg def / ask)
  (initget (+ 2 4))
  (if (not (setq ask (getreal (strcat "\n" msg " <" (rtos def 2) ">: "))))
   (setq ask def)
   (setq def ask)
  )
 ); askReal

 ; here start command
 (setq sysvars^ '("userr1" "userr2" "userr3" "userr4")) 
 (set_defaults)
  
 (if (and
       (setvar (nth 0 sysvars^) (setq slab-length 	(askReal "Slab length"      (getvar (nth 0 sysvars^)))))
       (setvar (nth 1 sysvars^) (setq slab-thickness  	(askReal "Slab thickness"   (getvar (nth 1 sysvars^)))))
       (setvar (nth 2 sysvars^) (setq left-beam-depth 	(askReal "Left beam depth"  (getvar (nth 2 sysvars^)))))
       (setvar (nth 3 sysvars^) (setq right-beam-depth 	(askReal "Right beam depth" (getvar (nth 3 sysvars^)))))
       (setq p0 (getpoint "Specify upper left corner: "))
     )
  (command "._pline" p0 "_w" "0" "0"
           (setq p1 (list (+ (car p0) slab-length) (cadr p0)))
	   (setq p2 (list (car p1) (- (cadr p1) right-beam-depth)))
	   (setq p3 (list (- (car p2) right-beam-depth) (cadr p2)))
	   (setq p4 (list (car p3) (+ (cadr p3) (- right-beam-depth slab-thickness))))
	   (setq p5 (list (- (car p4) (- slab-length left-beam-depth right-beam-depth)) (cadr p4)))
	   (setq p6 (list (car p5) (- (cadr p5) (- left-beam-depth slab-thickness))))
	   (list (- (car p6) left-beam-depth) (cadr p6))
	   "_close")
 ); if

 (princ)  
)

 

 

0 Likes
Message 5 of 7

Sea-Haven
Mentor
Mentor

To many variations and applications to try and solve with one lisp program.

 

You are right its a case of not one lisp but rather  a series of functions that draw the required output. My house package has around 104 lisp's it it gets options added as required.

 

Most footings have a common theme single strip L T etc so the approach is ask questions and draw the answer. In your image you need also the reinforcement to be added.

 

I appreciate your designs vary but again can be broken down into similar objects. The other way is to use dynamic blocks.

 

Moshe-a I have attached my multival dcl it creates a dcl on the fly with as many lines as you want, its called via 2 lines of code. I like the variable names makes it easier to see whats going on, like you I use default values. Here is this project add or remove required input 8 7 is input characters, ans is a list of strings of the returned values. Use nth etc.

(if (not AH:getvalsm)(load "Multi Getvals.lsp"))
(setq ans (AH:getvalsm (list "Double beam edge" "Enter length" 8 7 "1000" "Enter slab thickness" 8 7 "100" "Beam depth" 8 7 "330" "Beam width" 8 7 "300")))

The other thing I would have added was the dimensions already mentioned the reo missing.

 

Could be expanded to edgebeam1 edgebeam 2 being different pretty quick.

 

Lastly to dc-mwa if your happy to post some images or pdfs happy to look at whats involved in automating them. Private message etc.

 

 

 

 

 

0 Likes
Message 6 of 7

DC-MWA
Collaborator
Collaborator

Thank you Moshe.  I was able to take this and modify it slightly to do what I needed.

0 Likes
Message 7 of 7

DC-MWA
Collaborator
Collaborator

Thank you for you input. On this one I think I'll just keep it simple.

0 Likes