|
发表于 2024-8-16 20:55:35
|
显示全部楼层
本帖最后由 snowa* 于 2024-8-16 20:57 编辑
分享一段代码,我也是抄来的。现在想抄个代码基本不可能了,都是加密的。感谢原作者!
global mom_stock_floor mom_stock_part
global 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} {
if {[info exists mom_stock_part]} {
set floorstock $mom_stock_part
}
} else {
set floorstock $mom_stock_floor
}
} else {
set floorstock 0
}
if { $mom_operation_type != "Point to Point" && $mom_operation_type != "Drilling" } {
MOM_output_literal "(XY=[format "%.3f" $sidestock] Z=[format "%.3f" $floorstock])"
}
|
|