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

0 Members and 1 Guest are viewing this topic.

hornet 103

  • Guest
British building regulation stair program wanted
« on: February 13, 2006, 05:08:47 PM »
Hello everyone.
I'm looking to sort out one stair drawing program covering 5 different British building regulations.
1) Part M covers wheel chair users = which has a rise no more than 170mm and going no less than 250mm max rise = 1800mm
before a landing, with a maximum of 16 rises

2) Part B Fire escape stairs, = number of people in the building trying to get out = width of stairs. see print out.

3) Part K private house stairs = rise = 155 - 220, going = 245 - 260, with a maximum angle of 42 degrees

4) Part K Public Stairs = rise= 135 - 180, going = 280 - 340 with a maximum angle of 38 degrees

5) Part K other stairs = rise = 150, going = 320 with a maximum angle of 35 degrees

I have attached one lisp I have started but I need help, lots of it. please :-o


fire stairs info.jpg

stair rise and going.jpg

stairs part M Building regs.jpg


« Last Edit: February 13, 2006, 06:12:56 PM by CAB »

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: British building regulation stair program wanted
« Reply #1 on: February 13, 2006, 06:13:44 PM »
Welcome to the swamp. :-)

Hope you don't mind but I moved your pictures so they are download on demand.
They were so large they made the display of this post very slow.
Just click in the link to download them.
« Last Edit: February 13, 2006, 06:22:28 PM by CAB »
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.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: British building regulation stair program wanted
« Reply #2 on: February 14, 2006, 09:07:18 AM »
hornet
The first order of business is to establish a game plan. That usually means creating pseudo code.
Most people skip that step or do it in there heads which sometimes results in an unclear direction
and you fall short of your goal.

As I see it the goal is to draw a stair profile that is within the code requirements form information
gathered from the user. The pseudo code might be something like this:


Code: [Select]
Pick a name for the routine that is easy to remember. You did ->  C:STEP

Housekeeping, saving & setting system variables. You did -> ;Initialize AutoCAD variables

User to select which set of rules to work with:
    1) Part M wheel chair
    2) Part B Fire escape
    3) Part K private house
    4) Part K Public
    5) Part K other stairs
   
Get the stair information needed to calculate the stair:
    Get total rise, error check using the rules
    User choice of method,
        1) number of risers desired
        2) individual riser height desired
        3) total 'going', we call that 'run'
       
Get input based on the method 1 or 2 or 3
   1) Get number of risers desired
      Divide total height by number of risers, error check the rules for max riser ht.
   2) Get individual riser height desired
      Error check that the riser is within limits of rules
      Divide total height by the rise, if <= 16 calculate the actual riser
             (setq riser_ht (/ total_height (fix (/ total_height user_riser))))
   3) Get the total 'going'
      Error check that the riser is within limits of rules
      Calculate the number of steps
     
Calc the remaining values based on the rules
   If there are more than one configuration within the rules let the user pick the one to use
   
Get the user to pick the base of stairs

User choice of direction, up to Left or Right

Draw the stairs


Does that seem like a valid direction?
Does it meet your criterion?
How would you change it if not?
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.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: British building regulation stair program wanted
« Reply #3 on: February 14, 2006, 09:25:40 AM »
Quote
Get the user to pick the base of stairs
User choice of direction, up to Left or Right

OR ..

Pick top nosing ..and go down .. etc, etc

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

GDF

  • Water Moccasin
  • Posts: 2081
Re: British building regulation stair program wanted
« Reply #4 on: February 14, 2006, 09:50:30 AM »
Here is some code to get you started. It is not a standalone routine, it requires the base arch program to work. You will have
to dig out the code and modify it to meet your code standards. Let me know if you need help.

Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: British building regulation stair program wanted
« Reply #5 on: February 14, 2006, 10:06:24 AM »
Gary,
That my take some digging to get at the code he needs. Judging from the lisp
Hornet posted it may be beyond his current ability to decipher your code.

Not sure of hornet's desires but I think he wanted help refining his code.

I think I remember Tim wrote a basic stair routine some where.
Maybe he will post it to show how the the geometry can be generated.

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.

GDF

  • Water Moccasin
  • Posts: 2081
Re: British building regulation stair program wanted
« Reply #6 on: February 14, 2006, 10:13:43 AM »
Allen

You are correct. Most of  the routine I posted is from Timothy G. Spangler in 2003. I added to and modified his code. I just wanted to show an example of how it could be done.
To me that is one of the easiest ways is to learn how other people tacked a problem. Mr. Spangler probably has a better updated version.

Looking to the future, if I had the time and the experience I would now use dynamic blocks to draw steps (stairs) in plan and section.

Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

LE

  • Guest
Re: British building regulation stair program wanted
« Reply #7 on: February 14, 2006, 10:32:29 AM »
Here is one is a VLX file.... for metal stairs using the UBC-1994

hornet 103

  • Guest
Re: British building regulation stair program wanted
« Reply #8 on: February 14, 2006, 11:13:40 AM »
Hello Cab
thanks for having a look at the stair problem
you are quite right I do not have the skills to sort this problem out.
I was trying to get all three views, I would cheat a bit, by copying the finished 3d wire frame, into those views, however not everyone would think in 3d, thereby not use the program effectively. 

The Timothy Sprangler program looked very complicated to me. maybe he tried to do the same as above.

When placing the stairs in a drawing, I think I would pick the point of the bottom tread, let the program work, then pick a corner of the brickwork, then onto the next corm er, this may produce a landing area, thereby building up a stair tower.  I guess I would work from left to right 

Does that seem like a valid direction?    yes
Does it meet your criterion?                yes
How would you change it if not?         n/a

please keep in touch

Hornet 
by the way the Hornet 103 is a de Havilland plane

T.Willey

  • Needs a day job
  • Posts: 5251
Re: British building regulation stair program wanted
« Reply #9 on: February 14, 2006, 11:15:52 AM »
I think I remember Tim wrote a basic stair routine some where.
Maybe he will post it to show how the the geometry can be generated.
You have a good memory Alan.  Here is the one I wrote for This thread.
Code: [Select]
(defun c:CreateStairs (/ Pt1 Pt2 VerDist MinStairs Risers HorDist TrdSize RsrSize cnt PtLIst)

(if
 (and
  (setq Pt1 (getpoint "\n Select bottom point to start stairs: "))
  (setq Pt2 (getpoint Pt1 "\n Select top point of stairs: "))
  (setq VerDist (- (cadr Pt2) (cadr Pt1)))
  (setq MinStairs (/ VerDist 11.5))
  (setq Risers (getint (strcat "\n Enter number of risers: \(minimun of " (rtos MinStairs 2 0) "\) ")))
  (>= Risers (fix MinStairs))
 )
 (progn
  (setq HorDist (abs (- (car Pt1) (car Pt2))))
  (setq TrdSize (/ HorDist (1- Risers)))
  (setq RsrSize (/ VerDist Risers))
  (setq cnt 0)
  (setq PtList (cons Pt1 PtList))
  (while (< cnt Risers)
   (setq Pt1 (list (car Pt1) (+ (cadr Pt1) RsrSize) (caddr Pt1)))
   (setq PtList (cons Pt1 PtList))
   (if (equal cnt Risers)
    (setq PtList (cons Pt2 PtList))
    (setq PtList
     (cons
      (setq Pt1 (list (+ (car Pt1) TrdSize) (cadr Pt1) (caddr Pt1)))
      PtList
     )
    )
   )
   (setq cnt (1+ cnt))
  )
  (command "_.pline")
  (foreach i PtList
   (command i)
  )
  (command "")
 )
)
(princ)
)
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

LE

  • Guest
Re: British building regulation stair program wanted
« Reply #10 on: February 14, 2006, 11:27:56 AM »
For those swamper's using AutoCAD 2006 and implementing the DBlocks, it will be easy and worth to use that new objects to generate a dynamic stair?.... or that still as is the DBlocks is not possible.... ?

Thanks.

GDF

  • Water Moccasin
  • Posts: 2081
Re: British building regulation stair program wanted
« Reply #11 on: February 14, 2006, 11:31:00 AM »
Luis

Sweet little routine. I like it.

Tim

Is this only to give a reference points for risers?
Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

T.Willey

  • Needs a day job
  • Posts: 5251
Re: British building regulation stair program wanted
« Reply #12 on: February 14, 2006, 11:33:28 AM »
Tim

Is this only to give a reference points for risers?
Gary
I don't really remember.  I wrote it to suit the needs of the OP on the thread mentioned.  Sorry couldn't be more help, it was just a quick little one. :-)
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

GDF

  • Water Moccasin
  • Posts: 2081
Re: British building regulation stair program wanted
« Reply #13 on: February 14, 2006, 11:44:36 AM »
Luis

Yes, the more I think about it dblocks would be the way to go. Or you could create a custom object in arx?

Quick question Luis, I hear the AutoCAD 2007 due to come out this summer will be a new format, which means all
the arx files will need to be updated?

Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

LE

  • Guest
Re: British building regulation stair program wanted
« Reply #14 on: February 14, 2006, 11:50:52 AM »
Or you could create a custom object in arx?

Yes.

Quote
Quick question Luis, I hear the AutoCAD 2007 due to come out this summer will be a new format, which means all
the arx files will need to be updated?

I have no idea, if that version is going to use the latest compiler [V8 ? ]... I don't think they will be able to port ALL the arx classes into managed code.... but that's what I think.

In the worst case scenario... then I would have to upgrade my VC++ compiler... not a big deal [if I have the money]...  :roll: