home *** CD-ROM | disk | FTP | other *** search
/ Global Amiga Experience / globalamigaexperience.iso / compressed / graphic / vertex2.0demo.dms / vertex2.0demo.adf / Vertex / Rexxy / BevelIt.vert next >
Text File  |  1993-06-24  |  3KB  |  82 lines

  1. /* Arexx */
  2.  
  3. options results
  4.  
  5. /*
  6.     Okay, this little script will bevel and then make proper smoothing
  7.     objects out of your original object.
  8.     
  9.     To get it to work properly, you must supply an object. 
  10.     This object must be flat, lie on the X,Y plane and be
  11.     filled with faces. The object should also be fairly large.
  12.  
  13.     Load your object, ensure the proper restrictions are met (flat object,
  14.     face filled, etc.) and then lauch the script by using the
  15.     Modify-Macro command. From the file requester, select this macro.
  16.  
  17. */
  18.  
  19. 'select all'                /* Select All the vertices in memory */
  20. 'name Slice-2'              /* We temporarily name the object all the */
  21.                             /* same. */
  22.  
  23. 'getv BEVEL_INSET 10'
  24. ins=result
  25. 'getv BEVEL_DEPTH -10'
  26. dep=result
  27.  
  28.  
  29. 'bevel' ins dep             /* If your beveling looks bad for this object */
  30.                             /* then change these numbers. At normal       */
  31.                             /* resolution, ie Zoom 1, my objects usually  */
  32.                             /* fill the whole screen or are bigger than   */
  33.                             /* the screen */
  34.  
  35. 'name Slice-1'              /* After beveling, the newly created points   */
  36.                             /* will be selected, and the originals will   */
  37.                             /* deselected. We take advantage of this and  */
  38.                             /* name them. This will eventually be a flat  */
  39.                             /* object since we don't want it to smoothed  */
  40.  
  41. 'select swap'               /* Now, swap select to get the original points*/
  42. 'extrude 0 0 20 0 0 0 1 1 1 1'
  43. 'name Slice-3'              /* After extruding them we name these to keep */
  44.                             /* them seperate from the other points */
  45.  
  46. 'deselect all'              /* Now, deselect everything */
  47. 'select name Slice-2'       /* Select the original set of points */
  48. 'delete internal'           /* so we can delete the internal faces */
  49.                             /* which will never get rendered and we don't */
  50.                             /* need */
  51.  
  52. 'deselect all'
  53.  
  54. 'select name Slice-1'       /* Select the points to make the Front_Plate */
  55. 'separate'                  /* We seperate these and name them */
  56. 'name Front_Plate'          /* We now have a seperate object   */
  57.                             /* which will be flat */
  58.  
  59. 'deselect all'
  60. 'Select name Slice-3'       /* Ditto for the Back_Plate */
  61. 'separate'
  62. 'name Back_Plate'
  63.  
  64. 'deselect all'              /* Now create the beveled_edge object */
  65. 'Select name Slice-1'       /* These are the points made from the bevel */
  66. 'Select name Slice-2'       /* These are the original object points */
  67. 'duplicate 0 0 0 0 0 0 1 1 1 1'
  68. 'name Beveled_Edge'         /* Dupicate them and call them Beveled_Edge */
  69. 'deselect all'
  70. 'select name Slice-1'       /* We no longer need these vertices */
  71. 'delete vertices'
  72.  
  73. 'deselect all'              /* Now it just remains to select the remaining */
  74. 'select name Back_Plate'    /* points and call them Smooth_Sides */
  75. 'select Name Front_Plate'   /* We do this indirectly by selecting all */
  76. 'Select Name Beveled_Edge'  /* the other points and swap selecting */
  77. 'Select Swap'
  78. 'Name Smooth_Sides'
  79.  
  80. 'draw'
  81. 'endd'
  82.