-
Notifications
You must be signed in to change notification settings - Fork 0
/
ruler.gle
101 lines (91 loc) · 2.98 KB
/
ruler.gle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
!----------------------------------------------------------------------------
! Copyright 2014 Jacques Supcik, EIA-FR
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
! You may obtain a copy of the License at
!
! http://www.apache.org/licenses/LICENSE-2.0
!
! Unless required by applicable law or agreed to in writing, software
! distributed under the License is distributed on an "AS IS" BASIS,
! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
! See the License for the specific language governing permissions and
! limitations under the License.
!----------------------------------------------------------------------------
!
! Ruler / Jacques Supcik / 2014-07-20
!
!----------------------------------------------------------------------------
step = 0.5
k = 0.8
size 4.0 0.4+step*17
!----------------------------------------------------------------------------
! Color definition for Trotec 300 laser cutter
!----------------------------------------------------------------------------
Black$ = "rgb255(000,000,000)"
Red$ = "rgb255(255,000,000)"
Blue$ = "rgb255(000,000,255)"
Desert$ = "rgb255(051,102,153)"
Cyan$ = "rgb255(000,255,255)"
Green$ = "rgb255(000,255,000)"
Grass$ = "rgb255(000,153,051)"
Forest$ = "rgb255(000,102,051)"
Olive$ = "rgb255(153,153,051)"
Brown$ = "rgb255(153,102,051)"
Walnut$ = "rgb255(102,051,000)"
Plum$ = "rgb255(102,000,102)"
Purple$ = "rgb255(153,000,204)"
Magen$ = "rgb255(255,000,255)"
Orang$ = "rgb255(255,102,000)"
Yellow$ = "rgb255(255,255,000)"
CuttingCollor = Black$
GravingColor = Red$
!----------------------------------------------------------------------------
! Defaults
!----------------------------------------------------------------------------
set lwidth 0.01
set join round
set cap round
set font texcmss
!----------------------------------------------------------------------------
! Subroutines
!----------------------------------------------------------------------------
sub cut color$ h t$
set color color$
amove step*.5*k step+h*step
rline 1.5 0
rmove 0.2 -0.1
set color Red$
write t$
set color color$
amove 0 step+h*step
arc step*.5*k -90 90
end sub
!----------------------------------------------------------------------------
! Main
!----------------------------------------------------------------------------
sub main
cut Black$ 0 "???/???"
cut Red$ 1 "???/???"
cut Blue$ 2 "???/???"
cut Desert$ 3 "???/???"
cut Cyan$ 4 "???/???"
cut Green$ 5 "???/???"
cut Grass$ 6 "???/???"
cut Forest$ 7 "???/???"
cut Olive$ 8 "???/???"
cut Brown$ 9 "???/???"
cut Walnut$ 10 "???/???"
cut Plum$ 11 "???/???"
cut Purple$ 12 "???/???"
cut Magen$ 13 "???/???"
cut Orang$ 14 "???/???"
cut Yellow$ 15 "???/???"
set color Black$
amove 0 0
box 3.6 step*17
end sub
begin translate 0.2 0.2
main
end translate