Complete the code to apply tool radius compensation in CNC programming.
G41 [1] ; Activate tool radius compensation to the leftThe code G41 D01 activates tool radius compensation to the left using tool offset number 1.
Complete the code to cancel tool radius compensation.
G[1] ; Cancel tool radius compensationThe code G40 cancels any active tool radius compensation.
Fix the error in the code to correctly apply tool radius compensation to the right.
G42 [1] ; Apply tool radius compensation to the rightThe correct code is G42 D02 where D02 specifies tool offset number 2 for compensation to the right.
Fill both blanks to set tool length compensation and activate it.
G[1] [2] ; Set and activate tool length compensation
G43 D03 activates tool length compensation using tool offset number 3.
Fill all three blanks to create a dictionary of tool offsets for compensation where keys are tool numbers and values are their radius.
tool_offsets = {{ [1]: [2] for [3] in tools }}This dictionary comprehension creates a mapping from each tool in tools to its radius for compensation.
