home *** CD-ROM | disk | FTP | other *** search
- ;---------------------------------------------
- ;File name: Chamfer.SCR
- ;Purpose: Demonstrate Chamfer and options
- ;
- ;Last Modified: 3/18/98
- ;---------------------------------------------
- CMDECHO
- 0
- PICKBOX
- 3
- APERTURE
- 10
- ;---------------------------------------------
- ; Erase anything that's there already.
- erase
- all
-
- ; Turn blips off
- blipmode
- off
- ; Set the current layer to zero.
- layer
- s
- 0
-
- color
- bylayer
- ; Setting all the other necessary system variables:
- vpoint
- 0,0,1
- ; Zoom to a window at least 100 x 100 (if it were square).
- zoom
- c
- 58,62
- 110
- elev
- 0
- 0
- gridmode
- 0
- fillmode
- 1
- snapmode
- 0
- linetype
- s
- bylayer
-
- aperture
- 10
- ; ***************************************************************************************
- ; LINES
- ; ***************************************************************************************
- ; Draw some lines to chamfer - 2 sets of each, for Trim and No trim
- ; Upside-down U shape with a little line across the opening:
- line
- 0,80
- 0,100
- 10,100
- 10,80
-
- line
- 3,80
- 7,80
-
- line
- 60,80
- 60,100
- 70,100
- 70,80
-
- line
- 63,80
- 67,80
-
- ; Little crosses to be sure the lines chamfer and trim in the right direction:
- line
- 20,80
- 20,84
-
- line
- 20,85
- 20,89
-
- line
- 20,90
- 20,94
-
- line
- 20,95
- 20,99
-
- line
- 15,97
- 25,97
-
- line
- 15,92
- 25,92
-
- line
- 15,87
- 25,87
-
- line
- 15,82
- 25,82
-
- ; Another set of crosses for testing No trim.
- line
- 80,80
- 80,84
-
- line
- 80,85
- 80,89
-
- line
- 80,90
- 80,94
-
- line
- 80,95
- 80,99
-
- line
- 75,97
- 85,97
-
- line
- 75,92
- 85,92
-
- line
- 75,87
- 85,87
-
- line
- 75,82
- 85,82
-
- ; Non-intersecting lines, for testing with trim:
- line
- 30,80
- 30,89
-
- line
- 30,91
- 30,95
-
- line
- 30,96
- 30,100
-
- line
- 33,82
- 35,82
-
- line
- 33,88
- 35,88
-
- line
- 33,92
- 35,92
-
- line
- 33,99
- 35,99
-
- ; Non-intersecting lines, for testing with No trim:
- line
- 90,80
- 90,89
-
- line
- 90,91
- 90,95
-
- line
- 90,96
- 90,100
-
- line
- 93,82
- 95,82
-
- line
- 93,88
- 95,88
-
- line
- 93,92
- 95,92
-
- line
- 93,99
- 95,99
-
- ; Draw two sets of lines that will intersect way off the screen if they are extended.
- line
- 40,80
- 40.05,85
-
- line
- 44,80
- 43.95,85
-
- line
- 100,80
- 100.05,85
-
- line
- 104,80
- 103.95,85
-
- ; Draw some lines on different layers
- ; The horizontal lines are white, on layer "0".
- layer
- s
- 0
-
- line
- 45,80
- 55,80
-
- line
- 45,85
- 55,85
-
- line
- 45,90
- 55,90
-
- line
- 48,95
- 52,95
-
- line
- 48,100
- 52,100
-
- line
- 105,80
- 115,80
-
- line
- 105,85
- 115,85
-
- line
- 105,90
- 115,90
-
- line
- 108,95
- 112,95
-
- line
- 108,100
- 112,100
-
- ; The vertical lines are red, on layer "red".
- layer
- m
- redchamfer
- c
- red
-
-
- line
- 46,79
- 46,86
-
- line
- 55,80
- 55,85
-
- line
- 46,88
- 46,92
-
- line
- 55,88
- 55,92
-
- line
- 45,93
- 45,97
-
- line
- 55,93
- 55,97
-
- line
- 45,98
- 45,102
-
- line
- 55,98
- 55,102
-
- line
- 106,79
- 106,86
-
- line
- 115,80
- 115,85
-
- line
- 106,88
- 106,92
-
- line
- 115,88
- 115,92
-
- line
- 105,93
- 105,97
-
- line
- 115,93
- 115,97
-
- line
- 105,98
- 105,102
-
- line
- 115,98
- 115,102
-
- ; Chamfer the above lines.
- ;
- text
- 0,108
- 1.5
-
- Chamfer
- text
- 0,105
- 1.5
-
- w/Trim
- text
- 0,102
- 1.0
-
- Distance 4 2
- ;-----------------------------
- chamfer
- distance
- 4
- 2
- chamfer
- trim
- trim
- 5,80
- 0,85
-
- 0,95
- 5,100
-
- 5,100
- 10,95
-
- 10,85
- 5,80
- text
- 60,108
- 1.5
-
- Chamfer
- text
- 60,105
- 1.5
-
- w/No Trim
- text
- 60,102
- 1.0
-
- Distance 4 2
- chamfer
- distance
- 4
- 2
- chamfer
- trim
- no
- 65,80
- 60,85
-
- 60,95
- 65,100
-
- 65,100
- 70,95
-
- 70,85
- 65,80
- ; Chamfer the little crosses
- text
- 14,102
- 1.0
-
- Distance 1 2
- chamfer
- trim
- trim
- distance
- 1
- 2
- chamfer
- 20,80
- 15,82
-
- 20,85
- 25,87
-
- 15,92
- 20,94
-
- 25,97
- 20,99
- text
- 74,102
- 1.0
-
- Distance 1 2
- chamfer
- trim
- no
- distance
- 1
- 2
- chamfer
- 80,80
- 75,82
-
- 80,85
- 85,87
-
- 75,92
- 80,94
-
- 85,97
- 80,99
- ; Chamfer the non-intersecting lines
- text
- r
- 40,105
- 1.0
-
- Non-intersecting
-
- 30,102
- 1.0
-
- lines
- chamfer
- trim
- trim
- distance
- 2
- 1
- chamfer
- 34,82
- 30,84
-
- 34,88
- 30,85
-
- 34,92
- 30,94
-
- 34,99
- 30,97
- chamfer
- trim
- no
- distance
- 2
- 1
- chamfer
- 94,82
- 90,84
-
- 94,88
- 90,85
-
- 94,92
- 90,94
-
- 94,99
- 90,97
- ; Now chamfer the lines that are almost parallel, using trim
- ; This should look like two converging lines, but if you select them
- ; and List them you will find three lines. The chamfer line is almost
- ; vertical and about 4 units long.
- text
- r
- 38,114
- 1.5
-
- =>
- text
- r
- 38,112
- 1.5
-
- Almost
-
- r
- 38,110
- 1.5
-
- Parallel
- chamfer
- trim
- trim
- distance
- 1
- 5
- chamfer
- 40,82
- 44,82
- ; Now the same thing, but with No trim.
- ; This will just give the 4 unit line at the top.
- chamfer
- trim
- no
- 100,82
- 104,82
- ; Chamfer the red and white lines that are on different layers.
- ; The chamfer lines should be on the active layer, which is "red".
- ; This is not because any of the lines are on the "red" layer, but
- ; just because it's the current layer at the moment.
- chamfer
- trim
- trim
- dist
- 1
- 2
- ; The first 4 go clockwise around the rectangle at the bottom.
- chamfer
- 46,82
- 48,85
-
- 50,85
- 55,83
-
- 55,88
- 50,80
-
- 48,80
- 46,82
- ; These do the three sets of lines above the rectangle.
- chamfer
- 48,90
- 46,88
-
- 50,90
- 55,92
-
- 48,95
- 45,93
-
- 52,95
- 55,97
- ;
-
- 45,102
- 50,100
-
- 55,98
- 50,100
- ; Now the same thing on the right, but with No trim
- chamfer
- trim
- no
-
- ; The first 4 go clockwise around the rectangle at the bottom.
- chamfer
- 106,82
- 108,85
-
- 110,85
- 115,83
-
- 115,88
- 110,80
-
- 108,80
- 106,82
- ; These do the three sets of lines above the rectangle.
- chamfer
- 108,90
- 106,88
-
- 110,90
- 115,92
-
- 108,95
- 105,93
-
- 112,95
- 115,97
-
- 105,102
- 110,100
-
- 115,98
- 110,100
- ; *********************************************************************************
- ; POLYGONS
- ; *********************************************************************************
- layer
- m
- polygons
- c
- yellow
-
-
- text
- 46,72
- 2.5
-
- Polygons
- polygon
- 3
- e
- 0,60
- 10,60
- polygon
- 4
- e
- 15,60
- 25,60
- polygon
- 3
- e
- 30,60
- 40,60
- polygon
- 4
- e
- 45,60
- 55,60
- polygon
- 3
- e
- 60,60
- 70,60
- polygon
- 4
- e
- 75,60
- 85,60
- polygon
- 3
- e
- 90,60
- 100,60
- polygon
- 4
- e
- 105,60
- 115,60
- ;*****************CHAMFERING*************************
- text
- 16,72
- 1.5
-
- w/Trim
- chamfer
- distance
- 3
- 3
- chamfer
- trim
- trim
- 5,60
- 2,64
- chamfer
- 20,60
- 15,65
- chamfer
- 32,64
- 35,60
- chamfer
- 45,65
- 50,60
- text
- 87,72
- 1.5
-
- w/No Trim
- chamfer
- trim
- No
- 65,60
- 62,64
- chamfer
- 80,60
- 75,65
- chamfer
- p
- 92,64
- ;95,60
- chamfer
- 105,65
- 110,60
- ; *********************************************************************************
- ; PLINES
- ; *********************************************************************************
- ; Draw some plines to chamfer
- layer
- m
- plines
- c
- magenta
-
-
- text
- 46,46
- 2.5
-
- Polylines
- ; First, a vertical zig-zag for testing with Trim.
- pline
- 10,40
- 0,36
- 10,32
- 0,28
- 10,24
- 0,20
-
- ; Draw a shepherd's hook and a slanted line for testing with Trim.
- pline
- 12,20
- 12,30
- arc
- 20,30
-
- line
- 28,35
- 21,31
-
- ; Draw the same thing.
- pline
- 32,20
- 32,30
- arc
- 40,30
-
- line
- 48,35
- 41,31
-
- ; Now a vertical zig-zag for testing with No trim.
- pline
- 70,40
- 60,36
- 70,32
- 60,28
- 70,24
- 60,20
-
- ; Draw a shepherd's hook and a slanted line for testing with No trim.
- pline
- 72,20
- 72,30
- arc
- 80,30
-
- line
- 88,35
- 81,31
-
- ; Draw the same thing.
- pline
- 92,20
- 92,30
- arc
- 100,30
-
- line
- 108,35
- 101,31
-
- ;*******************CHAMFERING W/TRIM***********************
- text
- 16,46
- 1.5
-
- w/Trim
- chamfer
- trim
- trim
- 5,22
- 6,25.6
- chamfer
- 12,25
- 24,33
- chamfer
- 39,32
- 48,35
- ;*******************CHAMFERING W/NO TRIM***********************
- text
- 87,46
- 1.5
-
- w/No Trim
- chamfer
- trim
- no
- 65,38
- 63,35
- chamfer
- 72,25
- 84,33
- chamfer
- 103,32
- 92,30
- setvar
- cmdecho
- 0
- redraw
- ;----------------------------------------------------------------------
- ;Now for the grand finale
- text
- 32,15,0
- 6
-
- Done!
- ;----------------------------------------------------------------------
-