set outputthd 1
global toollist mom_tool_cutcom_register mom_cutcom_adjust_register mom_tool_name mom_tool_diameter mom_tool_corner1_radius mom_tool_adjust_register mom_tool_adj_reg_defined mom_tool_number
set tdi [ format "%.2f" $mom_tool_diameter]
set tr [ format "%.2f" $mom_tool_corner1_radius]
if [info exists mom_tool_number] {
set tt $mom_tool_number
} else {
set tt 0
}
if [info exists mom_tool_adj_reg_defined] {
set th $mom_tool_adjust_register
} else {
set th 0
}
if [info exists mom_tool_adj_reg_defined] {
set td $mom_tool_cutcom_register
} else {
set td 0
}
set tt [format "%02.0f" $tt]
set th [format "%02.0f" $th]
set td [format "%02.0f" $td]
set tt [format "%02.0f" $tt]
set th [format "%02.0f" $th]
set td [format "%02.0f" $td]
global mom_stock_part side
global mom_stock_floor
global mom_stock use floor same as side
global mom_operation_type
global mom_motion_type
set xystock 0
set zstock 0
#output tool info
global ptp_file_name
global tool_lists_file_name
global ino
global mom_group_name mom_output_file_suffix mom_output_file_basename
global mom_sys_max_travel
global mom_sys_min_travel
global mom_machine_time
set tool_lists_file_name ${ptp_file_name}_toollists
if {![info exists ino]} {
set ino 1
if {[file exists $tool_lists_file_name]} {
MOM_remove_file $tool_lists_file_name
}
}
set tfile [open $tool_lists_file_name a]
if {$ino > 1} {
puts $tfile "(ZMAX=[format "%.2f" $mom_sys_max_travel(2)] ZMIN=[format "%.2f" $mom_sys_min_travel(2)])"
}
set mom_sys_max_travel(2) -9999.999
set mom_sys_min_travel(2) 9999.999
#puts $tfile "(NC ne:$mom_group_name.$mom_output_file_suffix)"
if {$outputthd == 1 } {
puts $tfile "(T$tt:$mom_tool_name D:$tdi R:$tr H:$th D:$td)"
}