Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to link a 3D model file to a PCB footprint.
PCB Design
footprint.set3DModel('[1]')
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect file extensions like .pcb or .3d
Confusing .step with .stp
✗ Incorrect
The standard 3D model file extension for PCB footprints is .stp.
2fill in blank
mediumComplete the code to assign the 3D model path to the footprint.
PCB Design
footprint.[1] = '/models/[2]'
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using camelCase instead of snake_case
Using incorrect property names
✗ Incorrect
The property to assign the 3D model file path is usually model_path.
3fill in blank
hardFix the error in the code to correctly associate the 3D model with the footprint.
PCB Design
footprint.attach3DModel([1]) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the file name without quotes
Passing a variable that is undefined
✗ Incorrect
The file name must be passed as a string literal with quotes.
4fill in blank
hardFill both blanks to create a dictionary mapping footprint names to their 3D model files.
PCB Design
model_map = {'[1]': '[2]'} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing footprint names and model files
Using wrong file extensions
✗ Incorrect
The footprint 'R1' is associated with the resistor 3D model file 'resistor.stp'.
5fill in blank
hardFill all three blanks to define a function that associates a 3D model file to a footprint.
PCB Design
def associate_3d_model([1], [2]): [3].set3DModel([2])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong parameter names
Not calling the method on the footprint object
✗ Incorrect
The function takes a footprint and a model file, then sets the 3D model on the footprint.
