The Remove Garbage function in NCPlayer is designed to automatically clean the CNC program (NC file) from unnecessary characters while preserving all important information, including comments. This helps make the G-code more readable and correct for simulation.
( ... ) is temporarily replaced with placeholders to ensure it will not be altered.!"№?@$^{}~\'<>|, (while keeping / and _ as they can be part of division or placeholders).;.; are found at the end of a line, only one is kept.
This function is useful when importing code from CAM systems or other sources that may contain extra characters, formatting errors, or unnecessary spaces. Cleaning minimizes the risk of simulation errors and makes the code tidier.