global mom_tool_number group1
global mom_tool_diameter
global mom_tool_flute_length hhh mom_tool_length_adjust_register
global mom_tool_corner1_radius mom_tool_lower_corner_radius
global mom_tool_type mom_operation_name mom_group_name
global mom_tool_name mom_tool_cutcom_register
global mom_tool_corner1_radius mom_cutcom_adjust_register
global mom_tool_description tname mom_tool_adjust_register
global mom_tool_length rr2 g9g mom_tool_point_angle ddd mmm ttinf
set g9g 0
if {[info exists mom_tool_cutcom_register] } {
set ddd $mom_tool_cutcom_register
} else {
if {[info exists mom_cutcom_adjust_register] } {
set ddd $mom_cutcom_adjust_register
}
}
if {[info exists mom_tool_adjust_register] } {
set hhh $mom_tool_adjust_register
} else {
if {[info exists mom_tool_length_adjust_register] } {
set hhh $mom_tool_length_adjust_register
} else {
set hhh 0
}
}
global numbers toolnumbers mom_operation_name
global nStep nt mom_tool_number ni ntd mom_tool_name
set nStep [expr $nStep+1]
set nt($nStep) $mom_tool_number
set ntd($nStep) $mom_tool_name
for { set ni 0 } { $ni < $nStep } { incr ni } {
if { $nt($ni) == $mom_tool_number } {
set nStep [expr $nStep-1]
if { [string compare $ntd($ni) $mom_tool_name] } {
MOM_abort "\n\n 「 $mom_operation_name」使用的刀具:「 $mom_tool_name 」与前面刀具的刀号相同!\n\n"
}
return
}
}
set numbers [expr $numbers+1]
set toolnumbers($numbers) $mom_tool_number