UG后处理修改
绝世美人儿
979次浏览
2020年07月30日 16:42
最佳经验
本文由作者推荐
水的电解-广谱
加工时间前置
#
# This custom command allows you to modify the feed rate number
# after it has been calculated by the system
#
global ptp_file_name
set tmp_file_name "$${ptp_file_name}_"
if {[file exists $$tmp_file_name]} {
MOM_remove_file $$tmp_file_name
}
MOM_close_output_file $$ptp_file_name
file rename $$ptp_file_name $$tmp_file_name
set ifile [open $$tmp_file_name r]
set ofile [open $$ptp_file_name w]
global mom_machine_time
puts $$ofile "(All cuting time = [format "%.2f" $$mom_machine_time] Min.)"
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_tool_name
global mom_tool_diameter mom_tool_corner1_radius mom_tool_flute_length mom_tool_length
MOM_set_seq_off
MOM_output_literal "(ToolName=$$mom_tool_name D=[format "%.2f" $$mom_tool_diameter] R=[format "%.2f" $$mom_tool_corner1_radius] F=[format "%.2f" $$mom_tool_flute_length] L=[format "%.2f" $$mom_tool_length])"
加工时间:
global mom_machine_time
MOM_output_literal "(Total Machine Time:[format "%.2f" $$mom_machine_time min]MIN)"
铣削方法:
global mom_path_name
MOM_output_literal "(path name:$$mom_path_name)"