← Back to team overview

kicad-developers team mailing list archive

[PATCH] Fix wrong numbering in the QFP footprint wizard

 

Hello

I was just playing around with the python scripts for the module editor and
found that the pin numbering was wrong. QFP chips is always numbered in
incrementing fashion on one circular direction. Attached is a patch.

It basically adds some more coordinate swapping on the bottom and top, as
is done for the left and right.

In addition, I think that the default shape of the pads should be
rectangular, that is "*oval": "False". I have never seen a datasheet
suggesting oval pads for a QFP. I did not add that to the patch since that
was not the problem I wanted to fix and it can be selected by the user
anyway.

If I am mistaken please let me know -- otherwise commit.. :)

Regards
Nick Østergaard
=== modified file 'pcbnew/scripting/plugins/qfp_wizard.py'
--- pcbnew/scripting/plugins/qfp_wizard.py	2013-11-01 15:29:50 +0000
+++ pcbnew/scripting/plugins/qfp_wizard.py	2014-02-11 22:03:06 +0000
@@ -109,18 +109,22 @@
                 pad_size = pad_size_left_right
 
                 pad_pos_x = -(pad_horizontal_pitch / 2)
+                pad_pos_y = (cur_pad % (num_pads / 4)) * pad_pitch - (side_length / 2)
+
                 if side == 2:
                     pad_pos_x = -pad_pos_x
+                    pad_pos_y = -pad_pos_y
 
-                pad_pos_y = (cur_pad % (num_pads / 4)) * pad_pitch - (side_length / 2)
             else:
                 pad_size = pad_size_bottom_top
 
                 pad_pos_x = (cur_pad % (num_pads / 4)) * pad_pitch - (side_length / 2)
-
                 pad_pos_y = -(pad_vertical_pitch / 2)
+
                 if side == 1:
                     pad_pos_y = -pad_pos_y
+                else:
+                    pad_pos_x = -pad_pos_x
 
             pad_pos = pcbnew.wxPoint(pad_pos_x, pad_pos_y)
 


Follow ups