DIALOGS MESSAGE OFF DIALOGS ERROR OFF GRAPHICS LOCK EXPLORER SELECT Stockmodel ROOT DEBUG EXPLORER KEY right EXPLORER SELECT StockModel "StockModel\P#01 - STM_Blank milling" NEW DEBUG EXPLORER KEY right ACTIVATE STOCKMODEL "P#01 - STM_Blank milling" EDIT STOCKMODEL "P#01 - STM_Blank milling" ACTIVATE BLOCK COPY STOCKMODEL "P#01 - STM_Blank milling" FOREACH $tp in filter(folder('toolpath'),'this.RootType == "toolpath"') { IF NOT tp.Computed { ACTIVATE TOOLPATH $tp.Name EDIT TOOLPATH $tp.Name CALCULATE } } FOREACH $tp in filter(folder('toolpath'),'this.RootType == "toolpath"') { ACTIVATE TOOLPATH $tp.Name ACTIVATE StockModel "P#01 - STM_Blank milling_1" EDIT COLLISION TYPE COLLISION EDIT COLLISION STOCKMODEL_CHECK Y EDIT COLLISION STOCKMODEL "P#01 - STM_Blank milling_1" EDIT COLLISION SCOPE ALL EDIT COLLISION SPLIT_TOOLPATH N EDIT COLLISION MISS_OUTPUT N EDIT PAR 'Verification.UseVerificationThickness' 0 EDIT COLLISION HEAD_CLEARANCE "600.0" EDIT COLLISION HOLDER_CLEARANCE "1.0" EDIT COLLISION SHANK_CLEARANCE "0.3" EDIT COLLISION DEPTH Y EDIT COLLISION ADJUST_TOOL N UNDRAW COLLISION EDIT COLLISION APPLY EDIT STOCKMODEL ; INSERT_INPUT TOOLPATH $tp.Name LAST EDIT STOCKMODEL "P#01 - STM_Blank milling_1" CALCULATE IF $tp.Safety.Holder.Cutting.Status == 'collides' or $tp.Safety.Holder.Leads.Status == 'collides' or $tp.Safety.Holder.Links.Status == 'collides' or $tp.Safety.Tool.Cutting.Status == 'collides' or $tp.Safety.Tool.Leads.Status == 'collides' or $tp.Safety.Tool.Links.Status == 'collides' { string $newName = $tp.Name + "_COLLISION" IF entity_exists('toolpath',$newName) { $newName = new_entity_name('toolpath',$newName) } RENAME Toolpath ${tp.Name} ${newName} } } DEACTIVATE Toolpath DIALOGS MESSAGE ON DIALOGS ERROR ON GRAPHICS UNLOCK //MACRO DEBUG 'C:\SYNOLOGY\BCAD_CAM\Powermill\Macros\MACRO_TEST\check_collision - V2'