Author Topic: British building regulation stair program wanted  (Read 7506 times)

0 Members and 1 Guest are viewing this topic.

hornet 103

  • Guest
Re: British building regulation stair program wanted
« Reply #15 on: February 15, 2006, 11:04:22 AM »
Hello Cab

I'm not sure what you want me to do now? :oops:

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: British building regulation stair program wanted
« Reply #16 on: February 15, 2006, 12:13:13 PM »
I've been slaying dragons here so I need a little more time.
Maybe someone will jump in there and help out.
If not I'll try to get you going tonight.

But basically you replace the pseudo code with lisp code.
Looking at your routine you have some of the code already.
You don't have to have every option working to test the routine so
Lets start with the Private stair.

Roughly

Code: [Select]
(Defun C:STEP ()
  ;;Initialise AutoCAD variables
  (Setq BM (Getvar "BLIPMODE"))
  (Setvar "BLIPMODE" 0)
  (Setq CE (Getvar "CMDECHO"))
  (Setvar "CMDECHO" 0)
  (Setq OM (Getvar "OSMODE"))
  (Setvar "OSMODE" 0)

;;=========================================================
(intget "Private Public Escape Handicap Other")
(setq stair_type (getkword "\nSelect stair type. [Private\Public\Escape\Handicap\Other] <Private> "))
(or stair_type (setq stair_type "Private"))

;;=========================================================
;;  set rules based on stair type
;;=========================================================
(cond
  ((= stair_type "Private")
    ;; set rules for private
    (setq min_rise  155
          max_rise  220
          Min_going 245
          Max_going 260
          max_angle 42
          min_height  (* min_rise 2)
          max_height 1800  ; ??
          )
   )
  ((= stair_type "Public")
    ;; set rules for private
    (setq max_rise xxx
          min_rise xxx
          Max_going xxx
          Min_going xxx
          max_angle xx
          )
   )
)

;;=========================================================
;; Get the stair information needed to calculate the stair:
;;=========================================================

;; Get total rise
(while
  (if
    (<= min_height
       (progn
         (initget 7)
         (setq total_rise (getdist "\nEnter the total rise of stairs: "))
       )
       max_height
     )
     nil ; exit loop
     (prompt (strcat "\n**  Error, Value is out of range. ["
                     (itoa min_hight) " to "
                     (itoa max_hight) "]"))
  )
)
     

    User choice of method,  error check using the rules
        1) number of risers desired
        2) individual riser height desired
        3) total 'going', we call that 'run'
  start uset input

;;

Just threw this together to give you the idea.
That's all I have time for now....
Code: [Select]
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

hornet 103

  • Guest
Re: British building regulation stair program wanted
« Reply #17 on: February 19, 2006, 05:32:21 PM »
hello Cab and Everyone

I have now added some more stair info to this file

still not sure how to join the two lots of lsp together to get them to work
but it loads :?

Hornet 103