|
发表于 2020-10-16 16:00:02
|
显示全部楼层
//碰撞检查已选文件夹内的刀路 DIALOGS MESSAGE OFF DIALOGS ERROR OFF STRING ARRAY Opts[]=get_folders('Toolpath') INT i=input CHOICE $Opts "选择要碰撞计算的文件夹:" STRING FolderPath=Opts[i] FOREACH Toolpath in folder(FolderPath) { ACTIVATE Toolpath $Toolpath.name FORM COLLISION EDIT COLLISION TYPE COLLISION EDIT COLLISION SPLIT_TOOLPATH N EDIT COLLISION SHANK_CLEARANCE "0.5" EDIT COLLISION HOLDER_CLEARANCE "0.5" EDIT COLLISION DEPTH Y EDIT COLLISION ADJUST_TOOL Y EDIT COLLISION OVERHANG_ONLY N EDIT PAR 'Verification.AlwaysCreateTool' 1 EDIT COLLISION APPLY COLLISION ACCEPT } real MaxL=max(extract(folder(FolderPath),'tool.Overhang')) string ToolName="" PRINT $FolderPath FOREACH Toolpath in folder(FolderPath) { IF Toolpath.Tool.OverHang==MaxL { $ToolName=Toolpath.Tool.Name BREAK } } IF ToolName!="" { FOREACH TH in folder(FolderPath) { ACTIVATE Tool $ToolName EDIT TOOLPATH $TH.NAME REPLACE_TOOL ; } } DIALOGS MESSAGE ON DIALOGS ERROR ON用这宏可以一键搞定 |
|