Bird
0
0
PCB Designbi_tool~10 mins

3D model association in PCB Design - Interactive Code Practice

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

Complete 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'
Amodel.3d
Bmodel.stp
Cmodel.step
Dmodel.pcb
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect file extensions like .pcb or .3d
Confusing .step with .stp
2fill in blank
medium

Complete 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'
Amodel_path
Bmodel_file
CmodelPath
DmodelLocation
Attempts:
3 left
💡 Hint
Common Mistakes
Using camelCase instead of snake_case
Using incorrect property names
3fill in blank
hard

Fix 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'
Amodel.stp
Bmodel
C"model.stp"
D'model.stp'
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the file name without quotes
Passing a variable that is undefined
4fill in blank
hard

Fill 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'
AR1
BC1
Cresistor.stp
Dcapacitor.stp
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing footprint names and model files
Using wrong file extensions
5fill in blank
hard

Fill 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'
Afootprint
Bmodel_file
Dmodel
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong parameter names
Not calling the method on the footprint object