home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p068 / 4.img / SP.CDL < prev    next >
Encoding:
Text File  |  1989-01-04  |  1.2 KB  |  74 lines

  1. REM  @(#)CADKEY SOLIDS    sp.cdl    2.2    10/31/88
  2. REM Solid Primitives Main Program
  3.  
  4. REM find out the number of groups already existing
  5. i = 0
  6. :lpgrp
  7. i = i + 1
  8. GETGROUP i
  9. if ((i < 128) && (@intdat[0] != 0))
  10. goto lpgrp
  11. if (i == 128)
  12.         goto overflow
  13.  
  14. REM ptot is the total number of groups
  15. ptot = i - 1
  16.  
  17. :menu
  18. getmenu "Choose option",\
  19.         "BLOCK",\
  20.         "CONE",\
  21.         "CYLNDER",\
  22.         "SPHERE",\
  23.         "TORUS",\
  24.         "WEDGE",\
  25.         "EXIT"
  26.  
  27. on (@key + 3) goto exit2, exit2, menu,, blk, con, cyl, sph, trs, wdg, exit
  28. goto menu
  29.  
  30. :blk
  31. dosub block
  32. goto menu
  33.  
  34. :con
  35. dosub cone
  36. goto menu
  37.  
  38. :cyl 
  39. dosub cylinder
  40. goto menu
  41.  
  42. :sph
  43. dosub sphere
  44. goto menu
  45.  
  46. :trs
  47. dosub torus
  48. goto menu
  49.  
  50. :wdg
  51. dosub wedge
  52. goto menu
  53.  
  54. :overflow
  55. pause "Group overflow ... Abnormal termination"
  56. abort
  57.  
  58. :exit
  59. getmenu "Exit sp?",\
  60.         "NO",\
  61.         "YES"
  62.  
  63. if (@key != 2)
  64.         goto menu
  65.  
  66. :exit2
  67. REM clear all the variables
  68. clear     i, ptot, vmat, len, rad1, rad2, sect, def, x1, y1, z1, x2, y2, z2,\
  69.     xn, yn, zn, xx, xy, xz, yx, yy, yz, mn, mx, my, dx, dy, dz, xc,yc,\
  70.     zc, arr, $grp, inc, diff, rad, vmat1, vmat2, vmat5, vwwld, vnum,\
  71.         ret_flag, xt, r, ltype
  72.   
  73. exit
  74.