MOM_set_seq_on
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]
if {$outputthd == 1 } {
MOM_output_literal "(T$tt:$mom_tool_name D=$tdi R=$tr H$th D$td)"
} else {
MOM_output_literal "(T00:$mom_tool_name D=$tdi R=$tr H00 D$td)"
}
MOM_set_seq_off
global mom_spindle_rpm
global mom_feed_cut_value
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
global mom_operation_name
set partstock 0
set floorstock 0
if [info exists mom_stock_floor] {
set partstock [format "%.2f" $mom_stock_part side]
set floorstock [format "%.2f" $mom_stock_floor]
}
if {$mom_operation_type == "point to point"} {
set partstock 0
set floorstock 0
}
set buf ""
while { [gets $ifile buf] > 0 } {
puts $ofile $buf
}
close $ifile
close $ofile
MOM_remove_file $tmp_file_name
MOM_open_output_file $ptp_file_name
global mom_fixture_offset_value
if {$mom_fixture_offset_value>5} {
MOM_output_literal "G00G90G54.1P[expr $mom_fixture_offset_value-5]"
} else {
MOM_output_literal "G00G90G[expr $mom_fixture_offset_value+54]"
}
global toollist mom_tool_name mom_tool_diameter mom_tool_corner1_radius mom_tool_number
set mom_tool_number [format "%02.0f" $mom_tool_number]
set tool_mes [format "%-10s %-15s %-15s" T$mom_tool_number=$mom_tool_name D=[ format "%.2f" $mom_tool_diameter ] R=[ format "%.2f" $mom_tool_corner1_radius ] ]
#if { ![info exists toollist] } {
# set toollist $tool_mes
#} else {
lappend toollist $tool_mes
#}
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]
if {$outputthd == 1 } {
#MOM_output_literal "(T$tt:$mom_tool_name D=$tdi R=$tr H$th D$td)"
} else {
#MOM_output_literal "(T00:$mom_tool_name D=$tdi R=$tr H00 D$00)"
}
global toollist max_z min_z mom_tool_number mom_tool_name
global toollist mom_tool_name mom_tool_diameter mom_tool_corner1_radius mom_tool_number
set zmax [ string trimright [ format %.2f $max_z ]mm 0 ]
set zmin [ string trimright [ format %.2f $min_z ]mm 0 ]
set mom_tool_number [format "%02.0f" $mom_tool_number]
set tool_mes [format "%-8s %-8s %-8s" T$mom_tool_number:$mom_tool_name D=[ format "%.2f" $mom_tool_diameter ] R=[ format "%.2f" $mom_tool_corner1_radius ]\ \ \H$th\ \ \D$td\ \ \MaxZ=[ format %.2f $max_z ]mm\ \ \MinZ=[ format %.2f $min_z ]mm ]