|
大师看看这代码输出开头刀具信息
只输出了这种格式,但是没有输出刀具的信息 是啥情况 代码如下,请大师修改
LIB_GE_command_buffer_edit_append MOM_start_of_program_LIB PROGRAMSTART {
global mom_cutter_info tool_name_list
array set tool_check {}
set duplicates ""
set tool_name_list [lsort -dictionary -unique $::lib_pretreatment(tool_name_list)]
MOM_ask_cutter_info tool_name_list
foreach tool_name $tool_name_list {
set tn $mom_cutter_info($tool_name,tool_number)
if {[info exists tool_check($tn)]} {
lappend duplicates "T$tn"
}
set tool_check($tn) 1
set td [expr {[info exists mom_cutter_info($tool_name,diameter)] ? $mom_cutter_info($tool_name,diameter) : 0}]
set tr [expr {[info exists mom_cutter_info($tool_name,corner_radius)] ? $mom_cutter_info($tool_name,corner_radius) : 0}]
set fl [expr {[info exists mom_cutter_info($tool_name,flute_length)] ? $mom_cutter_info($tool_name,flute_length) : 0}]
set tl [expr {[info exists mom_cutter_info($tool_name,total_length)] ? $mom_cutter_info($tool_name,total_length) : 0}]
LIB_GE_message "T${tn}=$tool_name\
D=[format %.0f $td]\
R=[format %.2f $tr]\
FL=[format %.0f $fl]\
TL=[format %.2f $tl]"
}
if {[llength $duplicates] > 0} {
LIB_GE_abort "DUPLICATE TOOL NUMBERS: [join $duplicates ", "]"
}
} _CUSTOM_TOOL_LIST
|
|