Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to start defining a new footprint in KiCad.
PCB Design
footprint = pcbnew.Footprint[1]() Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Create' or 'Add' instead of 'New' causes errors.
✗ Incorrect
In KiCad's Python API, pcbnew.FootprintNew() is used to create a new footprint object.
2fill in blank
mediumComplete the code to set the footprint name.
PCB Design
footprint.[1]("Custom_Footprint_01")
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing footprint name with reference or value.
✗ Incorrect
The method SetName sets the footprint's name in KiCad's API.
3fill in blank
hardFix the error in adding a pad to the footprint.
PCB Design
pad = pcbnew.Pad[1]() Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Create' or 'Add' causes runtime errors.
✗ Incorrect
The correct method to create a new pad object is PadNew() in KiCad's API.
4fill in blank
hardFill both blanks to set pad properties correctly.
PCB Design
pad.[1](1) pad.[2](pcbnew.PAD_SHAPE_RECT)
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up size and shape methods.
✗ Incorrect
SetNumber assigns the pad number, and SetShape defines the pad shape.
5fill in blank
hardFill all three blanks to add the pad to the footprint and set its size and position.
PCB Design
footprint.[1](pad) pad.[2](pcbnew.wxSizeMM(1.5, 1.5)) pad.[3](pcbnew.wxPointMM(5, 5))
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong method names like 'InsertPad' instead of 'AddPad'.
✗ Incorrect
AddPad adds the pad to the footprint, SetSize sets pad size, and SetPosition sets its location.
