|
发表于 2024-8-27 16:34:26
|
显示全部楼层
用这个完美解决,想同一把刀每条刀路显示余量就在 第一次移动 这里面 定制命令 然后这个代码再添加一次
global mom_stock_floor mom_stock_part mom_wall_stock mom_stock_part_use
global sidestock floorstock mom_operation_type
if {[info exists mom_stock_part]} {
set sidestock $mom_stock_part
if {[info exists mom_wall_stock] && $mom_wall_stock != 0} {
set sidestock $mom_wall_stock
}
} else {
set sidestock 0
}
if {[info exists mom_stock_floor]} {
if {[info exists mom_stock_part_use] && $mom_stock_part_use == 1 && [info exists mom_stock_part]} {
set floorstock $mom_stock_part
} else {
set floorstock $mom_stock_floor
}
} else {
set floorstock 0
}
if {([info exists sidestock] && $sidestock != 1) || ([info exists floorstock] && $floorstock != 1)} {
if {$mom_operation_type != "Point to Point" && $mom_operation_type != "Drilling"} {
MOM_output_literal "(XY=[string trimright [format "%.2f" $sidestock] "1"]mm Z=[string trimright [format "%.2f" $floorstock] "1"]mm)"
}
} |
|