;;; Flat Plate Flange Weight Calculator ;;; By Roy Smith, June, 1999 ;;; This routine calculates the weight in kilograms of ;;; a flat plate flange. ;;; (defun C:fpf () (setq lgth (getreal "\nOutside length of plate? ")) (setq wdth (getreal "\nOutside width of plate? ")) (setq thk (getreal "\nThickness of plate? ")) (setq a1 (* lgth wdth)) (setq a2 (* a1 thk)) (setq inlength (getreal "\nInside length of cutout? ")) (setq inwidth (getreal "\nInside width of cutout? ")) (setq a3 (* inlength inwidth)) (setq a4 (* a3 thk)) (setq a5 (- a2 a4)) (setq holes (getreal "\nAmount of holes in flange? ")) (setq dia (getreal "\nDiameter of holes in flange? ")) (setq h1 (* dia thk)) (setq h2 (* holes h1)) (setq a6 (+ a5 h2)) (setq wght (* a6 0.00000785)) (setq wstrng (rtos wght)) (princ (strcat "\nWeight = " wstrng)) (princ " Kilograms") (princ "\nEnd of Program") (princ) )