home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1998 November / Dppcpro1198.iso / Nov / Intelcad / Uncompressed / API / Scripts / Polygon2.scr < prev    next >
Encoding:
Text File  |  1998-03-18  |  7.1 KB  |  694 lines

  1. ;---------------------------------------------
  2. ;File name: Polygon2.SCR
  3. ;Purpose: Demonstrate Polygons 
  4. ;
  5. ;Last Modified: 3/18/98
  6. ;---------------------------------------------
  7. CMDECHO
  8. 0
  9. PICKBOX
  10. 3
  11. APERTURE
  12. 10
  13. ; Erase anything that's there already.
  14. erase
  15. all
  16.  
  17. ; Turn blips off
  18. blipmode
  19. off
  20. ; Set the current layer to zero.
  21. layer
  22. s
  23. 0
  24.  
  25. color
  26. bylayer
  27. ; Setting all the other necessary system variables:
  28. vpoint
  29. 0,0,1
  30. ; Zoom to a window at least 100 x 100 (if it were square).
  31. zoom
  32. c
  33. 100,100
  34. 220
  35. elev
  36. 0
  37. 0
  38. gridmode
  39. 0
  40. fillmode
  41. 1
  42. snapmode
  43. 0
  44. linetype
  45. s
  46. bylayer
  47.  
  48. ; Draw a white grid for reference
  49. layer
  50. m
  51. redpolygo
  52. c
  53. red
  54.  
  55.  
  56. line
  57. 0,0
  58. 0,200
  59. 200,200
  60. 200,0
  61. 0,0
  62.  
  63. line
  64. 0,50
  65. 200,50
  66.  
  67. line
  68. 0,100
  69. 200,100
  70.  
  71. line
  72. 0,150
  73. 200,150
  74.  
  75. line
  76. 50,0
  77. 50,200
  78.  
  79. line
  80. 100,0
  81. 100,200
  82.  
  83. line
  84. 150,0
  85. 150,200
  86.  
  87. layer
  88. s
  89. 0
  90.  
  91. ;1st POLYGON start here
  92. ;command by picking points
  93. color
  94. white
  95. TEXT
  96. -39.8278,169.2913
  97. 3
  98. 0
  99. POLYGONS
  100. ;*********************************
  101. ; BASIC POLYGONS
  102. ;*********************************
  103. color
  104. yellow
  105. text
  106. 4.2,194
  107. 2
  108. 0
  109. 1) 4-sided polygons
  110. color
  111. blue
  112. polygon
  113.  
  114. 26.2083,169.6667
  115.  
  116. 21.1667,185.2500
  117.  
  118.  
  119. 26.2083,169.2083
  120.  
  121. 32.6250,177.4583
  122.  
  123.  
  124. 26.6667,169.6667
  125.  
  126. 26.2083,176.0833
  127. ; *******************
  128. ;MOVE COMMAND
  129. ;*******************
  130. text
  131. 54.1,194
  132.  
  133.  
  134. 2) move 5 side polygons
  135. color
  136. green
  137. polygon
  138. 5
  139. 75.2500,169.2083
  140.  
  141. 74.7917,184.3333
  142. color
  143. cyan
  144. polygon
  145.  
  146. 75.7083,170.5833
  147.  
  148. 75.2500,177.9167
  149. ;*****************
  150. ; MOVE COMMAND
  151. ;*****************
  152. text
  153. 104.5,194
  154.  
  155.  
  156. 3) move polygons
  157. color
  158. red
  159. polygon
  160. 7
  161. 114.2083,176.0833
  162.  
  163. 116.9583,180.2083
  164. color
  165. blue
  166. polygon
  167. 3
  168. 124.2917,164.6250
  169.  
  170. 124.2917,180.6667
  171. move
  172. 112.3750,171.9583
  173.  
  174. 115.1250,174.7083
  175. 125.6667,162.7917
  176. ;*********************
  177. ; COPY COMMAND
  178. ;*********************
  179. text
  180. 155,194
  181.  
  182.  
  183. 4) copy polygons
  184. color
  185. white
  186. polygon
  187. 5
  188. 172.8750,171.0417
  189.  
  190. 169.6667,175.6250
  191. color
  192. magenta
  193. copy
  194. nea
  195. 175.6250,167.8333
  196.  
  197. m
  198. 161.4167,177.4583
  199. 155.9167,167.8333
  200. 167.8333,167.8333
  201. 171.5000,183.4167
  202. 152.2500,184.3333
  203.  
  204. ;*****************
  205. ; TRIM COMMAND
  206. ;*****************
  207. text
  208. 4.2,143
  209.  
  210.  
  211. 5) trim polygons
  212. color
  213. magenta
  214. polygon
  215. 3
  216. 28.5000,121.5417
  217.  
  218. 17.9583,134.8333
  219. color
  220. yellow
  221. polygon
  222.  
  223. 24.8333,124.2917
  224.  
  225. 24.8333,138.9583
  226. color
  227. white
  228. polygon
  229.  
  230. 27.5833,118.7917
  231.  
  232. 31.2500,135.7500
  233. trim
  234. nea
  235. 39.9583,120.1667
  236. nea
  237. 34.9167,108.2500
  238.  
  239. nea
  240. 26.6667,117.4167
  241. nea
  242. 17.0417,117.4167
  243.  
  244. trim
  245. nea
  246. 17.0417,111.4583
  247.  
  248. nea
  249. 32.6250,113.7500
  250.  
  251. ;*************************
  252. ; ROTATE COMMAND
  253. ;*************************
  254. text
  255. 54.1,143
  256.  
  257.  
  258. 7) rotate polygons
  259. color
  260. yellow
  261. polygon
  262. 4
  263. 70.6667,126.1250
  264.  
  265. 54.1667,131.1667
  266. color
  267. magenta
  268. polygon
  269. 5
  270. 80.7500,112.3750
  271.  
  272. 75.7083,122.4583
  273. rotate
  274. 80.7500,122.0000
  275. 83.0417,127.9583
  276.  
  277. 77.5417,119.2500
  278. 79.8333,123.8333
  279. ;*********************
  280. ; OFFSET
  281. ;**********************
  282. text
  283. 104.5,143
  284.  
  285.  
  286. 7) offset polygons
  287. color
  288. green
  289. polygon
  290. 6
  291. 127.0417,118.3333
  292.  
  293. 124.7500,121.0833
  294. offset
  295. 122.9167,122.9167
  296. 116.5000,119.2500
  297. 124.7500,116.9583
  298. 128.4167,126.5833
  299.  
  300. ;**********************
  301. ; MIRROR COMMAND
  302. ;*********************
  303. text
  304. 155,143
  305.  
  306.  
  307. 8) mirror polygons
  308. color
  309. red
  310. polygon
  311. 9
  312. e
  313. 174.2500,129.3333
  314. 170.1250,129.7917
  315. mirror
  316. 175.6250,119.7083
  317.  
  318. 158.2083,122.4583
  319. 188.0000,122.0000
  320. n
  321. mirror
  322. 174.7083,115.1250
  323. 172.4167,118.7917
  324.  
  325. 172.8750,135.7500
  326. 172.8750,108.7083
  327. n
  328. color
  329. yellow
  330. polygon
  331. 5
  332. 172.8750,122.0000
  333.  
  334. 172.8750,134.8333
  335. mirror
  336. 180.6667,113.7500
  337.  
  338. 184.3333,136.2083
  339. 160.5000,106.8750
  340. n
  341. ;********************
  342. ; SCALE COMMAND
  343. ;********************
  344. text
  345. 4.2,93.1
  346.  
  347.  
  348. 9) scale polygons
  349. color
  350. white
  351. polygon
  352. 55
  353. 24.8333,67.0000
  354.  
  355. 24.8333,75.2500
  356. scale
  357. nea
  358. 28.0417,72.5000
  359.  
  360. 25.7500,68.8333
  361. 23.9167,68.8333
  362. color
  363. yellow
  364. polygon
  365. 3
  366. 24.3750,71.5833
  367.  
  368. 24.3750,89.4583
  369. color
  370. cyan
  371. polygon
  372. 4
  373. 23.4583,62.8750
  374.  
  375. 28.5000,67.9167
  376. ;*******************
  377. ; EXPLODE COMMAND
  378. ;********************
  379. text
  380. 54.1,93.1
  381.  
  382.  
  383. 10) explode polygons
  384. color
  385. red
  386. polygon
  387. 3
  388. 79.8215,62.7363
  389.  
  390. 75.6858,68.4626
  391. color
  392. blue
  393. polygon
  394. 4
  395. 63.2786,83.7330
  396.  
  397. 63.9149,76.7341
  398. color
  399. green
  400. polygon
  401.  
  402. 72.5044,72.5984
  403.  
  404. 64.8693,83.0967
  405. color
  406. yellow
  407. polygon
  408. 13
  409. 72.5044,72.9165
  410.  
  411. 64.8693,85.3236
  412. explode
  413. 74.0951,81.1879
  414.  
  415. 78.5489,85.0055
  416.  
  417. 57.5522,81.5060
  418. ;********************
  419. ; BREAK COMMAND
  420. ;********************
  421. text
  422. 104.5,93.1
  423.  
  424.  
  425. 11) break polygons
  426. color
  427. red
  428. polygon
  429. 33
  430. 128.1775,67.5082
  431.  
  432. 125.9506,74.5071
  433. color
  434. blue
  435. polygon
  436. 44
  437. 125.3143,68.7808
  438.  
  439. 117.0429,77.3703
  440. color
  441. green
  442. polygon
  443. 55
  444. 129.1319,67.1901
  445.  
  446. 131.3588,70.0533
  447. color
  448. cyan
  449. polygon
  450. 4
  451. 131.3588,65.9176
  452.  
  453. 118.9517,78.6429
  454. color
  455. yellow
  456. polygon
  457. 5
  458. 114.4978,78.6429
  459.  
  460. 114.4978,90.0956
  461. break
  462. 129.1319,60.5093
  463. 121.8149,63.6907
  464. break
  465. 109.4077,69.0989
  466. 108.1352,68.7808
  467.  
  468. 135.1764,62.4181
  469. 134.2220,60.8275
  470. ;**********************
  471. ; ERASE COMMAND
  472. ;**********************
  473. text
  474. 155,93.1
  475.  
  476.  
  477. 12) erase polygons
  478. color
  479. magenta
  480. polygon
  481. 7
  482. 180.3511,65.5995
  483.  
  484. 175.8973,75.1434
  485. color
  486. blue
  487. polygon
  488. 3
  489. 176.5335,69.4170
  490.  
  491. 160.3088,59.5550
  492. color
  493. cyan
  494. polygon
  495.  
  496. 181.3055,64.9632
  497. I
  498. 171.4434,73.8709
  499. polygon
  500.  
  501. 164.4445,76.0978
  502.  
  503. 164.1264,85.3236
  504. polygon
  505.  
  506. 174.9429,78.0066
  507.  
  508. 174.9429,90.4137
  509. erase
  510. 166.6715,81.5060
  511. 171.1253,84.6874
  512.  
  513. ;******************
  514. ; RECTANGULAR ARRAY
  515. ;******************
  516. text
  517. 4.2,44
  518.  
  519.  
  520. 13) rect-array polygon
  521. color
  522. red
  523. polygon
  524. 5
  525. 26.7730,17.2434
  526.  
  527. 23.2735,24.2423
  528. array
  529. 29.3180,23.2879
  530.  
  531. r
  532. 3
  533. 5
  534. .5
  535. .6
  536. color
  537. green
  538. polygon
  539. 3
  540. 21.0466,24.8786
  541.  
  542. 20.7285,35.3769
  543. array
  544. 25.5005,28.0599
  545.  
  546. r
  547. 4
  548. 7
  549. 1
  550. .13
  551. ;****************
  552. ; SNAP POLYGONS
  553. ;****************
  554. text
  555. 54.1,44
  556.  
  557.  
  558. 14) snap to polygon
  559. color
  560. blue
  561. polygon
  562. 5
  563. 71.6296,26.7874
  564.  
  565. 71.9477,21.3791
  566. color
  567. yellow
  568. polygon
  569. 7
  570. 75.1290,18.1978
  571.  
  572. 72.2658,26.4692
  573. line
  574. int
  575. 72.9021,25.8330
  576. 68.1301,31.2412
  577. 79.9010,25.5148
  578. 74.4928,31.5594
  579.  
  580. line
  581. int
  582. 68.1301,13.7440
  583. 66.2213,24.8786
  584. 74.1746,9.2901
  585. 72.2658,21.3791
  586. 81.4917,11.1989
  587. 77.0378,25.1967
  588. 83.4005,18.5159
  589.  
  590. ;**********************
  591. ; 3D ARRAY
  592. ;**********************
  593. text
  594. 104.5,44
  595.  
  596.  
  597. 15) 3D array polygon
  598. color
  599. red
  600. polygon
  601. 9
  602. 122.1330,33.4681
  603.  
  604. 120.5423,30.9231
  605. color
  606. cyan
  607. polygon
  608. 4
  609. 132.3132,27.4236
  610.  
  611. 132.3132,31.8775
  612. color
  613. magenta
  614. polygon
  615. 5
  616. 124.0418,18.8341
  617.  
  618. 122.4511,22.3335
  619. color
  620. blue
  621. polygon
  622. 3
  623. 116.0885,24.5605
  624.  
  625. 114.4978,29.0143
  626. 3darray
  627. 126.2369,16.5753
  628. 134.1902,24.5286
  629. 117.0111,22.3017
  630. 121.4649,30.2550
  631.  
  632. p
  633. 7
  634.  
  635. n
  636. 124.3281,25.1649
  637. 132.2814,35.6633
  638. ;********************
  639. ; POLYGON SELECT
  640. ;********************
  641. text
  642. 155,44
  643.  
  644.  
  645. 16) polygons select
  646. color
  647. cyan
  648. color
  649. green
  650. polygon
  651. 6
  652. 181.5918,15.9391
  653.  
  654. 175.8655,25.4830
  655. polygon
  656.  
  657. 172.0479,27.3918
  658.  
  659. 166.6396,36.2995
  660. line
  661. end
  662. 176.1836,26.1193
  663. end
  664. 166.6396,35.6633
  665.  
  666. line
  667. end
  668. 186.6820,25.4830
  669. end
  670. 177.1380,35.9814
  671.  
  672. line
  673. end
  674. 170.4572,15.9391
  675. end
  676. 161.8677,27.0737
  677.  
  678. line
  679. end
  680. 187.0001,7.0314
  681. end
  682. 177.7743,18.8023
  683.  
  684. ;----------------------------------------------------------------------
  685. ;Now for the grand finale 
  686. TEXT
  687. -39.8278,152
  688. 3
  689. 0
  690. Done!
  691. zoom
  692. e
  693. ;----------------------------------------------------------------------
  694.