Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
eb396a5e
Commit
eb396a5e
authored
Jul 02, 2014
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix footprint wizard issues. Fix export vrml incorrect Z position of items.
parent
39216b4b
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
34 additions
and
36 deletions
+34
-36
class_pad.cpp
pcbnew/class_pad.cpp
+1
-3
class_pad.h
pcbnew/class_pad.h
+15
-4
dialog_pad_properties.cpp
pcbnew/dialogs/dialog_pad_properties.cpp
+1
-1
export_vrml.cpp
pcbnew/exporters/export_vrml.cpp
+2
-2
FPC_(SMD_type)_footprintwizard.py
pcbnew/scripting/plugins/FPC_(SMD_type)_footprintwizard.py
+2
-2
PadArray.py
pcbnew/scripting/plugins/PadArray.py
+4
-18
qfp_wizard.py
pcbnew/scripting/plugins/qfp_wizard.py
+5
-2
touch_slider_wizard.py
pcbnew/scripting/plugins/touch_slider_wizard.py
+3
-3
kicad.i
scripting/kicad.i
+1
-1
No files found.
pcbnew/class_pad.cpp
View file @
eb396a5e
...
...
@@ -95,15 +95,13 @@ LSET D_PAD::StandardMask()
LSET
D_PAD
::
SMDMask
()
{
// was: #define PAD_SMD_DEFAULT_LAYERS LAYER_FRONT | SOLDERPASTE_LAYER_FRONT | SOLDERMASK_LAYER_FRONT
static
LSET
saved
(
3
,
F_Cu
,
F_Paste
,
F_Mask
);
return
saved
;
}
LSET
D_PAD
::
ConnMask
()
LSET
D_PAD
::
Conn
SMD
Mask
()
{
// was: #define PAD_CONN_DEFAULT_LAYERS LAYER_FRONT | SOLDERMASK_LAYER_FRONT
static
LSET
saved
(
2
,
F_Cu
,
F_Mask
);
return
saved
;
}
...
...
pcbnew/class_pad.h
View file @
eb396a5e
...
...
@@ -88,10 +88,11 @@ public:
/* Default layers used for pads, according to the pad type.
* this is default values only, they can be changed for a given pad
*/
static
LSET
StandardMask
();
static
LSET
ConnMask
();
static
LSET
SMDMask
();
static
LSET
UnplatedHoleMask
();
static
LSET
StandardMask
();
///< layer set for a through hole pad
static
LSET
SMDMask
();
///< layer set for a SMD pad on Front layer
static
LSET
ConnSMDMask
();
///< layer set for a SMD pad on Front layer
///< used for edge board connectors
static
LSET
UnplatedHoleMask
();
///< layer set for a mechanical unplated through hole pad
void
Copy
(
D_PAD
*
source
);
...
...
@@ -419,6 +420,16 @@ public:
EDA_ITEM
*
Clone
()
const
;
/**
* same as Clone, but returns a D_PAD item.
* Useful mainly for pythons scripts, because Clone (virtual function)
* returns an EDA_ITEM.
*/
D_PAD
*
Duplicate
()
const
{
return
(
D_PAD
*
)
Clone
();
}
/// @copydoc VIEW_ITEM::ViewGetLayers()
virtual
void
ViewGetLayers
(
int
aLayers
[],
int
&
aCount
)
const
;
...
...
pcbnew/dialogs/dialog_pad_properties.cpp
View file @
eb396a5e
...
...
@@ -76,7 +76,7 @@ static const LSET std_pad_layers[] = {
D_PAD
::
SMDMask
(),
// PAD_CONN:
D_PAD
::
ConnMask
(),
D_PAD
::
Conn
SMD
Mask
(),
// PAD_HOLE_NOT_PLATED:
D_PAD
::
UnplatedHoleMask
()
...
...
pcbnew/exporters/export_vrml.cpp
View file @
eb396a5e
...
...
@@ -473,9 +473,9 @@ static void compute_layer_Zs( MODEL_VRML& aModel, BOARD* pcb )
LAYER_ID
i
=
*
seq
;
if
(
i
<
copper_layers
)
aModel
.
SetLayerZ
(
i
,
aModel
.
board_thickness
*
i
/
(
copper_layers
-
1
)
-
half_thickness
);
aModel
.
SetLayerZ
(
i
,
half_thickness
-
aModel
.
board_thickness
*
i
/
(
copper_layers
-
1
)
);
else
aModel
.
SetLayerZ
(
i
,
half_thickness
);
// component
layer
aModel
.
SetLayerZ
(
i
,
-
half_thickness
);
// bottom
layer
}
/* To avoid rounding interference, we apply an epsilon to each
...
...
pcbnew/scripting/plugins/FPC_(SMD_type)_footprintwizard.py
View file @
eb396a5e
...
...
@@ -30,7 +30,7 @@ class FPCFootprintWizard(FootprintWizardPlugin):
pad
.
SetSize
(
size
)
pad
.
SetShape
(
PAD_RECT
)
pad
.
SetAttribute
(
PAD_SMD
)
pad
.
SetLayer
Mask
(
PAD_SMD_DEFAULT_LAYERS
)
pad
.
SetLayer
Set
(
pad
.
StandardMask
()
)
pad
.
SetPos0
(
pos
)
pad
.
SetPosition
(
pos
)
pad
.
SetPadName
(
name
)
...
...
@@ -126,7 +126,7 @@ class FPCFootprintWizard(FootprintWizardPlugin):
xstart
=
-
pad_pitch
*
0.5
-
offsetX
xend
=
pad_pitch
*
pads
+
xstart
;
outline
.
SetStartEnd
(
wxPoint
(
xstart
,
posy
),
wxPoint
(
xend
,
posy
)
)
outline
.
SetLayer
(
SILKSCREEN_N_FRONT
)
#default: not needed
outline
.
SetLayer
(
F_SilkS
)
#default: not needed
outline
.
SetShape
(
S_SEGMENT
)
module
.
Add
(
outline
)
...
...
pcbnew/scripting/plugins/PadArray.py
View file @
eb396a5e
...
...
@@ -17,7 +17,7 @@ class PadMaker:
pad
.
SetShape
(
shape
)
pad
.
SetAttribute
(
pcbnew
.
PAD_STANDARD
)
pad
.
SetLayer
Mask
(
pcbnew
.
PAD_STANDARD_DEFAULT_LAYERS
)
pad
.
SetLayer
Set
(
pad
.
StandardMask
()
)
pad
.
SetDrillSize
(
pcbnew
.
wxSize
(
drill
,
drill
))
return
pad
...
...
@@ -29,7 +29,7 @@ class PadMaker:
pad
.
SetShape
(
shape
)
pad
.
SetAttribute
(
pcbnew
.
PAD_SMD
)
pad
.
SetLayer
Mask
(
pcbnew
.
PAD_SMD_DEFAULT_LAYERS
)
pad
.
SetLayer
Set
(
pad
.
SMDMask
()
)
return
pad
...
...
@@ -45,19 +45,6 @@ class PadArray:
def
SetFirstPadInArray
(
self
,
fpNum
):
self
.
firstPad
=
fpNum
# HACK! pad should one day have its own clone method
def
ClonePad
(
self
):
pad
=
pcbnew
.
D_PAD
(
self
.
pad
.
GetParent
())
pad
.
SetSize
(
self
.
pad
.
GetSize
())
pad
.
SetShape
(
self
.
pad
.
GetShape
())
pad
.
SetAttribute
(
self
.
pad
.
GetAttribute
())
pad
.
SetLayerMask
(
self
.
pad
.
GetLayerMask
())
pad
.
SetDrillSize
(
self
.
pad
.
GetDrillSize
())
return
pad
def
AddPad
(
self
,
pad
):
self
.
pad
.
GetParent
()
.
Add
(
pad
)
...
...
@@ -100,9 +87,8 @@ class PadGridArray(PadArray):
pos
=
pcbnew
.
wxPoint
(
posX
,
posY
)
# THIS DOESN'T WORK yet!
#pad = self.pad.Clone()
pad
=
self
.
ClonePad
()
# create a new pad with same characteristics
pad
=
self
.
pad
.
Duplicate
()
pad
.
SetPos0
(
pos
)
pad
.
SetPosition
(
pos
)
...
...
pcbnew/scripting/plugins/qfp_wizard.py
View file @
eb396a5e
...
...
@@ -27,6 +27,7 @@ class QFPWizard(HelpfulFootprintWizardPlugin.HelpfulFootprintWizardPlugin):
def
CheckParameters
(
self
):
self
.
CheckParamPositiveInt
(
"Pads"
,
"*n"
,
is_multiple_of
=
4
)
self
.
CheckParamBool
(
"Pads"
,
"*oval"
)
def
GetReference
(
self
):
return
"QFP
%
d"
%
self
.
parameters
[
"Pads"
][
"*n"
]
...
...
@@ -46,8 +47,10 @@ class QFPWizard(HelpfulFootprintWizardPlugin.HelpfulFootprintWizardPlugin):
row_len
=
(
pads_per_row
-
1
)
*
pad_pitch
h_pad
=
PA
.
PadMaker
(
self
.
module
)
.
SMDPad
(
pad_width
,
pad_length
,
shape
=
pcbnew
.
PAD_OVAL
)
v_pad
=
PA
.
PadMaker
(
self
.
module
)
.
SMDPad
(
pad_length
,
pad_width
,
shape
=
pcbnew
.
PAD_OVAL
)
pad_shape
=
pcbnew
.
PAD_OVAL
if
pads
[
"*oval"
]
else
pcbnew
.
PAD_RECT
h_pad
=
PA
.
PadMaker
(
self
.
module
)
.
SMDPad
(
pad_width
,
pad_length
,
shape
=
pad_shape
)
v_pad
=
PA
.
PadMaker
(
self
.
module
)
.
SMDPad
(
pad_length
,
pad_width
,
shape
=
pad_shape
)
#left row
pin1Pos
=
pcbnew
.
wxPoint
(
-
h_pitch
/
2
,
-
row_len
/
2
)
...
...
pcbnew/scripting/plugins/touch_slider_wizard.py
View file @
eb396a5e
...
...
@@ -25,7 +25,7 @@ class TouchSliderWizard(FootprintWizardPlugin):
pad
.
SetSize
(
size
)
pad
.
SetShape
(
PAD_RECT
)
pad
.
SetAttribute
(
PAD_SMD
)
pad
.
SetLayer
Mask
(
PAD_SMD_DEFAULT_LAYERS
)
pad
.
SetLayer
Set
(
pad
.
ConnSMDMask
()
)
pad
.
SetPos0
(
pos
)
pad
.
SetPosition
(
pos
)
pad
.
SetPadName
(
name
)
...
...
@@ -36,8 +36,8 @@ class TouchSliderWizard(FootprintWizardPlugin):
pad
=
D_PAD
(
module
)
pad
.
SetSize
(
wxSize
(
size
[
0
],
size
[
1
]))
pad
.
SetShape
(
PAD_TRAPEZOID
)
pad
.
SetAttribute
(
PAD_
CONN
)
pad
.
SetLayer
Mask
(
PAD_CONN_DEFAULT_LAYERS
)
pad
.
SetAttribute
(
PAD_
SMD
)
pad
.
SetLayer
Set
(
pad
.
ConnSMDMask
()
)
pad
.
SetPos0
(
pos
)
pad
.
SetPosition
(
pos
)
pad
.
SetPadName
(
name
)
...
...
scripting/kicad.i
View file @
eb396a5e
...
...
@@ -66,7 +66,7 @@
#include <class_title_block.h>
#include <class_colors_design_settings.h>
#include <class_marker_base.h>
#include <eda_text.h>
#include <eda_text.h>
#include <convert_from_iu.h>
#include <convert_to_biu.h>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment