Author Topic: Parking Lot Layout with Stalls ?  (Read 2330 times)

0 Members and 1 Guest are viewing this topic.

MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
Parking Lot Layout with Stalls ?
« on: March 25, 2005, 12:39:54 PM »
Does anyone have a good program that can create parking lots with stalls?

maybe you tell it the area of the lot

then it will calc and place stalls in it with a 24' drive aile... etc.

any ideas?

thanks!
Civil3D 2020

SPDCad

  • Bull Frog
  • Posts: 453
Parking Lot Layout with Stalls ?
« Reply #1 on: March 25, 2005, 02:19:43 PM »
I have not used it yet and I have only a demo version but it looks pretty cool!

http://www.caddautomationtools.com/

Its funny just last week I was thinking of writing a lisp to do just this very thing, and the next day I found the link mentioned above and  now you are asking for a similar lisp. Gee I better get started writing one. :O)
AutoCAD 2010, w/ OpenDCL

visit: http://reachme.at/spd_designs

delium55

  • Guest
Stall parking
« Reply #2 on: March 25, 2005, 04:05:39 PM »
See Tip|1552 Cadalyst, get the code ,september 1999 For the lisp ZPP

And one other around a arc.
;;   This routine allows the user to place parking stalls along an arc.
;;
;;   Written by Ron Engberg 12-2000



;; Radians to degrees   
(defun rtd (r)
   (* (/ r pi) 180)
)

;; Degrees to Radians
(defun dtr (r)
   (/ (* 2 pi) 360)
)



(defun c:arc-park (/ ent arc-pt1 stall-w stall-l arc-side arc-dir stall-count
         arc_list arc-cpt arc-diam s-ang e-ang arc-circ delta arc-length
         stall-angle-in stall-angle-out arc-base arc-rot-angle)

;;   Screen echo off
   (setvar "cmdecho" 0)

;;   Set to World UCS
   (command "ucs" "w")


;;   Parking stall information
   (setq ent (entsel "\nSelect ARC: "))
   (initget 1)
   (setq arc-pt1 (getpoint "\nStarting End of ARC:  "))
   (initget 7)
   (setq stall-w (getreal "\nStall Width:  "))
   (initget 7)
   (setq stall-l (getreal "\nStall Length:  "))
   (setq arc-side (getstring "\nInside or Outside < I,O >:  "))
   (setq arc-dir (getstring "\nClockwise or Counter Clockwise < CW,CCW >:  "))
   (initget 7)
   (setq stall-count (getint "\nNumber of Stalls:  "))


;;   Arc information
   
   (setq arc_list (entget (car ent)))
   (setq arc-cpt (cdr (assoc 10 arc_list)))      ;center point
   (setq arc-diam (* (cdr (assoc 40 arc_list)) 2))      ;arc diameter
   (if (or (= arc-side "I") (= arc-side "i"))
      (setq arc-diam (- arc-diam (* 2 stall-l)))
   )
   (setq   s-ang (cdr (assoc 50 arc_list))         ;start angle
      e-ang (cdr (assoc 51 arc_list))         ;end angle
      arc-circ (* pi arc-diam)         ;arc circumference
               ;arc length
   ); end arc info
   
;;   Test for delta angle
   (if (> s_ang e_ang)
           (setq delta (+ (- 6.2831853 s-ang) e-ang))
           (setq delta (abs (- s-ang e-ang)))
       ); end if

   (setq arc-length (* (cdr (assoc 40 arc_list)) delta))

;;   Angle for starter line
   (setq stall-angle-in (angle arc-pt1 arc-cpt)      ;stalls inside arc
         stall-angle-out (angle arc-cpt arc-pt1)      ;stalls outside arc
   ); end set group


;;   Rotation info
   (setq arc-base (/ arc-circ 360.0000)         ;length per degree
         arc-rot-angle (/ stall-w arc-base)      ;degrees per stall
   ); end set group


;;   Test for inside or outside
   (if (or (= arc-side "I") (= arc-side "i"))      ;case sensitive ?
      (command "line" arc-pt1 (polar arc-pt1 stall-angle-in stall-l) "")   ;if inside
      (command "line" arc-pt1 (polar arc-pt1 stall-angle-out stall-l) "")   ;else, outside
   );end if



;;   Test for clockwise or counter clockwise
   (if (or (= arc-dir "CCW") (= arc-dir "ccw"))      ;case sensitive ?
      (progn
         (repeat stall-count
            (command "array" "l" "" "P" arc-cpt "2" arc-rot-angle "Y")
         )
      ); if ccw
      (progn
         (repeat stall-count
            (command "array" "l" "" "P" arc-cpt "2" (- arc-rot-angle (* 2 arc-rot-angle)) "Y")
         )
      ); else cw
   ); end if


;;   Reset UCS
   (command "ucs" "p")
   (princ)

;;   Screen echo on
   (setvar "cmdecho" 1)
)

Good work,

François :wink: