Author Topic: Frightening Stuff ....  (Read 2332 times)

0 Members and 1 Guest are viewing this topic.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Frightening Stuff ....
« on: November 30, 2006, 03:12:36 AM »
I was burning some DVD'd from disk backups this afternoon.

Came across this ....
it's been stored away in the dark for a few years ....

Frightens me ...  both the age of it and the fact that the style is almost indistinguishable from yesterdays code.

I'll just post the module for collecting the data.

Code: [Select]
;;    Last change:  BRW   4 Oct 97    1:27 pm  Edit text output :
;;; Program to develop branch pipe to straight pipe
;;;------------
;;; PIPE_101.LSP
;;; Property of Kerry Brown
;;; Mar/1991
;;;
(defun p:get ()
  (while  (not (p:mmax 20.0 1200.0 (setq
          b-dia (p:real 0.0 "Diameter of branch to be developed"))))
  )
  (setq rad_b  (/ b-dia 2.0))
  (while  (not (p:mmax 0 rad_b (setq
          wt (p:real 0.0 "Wall thickness of branch"))))
  )
  (while  (not (p:mmax 4.0 360.0 (setq
          nsteps  (p:real 180.0 "Number of steps around development"))))
  )
  (if (/= 0 (rem nsteps 4))
    (prompt (strcat "Steps set to " (rtos (+ 4.0 (* 4.0 (fix (/ nsteps 4.0)))))))
  )
  (while  (not (p:mmax 5.0 90.0 (setq
          a1 (p:real  45.0 "Angle between pipe centre-lines"))))
  )
  (while  (not (p:mmax b-dia 1200.0 (setq
          m-dia (p:real  b-dia "What is diameter of main pipe"))))
  )
  (setq
    a1    (p:110 a1)
    rad_w (- rad_b wt)
    rad_m (/ m-dia 2.0)
  )
  (if (/= b-dia m-dia)
    (progn
      (initget "N F")
      (setq dpoff (getkword "Offset center lines [ Near side or Far side ] < N / F / ENTER for none >"))
      (if dpoff
        (progn
          (while  (not (p:mmax 0 (- rad_m rad_b) (setq
                  poff (p:real 0 "Offset between center-lines "))))
          )
          (if (= dpoff "F")
            (setq poff (- poff))
          )
        )
        (setq poff 0)
      )
    )
    (setq poff 0)
  )
)
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.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Frightening Stuff ....
« Reply #1 on: November 30, 2006, 03:21:54 AM »
OMG !! I was SO polite back then ... 'please' even :lol:

Code: [Select]
;;;------------------------
(defun p:mmax (mi ma x / )
  (if (and (>= x mi) (<= x ma) )
    (setq x T)
    (progn
      (setq x nil)
      (prompt (strcat "..between " (rtos mi)  " and " (rtos ma) " only please.."))
    )
  )
  x
)
;;;---------------
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.

Maverick®

  • Seagull
  • Posts: 14778
Re: Frightening Stuff ....
« Reply #2 on: November 30, 2006, 08:59:42 AM »
That's funny Kerry. 


Bob Wahr always used to put interesting things in his dialog boxes.  :-D

daron

  • Guest
Re: Frightening Stuff ....
« Reply #3 on: November 30, 2006, 09:05:51 AM »
What happened to you Kerry? Please? How unlike you. :lol:

JohnK

  • Administrator
  • Seagull
  • Posts: 10659
Re: Frightening Stuff ....
« Reply #4 on: November 30, 2006, 09:47:37 AM »
OMG !! I was SO polite back then ... 'please' even :lol:

fricken' sissy!
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org