-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathmaterial.py
320 lines (291 loc) · 12.2 KB
/
material.py
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
import inspect
from btl.toolmaterial import HSS, Carbide
from . import operation
# TODO: Load materials from resource files.
# Notes:
# - All speeds are in m/min.
# - *_chipload_divisor attributes are defined as chipload = DIAMETER/divisor
# So the divisor is a unitless quantity that would work regardless of the
# unit of the diameter.
# - The power factor originally taken from "Machinery's Handbook 29" (2012) pp1083-1084,
# originally specified the "width of a chip that 1 HP can make".
# I converted this to metric. In other words, the original factor was "in³ * fac = HP",
# which equals "cm³*0.0610237*fac*0.745699872=KW". So below, I multiplied all
# factors by 0.061024*0.745699872=0.04550260618944 to simplify their use in
# a metric context.
METRIC_POWER_FACTOR=0.04550260618944
class Material(object):
@classmethod
def get_speeds(cls, tool_material):
data = cls.cutting_data[tool_material]
return data['speeds']
@classmethod
def get_chipload_divisor(cls, tool_material):
data = cls.cutting_data[tool_material]
return data['chipload_divisor']
@classmethod
def dump(cls):
print(f"Material data for {cls.name}")
for tool_material, data in cls.cutting_data.items():
print(f" {tool_material.name}:")
print(f" Chipload divisor: {data['chipload_divisor']}")
print( " Speeds:")
for op, (min_speed, max_speed) in data['speeds'].items():
print(f" {op.label()}: min {min_speed}, max {max_speed}")
class Aluminium6061(Material):
name = 'Aluminium Alloy (6061)'
power_factor = 0.33*METRIC_POWER_FACTOR
cutting_data = {
HSS: {
'chipload_divisor': 160, # chipload = DIAMETER/divisor
'speeds': {
operation.Profiling: (152, 182), # https://littlemachineshop.com/reference/cuttingspeeds.php
operation.Slotting: (120, 146), # estimated, 80% of milling speed
operation.Drilling: (106, 122), # https://littlemachineshop.com/reference/cuttingspeeds.php
}
},
Carbide: {
'chipload_divisor': 80,
'speeds': { # Source: https://www.machiningdoctor.com/mds/?matId=3850
operation.Profiling: (640, 865),
operation.Slotting: (425, 575),
operation.Drilling: (215, 290),
#operation.Turning: (510, 690),
#operation.Parting: (340, 460),
}
},
}
class Aluminium7075(Material):
name = 'Aluminium Alloy (7075)'
power_factor = 0.33*METRIC_POWER_FACTOR
cutting_data = {
HSS: {
'chipload_divisor': 160,
'speeds': {
operation.Profiling: (60, 300), # https://bekas.sk/files/pdfs/44.pdf
operation.Slotting: (48, 240), # estimated, 80% of milling speed
operation.Drilling: (106, 122), # https://littlemachineshop.com/reference/cuttingspeeds.php
}
},
Carbide: {
'chipload_divisor': 80,
'speeds': { # Source: https://www.machiningdoctor.com/mds/?matId=3970
operation.Profiling: (400, 545),
operation.Slotting: (270, 360),
operation.Drilling: (135, 180),
#operation.Turning: (320, 435),
#operation.Parting: (215, 290),
}
},
}
class CopperAlloy(Material):
name = 'Copper Alloy'
power_factor = 0.80*METRIC_POWER_FACTOR
cutting_data = {
HSS: {
'chipload_divisor': 160,
'speeds': {
operation.Profiling: (60, 300), # https://bekas.sk/files/pdfs/44.pdf
operation.Slotting: (48, 240), # estimated, 80% of milling speed
operation.Drilling: (24, 60), # https://www.easyspeedsandfeeds.com/
#operation.Parting: (120, 250), # https://www.heinrich-meier.de/upload/shoppictures_29/SchnittgeschwindigkeitNutex.pdf
}
},
Carbide: {
'chipload_divisor': 80,
'speeds': { # Source: https://www.machiningdoctor.com/mds/?matId=7210
operation.Profiling: (280, 555),
operation.Slotting: (185, 370),
operation.Drilling: (95, 185),
#operation.Turning: (220, 445),
#operation.Parting: (150, 295),
}
},
}
class Iron(Material):
name = 'Iron'
power_factor = 0.85*METRIC_POWER_FACTOR
cutting_data = {
HSS: {
'chipload_divisor': 200,
'speeds': {
operation.Profiling: (60, 250), # https://bekas.sk/files/pdfs/44.pdf
operation.Slotting: (48, 200), # estimated, 80% of milling speed
operation.Drilling: (15, 30), # https://www.easyspeedsandfeeds.com/
#operation.Parting: (15, 45), # https://www.heinrich-meier.de/upload/shoppictures_29/SchnittgeschwindigkeitNutex.pdf
}
},
Carbide: {
'chipload_divisor': 100,
'speeds': { # Source: https://www.machiningdoctor.com/mds/?matId=3230
operation.Profiling: (225, 305),
operation.Slotting: (230, 315),
operation.Drilling: (190, 255),
#operation.Parting: (165, 225),
#operation.Turning: (330, 450),
}
},
}
class ToolSteel(Material):
name = 'Tool Steel (640-670N/mm²)'
power_factor = 1.0*METRIC_POWER_FACTOR
cutting_data = {
HSS: {
'chipload_divisor': 250,
'speeds': {
operation.Profiling: (60, 100), # https://bekas.sk/files/pdfs/44.pdf
operation.Slotting: (48, 80), # estimated, 80% of milling speed
operation.Drilling: (7, 15), # https://www.easyspeedsandfeeds.com/
#operation.Parting: (30, 45), # https://www.heinrich-meier.de/upload/shoppictures_29/SchnittgeschwindigkeitNutex.pdf
}
},
Carbide: {
'chipload_divisor': 300,
'speeds': { # Source: https://www.machiningdoctor.com/mds/?matId=1610
operation.Profiling: (95, 130),
operation.Slotting: (90, 120),
operation.Drilling: (65, 85),
#operation.Turning: (155, 210),
#operation.Parting: (75, 100),
}
},
}
class LowCarbonSteel(Material):
name = 'Low Carbon Steel (340-690N/mm²)'
power_factor = 1.0*METRIC_POWER_FACTOR
cutting_data = {
HSS: {
'chipload_divisor': 250,
'speeds': {
operation.Profiling: (60, 100), # https://bekas.sk/files/pdfs/44.pdf
operation.Slotting: (48, 80), # estimated, 80% of milling speed
operation.Drilling: (6, 18), # https://www.easyspeedsandfeeds.com/
#operation.Parting: (40, 60), # https://www.heinrich-meier.de/upload/shoppictures_29/SchnittgeschwindigkeitNutex.pdf
}
},
Carbide: {
'chipload_divisor': 300,
'speeds': { # Source: https://www.machiningdoctor.com/mds/?matId=960
operation.Profiling: (125, 170),
operation.Slotting: (115, 155),
operation.Drilling: (80, 110),
#operation.Turning: (205, 275),
#operation.Parting: (100, 135),
}
},
}
class Stainless(Material):
name = 'Stainless Steel'
power_factor = 0.80*METRIC_POWER_FACTOR
cutting_data = {
HSS: {
'chipload_divisor': 200,
'speeds': {
operation.Profiling: (60, 80), # https://bekas.sk/files/pdfs/44.pdf
operation.Slotting: (48, 64), # estimated, 80% of milling speed
operation.Drilling: (7, 15), # https://www.easyspeedsandfeeds.com/
#operation.Parting: (15, 35), # https://www.heinrich-meier.de/upload/shoppictures_29/SchnittgeschwindigkeitNutex.pdf
}
},
Carbide: {
'chipload_divisor': 200,
'speeds': { # Source: https://www.machiningdoctor.com/mds/?matId=1750
operation.Profiling: (100, 135),
operation.Slotting: (95, 130),
operation.Drilling: (45, 60),
#operation.Turning: (160, 215),
#operation.Parting: (65, 85),
}
},
}
class Titanium(Material):
name = 'Titanium (900-1200N/mm²)'
power_factor = 0.80*METRIC_POWER_FACTOR
cutting_data = {
HSS: {
'chipload_divisor': 200,
'speeds': {
operation.Profiling: (5, 7), # https://mae.ufl.edu/designlab/Advanced%20Manufacturing/Speeds%20and%20Feeds/Speeds%20and%20Feeds.htm
operation.Slotting: (4, 6), # estimated, 80% of milling speed
operation.Drilling: (6, 15), # https://www.easyspeedsandfeeds.com/
#operation.Parting: (10, 15), # https://www.heinrich-meier.de/upload/shoppictures_29/SchnittgeschwindigkeitNutex.pdf
}
},
Carbide: {
'chipload_divisor': 250,
'speeds': { # Source: https://www.machiningdoctor.com/mds/?matId=6640
operation.Profiling: (45, 60),
operation.Slotting: (50, 70),
operation.Drilling: (50, 70),
#operation.Turning: (60, 80),
#operation.Parting: (35, 50),
}
},
}
class Plastic(Material):
name = 'Plastic'
power_factor = 0.20*METRIC_POWER_FACTOR
cutting_data = {
HSS: {
'chipload_divisor': 125,
'speeds': {
operation.Profiling: (200, 300), # https://bekas.sk/files/pdfs/44.pdf
operation.Slotting: (160, 240), # estimated, 80% of milling speed
operation.Drilling: (100, 300), # TODO. guesses for now
#operation.Parting: (100, 150), # https://www.heinrich-meier.de/upload/shoppictures_29/SchnittgeschwindigkeitNutex.pdf
}
},
Carbide: {
'chipload_divisor': 40,
'speeds': {
operation.Profiling: (100, 1000), # TODO. guesses for now
operation.Slotting: (80, 800), # estimated, 80% of milling speed
operation.Drilling: (100, 1000), # TODO. guesses for now
#operation.Parting: (150, 300), # https://www.heinrich-meier.de/upload/shoppictures_29/SchnittgeschwindigkeitNutex.pdf
}
},
}
class Softwood(Material):
name = 'Wood (soft)'
power_factor = 0.20*METRIC_POWER_FACTOR
cutting_data = {
HSS: {
'chipload_divisor': 100,
'speeds': {
operation.Profiling: (100, 1300), # TODO. guesses for now
operation.Slotting: (80, 1040), # estimated, 80% of milling speed
operation.Drilling: (100, 1000), # TODO. guesses for now
}
},
Carbide: {
'chipload_divisor': 80,
'speeds': {
operation.Profiling: (100, 1300), # TODO. guesses for now
operation.Slotting: (None, None), # will be auto-estimated from milling
operation.Drilling: (100, 1300), # TODO. guesses for now
}
},
}
class Hardwood(Material):
name = 'Wood (hard)'
power_factor = 0.30*METRIC_POWER_FACTOR # Guess based on softwood
cutting_data = {
HSS: {
'chipload_divisor': 100, # Guess based on softwood
'speeds': {
operation.Profiling: (100, 1300), # TODO. guesses for now
operation.Slotting: (80, 1040), # estimated, 80% of milling speed
operation.Drilling: (100, 1300), # TODO. guesses for now
}
},
Carbide: {
'chipload_divisor': 80, # Guess based on softwood
'speeds': {
operation.Profiling: (100, 1300), # TODO. guesses for now
operation.Slotting: (80, 1040), # estimated, 80% of milling speed
operation.Drilling: (100, 1300), # TODO. guesses for now
}
},
}
materials = [c for c in locals().values()
if inspect.isclass(c) and issubclass(c, Material) and c != Material]