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

  1. ;---------------------------------------------
  2. ;File name: Chamfer.SCR
  3. ;Purpose: Demonstrate Chamfer and options 
  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. ; 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. 58,62
  35. 110
  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. aperture
  50. 10
  51. ; ***************************************************************************************
  52. ;         LINES
  53. ; ***************************************************************************************
  54. ; Draw some lines to chamfer - 2 sets of each, for Trim and No trim
  55. ; Upside-down U shape with a little line across the opening:
  56. line
  57. 0,80
  58. 0,100
  59. 10,100
  60. 10,80
  61.  
  62. line
  63. 3,80
  64. 7,80
  65.  
  66. line
  67. 60,80
  68. 60,100
  69. 70,100
  70. 70,80
  71.  
  72. line
  73. 63,80
  74. 67,80
  75.  
  76. ; Little crosses to be sure the lines chamfer and trim in the right direction:
  77. line
  78. 20,80
  79. 20,84
  80.  
  81. line
  82. 20,85
  83. 20,89
  84.  
  85. line
  86. 20,90
  87. 20,94
  88.  
  89. line
  90. 20,95
  91. 20,99
  92.  
  93. line
  94. 15,97
  95. 25,97
  96.  
  97. line
  98. 15,92
  99. 25,92
  100.  
  101. line
  102. 15,87
  103. 25,87
  104.  
  105. line
  106. 15,82
  107. 25,82
  108.  
  109. ; Another set of crosses for testing No trim.
  110. line
  111. 80,80
  112. 80,84
  113.  
  114. line
  115. 80,85
  116. 80,89
  117.  
  118. line
  119. 80,90
  120. 80,94
  121.  
  122. line
  123. 80,95
  124. 80,99
  125.  
  126. line
  127. 75,97
  128. 85,97
  129.  
  130. line
  131. 75,92
  132. 85,92
  133.  
  134. line
  135. 75,87
  136. 85,87
  137.  
  138. line
  139. 75,82
  140. 85,82
  141.  
  142. ; Non-intersecting lines, for testing with trim:
  143. line
  144. 30,80
  145. 30,89
  146.  
  147. line
  148. 30,91
  149. 30,95
  150.  
  151. line
  152. 30,96
  153. 30,100
  154.  
  155. line
  156. 33,82
  157. 35,82
  158.  
  159. line
  160. 33,88
  161. 35,88
  162.  
  163. line
  164. 33,92
  165. 35,92
  166.  
  167. line
  168. 33,99
  169. 35,99
  170.  
  171. ; Non-intersecting lines, for testing with No trim:
  172. line
  173. 90,80
  174. 90,89
  175.  
  176. line
  177. 90,91
  178. 90,95
  179.  
  180. line
  181. 90,96
  182. 90,100
  183.  
  184. line
  185. 93,82
  186. 95,82
  187.  
  188. line
  189. 93,88
  190. 95,88
  191.  
  192. line
  193. 93,92
  194. 95,92
  195.  
  196. line
  197. 93,99
  198. 95,99
  199.  
  200. ; Draw two sets of lines that will intersect way off the screen if they are extended.
  201. line
  202. 40,80
  203. 40.05,85
  204.  
  205. line
  206. 44,80
  207. 43.95,85
  208.  
  209. line
  210. 100,80
  211. 100.05,85
  212.  
  213. line
  214. 104,80
  215. 103.95,85
  216.  
  217. ; Draw some lines on different layers 
  218. ; The horizontal lines are white, on layer "0".
  219. layer
  220. s
  221. 0
  222.  
  223. line
  224. 45,80
  225. 55,80
  226.  
  227. line
  228. 45,85
  229. 55,85
  230.  
  231. line
  232. 45,90
  233. 55,90
  234.  
  235. line
  236. 48,95
  237. 52,95
  238.  
  239. line
  240. 48,100
  241. 52,100
  242.  
  243. line
  244. 105,80
  245. 115,80
  246.  
  247. line
  248. 105,85
  249. 115,85
  250.  
  251. line
  252. 105,90
  253. 115,90
  254.  
  255. line
  256. 108,95
  257. 112,95
  258.  
  259. line
  260. 108,100
  261. 112,100
  262.  
  263. ; The vertical lines are red, on layer "red".
  264. layer
  265. m
  266. redchamfer
  267. c
  268. red
  269.  
  270.  
  271. line
  272. 46,79
  273. 46,86
  274.  
  275. line
  276. 55,80
  277. 55,85
  278.  
  279. line
  280. 46,88
  281. 46,92
  282.  
  283. line
  284. 55,88
  285. 55,92
  286.  
  287. line
  288. 45,93
  289. 45,97
  290.  
  291. line
  292. 55,93
  293. 55,97
  294.  
  295. line
  296. 45,98
  297. 45,102
  298.  
  299. line
  300. 55,98
  301. 55,102
  302.  
  303. line
  304. 106,79
  305. 106,86
  306.  
  307. line
  308. 115,80
  309. 115,85
  310.  
  311. line
  312. 106,88
  313. 106,92
  314.  
  315. line
  316. 115,88
  317. 115,92
  318.  
  319. line
  320. 105,93
  321. 105,97
  322.  
  323. line
  324. 115,93
  325. 115,97
  326.  
  327. line
  328. 105,98
  329. 105,102
  330.  
  331. line
  332. 115,98
  333. 115,102
  334.  
  335. ; Chamfer the above lines.
  336. text
  337. 0,108
  338. 1.5
  339.  
  340. Chamfer
  341. text
  342. 0,105
  343. 1.5
  344.  
  345. w/Trim
  346. text
  347. 0,102
  348. 1.0
  349.  
  350. Distance 4 2
  351. ;-----------------------------
  352. chamfer
  353. distance
  354. 4
  355. 2
  356. chamfer
  357. trim
  358. trim
  359. 5,80
  360. 0,85
  361.  
  362. 0,95
  363. 5,100
  364.  
  365. 5,100
  366. 10,95
  367.  
  368. 10,85
  369. 5,80
  370. text
  371. 60,108
  372. 1.5
  373.  
  374. Chamfer
  375. text
  376. 60,105
  377. 1.5
  378.  
  379. w/No Trim
  380. text
  381. 60,102
  382. 1.0
  383.  
  384. Distance 4 2
  385. chamfer
  386. distance
  387. 4
  388. 2
  389. chamfer
  390. trim
  391. no
  392. 65,80
  393. 60,85
  394.  
  395. 60,95
  396. 65,100
  397.  
  398. 65,100
  399. 70,95
  400.  
  401. 70,85
  402. 65,80
  403. ; Chamfer the little crosses
  404. text
  405. 14,102
  406. 1.0
  407.  
  408. Distance 1 2
  409. chamfer
  410. trim
  411. trim
  412. distance
  413. 1
  414. 2
  415. chamfer
  416. 20,80
  417. 15,82
  418.  
  419. 20,85
  420. 25,87
  421.  
  422. 15,92
  423. 20,94
  424.  
  425. 25,97
  426. 20,99
  427. text
  428. 74,102
  429. 1.0
  430.  
  431. Distance 1 2
  432. chamfer
  433. trim
  434. no
  435. distance
  436. 1
  437. 2
  438. chamfer
  439. 80,80
  440. 75,82
  441.  
  442. 80,85
  443. 85,87
  444.  
  445. 75,92
  446. 80,94
  447.  
  448. 85,97
  449. 80,99
  450. ; Chamfer the non-intersecting lines
  451. text
  452. r
  453. 40,105
  454. 1.0
  455.  
  456. Non-intersecting
  457.  
  458. 30,102
  459. 1.0
  460.  
  461. lines
  462. chamfer
  463. trim
  464. trim
  465. distance
  466. 2
  467. 1
  468. chamfer
  469. 34,82
  470. 30,84
  471.  
  472. 34,88
  473. 30,85
  474.  
  475. 34,92
  476. 30,94
  477.  
  478. 34,99
  479. 30,97
  480. chamfer
  481. trim
  482. no
  483. distance
  484. 2
  485. 1
  486. chamfer
  487. 94,82
  488. 90,84
  489.  
  490. 94,88
  491. 90,85
  492.  
  493. 94,92
  494. 90,94
  495.  
  496. 94,99
  497. 90,97
  498. ; Now chamfer the lines that are almost parallel, using trim
  499. ; This should look like two converging lines, but if you select them
  500. ; and List them you will find three lines.  The chamfer line is almost
  501. ; vertical and about 4 units long.
  502. text
  503. r
  504. 38,114
  505. 1.5
  506.  
  507. =>
  508. text
  509. r
  510. 38,112
  511. 1.5
  512.  
  513. Almost
  514.  
  515. r
  516. 38,110
  517. 1.5
  518.  
  519. Parallel
  520. chamfer
  521. trim
  522. trim
  523. distance
  524. 1
  525. 5
  526. chamfer
  527. 40,82
  528. 44,82
  529. ; Now the same thing, but with No trim.
  530. ; This will just give the 4 unit line at the top.
  531. chamfer
  532. trim
  533. no
  534. 100,82
  535. 104,82
  536. ; Chamfer the red and white lines that are on different layers.
  537. ; The chamfer lines should be on the active layer, which is "red".
  538. ; This is not because any of the lines are on the "red" layer, but
  539. ; just because it's the current layer at the moment.
  540. chamfer
  541. trim
  542. trim
  543. dist
  544. 1
  545. 2
  546. ; The first 4 go clockwise around the rectangle at the bottom.
  547. chamfer
  548. 46,82
  549. 48,85
  550.  
  551. 50,85
  552. 55,83
  553.  
  554. 55,88
  555. 50,80
  556.  
  557. 48,80
  558. 46,82
  559. ; These do the three sets of lines above the rectangle.
  560. chamfer
  561. 48,90
  562. 46,88
  563.  
  564. 50,90
  565. 55,92
  566.  
  567. 48,95
  568. 45,93
  569.  
  570. 52,95
  571. 55,97
  572. ;
  573.  
  574. 45,102
  575. 50,100
  576.  
  577. 55,98
  578. 50,100
  579. ; Now the same thing on the right, but with No trim
  580. chamfer
  581. trim
  582. no
  583.  
  584. ; The first 4 go clockwise around the rectangle at the bottom.
  585. chamfer
  586. 106,82
  587. 108,85
  588.  
  589. 110,85
  590. 115,83
  591.  
  592. 115,88
  593. 110,80
  594.  
  595. 108,80
  596. 106,82
  597. ; These do the three sets of lines above the rectangle.
  598. chamfer
  599. 108,90
  600. 106,88
  601.  
  602. 110,90
  603. 115,92
  604.  
  605. 108,95
  606. 105,93
  607.  
  608. 112,95
  609. 115,97
  610.  
  611. 105,102
  612. 110,100
  613.  
  614. 115,98
  615. 110,100
  616. ; *********************************************************************************
  617. ;      POLYGONS
  618. ; *********************************************************************************
  619. layer
  620. m
  621. polygons
  622. c
  623. yellow
  624.  
  625.  
  626. text
  627. 46,72
  628. 2.5
  629.  
  630. Polygons
  631. polygon
  632. 3
  633. e
  634. 0,60
  635. 10,60
  636. polygon
  637. 4
  638. e
  639. 15,60
  640. 25,60
  641. polygon
  642. 3
  643. e
  644. 30,60
  645. 40,60
  646. polygon
  647. 4
  648. e
  649. 45,60
  650. 55,60
  651. polygon
  652. 3
  653. e
  654. 60,60
  655. 70,60
  656. polygon
  657. 4
  658. e
  659. 75,60
  660. 85,60
  661. polygon
  662. 3
  663. e
  664. 90,60
  665. 100,60
  666. polygon
  667. 4
  668. e
  669. 105,60
  670. 115,60
  671. ;*****************CHAMFERING*************************
  672. text
  673. 16,72
  674. 1.5
  675.  
  676. w/Trim
  677. chamfer
  678. distance
  679. 3
  680. 3
  681. chamfer
  682. trim
  683. trim
  684. 5,60
  685. 2,64
  686. chamfer
  687. 20,60
  688. 15,65
  689. chamfer
  690. 32,64
  691. 35,60
  692. chamfer
  693. 45,65
  694. 50,60
  695. text
  696. 87,72
  697. 1.5
  698.  
  699. w/No Trim
  700. chamfer
  701. trim
  702. No
  703. 65,60
  704. 62,64
  705. chamfer
  706. 80,60
  707. 75,65
  708. chamfer
  709. p
  710. 92,64
  711. ;95,60
  712. chamfer
  713. 105,65
  714. 110,60
  715. ; *********************************************************************************
  716. ;      PLINES
  717. ; *********************************************************************************
  718. ; Draw some plines to chamfer
  719. layer
  720. m
  721. plines
  722. c
  723. magenta
  724.  
  725.  
  726. text
  727. 46,46
  728. 2.5
  729.  
  730. Polylines
  731. ; First, a vertical zig-zag for testing with Trim.
  732. pline
  733. 10,40
  734. 0,36
  735. 10,32
  736. 0,28
  737. 10,24
  738. 0,20
  739.  
  740. ; Draw a shepherd's hook and a slanted line for testing with Trim.
  741. pline
  742. 12,20
  743. 12,30
  744. arc
  745. 20,30
  746.  
  747. line
  748. 28,35
  749. 21,31
  750.  
  751. ; Draw the same thing.
  752. pline
  753. 32,20
  754. 32,30
  755. arc
  756. 40,30
  757.  
  758. line
  759. 48,35
  760. 41,31
  761.  
  762. ; Now a vertical zig-zag for testing with No trim.
  763. pline
  764. 70,40
  765. 60,36
  766. 70,32
  767. 60,28
  768. 70,24
  769. 60,20
  770.  
  771. ; Draw a shepherd's hook and a slanted line for testing with No trim.
  772. pline
  773. 72,20
  774. 72,30
  775. arc
  776. 80,30
  777.  
  778. line
  779. 88,35
  780. 81,31
  781.  
  782. ; Draw the same thing.
  783. pline
  784. 92,20
  785. 92,30
  786. arc
  787. 100,30
  788.  
  789. line
  790. 108,35
  791. 101,31
  792.  
  793. ;*******************CHAMFERING W/TRIM***********************
  794. text
  795. 16,46
  796. 1.5
  797.  
  798. w/Trim
  799. chamfer
  800. trim
  801. trim
  802. 5,22
  803. 6,25.6
  804. chamfer
  805. 12,25
  806. 24,33
  807. chamfer
  808. 39,32
  809. 48,35
  810. ;*******************CHAMFERING W/NO TRIM***********************
  811. text
  812. 87,46
  813. 1.5
  814.  
  815. w/No Trim
  816. chamfer
  817. trim
  818. no
  819. 65,38
  820. 63,35
  821. chamfer
  822. 72,25
  823. 84,33
  824. chamfer
  825. 103,32
  826. 92,30
  827. setvar
  828. cmdecho
  829. 0
  830. redraw
  831. ;----------------------------------------------------------------------
  832. ;Now for the grand finale
  833. text
  834. 32,15,0
  835. 6
  836.  
  837. Done!
  838. ;----------------------------------------------------------------------
  839.