home *** CD-ROM | disk | FTP | other *** search
- REM @(#)CADKEY SOLIDS sp.cdl 2.2 10/31/88
- REM Solid Primitives Main Program
-
- REM find out the number of groups already existing
- i = 0
- :lpgrp
- i = i + 1
- GETGROUP i
- if ((i < 128) && (@intdat[0] != 0))
- goto lpgrp
- if (i == 128)
- goto overflow
-
- REM ptot is the total number of groups
- ptot = i - 1
-
- :menu
- getmenu "Choose option",\
- "BLOCK",\
- "CONE",\
- "CYLNDER",\
- "SPHERE",\
- "TORUS",\
- "WEDGE",\
- "EXIT"
-
- on (@key + 3) goto exit2, exit2, menu,, blk, con, cyl, sph, trs, wdg, exit
- goto menu
-
- :blk
- dosub block
- goto menu
-
- :con
- dosub cone
- goto menu
-
- :cyl
- dosub cylinder
- goto menu
-
- :sph
- dosub sphere
- goto menu
-
- :trs
- dosub torus
- goto menu
-
- :wdg
- dosub wedge
- goto menu
-
- :overflow
- pause "Group overflow ... Abnormal termination"
- abort
-
- :exit
- getmenu "Exit sp?",\
- "NO",\
- "YES"
-
- if (@key != 2)
- goto menu
-
- :exit2
- REM clear all the variables
- clear i, ptot, vmat, len, rad1, rad2, sect, def, x1, y1, z1, x2, y2, z2,\
- xn, yn, zn, xx, xy, xz, yx, yy, yz, mn, mx, my, dx, dy, dz, xc,yc,\
- zc, arr, $grp, inc, diff, rad, vmat1, vmat2, vmat5, vwwld, vnum,\
- ret_flag, xt, r, ltype
-
- exit
-