Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to import a CAD file into the CAM software.
CNC Programming
cam.import_file('[1]')
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a 2D drawing file like DXF instead of a 3D model file.
Selecting a toolpath file instead of a CAD model.
✗ Incorrect
The STEP file format (.step) is commonly used to import 3D CAD models into CAM software for machining.
2fill in blank
mediumComplete the code to generate a toolpath from the imported CAD model.
CNC Programming
toolpath = cam.generate_toolpath(model, '[1]')
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing non-machining processes like welding or painting.
Selecting inspection which is not a machining operation.
✗ Incorrect
Milling is a common machining process where the CAM software generates toolpaths for cutting.
3fill in blank
hardFix the error in the code to export the toolpath as a CNC program file.
CNC Programming
cam.export_toolpath(toolpath, '[1]')
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Exporting as a CAD model file instead of a CNC program.
Using document or drawing file extensions.
✗ Incorrect
CNC programs are typically saved with the .nc extension which contains G-code instructions.
4fill in blank
hardFill both blanks to set the machining parameters: spindle speed and feed rate.
CNC Programming
cam.set_parameters(spindle_speed=[1], feed_rate=[2])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping spindle speed and feed rate values.
Using values that are too low or too high for typical milling.
✗ Incorrect
A typical spindle speed is 12000 RPM and feed rate is 1500 mm/min for milling operations.
5fill in blank
hardFill all three blanks to create a dictionary of tool data with keys: name, diameter, and length.
CNC Programming
tool_data = {'name': '[1]', 'diameter': [2], 'length': [3] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a drill name instead of an end mill.
Mixing up diameter and length values.
Putting numbers in quotes making them strings.
✗ Incorrect
The tool is named 'EndMill' with a diameter of 10 mm and length of 50 mm.