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
8d7054a5
Commit
8d7054a5
authored
Jul 31, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added drawing of solderpaste layer for pads.
parent
f5b0c198
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
13 deletions
+37
-13
layers_id_colors_and_visibility.h
include/layers_id_colors_and_visibility.h
+1
-1
class_pad.cpp
pcbnew/class_pad.cpp
+21
-9
class_pad.h
pcbnew/class_pad.h
+1
-1
pcb_painter.cpp
pcbnew/pcb_painter.cpp
+14
-2
No files found.
include/layers_id_colors_and_visibility.h
View file @
8d7054a5
...
...
@@ -261,13 +261,13 @@ const LAYER_NUM GalLayerOrder[] =
UNUSED_LAYER_29
,
UNUSED_LAYER_30
,
UNUSED_LAYER_31
,
ITEM_GAL_LAYER
(
MOD_TEXT_FR_VISIBLE
),
ITEM_GAL_LAYER
(
MOD_REFERENCES_VISIBLE
),
ITEM_GAL_LAYER
(
MOD_VALUES_VISIBLE
),
SILKSCREEN_N_FRONT
,
SOLDERPASTE_N_FRONT
,
ADHESIVE_N_FRONT
,
ITEM_GAL_LAYER
(
VIAS_HOLES_VISIBLE
),
ITEM_GAL_LAYER
(
PADS_HOLES_VISIBLE
),
ITEM_GAL_LAYER
(
VIAS_VISIBLE
),
ITEM_GAL_LAYER
(
PADS_VISIBLE
),
ITEM_GAL_LAYER
(
PAD_FR_NETNAMES_VISIBLE
),
ITEM_GAL_LAYER
(
PAD_FR_VISIBLE
),
SOLDERMASK_N_FRONT
,
ITEM_GAL_LAYER
(
LAYER_16_NETNAMES_VISIBLE
),
LAYER_N_FRONT
,
SILKSCREEN_N_FRONT
,
SOLDERPASTE_N_FRONT
,
ADHESIVE_N_FRONT
,
ITEM_GAL_LAYER
(
LAYER_15_NETNAMES_VISIBLE
),
LAYER_N_15
,
ITEM_GAL_LAYER
(
LAYER_14_NETNAMES_VISIBLE
),
LAYER_N_14
,
ITEM_GAL_LAYER
(
LAYER_13_NETNAMES_VISIBLE
),
LAYER_N_13
,
...
...
pcbnew/class_pad.cpp
View file @
8d7054a5
...
...
@@ -424,7 +424,7 @@ int D_PAD::GetSolderMaskMargin() const
}
wxSize
D_PAD
::
GetSolderPasteMargin
()
wxSize
D_PAD
::
GetSolderPasteMargin
()
const
{
int
margin
=
m_LocalSolderPasteMargin
;
double
mratio
=
m_LocalSolderPasteMarginRatio
;
...
...
@@ -759,18 +759,22 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const
aLayers
[
aCount
++
]
=
ITEM_GAL_LAYER
(
PADS_NETNAMES_VISIBLE
);
aLayers
[
aCount
++
]
=
SOLDERMASK_N_FRONT
;
aLayers
[
aCount
++
]
=
SOLDERMASK_N_BACK
;
aLayers
[
aCount
++
]
=
SOLDERPASTE_N_FRONT
;
aLayers
[
aCount
++
]
=
SOLDERPASTE_N_BACK
;
}
else
if
(
IsOnLayer
(
LAYER_N_FRONT
)
)
{
aLayers
[
aCount
++
]
=
ITEM_GAL_LAYER
(
PAD_FR_VISIBLE
);
aLayers
[
aCount
++
]
=
ITEM_GAL_LAYER
(
PAD_FR_NETNAMES_VISIBLE
);
aLayers
[
aCount
++
]
=
SOLDERMASK_N_FRONT
;
aLayers
[
aCount
++
]
=
SOLDERPASTE_N_FRONT
;
}
else
if
(
IsOnLayer
(
LAYER_N_BACK
)
)
{
aLayers
[
aCount
++
]
=
ITEM_GAL_LAYER
(
PAD_BK_VISIBLE
);
aLayers
[
aCount
++
]
=
ITEM_GAL_LAYER
(
PAD_BK_NETNAMES_VISIBLE
);
aLayers
[
aCount
++
]
=
SOLDERMASK_N_BACK
;
aLayers
[
aCount
++
]
=
SOLDERPASTE_N_BACK
;
}
#ifdef __WXDEBUG__
else
// Should not occur
...
...
@@ -788,13 +792,16 @@ void D_PAD::ViewGetRequiredLayers( int aLayers[], int& aCount ) const
// Remove pad description layer & soldermask from the required layers group
if
(
IsOnLayer
(
LAYER_N_FRONT
)
&&
IsOnLayer
(
LAYER_N_BACK
)
)
{
// Multilayer pads have 2 soldermask layers and one description layer
aCount
-=
3
;
// Multilayer pads have 2 soldermask layers (front and back), 2 solder paste layer
// (front and back) and one description layer that do not have to be enabled in order to
// display a pad.
aCount
-=
5
;
}
else
{
// Rest of pads have one soldermask layer and one description layer
aCount
-=
2
;
// Rest of pads have one soldermask layer, one solder paste layer and one description layer
// that are not necessary for pad to be displayed.
aCount
-=
3
;
}
}
...
...
@@ -816,8 +823,13 @@ const BOX2I D_PAD::ViewBBox() const
{
// Bounding box includes soldermask too
int
solderMaskMargin
=
GetSolderMaskMargin
();
VECTOR2I
solderPasteMargin
=
VECTOR2D
(
GetSolderPasteMargin
()
);
EDA_RECT
bbox
=
GetBoundingBox
();
return
BOX2I
(
VECTOR2I
(
bbox
.
GetOrigin
()
)
-
solderMaskMargin
,
VECTOR2I
(
bbox
.
GetSize
()
)
+
2
*
solderMaskMargin
);
// Look for the biggest possible bounding box
int
xMargin
=
std
::
max
(
solderMaskMargin
,
solderPasteMargin
.
x
);
int
yMargin
=
std
::
max
(
solderMaskMargin
,
solderPasteMargin
.
y
);
return
BOX2I
(
VECTOR2I
(
bbox
.
GetOrigin
()
)
-
VECTOR2I
(
xMargin
,
yMargin
),
VECTOR2I
(
bbox
.
GetSize
()
)
+
VECTOR2I
(
2
*
xMargin
,
2
*
yMargin
)
);
}
pcbnew/class_pad.h
View file @
8d7054a5
...
...
@@ -259,7 +259,7 @@ public:
* 2 - if null, the parent footprint value
* 1 - if null, the global value
*/
wxSize
GetSolderPasteMargin
();
wxSize
GetSolderPasteMargin
()
const
;
void
SetZoneConnection
(
ZoneConnection
aType
)
{
m_ZoneConnection
=
aType
;
}
ZoneConnection
GetZoneConnection
()
const
;
...
...
pcbnew/pcb_painter.cpp
View file @
8d7054a5
...
...
@@ -525,9 +525,21 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer )
else
if
(
aLayer
==
SOLDERMASK_N_FRONT
||
aLayer
==
SOLDERMASK_N_BACK
)
{
// Drawing soldermask
int
soldermaskMargin
=
aPad
->
GetSolderMaskMargin
();
m_gal
->
Translate
(
VECTOR2D
(
aPad
->
GetOffset
()
)
);
size
=
VECTOR2D
(
aPad
->
GetSize
().
x
/
2.0
+
soldermaskMargin
,
aPad
->
GetSize
().
y
/
2.0
+
soldermaskMargin
);
shape
=
aPad
->
GetShape
();
}
else
if
(
aLayer
==
SOLDERPASTE_N_FRONT
||
aLayer
==
SOLDERPASTE_N_BACK
)
{
// Drawing solderpaste
int
solderpasteMargin
=
aPad
->
GetLocalSolderPasteMargin
();
m_gal
->
Translate
(
VECTOR2D
(
aPad
->
GetOffset
()
)
);
size
=
VECTOR2D
(
aPad
->
GetSize
().
x
/
2.0
+
aPad
->
GetSolderMaskMargin
()
,
aPad
->
GetSize
().
y
/
2.0
+
aPad
->
GetSolderMaskMargin
()
);
size
=
VECTOR2D
(
aPad
->
GetSize
().
x
/
2.0
+
solderpasteMargin
,
aPad
->
GetSize
().
y
/
2.0
+
solderpasteMargin
);
shape
=
aPad
->
GetShape
();
}
else
...
...
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