0
0
3D Printingknowledge~10 mins

G-code preview and simulation in 3D Printing - Interactive Code Practice

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

Complete the code to start the G-code preview by loading the file.

3D Printing
preview.load_file('[1]')
Drag options to blanks, or click blank then click option'
Asettings.cfg
Bmodel.stl
Cgcode.nc
Dcalibration.txt
Attempts:
3 left
💡 Hint
Common Mistakes
Trying to load a 3D model file instead of a G-code file.
Using a configuration file instead of a G-code file.
2fill in blank
medium

Complete the code to start the simulation of the loaded G-code.

3D Printing
simulation.[1]()
Drag options to blanks, or click blank then click option'
Astop
Bstart
Cpause
Dreset
Attempts:
3 left
💡 Hint
Common Mistakes
Using stop() instead of start(), which ends the simulation.
Using pause() which only temporarily halts the simulation.
3fill in blank
hard

Fix the error in the code to correctly set the simulation speed.

3D Printing
simulation.set_speed([1])
Drag options to blanks, or click blank then click option'
A5
B'fast'
Cspeed
Dtrue
Attempts:
3 left
💡 Hint
Common Mistakes
Passing a string like 'fast' instead of a number.
Passing a variable name without defining it.
4fill in blank
hard

Fill both blanks to create a dictionary comprehension that maps layer numbers to their heights if the height is above 0.2mm.

3D Printing
{layer: [1] for layer, height in layers.items() if height [2] 0.2}
Drag options to blanks, or click blank then click option'
Aheight
B<
C>
Dlayer
Attempts:
3 left
💡 Hint
Common Mistakes
Using the layer number as the value instead of height.
Using < instead of > in the condition.
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension that maps tool names in uppercase to their speeds if speed is at least 50.

3D Printing
{ [1]: [2] for tool, speed in tools.items() if speed [3] 50 }
Drag options to blanks, or click blank then click option'
Atool.upper()
Bspeed
C>=
Dtool
Attempts:
3 left
💡 Hint
Common Mistakes
Using the tool name without uppercase.
Using > instead of >= for the speed condition.