0
0
CNC Programmingscripting~10 mins

Multiple setups (flip operations) in CNC Programming - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the flip axis to X for the second setup.

CNC Programming
setup2.flip_axis = '[1]'
Drag options to blanks, or click blank then click option'
AY
BX
CZ
DNone
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Y' or 'Z' instead of 'X' for the flip axis.
Setting flip_axis to 'None' which disables flipping.
2fill in blank
medium

Complete the code to rotate the part 180 degrees around the Z axis in the third setup.

CNC Programming
setup3.rotation_angle = [1]
Drag options to blanks, or click blank then click option'
A180
B90
C270
D360
Attempts:
3 left
💡 Hint
Common Mistakes
Using 90 or 270 degrees which rotate the part partially.
Using 360 degrees which results in no change.
3fill in blank
hard

Fix the error in the code to correctly apply the flip operation on the first setup.

CNC Programming
setup1.apply_flip([1])
Drag options to blanks, or click blank then click option'
Aflip_axis_value
B'flip_axis'
Cflip_axis
DflipAxis
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the flip axis as a string instead of a variable.
Using incorrect variable names like flip_axis_value or flipAxis.
4fill in blank
hard

Fill both blanks to create a dictionary mapping setup numbers to their flip axes.

CNC Programming
flip_map = {1: '[1]', 2: '[2]'}
Drag options to blanks, or click blank then click option'
AX
BY
CZ
DNone
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping the axes for setups 1 and 2.
Using 'None' which means no flip.
5fill in blank
hard

Complete the code to create a dictionary comprehension that maps setup numbers to their rotation angles if the angle is greater than 0.

CNC Programming
rotation_angles = {setup: angle for setup, angle in setups.items() if angle [1] 0}
Drag options to blanks, or click blank then click option'
C>
D<
Attempts:
3 left
💡 Hint
Common Mistakes
Adding unnecessary characters after keys or values.
Using '<' which filters angles less than zero.