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

  1. ;---------------------------------------------
  2. ;File name:
  3. ;Purpose: Demonstrate Spline and options 
  4. ;
  5. ;Last Modified: 3/18/98
  6. ;---------------------------------------------
  7. CMDECHO
  8. 0
  9. PICKBOX
  10. 3
  11. APERTURE
  12. 10
  13. ; settings 
  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. ;////////////////////////////////////////////////////////////////////////////////////////
  26. color
  27. bylayer
  28. ; Setting all the other necessary system variables:
  29. vpoint
  30. 0,0,1
  31. ; Zoom to a window at least 100 x 100 (if it were square).
  32. zoom
  33. c
  34. 100,100
  35. 220
  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. ; *********************
  50. ; Draw a grid for reference
  51. ;*********************
  52. layer
  53. m
  54. splinegrid
  55. c
  56. white
  57.  
  58.  
  59. line
  60. 0,0
  61. 0,250
  62. 250,250
  63. 250,0
  64. 0,0
  65.  
  66. line
  67. 0,50
  68. 250,50
  69.  
  70. line
  71. 0,100
  72. 250,100
  73.  
  74. line
  75. 0,150
  76. 250,150
  77.  
  78. line
  79. 50,0
  80. 50,250
  81.  
  82. line
  83. 100,0
  84. 100,250
  85.  
  86. line
  87. 150,0
  88. 150,250
  89.  
  90. line
  91. 0,200
  92. 250,200
  93.  
  94. line
  95. 0,200
  96. 250,200
  97.  
  98. line
  99. 200,250
  100. 200,0
  101.  
  102. layer
  103. s
  104. 0
  105.  
  106. ; this is where I zoom in  grid
  107. zoom
  108. w
  109. -14,250
  110. 277,-2.84
  111. ; ignore this section - text only
  112. ;//////////////////////////////////////////////////////////////////
  113. color
  114. red
  115. text
  116. -48.8005,220.1456
  117. 5
  118.  
  119. SPLINE
  120. snap
  121. on
  122. color
  123. red
  124. text
  125. 5.0000,243.5000
  126. 2
  127.  
  128. 1) spline close
  129.  
  130. 54.5000,243.0000
  131.  
  132.  
  133. 2) spline fit tolerace
  134.  
  135. 105.0000,243.0000
  136.  
  137.  
  138. 3) tangent spline
  139.  
  140. 155.0000,243.0000
  141.  
  142.  
  143. 4) convert pline spline
  144.  
  145. 203.0000,243.0000
  146.  
  147.  
  148. 6) convert polygon-spline
  149. ;////////////////////////////////////////////////////////
  150. ; this is where the first set of 
  151. ; commands start
  152. ; spline_1>select first point>close
  153. color
  154. red
  155. spline
  156. 9.5,208.5
  157. 39.5,237
  158. 43,209.5
  159. 6.5,236.5
  160. c
  161. 3.5,242
  162. ; spline_2>fit tolerance>enter fit tolerance
  163. spline
  164. 57,237.5
  165. 93.5,205
  166. f
  167. .34
  168. 85.5,237.5
  169. 53.5,232.5
  170.  
  171. 94,236
  172. 61.5,207
  173. ;**********************************
  174. ;spline_3>start tangent>end tangent
  175. spline
  176. 119,225.5
  177. 109,207.5
  178. 139.5,237.5
  179. 125.5,207
  180.  
  181. 106,213.5
  182. 119,206.5
  183. ;*********************************
  184. ;pline>pedit>spline_4
  185. ; convert pline spline to true spline
  186. ;spline>select object
  187. pline
  188. 159.5,236.5
  189. 163,222
  190. 174,235
  191. 173.5,212
  192. 189,231
  193. 192.5,209.5
  194.  
  195. pedit
  196. 160.5,231
  197. s
  198. x
  199. ;*********************************
  200. ;convert to pline spline to 
  201. ; true spline
  202. ; spline_5>object
  203. polygon
  204. 5
  205. 223,224
  206. i
  207. 223,242
  208. pedit
  209. 209.5,220.5
  210. s
  211. x
  212. ;
  213. ; add text 
  214. ;///////////////////////////////////////////
  215. color
  216. cyan
  217. text
  218. 5.0000,191
  219. 2
  220.  
  221. 6) copy spline
  222.  
  223. 54.5000,191
  224.  
  225.  
  226. 7) rotate spline
  227.  
  228. 105.0000,191
  229.  
  230.  
  231. 8) move spline
  232.  
  233. 155.0000,191
  234.  
  235.  
  236. 9) break spline
  237.  
  238. 203.0000,191
  239.  
  240.  
  241. 10) trim spline
  242. ;////////////////////////////////////////////////
  243. ;**********************
  244. ; spline 6
  245. ; spline>copy
  246. ;**********************
  247. color
  248. cyan
  249. spline
  250. 10.4723,173.5089
  251. 20.4581,182.6958
  252. 14.0672,163.5231
  253. 20.0587,160.7271
  254. 25.6507,161.1265
  255. 30.8433,167.1180
  256. 29.6450,177.5032
  257. 33.2399,183.8941
  258. 42.4268,178.3021
  259. 43.2257,167.9169
  260. 40.8291,160.3277
  261. 34.0388,157.9311
  262. 29.2456,158.7300
  263. 22.0558,169.9140
  264.  
  265. 33.2399,176.3049
  266. 12.4695,159.5288
  267. copy
  268. 42.5,169
  269.  
  270. m
  271. 25,178
  272. 25,174.5
  273.  
  274. ;********************
  275. ; spline 7
  276. ; spline> rotate
  277. ; ********************
  278. spline
  279. 63.5967,183.4947
  280. 67.9904,165.5203
  281. 62.3984,162.3248
  282. 61.5995,167.1180
  283. 68.7893,167.9169
  284. 75.1802,160.7271
  285. 86.3643,163.9226
  286. 82.3700,169.1152
  287. 77.9762,166.7186
  288. 83.5682,159.5288
  289. 87.5626,169.5146
  290. 89.9591,183.8941
  291. 87.1631,186.6901
  292. 78.3756,181.0981
  293. 79.1745,173.5089
  294. 83.5682,177.1038
  295. 81.1717,182.6958
  296. 73.9819,185.0924
  297. 67.5910,179.5004
  298. 69.1887,173.5089
  299. 72.3842,174.7072
  300. 72.7836,182.2964
  301. 64.7950,186.6901
  302. 62.7978,183.4947
  303.  
  304. 75.1802,169.1152
  305. 87.1631,186.6901
  306. rotate
  307. 88,170
  308.  
  309. 75,168
  310. 77.5,151.5
  311. ;***********************
  312. ; spline 8
  313. ; spline> move
  314. ;***********************
  315. spline
  316. 114.3245,161.9254
  317. 113.9250,179.1009
  318. 120.3159,178.3021
  319. 141.0864,187.0896
  320. 115.1233,159.1294
  321. 141.4858,159.1294
  322. 141.4858,179.8998
  323. 130.7011,166.7186
  324.  
  325. 138.6898,165.5203
  326. 131.8994,176.7044
  327. move
  328. 141,158.5
  329.  
  330. 125,170
  331. 121.5,172
  332. ;**********************
  333. ; spline 9
  334. ; spline > break
  335. ;*********************
  336. spline
  337. 165.8511,185.0924
  338. 170.6443,164.3220
  339. 180.2306,165.5203
  340. 189.0181,175.1066
  341. 184.6244,179.8998
  342. 177.8340,179.8998
  343. C
  344. 160.6585,164.3220
  345. ;**********************
  346. ; spline 10
  347. ; spline > trim
  348. ;********************** 
  349. spline
  350. 209.7885,185.0924
  351. 219.3749,171.9112
  352. 225.3664,164.7214
  353. 216.5789,160.7271
  354. 208.9897,164.3220
  355. 210.9868,172.3106
  356. 216.9783,172.3106
  357. 218.5760,167.1180
  358. 212.9840,168.3163
  359. 214.1823,172.7100
  360. 210.5874,184.6930
  361.  
  362. 224.1681,179.8998
  363. 216.5789,162.7243
  364. spline
  365. 223.5,183
  366. 215,156.5
  367. 245,177
  368.  
  369. 234,180.5
  370. 229,174
  371. ;add text
  372. ;///////////////////////////////////////////
  373. color
  374. green
  375. text
  376. 5.0000,141
  377. 2
  378.  
  379. 11) block insert spline
  380.  
  381. 54.5000,141
  382.  
  383.  
  384. 12) erase undo
  385.  
  386. 105.0000,141
  387.  
  388.  
  389. 13) scale spline
  390.  
  391. 155.0000,141
  392.  
  393.  
  394. 14) mirror spline
  395.  
  396. 203.0000,141
  397.  
  398.  
  399. 15) block 2 spline
  400. ;////////////////////////////////////////////////
  401. ;**********************
  402. ; spline_11
  403. ; spline > block 1
  404. ;**********************
  405. color
  406. green
  407. spline
  408. 15.2655,117.5885
  409. 18.8604,128.3732
  410. 26.8490,124.3789
  411. 28.8462,117.5885
  412. 23.2541,110.7982
  413. 18.0615,113.1948
  414. 22.8547,117.5885
  415. 32.8405,117.9880
  416. 36.4354,126.3760
  417. 36.4354,129.5715
  418. F
  419. .0445
  420. 15.6649,133.9652
  421.  
  422. 27.2484,121.1834
  423. 28.4467,134.3646
  424. block
  425. spline11
  426. 23,122
  427. 35,123.5
  428.  
  429. insert
  430. spline11
  431. 21.5,117.5
  432. 22.5,118.5
  433.  
  434. ;**********************
  435. ; spline_12
  436. ; spline > erase
  437. ;**********************
  438. spline
  439. 58.4041,130.3703
  440. 70.3870,115.1919
  441. 77.5768,131.1692
  442. F
  443. .027
  444. 79.5739,108.4016
  445.  
  446. 87.9620,115.9908
  447. 87.5626,127.9737
  448. erase
  449. 76.5,124
  450.  
  451. undo
  452.  
  453. ;***********************
  454. ; spline_13
  455. ; spline > scale
  456. ;***********************
  457. spline
  458. 112.7267,137.1607
  459. 105.9364,130.7698
  460. 109.1318,127.1749
  461. 121.5142,136.7612
  462. 125.5085,132.3675
  463. 106.3358,118.7868
  464. 106.3358,112.7954
  465. 135.8937,134.3646
  466. 132.6983,124.3789
  467. 112.7267,109.5999
  468. 125.1091,110.3988
  469. 137.0920,120.3845
  470. 131.8994,107.2033
  471. 141.8852,109.2005
  472.  
  473. 112.7267,115.1919
  474. 137.8909,124.3789
  475. scale
  476. 117.5,125.5
  477.  
  478. 130,126.5
  479. 129,126.5
  480. ;***********************
  481. ; spline 14
  482. ; spline > mirror
  483. ;***********************
  484. spline
  485. 169.8454,135.5629
  486. 166.2505,132.7669
  487. 166.2505,129.9709
  488. 169.0465,129.9709
  489. 171.0437,131.5686
  490. 173.0409,135.1635
  491. 177.0352,134.7641
  492. 178.6329,131.5686
  493. 176.6357,127.9737
  494. 171.0437,126.3760
  495. 167.8482,125.9766
  496. 167.0494,125.9766
  497. 165.0522,123.5800
  498. 166.2505,122.3817
  499. 167.4488,121.9823
  500. 169.8454,122.3817
  501. 173.0409,123.1806
  502.  
  503. 175.0380,119.9851
  504. 181.4289,122.3817
  505. mirror
  506. 177.5,129
  507.  
  508. 160.5,123
  509. 189.5,122.5
  510. n
  511. ;***************************
  512. ; spline_15
  513. ; spline > block 2
  514. ;***************************
  515. spline
  516. 219.7743,138.7584
  517. 214.9811,135.1635
  518. 217.3777,132.7669
  519. 222.1709,132.3675
  520. 225.7658,128.3732
  521. 224.1681,125.9766
  522. 218.5760,125.5772
  523. 212.5845,124.3789
  524. 208.9897,121.5828
  525. 207.7914,117.9880
  526. 210.1880,115.9908
  527. 214.9811,115.9908
  528. 220.5732,119.1863
  529. 223.7686,121.9823
  530. 228.5618,122.7811
  531. 231.3578,123.1806
  532. 233.7544,122.3817
  533. 233.7544,119.9851
  534. c
  535. 230.5590,136.3618
  536. block
  537. spline15
  538. 224.5,117.5
  539. 222,120.5
  540.  
  541. insert
  542. spline15
  543. 227,113
  544. 228.5,114
  545. 33
  546. move
  547. 221,111
  548.  
  549. 219,120
  550. 226,127.5
  551. ;//////////////////////////////////////////////////////////
  552. ; ignore this section - text only
  553. ;/////////////////////////////////////////////////////////
  554. color
  555. 241
  556. text
  557. 5.0000,91
  558. 2
  559.  
  560. 16) stretch spline
  561.  
  562. 54.5000,91
  563.  
  564.  
  565. 17) rect array spline
  566.  
  567. 105.0000,91
  568.  
  569.  
  570. 18) 3d array spline
  571.  
  572. 155.0000,91
  573.  
  574.  
  575. 19) offset spline
  576.  
  577. 203.0000,91
  578.  
  579.  
  580. 20) trim spline
  581. ;////////////////////////////////////////////////
  582. ;****************************
  583. ; spline_16
  584. ; spline >
  585. ;****************************
  586. spline
  587. 16.8632,82.0391
  588. 26.0501,82.8380
  589. 28.8462,85.6340
  590. 33.6393,87.2318
  591. 37.2342,82.8380
  592. 37.6336,78.0448
  593. 32.0416,75.6482
  594. 12.4695,73.6511
  595. 33.6393,67.2602
  596. 31.6422,64.4642
  597. 25.2513,63.2659
  598. 20.0587,62.8664
  599. 15.6649,60.4699
  600. C
  601. 16.0644,60.4699
  602. stretch
  603. 40.5,59.5
  604. 23,78.5
  605.  
  606. 18.5,66.5
  607. 23,58
  608. ;*************************
  609. ; spline_17
  610. ; spline >
  611. ;************************
  612. spline
  613. 74.3813,82.4386
  614. 69.5882,82.4386
  615. 67.9904,84.0363
  616. 65.9933,84.4357
  617. 63.5967,82.8380
  618. 63.1973,78.8437
  619. 65.1944,76.0477
  620. 70.3870,75.6482
  621. 73.9819,72.4528
  622. 73.9819,70.0562
  623. 67.1916,66.8608
  624. 65.1944,62.8664
  625.  
  626. 77.1773,61.6682
  627. 82.7694,72.0534
  628. array
  629. 74,70.5
  630.  
  631. r
  632. 4
  633. 3
  634. .8
  635. .8
  636. ;***********************
  637. ; spline_18
  638. ; spline > 3d rect array
  639. ;**********************
  640. spline
  641. 107.5341,74.4500
  642. 105.9364,80.8409
  643. 106.7353,85.2346
  644. 112.7267,86.4329
  645. 113.5256,82.0391
  646. 113.9250,77.6454
  647. 116.3216,74.4500
  648. 122.3131,76.4471
  649. 122.3131,82.8380
  650. 129.9023,86.4329
  651. 133.4972,78.8437
  652. 130.7011,73.2517
  653. 137.8909,74.0505
  654. 140.2875,79.6426
  655. 139.4886,84.4357
  656.  
  657. 128.7040,90.8266
  658. 125.9080,66.4613
  659. 3darray
  660. 118,74.5
  661.  
  662. r
  663. 1
  664. 3
  665. 2
  666. 1
  667. .5
  668. snap
  669. on
  670. ;***********************
  671. ; spline_19
  672. ; spline > offset
  673. ;***********************
  674. spline
  675. 160.5000,75.5000
  676. 160.0000,80.0000
  677. 161.5000,81.0000
  678. 164.0000,81.0000
  679. 167.0000,78.5000
  680. 167.0000,74.0000
  681. 163.5000,71.5000
  682. 162.0000,68.0000
  683. 163.5000,66.0000
  684. 168.5000,64.0000
  685. 172.0000,64.5000
  686. 174.0000,67.0000
  687. 174.0000,68.5000
  688. 172.5000,71.0000
  689. 170.0000,73.5000
  690. 169.0000,75.5000
  691. 168.5000,78.0000
  692. 167.0000,82.0000
  693. 166.0000,84.0000
  694. 165.5000,87.0000
  695. 165.5000,87.5000
  696. 168.0000,88.5000
  697. 175.0000,88.0000
  698. 184.5000,87.5000
  699. 188.5000,87.5000
  700. 189.5000,87.5000
  701. 189.0000,84.5000
  702. 187.0000,83.0000
  703. 184.5000,81.5000
  704. 183.0000,78.5000
  705. 182.5000,76.5000
  706. 181.0000,72.0000
  707. 181.0000,70.0000
  708. 181.0000,66.5000
  709. 182.0000,65.0000
  710. 188.0000,63.0000
  711. 191.5000,64.0000
  712. 191.5000,68.0000
  713. 190.0000,72.0000
  714. 187.5000,74.5000
  715. 185.5000,77.0000
  716. 185.5000,78.5000
  717. 187.0000,79.0000
  718. 189.0000,78.0000
  719. 190.0000,76.5000
  720.  
  721. 169.5000,72.0000
  722. 180.5000,73.5000
  723. ;*************************
  724. ; spline_20
  725. ; spline >
  726. ;*************************
  727. spline
  728. 209.0000,86.0000
  729. 241.0000,86.0000
  730. 209.5000,77.0000
  731. 239.5000,76.5000
  732.  
  733. 238.5000,80.0000
  734. 229.5000,79.5000
  735. ; ignore this section - text only
  736. ;///////////////////////////////////////////
  737. color
  738. 31
  739. text
  740. 5.0000,41
  741. 2
  742.  
  743. 21) copy array
  744.  
  745. 54.5000,41
  746.  
  747.  
  748. 22) rotate spline
  749.  
  750. 105.0000,41
  751.  
  752.  
  753. 23) move spline
  754.  
  755. 155.0000,41
  756.  
  757.  
  758. 24) break spline
  759.  
  760. 203.0000,41
  761.  
  762.  
  763. 25) trim spline
  764. ;////////////////////////////////////////////////
  765. ;**********************
  766. ; spline_21
  767. ; spline >
  768. ;**********************
  769. spline
  770. 10.0000,30.0000
  771. 7.0000,27.0000
  772. 6.5000,23.0000
  773. 8.5000,19.5000
  774. 12.5000,18.5000
  775. 15.5000,20.0000
  776. 15.5000,23.5000
  777. 11.5000,26.5000
  778. 12.5000,28.0000
  779. 17.0000,27.0000
  780. 22.0000,26.5000
  781. 25.5000,27.5000
  782. 24.5000,31.5000
  783.  
  784. 19.0000,24.5000
  785. 21.0000,33.0000
  786. ;*************************
  787. ;spline_22
  788. ; spline >
  789. ;************************
  790. spline
  791. 64.5000,32.0000
  792. 63.0000,28.5000
  793. 63.5000,26.5000
  794. 68.0000,23.5000
  795. 74.0000,22.0000
  796. 77.0000,23.0000
  797. 79.0000,26.5000
  798. 79.5000,30.5000
  799. 78.0000,33.0000
  800. 73.5000,33.5000
  801. 70.5000,30.5000
  802. 70.0000,27.5000
  803. 69.5000,22.0000
  804. 70.5000,18.5000
  805. 76.0000,15.0000
  806. 80.5000,13.0000
  807. 86.5000,13.0000
  808. 89.0000,14.5000
  809. 89.5000,18.5000
  810. 88.5000,20.5000
  811. 81.5000,21.5000
  812. 76.0000,20.0000
  813. 75.0000,15.0000
  814. 75.5000,11.0000
  815. 77.0000,8.5000
  816. 82.0000,6.5000
  817. 87.5000,6.5000
  818. 89.0000,6.5000
  819.  
  820. 90.5000,11.5000
  821. 71.5000,38.0000
  822. ;***********************
  823. ; spline23
  824. ; spline >
  825. ;***********************
  826. spline
  827. 116.0000,33.5000
  828. 115.0000,31.0000
  829. 114.0000,28.0000
  830. 114.5000,24.0000
  831. 123.0000,22.0000
  832. 128.0000,24.0000
  833. 127.0000,30.5000
  834. F
  835. .0777
  836. 133.5000,32.0000
  837. 132.5000,21.0000
  838.  
  839. 128.5000,20.5000
  840. 128.5000,20.5000
  841. ;*************************
  842. ; spline_24
  843. ; spline > 
  844. ;*************************
  845. spline
  846. 175.5000,30.5000
  847. 169.5000,30.5000
  848. 167.0000,24.5000
  849. 167.0000,20.0000
  850. 177.0000,17.5000
  851. 181.5000,18.0000
  852. 186.0000,22.5000
  853. 181.0000,23.5000
  854. 178.0000,22.0000
  855. C
  856. 169.5000,22.5000
  857. ;************************
  858. ; spline_25
  859. ; spline > 
  860. ;************************
  861. spline
  862. 225.5000,29.0000
  863. 224.0000,30.0000
  864. 218.5000,30.5000
  865. 214.5000,28.5000
  866. 213.5000,22.0000
  867. 217.5000,19.0000
  868. 226.0000,18.5000
  869. 237.0000,20.0000
  870. 241.5000,25.0000
  871. 239.5000,31.5000
  872. 233.0000,34.5000
  873. 225.5000,36.0000
  874. 221.0000,36.0000
  875. 217.0000,33.5000
  876. 213.5000,30.5000
  877. 209.5000,24.0000
  878. 211.0000,15.0000
  879. 221.0000,13.0000
  880. 229.0000,14.5000
  881.  
  882. 230.5000,18.5000
  883. 229.5000,23.0000
  884. ;***********************
  885. ; end of script
  886. ; **********************
  887. ;----------------------------------------------------------------------
  888. ;Now for the grand finale 
  889. z
  890. e
  891. TEXT
  892. -39.8278,152
  893. 3
  894. 0
  895. Done!
  896. ;----------------------------------------------------------------------
  897.