修复同步刀具标准库
This commit is contained in:
@@ -41,11 +41,11 @@ class ToolMaterialsBasicParameters(models.Model):
|
||||
chip_breaker_groove = fields.Selection([('无', '无'), ('单面', '单面'), ('双面', '双面')],
|
||||
string='有无断屑槽')
|
||||
blade_teeth_model = fields.Selection(
|
||||
[('V牙型', 'V牙型'), ('米制全牙型', '米制全牙型'), ('美制全牙型', '美制全牙型'),
|
||||
[('无', '无'), ('V牙型', 'V牙型'), ('米制全牙型', '米制全牙型'), ('美制全牙型', '美制全牙型'),
|
||||
('惠氏全牙型', '惠氏全牙型'), ('BSPT全牙型', 'BSPT全牙型'), ('NPT全牙型', 'NPT全牙型'),
|
||||
('UNJ全牙型', 'UNJ全牙型'), ('DIN405圆牙型', 'DIN405圆牙型'), ('ACME梯形', 'ACME梯形'),
|
||||
('石油管螺纹刀片', '石油管螺纹刀片'), ('矮牙ACME梯形', '矮牙ACME梯形'),
|
||||
('Trapeze30° 103', 'Trapeze30° 103')], string='刀片牙型')
|
||||
('Trapeze30° 103', 'Trapeze30° 103')], string='刀片牙型', default='无')
|
||||
blade_blade_number = fields.Selection([('1', '1'), ('2', '2'), ('3', '3'), ('4', '4'), ('5', '5'), ('6', '6'),
|
||||
('7', '7'), ('8', '8'), ('9', '9'), ('10', '10')],
|
||||
string='刀片的刃数(个)')
|
||||
@@ -53,7 +53,7 @@ class ToolMaterialsBasicParameters(models.Model):
|
||||
top_angle = fields.Integer('顶角(°)')
|
||||
blade_tip_dip_angle = fields.Integer('刀尖倾角(°)')
|
||||
side_cutting_edge_angle = fields.Integer('侧切削角(°)')
|
||||
thread_model = fields.Selection([('外螺纹', '外螺纹'), ('内螺纹', '内螺纹')], string='螺纹类型')
|
||||
thread_model = fields.Selection([('无', '无'), ('外螺纹', '外螺纹'), ('内螺纹', '内螺纹')], string='螺纹类型', default='无')
|
||||
thread_num = fields.Char('每英寸螺纹数(tpi)', size=20)
|
||||
blade_tip_height_tolerance = fields.Char('刀尖高度公差(mm)', size=20)
|
||||
inscribed_circle_tolerance = fields.Char('内接圆公差(mm)', size=20)
|
||||
@@ -66,7 +66,7 @@ class ToolMaterialsBasicParameters(models.Model):
|
||||
min_machining_aperture = fields.Char('最小加工孔径(mm)', size=20)
|
||||
install_blade_tip_num = fields.Char('可装刀片数/齿数(个)', size=20)
|
||||
cutting_blade_model = fields.Char('切削类型', size=20)
|
||||
cooling_hole = fields.Selection([('有', '有'), ('无', '无')], string='有无冷却孔')
|
||||
is_cooling_hole = fields.Boolean('有无冷却孔', default=False)
|
||||
locating_slot_code = fields.Char('定位槽代号', size=20)
|
||||
installing_structure = fields.Char('安装结构', size=20)
|
||||
blade_ids = fields.Many2many(
|
||||
@@ -99,11 +99,11 @@ class ToolMaterialsBasicParameters(models.Model):
|
||||
max_rotate_speed = fields.Char('最大转速(n/min)', size=20)
|
||||
diameter_slip_accuracy = fields.Char('径跳精度(mm)', size=20)
|
||||
cooling_model = fields.Char('冷却类型', size=20)
|
||||
is_rough_machining = fields.Selection([('是', '是'), ('否', '否')], string='是否可粗加工')
|
||||
is_finish_machining = fields.Selection([('是', '是'), ('否', '否')], string='是否可精加工')
|
||||
is_quick_cutting = fields.Selection([('是', '是'), ('否', '否')], string='是否可高速切削')
|
||||
is_drill_hole = fields.Selection([('是', '是'), ('否', '否')], string='是否可钻孔')
|
||||
is_safe_lock = fields.Selection([('是', '是'), ('否', '否')], string='有无安全锁')
|
||||
is_rough_machining = fields.Boolean('可粗加工', default=False)
|
||||
is_finish_machining = fields.Boolean('可精加工', default=False)
|
||||
is_quick_cutting = fields.Boolean('可高速切削', default=False)
|
||||
is_drill_hole = fields.Boolean('可钻孔', default=False)
|
||||
is_safe_lock = fields.Boolean('有无安全锁', default=False)
|
||||
# 夹头参数
|
||||
er_size_model = fields.Char('ER尺寸型号', size=20)
|
||||
outer_diameter = fields.Char('外径(mm)', size=20)
|
||||
@@ -160,7 +160,7 @@ class ToolMaterialsBasicParameters(models.Model):
|
||||
'install_aperture_diameter': obj['install_aperture_diameter'],
|
||||
'pitch': obj['pitch'],
|
||||
'chip_breaker_groove': obj['chip_breaker_groove'],
|
||||
'blade_teeth_model': obj['bladed_teeth_model'],
|
||||
'blade_teeth_model': '无' if not obj['bladed_teeth_model'] else obj['bladed_teeth_model'],
|
||||
'blade_blade_number': obj['blade_blade_number'],
|
||||
'cutting_depth': obj['cutting_depth'],
|
||||
'blade_width': obj['blade_width'],
|
||||
@@ -168,7 +168,7 @@ class ToolMaterialsBasicParameters(models.Model):
|
||||
'top_angle': obj['top_angle'],
|
||||
'blade_tip_dip_angle': obj['blade_tip_dip_angle'],
|
||||
'side_cutting_edge_angle': obj['side_cutting_edge_angle'],
|
||||
'thread_model': obj['thread_model'],
|
||||
'thread_model': '无' if not obj['thread_model'] else obj['thread_model'],
|
||||
'thread_num': obj['thread_num'],
|
||||
'blade_tip_height_tolerance': obj['blade_tip_height_tolerance'],
|
||||
'inscribed_circle_tolerance': obj['inscribed_circle_tolerance'],
|
||||
@@ -194,10 +194,10 @@ class ToolMaterialsBasicParameters(models.Model):
|
||||
'min_machining_aperture': obj['min_machining_aperture'],
|
||||
'install_blade_tip_num': obj['install_blade_tip_num'],
|
||||
'cutting_blade_model': obj['cutting_blade_model'],
|
||||
'cooling_hole': obj['cooling_hole'],
|
||||
'is_cooling_hole': obj['is_cooling_hole'],
|
||||
'locating_slot_code': obj['locating_slot_code'],
|
||||
'installing_structure': obj['installing_structure'],
|
||||
'blade_ids': [(6, 0, [])] if not obj.get('blade_codes') else self.evn['sf.cutting.tool.type']._get_ids(
|
||||
'blade_ids': [(6, 0, [])] if not obj.get('blade_codes') else self.evn['sf.cutting_tool.standard.library']._get_ids(
|
||||
obj['blade_codes']),
|
||||
'tool_shim': obj['tool_shim'],
|
||||
'cotter_pin': obj['cotter_pin'],
|
||||
@@ -220,12 +220,12 @@ class ToolMaterialsBasicParameters(models.Model):
|
||||
'cutting_depth': obj['cutting_depth'],
|
||||
'main_included_angle': obj['main_included_angle'],
|
||||
'installing_structure': obj['installing_structure'],
|
||||
'blade_ids': [(6, 0, [])] if not obj.get('blade_codes') else self.evn['sf.cutting.tool.type']._get_ids(
|
||||
'blade_ids': [(6, 0, [])] if not obj.get('blade_codes') else self.evn['sf.cutting_tool.standard.library']._get_ids(
|
||||
obj['blade_codes']),
|
||||
'screw': obj['screw'],
|
||||
'spanner': obj['spanner'],
|
||||
'cutting_blade_model': obj['cutting_blade_model'],
|
||||
'cooling_hole': obj['cooling_hole'],
|
||||
'is_cooling_hole': obj['is_cooling_hole'],
|
||||
'locating_slot_code': obj['locating_slot_code'],
|
||||
})
|
||||
return cutter_head_basic_param_str
|
||||
@@ -248,11 +248,11 @@ class ToolMaterialsBasicParameters(models.Model):
|
||||
'max_rotate_speed': obj['max_rotate_speed'],
|
||||
'diameter_slip_accuracy': obj['diameter_slip_accuracy'],
|
||||
'cooling_model': obj['cooling_model'],
|
||||
'is_rough_machining': obj['whether_rough_machining'],
|
||||
'is_finish_machining': obj['whether_finish_machining'],
|
||||
'is_quick_cutting': obj['whether_quick_cutting'],
|
||||
'is_drill_hole': obj['whether_drill_hole'],
|
||||
'is_safe_lock': obj['whether_safe_lock'],
|
||||
'is_rough_machining': obj['is_rough_machining'],
|
||||
'is_finish_machining': obj['is_finish_machining'],
|
||||
'is_quick_cutting': obj['is_quick_cutting'],
|
||||
'is_drill_hole': obj['is_drill_hole'],
|
||||
'is_safe_lock': obj['is_safe_lock'],
|
||||
'screw': obj['screw'],
|
||||
'spanner': obj['spanner'],
|
||||
})
|
||||
@@ -278,7 +278,7 @@ class ToolMaterialsBasicParameters(models.Model):
|
||||
'clamping_tolerance': obj['clamping_tolerance'],
|
||||
'max_load_capacity': obj['max_load_capacity'],
|
||||
'handle_ids': [(6, 0, [])] if not obj.get(
|
||||
'handle_codes') else self.evn['sf.cutting.tool.type']._get_ids(obj['handle_codes']),
|
||||
'handle_codes') else self.evn['sf.cutting_tool.standard.library']._get_ids(obj['handle_codes']),
|
||||
'cooling_jacket': obj['cooling_jacket'],
|
||||
})
|
||||
return chuck_basic_param_str
|
||||
|
||||
Reference in New Issue
Block a user