-
Notifications
You must be signed in to change notification settings - Fork 1
/
CornuPowBord.rb
executable file
·114 lines (101 loc) · 2.68 KB
/
CornuPowBord.rb
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
102
103
104
105
106
107
108
109
110
111
112
113
114
require './Jacksloon.rb'
require './Okuda.rb'
require './plumbENGRAVE/cornuSZILK.rb'
class CornuPowBord < Jacksloon
MARJ = 0.00
$bitwidth = 0.9/25.4
$halfwidth = $bitwidth/2
@@numero = 0
def initialize(starx, stary)
@width = 6
@heigh = 1 ###1.95 ####wasz 2!!!
@depth = 0.08
@@lipp = 0.0
@zstep = 2
super(starx, stary)
end
def rectangle(minx,miny,maxx,maxy,deptg)
skimtoPoint(minx-$halfwidth,miny-$halfwidth,0.1)
penetrate(0-deptg)
drawzframe(minx-$halfwidth,
miny-$halfwidth,
maxx+$halfwidth,
maxy+$halfwidth)
end
def grancirque(x,y,xr,yr)
xr -= $halfwidth
yr -= $halfwidth
numsegs = Integer(xr*32+1)
for i in 0..NUMSEGS do
xx = xr * Math.sin(2 * i * Math::PI / NUMSEGS)
yy = yr * Math.cos(2 * i * Math::PI / NUMSEGS)
cutoPoint(x+xx,y+yy)
end
end
def grantubo(x,y,xr,yr,zstart,zdepth,step)
incro = (Float(zdepth-zstart) / Float(step))
skimtoPoint(x,y,zstart+0.1)
for i in 1..step do
penetrate(zstart + (incro * i))
grancirque(x,y,xr,yr)
end
end
def powtube(x,y)
grantubo(x,y,0.138/2,0.138/2,0,-@depth,2)
end
def screwtube(x,y)
grantubo(x,y,0.125/2,0.125/2,0,-@depth,2)
end
def staretube(x,y)
grantubo(x,y,0.081/2,0.081/2,0,-@depth,2)
end
def starestud(x,y)
grantubo(x,y,0.093/2,0.093/2,0,-@depth,2)
end
def boxo()
@curxo += MARJ
widochub = @width/2
staretierwon = 0.252
staretiertwo = 0.448
staretiermid = (staretierwon + staretiertwo)/2
starestud(@curxo+staretierwon,@stary+0.197)
staretube(@curxo+staretierwon,@stary)
starestud(@curxo+staretierwon,@stary-0.197)
staretube(@curxo+staretiertwo,@stary+0.197)
staretube(@curxo+2.5,@stary+0.197)
rectangle(@curxo+0.368,@stary+0.117,@curxo+2.6,@stary+0.277,0.01)
starestud(@curxo+staretiertwo,@stary)
staretube(@curxo+staretiertwo,@stary-0.197)
staretube(@curxo+2.5,@stary-0.197)
rectangle(@curxo+0.368,@stary-0.277,@curxo+2.6,@stary-0.117,0.01)
screwtube(@curxo+0.25,@stary-0.35)
screwtube(@curxo+0.25,@stary+0.35)
staretube(@curxo+3,@stary)
powtube(@curxo+5.461,@stary)
powtube(@curxo+5.577,@stary-0.193)
powtube(@curxo+5.697,@stary)
staretube(@curxo+3.5,@stary)
rectangle(@curxo+3.4,@stary-0.1,@curxo+5.5,@stary+0.1,0.01)
screwtube(@curxo+5.75,@stary-0.35)
screwtube(@curxo+5.75,@stary+0.35)
for i in 1..3
rectangle(@curxo,@stary-@heighchub,@curxo+@width,@stary+@heighchub,@depth*i/3)
end
retract
@curxo += @width /2
#@myOkuda = Okuda.new(@curxo,@stary,@width+MARJ*2+$bitwidth,@heigh+@@lipp*2+$bitwidth,0.3)
@curxo += @width /2
@curxo += MARJ
return @curxo
end
def ducatop
end
def ducabot
#@myOkuda.bokchoy(-@depth,1.0)
end
def duxo
@curxo += $bitwidth
return @curxo
end
end
stutterat(CornuPowBord)