Added drawing of solderpaste layer for pads.
This commit is contained in:
parent
f5b0c19830
commit
8d7054a592
|
@ -261,13 +261,13 @@ const LAYER_NUM GalLayerOrder[] =
|
||||||
UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31,
|
UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31,
|
||||||
ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ),
|
ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ),
|
||||||
ITEM_GAL_LAYER( MOD_REFERENCES_VISIBLE), ITEM_GAL_LAYER( MOD_VALUES_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_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ),
|
||||||
ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( PADS_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( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ), SOLDERMASK_N_FRONT,
|
||||||
ITEM_GAL_LAYER( LAYER_16_NETNAMES_VISIBLE ), LAYER_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_15_NETNAMES_VISIBLE ), LAYER_N_15,
|
||||||
ITEM_GAL_LAYER( LAYER_14_NETNAMES_VISIBLE ), LAYER_N_14,
|
ITEM_GAL_LAYER( LAYER_14_NETNAMES_VISIBLE ), LAYER_N_14,
|
||||||
ITEM_GAL_LAYER( LAYER_13_NETNAMES_VISIBLE ), LAYER_N_13,
|
ITEM_GAL_LAYER( LAYER_13_NETNAMES_VISIBLE ), LAYER_N_13,
|
||||||
|
|
|
@ -424,7 +424,7 @@ int D_PAD::GetSolderMaskMargin() const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxSize D_PAD::GetSolderPasteMargin()
|
wxSize D_PAD::GetSolderPasteMargin() const
|
||||||
{
|
{
|
||||||
int margin = m_LocalSolderPasteMargin;
|
int margin = m_LocalSolderPasteMargin;
|
||||||
double mratio = m_LocalSolderPasteMarginRatio;
|
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++] = ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE );
|
||||||
aLayers[aCount++] = SOLDERMASK_N_FRONT;
|
aLayers[aCount++] = SOLDERMASK_N_FRONT;
|
||||||
aLayers[aCount++] = SOLDERMASK_N_BACK;
|
aLayers[aCount++] = SOLDERMASK_N_BACK;
|
||||||
|
aLayers[aCount++] = SOLDERPASTE_N_FRONT;
|
||||||
|
aLayers[aCount++] = SOLDERPASTE_N_BACK;
|
||||||
}
|
}
|
||||||
else if( IsOnLayer( LAYER_N_FRONT ) )
|
else if( IsOnLayer( LAYER_N_FRONT ) )
|
||||||
{
|
{
|
||||||
aLayers[aCount++] = ITEM_GAL_LAYER( PAD_FR_VISIBLE );
|
aLayers[aCount++] = ITEM_GAL_LAYER( PAD_FR_VISIBLE );
|
||||||
aLayers[aCount++] = ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE );
|
aLayers[aCount++] = ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE );
|
||||||
aLayers[aCount++] = SOLDERMASK_N_FRONT;
|
aLayers[aCount++] = SOLDERMASK_N_FRONT;
|
||||||
|
aLayers[aCount++] = SOLDERPASTE_N_FRONT;
|
||||||
}
|
}
|
||||||
else if( IsOnLayer( LAYER_N_BACK ) )
|
else if( IsOnLayer( LAYER_N_BACK ) )
|
||||||
{
|
{
|
||||||
aLayers[aCount++] = ITEM_GAL_LAYER( PAD_BK_VISIBLE );
|
aLayers[aCount++] = ITEM_GAL_LAYER( PAD_BK_VISIBLE );
|
||||||
aLayers[aCount++] = ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE );
|
aLayers[aCount++] = ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE );
|
||||||
aLayers[aCount++] = SOLDERMASK_N_BACK;
|
aLayers[aCount++] = SOLDERMASK_N_BACK;
|
||||||
|
aLayers[aCount++] = SOLDERPASTE_N_BACK;
|
||||||
}
|
}
|
||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
else // Should not occur
|
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
|
// Remove pad description layer & soldermask from the required layers group
|
||||||
if( IsOnLayer( LAYER_N_FRONT ) && IsOnLayer( LAYER_N_BACK ) )
|
if( IsOnLayer( LAYER_N_FRONT ) && IsOnLayer( LAYER_N_BACK ) )
|
||||||
{
|
{
|
||||||
// Multilayer pads have 2 soldermask layers and one description layer
|
// Multilayer pads have 2 soldermask layers (front and back), 2 solder paste layer
|
||||||
aCount -= 3;
|
// (front and back) and one description layer that do not have to be enabled in order to
|
||||||
|
// display a pad.
|
||||||
|
aCount -= 5;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Rest of pads have one soldermask layer and one description layer
|
// Rest of pads have one soldermask layer, one solder paste layer and one description layer
|
||||||
aCount -= 2;
|
// that are not necessary for pad to be displayed.
|
||||||
|
aCount -= 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -815,9 +822,14 @@ unsigned int D_PAD::ViewGetLOD( int aLayer ) const
|
||||||
const BOX2I D_PAD::ViewBBox() const
|
const BOX2I D_PAD::ViewBBox() const
|
||||||
{
|
{
|
||||||
// Bounding box includes soldermask too
|
// Bounding box includes soldermask too
|
||||||
int solderMaskMargin = GetSolderMaskMargin();
|
int solderMaskMargin = GetSolderMaskMargin();
|
||||||
EDA_RECT bbox = GetBoundingBox();
|
VECTOR2I solderPasteMargin = VECTOR2D( GetSolderPasteMargin() );
|
||||||
|
EDA_RECT bbox = GetBoundingBox();
|
||||||
|
|
||||||
return BOX2I( VECTOR2I( bbox.GetOrigin() ) - solderMaskMargin,
|
// Look for the biggest possible bounding box
|
||||||
VECTOR2I( bbox.GetSize() ) + 2 * solderMaskMargin );
|
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 ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -259,7 +259,7 @@ public:
|
||||||
* 2 - if null, the parent footprint value
|
* 2 - if null, the parent footprint value
|
||||||
* 1 - if null, the global value
|
* 1 - if null, the global value
|
||||||
*/
|
*/
|
||||||
wxSize GetSolderPasteMargin();
|
wxSize GetSolderPasteMargin() const;
|
||||||
|
|
||||||
void SetZoneConnection( ZoneConnection aType ) { m_ZoneConnection = aType; }
|
void SetZoneConnection( ZoneConnection aType ) { m_ZoneConnection = aType; }
|
||||||
ZoneConnection GetZoneConnection() const;
|
ZoneConnection GetZoneConnection() const;
|
||||||
|
|
|
@ -525,9 +525,21 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer )
|
||||||
else if( aLayer == SOLDERMASK_N_FRONT || aLayer == SOLDERMASK_N_BACK )
|
else if( aLayer == SOLDERMASK_N_FRONT || aLayer == SOLDERMASK_N_BACK )
|
||||||
{
|
{
|
||||||
// Drawing soldermask
|
// Drawing soldermask
|
||||||
|
int soldermaskMargin = aPad->GetSolderMaskMargin();
|
||||||
|
|
||||||
m_gal->Translate( VECTOR2D( aPad->GetOffset() ) );
|
m_gal->Translate( VECTOR2D( aPad->GetOffset() ) );
|
||||||
size = VECTOR2D( aPad->GetSize().x / 2.0 + aPad->GetSolderMaskMargin(),
|
size = VECTOR2D( aPad->GetSize().x / 2.0 + soldermaskMargin,
|
||||||
aPad->GetSize().y / 2.0 + aPad->GetSolderMaskMargin() );
|
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 + solderpasteMargin,
|
||||||
|
aPad->GetSize().y / 2.0 + solderpasteMargin );
|
||||||
shape = aPad->GetShape();
|
shape = aPad->GetShape();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue