home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1998 November / Dppcpro1198.iso / Nov / Intelcad / Uncompressed / API / Scripts / 3d.scr next >
Encoding:
Text File  |  1998-03-18  |  5.0 KB  |  609 lines

  1. ;---------------------------------------------
  2. ;File name: 3D.SCR
  3. ;Purpose: Demonstrate 
  4. ;
  5. ;Last Modified: 3/18/98
  6. ;---------------------------------------------
  7. CMDECHO
  8. 0
  9. PICKBOX
  10. 3
  11. APERTURE
  12. 10
  13. ;
  14. ; Erase anything that's there already.
  15. erase
  16. all
  17.  
  18. ; Turn blips off
  19. blipmode
  20. off
  21. ; Set the current layer to zero.
  22. layer
  23. s
  24. 0
  25.  
  26. color
  27. bylayer
  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. 56,50
  34. 110
  35. ; Setting all the other necessary system variables:
  36. elev
  37. 0
  38. 0
  39. gridmode
  40. 0
  41. fillmode
  42. 1
  43. snapmode
  44. 0
  45. linetype
  46. s
  47. bylayer
  48.  
  49. ; Draw a rectangle using distances and angles.
  50. line
  51. 20,20
  52. @10<0
  53. @5<90
  54. @10<180
  55. @5<270
  56.  
  57. ; Make a layer named red, that is red.
  58. layer
  59. m
  60. red3d
  61. c
  62. red
  63.  
  64.  
  65. ; Draw a doodle by specifying endpoints.
  66. line
  67. 10,30
  68. 10,60
  69. 15,60
  70. 15,30
  71. 20,30
  72. 20,60
  73. 25,60
  74. 25,30
  75.  
  76. ; Make a layer named blue, that is blue.
  77. layer
  78. m
  79. blue3d
  80. c
  81. blue
  82.  
  83.  
  84. ; Draw a pyramid in 3D, using endpoints.
  85. line
  86. 10,75,0
  87. 20,75,0
  88. 20,75,10
  89. 10,75,10
  90. 10,75,0
  91. 15,85,5
  92. 20,75,0
  93.  
  94. line
  95. 15,85,5
  96. 20,75,10
  97.  
  98. line
  99. 15,85,5
  100. 10,75,10
  101.  
  102. layer
  103. m
  104. cyan3d
  105. c
  106. cyan
  107.  
  108.  
  109. ; Draw 4 concentric circles starting at 50,15,0, by different methods
  110. ; First, center point and radius
  111. circle
  112. 50,15
  113. 10
  114. ;
  115. ; Second, center point and diameter
  116. circle
  117. 50,15
  118. d
  119. 15
  120. ;
  121. ; Third, three points
  122. circle
  123. 3p
  124. 45,15
  125. 55,15
  126. 50,10
  127. ;
  128. ; Fourth, two points (endpoints of the diameter)
  129. circle
  130. 2p
  131. 50,12
  132. 50,18
  133. ;
  134. layer
  135. m
  136. magenta3d
  137. c
  138. magenta
  139.  
  140.  
  141. ; Draw a circle tangent to two lines (and draw the lines).
  142. line
  143. 35,30
  144. 65,30
  145. 65,65
  146.  
  147. circle
  148. ttr
  149. 40,30
  150. 65,40
  151. 10
  152. layer
  153. m
  154. magenta3d
  155. c
  156. magenta
  157.  
  158.  
  159. ; Draw a circle tangent to the last circle, and the second biggest one below.
  160. circle
  161. ttr
  162. 45,40
  163. 40,15
  164. 5
  165. ; Draw arcs, eight different ways
  166. ; Draw an arc - 3 points on the arc.
  167. ; Bottom, right, left
  168. arc
  169. 50,70
  170. 60,80
  171. 40,80
  172. ; Bottom, left, right
  173. arc
  174. 50,72
  175. 42,80
  176. 58,80
  177. ; Bottom, top, left
  178. arc
  179. 50,74
  180. 50,86
  181. 44,80
  182. ; Bottom, top, right
  183. arc
  184. 50,76
  185. 50,84
  186. 54,80
  187. ;
  188. layer
  189. s
  190. blue3d
  191.  
  192. ; Draw an arc - Start point, center, end point.
  193. arc
  194. 64,90
  195. c
  196. 70,95
  197. 76,90
  198. arc
  199. 64,90
  200. c
  201. 70,97
  202. 76,90
  203. arc
  204. 64,90
  205. c
  206. 70,99
  207. 76,90
  208. ;
  209. layer
  210. m
  211. green3d
  212. c
  213. green
  214.  
  215.  
  216. ; Draw an arc - Start point, center, included angle.
  217. ; This should spiral, getting bigger.
  218. arc
  219. 91,90
  220. c
  221. 90,90
  222. a
  223. 90
  224. arc
  225. 90,92
  226. c
  227. 90,90
  228. a
  229. 90
  230. arc
  231. 87,90
  232. c
  233. 90,90
  234. a
  235. 90
  236. arc
  237. 90,86
  238. c
  239. 90,90
  240. a
  241. 90
  242. layer
  243. s
  244. magenta3d
  245.  
  246. arc
  247. 95,90
  248. c
  249. 90,90
  250. a
  251. -90
  252. arc
  253. 90,96
  254. c
  255. 90,90
  256. a
  257. -90
  258. arc
  259. 83,90
  260. c
  261. 90,90
  262. a
  263. -90
  264. arc
  265. 90,82
  266. c
  267. 90,90
  268. a
  269. -90
  270. ; Draw an arc - Start point, center, length of chord.
  271. arc
  272. 80,60
  273. c
  274. 75,65
  275. l
  276. 6
  277. arc
  278. 80,60
  279. c
  280. 76,65
  281. l
  282. 7
  283. arc
  284. 80,60
  285. c
  286. 77,65
  287. l
  288. 8
  289. arc
  290. 80,60
  291. c
  292. 78,65
  293. l
  294. 9
  295. layer
  296. s
  297. blue3d
  298.  
  299. arc
  300. 80,60
  301. c
  302. 75,65
  303. l
  304. -2
  305. arc
  306. 80,60
  307. c
  308. 74,65
  309. l
  310. -3
  311. arc
  312. 80,60
  313. c
  314. 73,65
  315. l
  316. -4
  317. arc
  318. 80,60
  319. c
  320. 72,65
  321. l
  322. -5
  323. layer
  324. s
  325. green3d
  326.  
  327. ; Draw an arc - Start point, end point, radius.
  328. arc
  329. 100,60
  330. e
  331. 90,70
  332. r
  333. 10
  334. arc
  335. 100,60
  336. e
  337. 90,70
  338. r
  339. -10
  340. arc
  341. 100,60
  342. e
  343. 95,65
  344. r
  345. 10
  346. arc
  347. 100,60
  348. e
  349. 95,65
  350. r
  351. -10
  352. layer
  353. s
  354. magenta3d
  355.  
  356. ; Draw an arc - Start point, end point, included angle.
  357. ; This will be a series of arcs in one direction, then 4 more in the other 
  358. ; direction, kind of like a flower.
  359. arc
  360. 90,45
  361. e
  362. 90,55
  363. a
  364. 90
  365. arc
  366. 90,45
  367. e
  368. 80,45
  369. a
  370. 90
  371. arc
  372. 90,45
  373. e
  374. 90,35
  375. a
  376. 90
  377. arc
  378. 90,45
  379. e
  380. 100,45
  381. a
  382. 90
  383. layer
  384. s
  385. red3d
  386.  
  387. arc
  388. 90,45
  389. e
  390. 80,55
  391. a
  392. -90
  393. arc
  394. 90,45
  395. e
  396. 80,35
  397. a
  398. -90
  399. arc
  400. 90,45
  401. e
  402. 100,35
  403. a
  404. -90
  405. arc
  406. 90,45
  407. e
  408. 100,55
  409. a
  410. -90
  411. layer
  412. s
  413. 0
  414.  
  415. ; Draw an arc - Start point, end point, starting direction.
  416. arc
  417. 110,100
  418. e
  419. 120,90
  420. d
  421. 0
  422. arc
  423. 120,90
  424. e
  425. 110,80
  426. d
  427. 270
  428. arc
  429. 110,80
  430. e
  431. 100,70
  432. d
  433. 180
  434. ; Draw an arc - Continuation of previous line or arc.
  435. layer
  436. s
  437. blue3d
  438.  
  439. ; Draw 4 concentric circles starting at 80,15,0, by different methods,
  440. ; but this time in 3 dimensions.
  441. ; First, center point and radius, in 3 planes but all face-on:
  442. circle
  443. 80,15,0
  444. 10
  445. circle
  446. 80,15,5
  447. 9
  448. circle
  449. 80,15,-5
  450. 8
  451. ;
  452. layer
  453. s
  454. magenta3d
  455.  
  456. ; Second, center point and diameter, in 3 planes but all face-on:
  457. circle
  458. 80,15
  459. d
  460. 15
  461. circle
  462. 80,15
  463. d
  464. 14
  465. circle
  466. 80,15
  467. d
  468. 13
  469. ;
  470. layer
  471. s
  472. cyan3d
  473.  
  474. ; Third, three points, in 3 planes
  475. circle
  476. 3p
  477. 75,15,0
  478. 85,15
  479. 80,10
  480. circle
  481. 3p
  482. 76,15,-5
  483. 84,15
  484. 80,11
  485. circle
  486. 3p
  487. 77,15,5
  488. 83,15
  489. 80,12
  490. ;
  491. layer
  492. s
  493. red3d
  494.  
  495. ; Fourth, two points (endpoints of the diameter)
  496. circle
  497. 2p
  498. 80,12,2
  499. 80,18
  500. circle
  501. 2p
  502. 80,13,4
  503. 80,17
  504. circle
  505. 2p
  506. 80,14,6
  507. 80,16
  508. ;
  509. layer
  510. s
  511. blue3d
  512.  
  513. ; Flash the red layer to test Layer Off and Layer On
  514. layer
  515. off
  516. red3d
  517.  
  518. layer
  519. on
  520. red3d
  521.  
  522. layer
  523. off
  524. red3d
  525.  
  526. layer
  527. on
  528. red3d
  529.  
  530. ; Test Set Layer Color by changing the color of the blue layer
  531. layer
  532. c
  533. 1
  534. blue3d
  535.  
  536. layer
  537. c
  538. 2
  539. blue3d
  540.  
  541. layer
  542. c
  543. 3
  544. blue3d
  545.  
  546. layer
  547. c
  548. 4
  549. blue3d
  550.  
  551. layer
  552. c
  553. 5
  554. blue3d
  555.  
  556. layer
  557. c
  558. 6
  559. blue3d
  560.  
  561. layer
  562. c
  563. 7
  564. blue3d
  565.  
  566. layer
  567. c
  568. 8
  569. blue3d
  570.  
  571. layer
  572. c
  573. 9
  574. blue3d
  575.  
  576. layer
  577. c
  578. 10
  579. blue3d
  580.  
  581. layer
  582. c
  583. 11
  584. blue3d
  585.  
  586. layer
  587. c
  588. blue
  589. blue3d
  590.  
  591. layer
  592. m
  593. green3d
  594. c
  595. green
  596.  
  597.  
  598. setvar
  599. cmdecho
  600. 0
  601. vpoint
  602. 1,1,1
  603. ;now for the grand finale!
  604. Text
  605. 88,2
  606. 3
  607.  
  608. Done!
  609.