Correct naming conventions.
This commit is contained in:
parent
74ad1562d9
commit
8bae52d1c3
|
@ -44,7 +44,7 @@ SCH_BITMAP::SCH_BITMAP( const wxPoint& pos ) :
|
||||||
SCH_ITEM( NULL, SCH_BITMAP_T )
|
SCH_ITEM( NULL, SCH_BITMAP_T )
|
||||||
{
|
{
|
||||||
m_pos = pos;
|
m_pos = pos;
|
||||||
m_Layer = LAYER_NOTES; // used only to draw/plot a rectangle,
|
m_layer = LAYER_NOTES; // used only to draw/plot a rectangle,
|
||||||
// when a bitmap cannot be drawn or plotted
|
// when a bitmap cannot be drawn or plotted
|
||||||
m_image = new BITMAP_BASE();
|
m_image = new BITMAP_BASE();
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ SCH_BITMAP::SCH_BITMAP( const SCH_BITMAP& aSchBitmap ) :
|
||||||
SCH_ITEM( aSchBitmap )
|
SCH_ITEM( aSchBitmap )
|
||||||
{
|
{
|
||||||
m_pos = aSchBitmap.m_pos;
|
m_pos = aSchBitmap.m_pos;
|
||||||
m_Layer = aSchBitmap.m_Layer;
|
m_layer = aSchBitmap.m_layer;
|
||||||
m_image = new BITMAP_BASE( *aSchBitmap.m_image );
|
m_image = new BITMAP_BASE( *aSchBitmap.m_image );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ SCH_BUS_ENTRY_BASE::SCH_BUS_ENTRY_BASE( KICAD_T aType, const wxPoint& pos, bool
|
||||||
SCH_BUS_WIRE_ENTRY::SCH_BUS_WIRE_ENTRY( const wxPoint& pos, bool aFlipY ) :
|
SCH_BUS_WIRE_ENTRY::SCH_BUS_WIRE_ENTRY( const wxPoint& pos, bool aFlipY ) :
|
||||||
SCH_BUS_ENTRY_BASE( SCH_BUS_WIRE_ENTRY_T, pos, aFlipY )
|
SCH_BUS_ENTRY_BASE( SCH_BUS_WIRE_ENTRY_T, pos, aFlipY )
|
||||||
{
|
{
|
||||||
m_Layer = LAYER_WIRE;
|
m_layer = LAYER_WIRE;
|
||||||
m_connected_bus_item = nullptr;
|
m_connected_bus_item = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ SCH_BUS_WIRE_ENTRY::SCH_BUS_WIRE_ENTRY( const wxPoint& pos, bool aFlipY ) :
|
||||||
SCH_BUS_BUS_ENTRY::SCH_BUS_BUS_ENTRY( const wxPoint& pos, bool aFlipY ) :
|
SCH_BUS_BUS_ENTRY::SCH_BUS_BUS_ENTRY( const wxPoint& pos, bool aFlipY ) :
|
||||||
SCH_BUS_ENTRY_BASE( SCH_BUS_BUS_ENTRY_T, pos, aFlipY )
|
SCH_BUS_ENTRY_BASE( SCH_BUS_BUS_ENTRY_T, pos, aFlipY )
|
||||||
{
|
{
|
||||||
m_Layer = LAYER_BUS;
|
m_layer = LAYER_BUS;
|
||||||
m_connected_bus_items[0] = nullptr;
|
m_connected_bus_items[0] = nullptr;
|
||||||
m_connected_bus_items[1] = nullptr;
|
m_connected_bus_items[1] = nullptr;
|
||||||
}
|
}
|
||||||
|
@ -198,7 +198,7 @@ void SCH_BUS_ENTRY_BASE::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffs
|
||||||
{
|
{
|
||||||
wxDC* DC = aSettings->GetPrintDC();
|
wxDC* DC = aSettings->GetPrintDC();
|
||||||
COLOR4D color = ( GetStrokeColor() == COLOR4D::UNSPECIFIED ) ?
|
COLOR4D color = ( GetStrokeColor() == COLOR4D::UNSPECIFIED ) ?
|
||||||
aSettings->GetLayerColor( m_Layer ) : GetStrokeColor();
|
aSettings->GetLayerColor( m_layer ) : GetStrokeColor();
|
||||||
int penWidth = ( GetPenWidth() == 0 ) ? aSettings->GetDefaultPenWidth() : GetPenWidth();
|
int penWidth = ( GetPenWidth() == 0 ) ? aSettings->GetDefaultPenWidth() : GetPenWidth();
|
||||||
|
|
||||||
GRLine( nullptr, DC, m_pos.x + aOffset.x, m_pos.y + aOffset.y, GetEnd().x + aOffset.x,
|
GRLine( nullptr, DC, m_pos.x + aOffset.x, m_pos.y + aOffset.y, GetEnd().x + aOffset.x,
|
||||||
|
@ -393,7 +393,7 @@ void SCH_BUS_ENTRY_BASE::Plot( PLOTTER* aPlotter )
|
||||||
auto* settings = static_cast<KIGFX::SCH_RENDER_SETTINGS*>( aPlotter->RenderSettings() );
|
auto* settings = static_cast<KIGFX::SCH_RENDER_SETTINGS*>( aPlotter->RenderSettings() );
|
||||||
|
|
||||||
COLOR4D color = ( GetStrokeColor() == COLOR4D::UNSPECIFIED ) ?
|
COLOR4D color = ( GetStrokeColor() == COLOR4D::UNSPECIFIED ) ?
|
||||||
settings->GetLayerColor( m_Layer ) : GetStrokeColor();
|
settings->GetLayerColor( m_layer ) : GetStrokeColor();
|
||||||
int penWidth = ( GetPenWidth() == 0 ) ? settings->GetDefaultPenWidth() : GetPenWidth();
|
int penWidth = ( GetPenWidth() == 0 ) ? settings->GetDefaultPenWidth() : GetPenWidth();
|
||||||
|
|
||||||
penWidth = std::max( penWidth, settings->GetMinPenWidth() );
|
penWidth = std::max( penWidth, settings->GetMinPenWidth() );
|
||||||
|
|
|
@ -1234,7 +1234,7 @@ void SCH_COMPONENT::Show( int nestLevel, std::ostream& os ) const
|
||||||
<< " ref=\"" << TO_UTF8( GetField( 0 )->GetName() )
|
<< " ref=\"" << TO_UTF8( GetField( 0 )->GetName() )
|
||||||
<< '"' << " chipName=\""
|
<< '"' << " chipName=\""
|
||||||
<< GetLibId().Format() << '"' << m_Pos
|
<< GetLibId().Format() << '"' << m_Pos
|
||||||
<< " layer=\"" << m_Layer
|
<< " layer=\"" << m_layer
|
||||||
<< '"' << ">\n";
|
<< '"' << ">\n";
|
||||||
|
|
||||||
// skip the reference, it's been output already.
|
// skip the reference, it's been output already.
|
||||||
|
|
|
@ -185,7 +185,7 @@ int SCH_FIELD::GetPenWidth() const
|
||||||
void SCH_FIELD::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
|
void SCH_FIELD::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
|
||||||
{
|
{
|
||||||
wxDC* DC = aSettings->GetPrintDC();
|
wxDC* DC = aSettings->GetPrintDC();
|
||||||
COLOR4D color = aSettings->GetLayerColor( IsForceVisible() ? LAYER_HIDDEN : m_Layer );
|
COLOR4D color = aSettings->GetLayerColor( IsForceVisible() ? LAYER_HIDDEN : m_layer );
|
||||||
int orient;
|
int orient;
|
||||||
wxPoint textpos;
|
wxPoint textpos;
|
||||||
int penWidth = GetEffectiveTextPenWidth( aSettings->GetDefaultPenWidth() );
|
int penWidth = GetEffectiveTextPenWidth( aSettings->GetDefaultPenWidth() );
|
||||||
|
@ -241,7 +241,7 @@ void SCH_FIELD::SwapData( SCH_ITEM* aItem )
|
||||||
|
|
||||||
SCH_FIELD* item = (SCH_FIELD*) aItem;
|
SCH_FIELD* item = (SCH_FIELD*) aItem;
|
||||||
|
|
||||||
std::swap( m_Layer, item->m_Layer );
|
std::swap( m_layer, item->m_layer );
|
||||||
SwapText( *item );
|
SwapText( *item );
|
||||||
SwapEffects( *item );
|
SwapEffects( *item );
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
SCH_IREF::SCH_IREF( const wxPoint& pos, const wxString& text, SCH_GLOBALLABEL* aParent ) :
|
SCH_IREF::SCH_IREF( const wxPoint& pos, const wxString& text, SCH_GLOBALLABEL* aParent ) :
|
||||||
SCH_TEXT( pos, text, SCH_IREF_T )
|
SCH_TEXT( pos, text, SCH_IREF_T )
|
||||||
{
|
{
|
||||||
m_Layer = LAYER_GLOBLABEL;
|
m_layer = LAYER_GLOBLABEL;
|
||||||
m_parentLabel = aParent;
|
m_parentLabel = aParent;
|
||||||
SetMultilineAllowed( false );
|
SetMultilineAllowed( false );
|
||||||
m_screen = nullptr;
|
m_screen = nullptr;
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
SCH_ITEM::SCH_ITEM( EDA_ITEM* aParent, KICAD_T aType ) :
|
SCH_ITEM::SCH_ITEM( EDA_ITEM* aParent, KICAD_T aType ) :
|
||||||
EDA_ITEM( aParent, aType )
|
EDA_ITEM( aParent, aType )
|
||||||
{
|
{
|
||||||
m_Layer = LAYER_WIRE; // It's only a default, in fact
|
m_layer = LAYER_WIRE; // It's only a default, in fact
|
||||||
m_fieldsAutoplaced = FIELDS_AUTOPLACED_NO;
|
m_fieldsAutoplaced = FIELDS_AUTOPLACED_NO;
|
||||||
m_connectivity_dirty = true;
|
m_connectivity_dirty = true;
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ SCH_ITEM::SCH_ITEM( EDA_ITEM* aParent, KICAD_T aType ) :
|
||||||
SCH_ITEM::SCH_ITEM( const SCH_ITEM& aItem ) :
|
SCH_ITEM::SCH_ITEM( const SCH_ITEM& aItem ) :
|
||||||
EDA_ITEM( aItem )
|
EDA_ITEM( aItem )
|
||||||
{
|
{
|
||||||
m_Layer = aItem.m_Layer;
|
m_layer = aItem.m_layer;
|
||||||
m_fieldsAutoplaced = aItem.m_fieldsAutoplaced;
|
m_fieldsAutoplaced = aItem.m_fieldsAutoplaced;
|
||||||
m_connectivity_dirty = true;
|
m_connectivity_dirty = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -196,7 +196,7 @@ class SCH_ITEM : public EDA_ITEM
|
||||||
friend class CONNECTION_GRAPH;
|
friend class CONNECTION_GRAPH;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SCH_LAYER_ID m_Layer;
|
SCH_LAYER_ID m_layer;
|
||||||
EDA_ITEMS m_connections; // List of items connected to this item.
|
EDA_ITEMS m_connections; // List of items connected to this item.
|
||||||
FIELDS_AUTOPLACED m_fieldsAutoplaced; // indicates status of field autoplacement
|
FIELDS_AUTOPLACED m_fieldsAutoplaced; // indicates status of field autoplacement
|
||||||
wxPoint m_storedPos; // a temporary variable used in some move commands
|
wxPoint m_storedPos; // a temporary variable used in some move commands
|
||||||
|
@ -276,14 +276,14 @@ public:
|
||||||
/**
|
/**
|
||||||
* Return the layer this item is on.
|
* Return the layer this item is on.
|
||||||
*/
|
*/
|
||||||
SCH_LAYER_ID GetLayer() const { return m_Layer; }
|
SCH_LAYER_ID GetLayer() const { return m_layer; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the layer this item is on.
|
* Set the layer this item is on.
|
||||||
*
|
*
|
||||||
* @param aLayer The layer number.
|
* @param aLayer The layer number.
|
||||||
*/
|
*/
|
||||||
void SetLayer( SCH_LAYER_ID aLayer ) { m_Layer = aLayer; }
|
void SetLayer( SCH_LAYER_ID aLayer ) { m_layer = aLayer; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the layers the item is drawn on (which may be more than its "home" layer)
|
* Return the layers the item is drawn on (which may be more than its "home" layer)
|
||||||
|
@ -369,7 +369,7 @@ public:
|
||||||
|
|
||||||
virtual bool IsDangling() const { return false; }
|
virtual bool IsDangling() const { return false; }
|
||||||
|
|
||||||
virtual bool CanConnect( const SCH_ITEM* aItem ) const { return m_Layer == aItem->GetLayer(); }
|
virtual bool CanConnect( const SCH_ITEM* aItem ) const { return m_layer == aItem->GetLayer(); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return true if the schematic item can connect to another schematic item.
|
* @return true if the schematic item can connect to another schematic item.
|
||||||
|
|
|
@ -45,7 +45,7 @@ SCH_JUNCTION::SCH_JUNCTION( const wxPoint& aPosition, int aDiameter, SCH_LAYER_I
|
||||||
m_pos = aPosition;
|
m_pos = aPosition;
|
||||||
m_color = COLOR4D::UNSPECIFIED;
|
m_color = COLOR4D::UNSPECIFIED;
|
||||||
m_diameter = aDiameter;
|
m_diameter = aDiameter;
|
||||||
m_Layer = aLayer;
|
m_layer = aLayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ void SCH_JUNCTION::SwapData( SCH_ITEM* aItem )
|
||||||
void SCH_JUNCTION::ViewGetLayers( int aLayers[], int& aCount ) const
|
void SCH_JUNCTION::ViewGetLayers( int aLayers[], int& aCount ) const
|
||||||
{
|
{
|
||||||
aCount = 2;
|
aCount = 2;
|
||||||
aLayers[0] = m_Layer;
|
aLayers[0] = m_layer;
|
||||||
aLayers[1] = LAYER_SELECTION_SHADOWS;
|
aLayers[1] = LAYER_SELECTION_SHADOWS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,9 +45,9 @@ SCH_LINE::SCH_LINE( const wxPoint& pos, int layer ) :
|
||||||
|
|
||||||
switch( layer )
|
switch( layer )
|
||||||
{
|
{
|
||||||
default: m_Layer = LAYER_NOTES; break;
|
default: m_layer = LAYER_NOTES; break;
|
||||||
case LAYER_WIRE: m_Layer = LAYER_WIRE; break;
|
case LAYER_WIRE: m_layer = LAYER_WIRE; break;
|
||||||
case LAYER_BUS: m_Layer = LAYER_BUS; break;
|
case LAYER_BUS: m_layer = LAYER_BUS; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ void SCH_LINE::MoveEnd( const wxPoint& aOffset )
|
||||||
void SCH_LINE::Show( int nestLevel, std::ostream& os ) const
|
void SCH_LINE::Show( int nestLevel, std::ostream& os ) const
|
||||||
{
|
{
|
||||||
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str()
|
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str()
|
||||||
<< " layer=\"" << m_Layer << '"'
|
<< " layer=\"" << m_layer << '"'
|
||||||
<< " startIsDangling=\"" << m_startIsDangling
|
<< " startIsDangling=\"" << m_startIsDangling
|
||||||
<< '"' << " endIsDangling=\""
|
<< '"' << " endIsDangling=\""
|
||||||
<< m_endIsDangling << '"' << ">"
|
<< m_endIsDangling << '"' << ">"
|
||||||
|
@ -156,7 +156,7 @@ void SCH_LINE::Show( int nestLevel, std::ostream& os ) const
|
||||||
void SCH_LINE::ViewGetLayers( int aLayers[], int& aCount ) const
|
void SCH_LINE::ViewGetLayers( int aLayers[], int& aCount ) const
|
||||||
{
|
{
|
||||||
aCount = 2;
|
aCount = 2;
|
||||||
aLayers[0] = m_Layer;
|
aLayers[0] = m_layer;
|
||||||
aLayers[1] = LAYER_SELECTION_SHADOWS;
|
aLayers[1] = LAYER_SELECTION_SHADOWS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ int SCH_LINE::GetPenWidth() const
|
||||||
{
|
{
|
||||||
NETCLASSPTR netclass = NetClass();
|
NETCLASSPTR netclass = NetClass();
|
||||||
|
|
||||||
switch ( m_Layer )
|
switch ( m_layer )
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
if( m_stroke.GetWidth() > 0 )
|
if( m_stroke.GetWidth() > 0 )
|
||||||
|
@ -578,7 +578,7 @@ bool SCH_LINE::UpdateDanglingState( std::vector<DANGLING_END_ITEM>& aItemList,
|
||||||
|
|
||||||
bool SCH_LINE::IsConnectable() const
|
bool SCH_LINE::IsConnectable() const
|
||||||
{
|
{
|
||||||
if( m_Layer == LAYER_WIRE || m_Layer == LAYER_BUS )
|
if( m_layer == LAYER_WIRE || m_layer == LAYER_BUS )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -587,7 +587,7 @@ bool SCH_LINE::IsConnectable() const
|
||||||
|
|
||||||
bool SCH_LINE::CanConnect( const SCH_ITEM* aItem ) const
|
bool SCH_LINE::CanConnect( const SCH_ITEM* aItem ) const
|
||||||
{
|
{
|
||||||
if( m_Layer == LAYER_WIRE )
|
if( m_layer == LAYER_WIRE )
|
||||||
{
|
{
|
||||||
switch( aItem->Type() )
|
switch( aItem->Type() )
|
||||||
{
|
{
|
||||||
|
@ -605,7 +605,7 @@ bool SCH_LINE::CanConnect( const SCH_ITEM* aItem ) const
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( m_Layer == LAYER_BUS )
|
else if( m_layer == LAYER_BUS )
|
||||||
{
|
{
|
||||||
switch( aItem->Type() )
|
switch( aItem->Type() )
|
||||||
{
|
{
|
||||||
|
@ -622,7 +622,7 @@ bool SCH_LINE::CanConnect( const SCH_ITEM* aItem ) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return aItem->GetLayer() == m_Layer;
|
return aItem->GetLayer() == m_layer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -648,7 +648,7 @@ wxString SCH_LINE::GetSelectMenuText( EDA_UNITS aUnits ) const
|
||||||
|
|
||||||
if( m_start.x == m_end.x )
|
if( m_start.x == m_end.x )
|
||||||
{
|
{
|
||||||
switch( m_Layer )
|
switch( m_layer )
|
||||||
{
|
{
|
||||||
case LAYER_WIRE: txtfmt = _( "Vertical Wire, length %s" ); break;
|
case LAYER_WIRE: txtfmt = _( "Vertical Wire, length %s" ); break;
|
||||||
case LAYER_BUS: txtfmt = _( "Vertical Bus, length %s" ); break;
|
case LAYER_BUS: txtfmt = _( "Vertical Bus, length %s" ); break;
|
||||||
|
@ -657,7 +657,7 @@ wxString SCH_LINE::GetSelectMenuText( EDA_UNITS aUnits ) const
|
||||||
}
|
}
|
||||||
else if( m_start.y == m_end.y )
|
else if( m_start.y == m_end.y )
|
||||||
{
|
{
|
||||||
switch( m_Layer )
|
switch( m_layer )
|
||||||
{
|
{
|
||||||
case LAYER_WIRE: txtfmt = _( "Horizontal Wire, length %s" ); break;
|
case LAYER_WIRE: txtfmt = _( "Horizontal Wire, length %s" ); break;
|
||||||
case LAYER_BUS: txtfmt = _( "Horizontal Bus, length %s" ); break;
|
case LAYER_BUS: txtfmt = _( "Horizontal Bus, length %s" ); break;
|
||||||
|
@ -666,7 +666,7 @@ wxString SCH_LINE::GetSelectMenuText( EDA_UNITS aUnits ) const
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch( m_Layer )
|
switch( m_layer )
|
||||||
{
|
{
|
||||||
case LAYER_WIRE: txtfmt = _( "Wire, length %s" ); break;
|
case LAYER_WIRE: txtfmt = _( "Wire, length %s" ); break;
|
||||||
case LAYER_BUS: txtfmt = _( "Bus, length %s" ); break;
|
case LAYER_BUS: txtfmt = _( "Bus, length %s" ); break;
|
||||||
|
@ -681,9 +681,9 @@ wxString SCH_LINE::GetSelectMenuText( EDA_UNITS aUnits ) const
|
||||||
|
|
||||||
BITMAP_DEF SCH_LINE::GetMenuImage() const
|
BITMAP_DEF SCH_LINE::GetMenuImage() const
|
||||||
{
|
{
|
||||||
if( m_Layer == LAYER_NOTES )
|
if( m_layer == LAYER_NOTES )
|
||||||
return add_dashed_line_xpm;
|
return add_dashed_line_xpm;
|
||||||
else if( m_Layer == LAYER_WIRE )
|
else if( m_layer == LAYER_WIRE )
|
||||||
return add_line_xpm;
|
return add_line_xpm;
|
||||||
|
|
||||||
return add_bus_xpm;
|
return add_bus_xpm;
|
||||||
|
@ -746,7 +746,7 @@ void SCH_LINE::SwapData( SCH_ITEM* aItem )
|
||||||
{
|
{
|
||||||
SCH_LINE* item = (SCH_LINE*) aItem;
|
SCH_LINE* item = (SCH_LINE*) aItem;
|
||||||
|
|
||||||
std::swap( m_Layer, item->m_Layer );
|
std::swap( m_layer, item->m_layer );
|
||||||
|
|
||||||
std::swap( m_start, item->m_start );
|
std::swap( m_start, item->m_start );
|
||||||
std::swap( m_end, item->m_end );
|
std::swap( m_end, item->m_end );
|
||||||
|
@ -758,7 +758,7 @@ void SCH_LINE::SwapData( SCH_ITEM* aItem )
|
||||||
|
|
||||||
bool SCH_LINE::doIsConnected( const wxPoint& aPosition ) const
|
bool SCH_LINE::doIsConnected( const wxPoint& aPosition ) const
|
||||||
{
|
{
|
||||||
if( m_Layer != LAYER_WIRE && m_Layer != LAYER_BUS )
|
if( m_layer != LAYER_WIRE && m_layer != LAYER_BUS )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return IsEndPoint( aPosition );
|
return IsEndPoint( aPosition );
|
||||||
|
@ -776,7 +776,7 @@ void SCH_LINE::Plot( PLOTTER* aPlotter )
|
||||||
|
|
||||||
aPlotter->SetColor( color );
|
aPlotter->SetColor( color );
|
||||||
|
|
||||||
switch( m_Layer )
|
switch( m_layer )
|
||||||
{
|
{
|
||||||
case LAYER_WIRE: penWidth = settings->m_DefaultWireThickness; break;
|
case LAYER_WIRE: penWidth = settings->m_DefaultWireThickness; break;
|
||||||
case LAYER_BUS: penWidth = settings->m_DefaultBusThickness; break;
|
case LAYER_BUS: penWidth = settings->m_DefaultBusThickness; break;
|
||||||
|
|
|
@ -73,11 +73,11 @@ public:
|
||||||
|
|
||||||
for( const KICAD_T* p = aScanTypes; *p != EOT; ++p )
|
for( const KICAD_T* p = aScanTypes; *p != EOT; ++p )
|
||||||
{
|
{
|
||||||
if( *p == SCH_LINE_LOCATE_WIRE_T && m_Layer == LAYER_WIRE )
|
if( *p == SCH_LINE_LOCATE_WIRE_T && m_layer == LAYER_WIRE )
|
||||||
return true;
|
return true;
|
||||||
else if ( *p == SCH_LINE_LOCATE_BUS_T && m_Layer == LAYER_BUS )
|
else if ( *p == SCH_LINE_LOCATE_BUS_T && m_layer == LAYER_BUS )
|
||||||
return true;
|
return true;
|
||||||
else if ( *p == SCH_LINE_LOCATE_GRAPHIC_LINE_T && m_Layer == LAYER_NOTES )
|
else if ( *p == SCH_LINE_LOCATE_GRAPHIC_LINE_T && m_layer == LAYER_NOTES )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ const wxString SCH_SHEET::GetDefaultFieldName( int aFieldNdx )
|
||||||
SCH_SHEET::SCH_SHEET( EDA_ITEM* aParent, const wxPoint& pos ) :
|
SCH_SHEET::SCH_SHEET( EDA_ITEM* aParent, const wxPoint& pos ) :
|
||||||
SCH_ITEM( aParent, SCH_SHEET_T )
|
SCH_ITEM( aParent, SCH_SHEET_T )
|
||||||
{
|
{
|
||||||
m_Layer = LAYER_SHEET;
|
m_layer = LAYER_SHEET;
|
||||||
m_pos = pos;
|
m_pos = pos;
|
||||||
m_size = wxSize( Mils2iu( MIN_SHEET_WIDTH ), Mils2iu( MIN_SHEET_HEIGHT ) );
|
m_size = wxSize( Mils2iu( MIN_SHEET_WIDTH ), Mils2iu( MIN_SHEET_HEIGHT ) );
|
||||||
m_screen = NULL;
|
m_screen = NULL;
|
||||||
|
@ -101,7 +101,7 @@ SCH_SHEET::SCH_SHEET( const SCH_SHEET& aSheet ) :
|
||||||
{
|
{
|
||||||
m_pos = aSheet.m_pos;
|
m_pos = aSheet.m_pos;
|
||||||
m_size = aSheet.m_size;
|
m_size = aSheet.m_size;
|
||||||
m_Layer = aSheet.m_Layer;
|
m_layer = aSheet.m_layer;
|
||||||
const_cast<KIID&>( m_Uuid ) = aSheet.m_Uuid;
|
const_cast<KIID&>( m_Uuid ) = aSheet.m_Uuid;
|
||||||
m_fields = aSheet.m_fields;
|
m_fields = aSheet.m_fields;
|
||||||
m_fieldsAutoplaced = aSheet.m_fieldsAutoplaced;
|
m_fieldsAutoplaced = aSheet.m_fieldsAutoplaced;
|
||||||
|
|
|
@ -43,7 +43,7 @@ SCH_SHEET_PIN::SCH_SHEET_PIN( SCH_SHEET* parent, const wxPoint& pos, const wxStr
|
||||||
{
|
{
|
||||||
SetParent( parent );
|
SetParent( parent );
|
||||||
wxASSERT( parent );
|
wxASSERT( parent );
|
||||||
m_Layer = LAYER_SHEETLABEL;
|
m_layer = LAYER_SHEETLABEL;
|
||||||
|
|
||||||
SetTextPos( pos );
|
SetTextPos( pos );
|
||||||
|
|
||||||
|
|
|
@ -126,7 +126,7 @@ SCH_TEXT::SCH_TEXT( const wxPoint& pos, const wxString& text, KICAD_T aType ) :
|
||||||
m_connectionType( CONNECTION_TYPE::NONE ),
|
m_connectionType( CONNECTION_TYPE::NONE ),
|
||||||
m_spin_style( LABEL_SPIN_STYLE::LEFT )
|
m_spin_style( LABEL_SPIN_STYLE::LEFT )
|
||||||
{
|
{
|
||||||
m_Layer = LAYER_NOTES;
|
m_layer = LAYER_NOTES;
|
||||||
|
|
||||||
SetTextPos( pos );
|
SetTextPos( pos );
|
||||||
SetMultilineAllowed( true );
|
SetMultilineAllowed( true );
|
||||||
|
@ -274,7 +274,7 @@ void SCH_TEXT::SwapData( SCH_ITEM* aItem )
|
||||||
{
|
{
|
||||||
SCH_TEXT* item = (SCH_TEXT*) aItem;
|
SCH_TEXT* item = (SCH_TEXT*) aItem;
|
||||||
|
|
||||||
std::swap( m_Layer, item->m_Layer );
|
std::swap( m_layer, item->m_layer );
|
||||||
|
|
||||||
std::swap( m_shape, item->m_shape );
|
std::swap( m_shape, item->m_shape );
|
||||||
std::swap( m_isDangling, item->m_isDangling );
|
std::swap( m_isDangling, item->m_isDangling );
|
||||||
|
@ -324,7 +324,7 @@ int SCH_TEXT::GetPenWidth() const
|
||||||
|
|
||||||
void SCH_TEXT::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
|
void SCH_TEXT::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
|
||||||
{
|
{
|
||||||
COLOR4D color = aSettings->GetLayerColor( m_Layer );
|
COLOR4D color = aSettings->GetLayerColor( m_layer );
|
||||||
wxPoint text_offset = aOffset + GetSchematicTextOffset( aSettings );
|
wxPoint text_offset = aOffset + GetSchematicTextOffset( aSettings );
|
||||||
|
|
||||||
EDA_TEXT::Print( aSettings, text_offset, color );
|
EDA_TEXT::Print( aSettings, text_offset, color );
|
||||||
|
@ -697,7 +697,7 @@ void SCH_TEXT::Show( int nestLevel, std::ostream& os ) const
|
||||||
wxString s = GetClass();
|
wxString s = GetClass();
|
||||||
|
|
||||||
NestedSpace( nestLevel, os ) << '<' << s.Lower().mb_str()
|
NestedSpace( nestLevel, os ) << '<' << s.Lower().mb_str()
|
||||||
<< " layer=\"" << m_Layer << '"'
|
<< " layer=\"" << m_layer << '"'
|
||||||
<< " shape=\"" << static_cast<int>( m_shape ) << '"'
|
<< " shape=\"" << static_cast<int>( m_shape ) << '"'
|
||||||
<< " dangling=\"" << m_isDangling << '"'
|
<< " dangling=\"" << m_isDangling << '"'
|
||||||
<< '>'
|
<< '>'
|
||||||
|
@ -711,7 +711,7 @@ void SCH_TEXT::Show( int nestLevel, std::ostream& os ) const
|
||||||
SCH_LABEL::SCH_LABEL( const wxPoint& pos, const wxString& text )
|
SCH_LABEL::SCH_LABEL( const wxPoint& pos, const wxString& text )
|
||||||
: SCH_TEXT( pos, text, SCH_LABEL_T )
|
: SCH_TEXT( pos, text, SCH_LABEL_T )
|
||||||
{
|
{
|
||||||
m_Layer = LAYER_LOCLABEL;
|
m_layer = LAYER_LOCLABEL;
|
||||||
m_shape = PINSHEETLABEL_SHAPE::PS_INPUT;
|
m_shape = PINSHEETLABEL_SHAPE::PS_INPUT;
|
||||||
m_isDangling = true;
|
m_isDangling = true;
|
||||||
SetMultilineAllowed( false );
|
SetMultilineAllowed( false );
|
||||||
|
@ -808,7 +808,7 @@ BITMAP_DEF SCH_LABEL::GetMenuImage() const
|
||||||
SCH_GLOBALLABEL::SCH_GLOBALLABEL( const wxPoint& pos, const wxString& text )
|
SCH_GLOBALLABEL::SCH_GLOBALLABEL( const wxPoint& pos, const wxString& text )
|
||||||
: SCH_TEXT( pos, text, SCH_GLOBAL_LABEL_T )
|
: SCH_TEXT( pos, text, SCH_GLOBAL_LABEL_T )
|
||||||
{
|
{
|
||||||
m_Layer = LAYER_GLOBLABEL;
|
m_layer = LAYER_GLOBLABEL;
|
||||||
m_shape = PINSHEETLABEL_SHAPE::PS_BIDI;
|
m_shape = PINSHEETLABEL_SHAPE::PS_BIDI;
|
||||||
m_isDangling = true;
|
m_isDangling = true;
|
||||||
m_iref = nullptr;
|
m_iref = nullptr;
|
||||||
|
@ -899,7 +899,7 @@ void SCH_GLOBALLABEL::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset
|
||||||
static std::vector <wxPoint> Poly;
|
static std::vector <wxPoint> Poly;
|
||||||
|
|
||||||
wxDC* DC = aSettings->GetPrintDC();
|
wxDC* DC = aSettings->GetPrintDC();
|
||||||
COLOR4D color = aSettings->GetLayerColor( m_Layer );
|
COLOR4D color = aSettings->GetLayerColor( m_layer );
|
||||||
int penWidth = std::max( GetPenWidth(), aSettings->GetDefaultPenWidth() );
|
int penWidth = std::max( GetPenWidth(), aSettings->GetDefaultPenWidth() );
|
||||||
wxPoint text_offset = aOffset + GetSchematicTextOffset( aSettings );
|
wxPoint text_offset = aOffset + GetSchematicTextOffset( aSettings );
|
||||||
|
|
||||||
|
@ -1052,7 +1052,7 @@ BITMAP_DEF SCH_GLOBALLABEL::GetMenuImage() const
|
||||||
SCH_HIERLABEL::SCH_HIERLABEL( const wxPoint& pos, const wxString& text, KICAD_T aType )
|
SCH_HIERLABEL::SCH_HIERLABEL( const wxPoint& pos, const wxString& text, KICAD_T aType )
|
||||||
: SCH_TEXT( pos, text, aType )
|
: SCH_TEXT( pos, text, aType )
|
||||||
{
|
{
|
||||||
m_Layer = LAYER_HIERLABEL;
|
m_layer = LAYER_HIERLABEL;
|
||||||
m_shape = PINSHEETLABEL_SHAPE::PS_INPUT;
|
m_shape = PINSHEETLABEL_SHAPE::PS_INPUT;
|
||||||
m_isDangling = true;
|
m_isDangling = true;
|
||||||
SetMultilineAllowed( false );
|
SetMultilineAllowed( false );
|
||||||
|
@ -1115,7 +1115,7 @@ void SCH_HIERLABEL::Print( RENDER_SETTINGS* aSettings, const wxPoint& offset )
|
||||||
wxDC* DC = aSettings->GetPrintDC();
|
wxDC* DC = aSettings->GetPrintDC();
|
||||||
SCH_CONNECTION* conn = Connection();
|
SCH_CONNECTION* conn = Connection();
|
||||||
bool isBus = conn && conn->IsBus();
|
bool isBus = conn && conn->IsBus();
|
||||||
COLOR4D color = aSettings->GetLayerColor( isBus ? LAYER_BUS : m_Layer );
|
COLOR4D color = aSettings->GetLayerColor( isBus ? LAYER_BUS : m_layer );
|
||||||
int penWidth = std::max( GetPenWidth(), aSettings->GetDefaultPenWidth() );
|
int penWidth = std::max( GetPenWidth(), aSettings->GetDefaultPenWidth() );
|
||||||
wxPoint textOffset = offset + GetSchematicTextOffset( aSettings );
|
wxPoint textOffset = offset + GetSchematicTextOffset( aSettings );
|
||||||
|
|
||||||
|
|
|
@ -91,13 +91,13 @@ static inline wxString PCB_SHAPE_TYPE_T_asString( PCB_SHAPE_TYPE_T a )
|
||||||
class BOARD_ITEM : public EDA_ITEM
|
class BOARD_ITEM : public EDA_ITEM
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
PCB_LAYER_ID m_Layer;
|
PCB_LAYER_ID m_layer;
|
||||||
PCB_GROUP* m_group;
|
PCB_GROUP* m_group;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BOARD_ITEM( BOARD_ITEM* aParent, KICAD_T idtype ) :
|
BOARD_ITEM( BOARD_ITEM* aParent, KICAD_T idtype ) :
|
||||||
EDA_ITEM( aParent, idtype ),
|
EDA_ITEM( aParent, idtype ),
|
||||||
m_Layer( F_Cu ),
|
m_layer( F_Cu ),
|
||||||
m_group( nullptr )
|
m_group( nullptr )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -187,13 +187,13 @@ public:
|
||||||
* Function GetLayer
|
* Function GetLayer
|
||||||
* returns the primary layer this item is on.
|
* returns the primary layer this item is on.
|
||||||
*/
|
*/
|
||||||
virtual PCB_LAYER_ID GetLayer() const { return m_Layer; }
|
virtual PCB_LAYER_ID GetLayer() const { return m_layer; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function GetLayerSet
|
* Function GetLayerSet
|
||||||
* returns a std::bitset of all layers on which the item physically resides.
|
* returns a std::bitset of all layers on which the item physically resides.
|
||||||
*/
|
*/
|
||||||
virtual LSET GetLayerSet() const { return LSET( m_Layer ); }
|
virtual LSET GetLayerSet() const { return LSET( m_layer ); }
|
||||||
virtual void SetLayerSet( LSET aLayers )
|
virtual void SetLayerSet( LSET aLayers )
|
||||||
{
|
{
|
||||||
wxFAIL_MSG( "Attempted to SetLayerSet() on a single-layer object." );
|
wxFAIL_MSG( "Attempted to SetLayerSet() on a single-layer object." );
|
||||||
|
@ -210,7 +210,7 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual void SetLayer( PCB_LAYER_ID aLayer )
|
virtual void SetLayer( PCB_LAYER_ID aLayer )
|
||||||
{
|
{
|
||||||
m_Layer = aLayer;
|
m_layer = aLayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -243,7 +243,7 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual bool IsOnLayer( PCB_LAYER_ID aLayer ) const
|
virtual bool IsOnLayer( PCB_LAYER_ID aLayer ) const
|
||||||
{
|
{
|
||||||
return m_Layer == aLayer;
|
return m_layer == aLayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -72,12 +72,12 @@ BOARD::BOARD() :
|
||||||
|
|
||||||
for( LAYER_NUM layer = 0; layer < PCB_LAYER_ID_COUNT; ++layer )
|
for( LAYER_NUM layer = 0; layer < PCB_LAYER_ID_COUNT; ++layer )
|
||||||
{
|
{
|
||||||
m_Layer[layer].m_name = GetStandardLayerName( ToLAYER_ID( layer ) );
|
m_layers[layer].m_name = GetStandardLayerName( ToLAYER_ID( layer ) );
|
||||||
|
|
||||||
if( IsCopperLayer( layer ) )
|
if( IsCopperLayer( layer ) )
|
||||||
m_Layer[layer].m_type = LT_SIGNAL;
|
m_layers[layer].m_type = LT_SIGNAL;
|
||||||
else
|
else
|
||||||
m_Layer[layer].m_type = LT_UNDEFINED;
|
m_layers[layer].m_type = LT_UNDEFINED;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOARD_DESIGN_SETTINGS& bds = GetDesignSettings();
|
BOARD_DESIGN_SETTINGS& bds = GetDesignSettings();
|
||||||
|
@ -296,9 +296,9 @@ TRACKS BOARD::TracksInNet( int aNetCode )
|
||||||
|
|
||||||
bool BOARD::SetLayerDescr( PCB_LAYER_ID aIndex, const LAYER& aLayer )
|
bool BOARD::SetLayerDescr( PCB_LAYER_ID aIndex, const LAYER& aLayer )
|
||||||
{
|
{
|
||||||
if( unsigned( aIndex ) < arrayDim( m_Layer ) )
|
if( unsigned( aIndex ) < arrayDim( m_layers ) )
|
||||||
{
|
{
|
||||||
m_Layer[ aIndex ] = aLayer;
|
m_layers[ aIndex ] = aLayer;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -312,8 +312,8 @@ const PCB_LAYER_ID BOARD::GetLayerID( const wxString& aLayerName ) const
|
||||||
// Check the BOARD physical layer names.
|
// Check the BOARD physical layer names.
|
||||||
for( LAYER_NUM layer = 0; layer < PCB_LAYER_ID_COUNT; ++layer )
|
for( LAYER_NUM layer = 0; layer < PCB_LAYER_ID_COUNT; ++layer )
|
||||||
{
|
{
|
||||||
if ( ( m_Layer[ layer ].m_name == aLayerName )
|
if ( ( m_layers[ layer ].m_name == aLayerName )
|
||||||
|| ( m_Layer[ layer ].m_userName == aLayerName ) )
|
|| ( m_layers[ layer ].m_userName == aLayerName ) )
|
||||||
return ToLAYER_ID( layer );
|
return ToLAYER_ID( layer );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -336,8 +336,8 @@ const wxString BOARD::GetLayerName( PCB_LAYER_ID aLayer ) const
|
||||||
// Standard names were set in BOARD::BOARD() but they may be over-ridden by
|
// Standard names were set in BOARD::BOARD() but they may be over-ridden by
|
||||||
// BOARD::SetLayerName(). For copper layers, return the user defined layer name,
|
// BOARD::SetLayerName(). For copper layers, return the user defined layer name,
|
||||||
// if it was set. Otherwise return the Standard English layer name.
|
// if it was set. Otherwise return the Standard English layer name.
|
||||||
if( !m_Layer[aLayer].m_userName.IsEmpty() )
|
if( !m_layers[aLayer].m_userName.IsEmpty() )
|
||||||
return m_Layer[aLayer].m_userName;
|
return m_layers[aLayer].m_userName;
|
||||||
}
|
}
|
||||||
|
|
||||||
return GetStandardLayerName( aLayer );
|
return GetStandardLayerName( aLayer );
|
||||||
|
@ -354,7 +354,7 @@ bool BOARD::SetLayerName( PCB_LAYER_ID aLayer, const wxString& aLayerName )
|
||||||
|
|
||||||
if( IsLayerEnabled( aLayer ) )
|
if( IsLayerEnabled( aLayer ) )
|
||||||
{
|
{
|
||||||
m_Layer[aLayer].m_userName = aLayerName;
|
m_layers[aLayer].m_userName = aLayerName;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -370,7 +370,7 @@ LAYER_T BOARD::GetLayerType( PCB_LAYER_ID aLayer ) const
|
||||||
//@@IMB: The original test was broken due to the discontinuity
|
//@@IMB: The original test was broken due to the discontinuity
|
||||||
// in the layer sequence.
|
// in the layer sequence.
|
||||||
if( IsLayerEnabled( aLayer ) )
|
if( IsLayerEnabled( aLayer ) )
|
||||||
return m_Layer[aLayer].m_type;
|
return m_layers[aLayer].m_type;
|
||||||
|
|
||||||
return LT_SIGNAL;
|
return LT_SIGNAL;
|
||||||
}
|
}
|
||||||
|
@ -385,7 +385,7 @@ bool BOARD::SetLayerType( PCB_LAYER_ID aLayer, LAYER_T aLayerType )
|
||||||
// in the layer sequence.
|
// in the layer sequence.
|
||||||
if( IsLayerEnabled( aLayer ) )
|
if( IsLayerEnabled( aLayer ) )
|
||||||
{
|
{
|
||||||
m_Layer[aLayer].m_type = aLayerType;
|
m_layers[aLayer].m_type = aLayerType;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -199,9 +199,8 @@ private:
|
||||||
GROUPS m_groups;
|
GROUPS m_groups;
|
||||||
ZONES m_zones;
|
ZONES m_zones;
|
||||||
|
|
||||||
LAYER m_Layer[PCB_LAYER_ID_COUNT];
|
LAYER m_layers[PCB_LAYER_ID_COUNT];
|
||||||
|
|
||||||
// if true m_highLight_NetCode is used
|
|
||||||
HIGH_LIGHT_INFO m_highLight; // current high light data
|
HIGH_LIGHT_INFO m_highLight; // current high light data
|
||||||
HIGH_LIGHT_INFO m_highLightPrevious; // a previously stored high light data
|
HIGH_LIGHT_INFO m_highLightPrevious; // a previously stored high light data
|
||||||
|
|
||||||
|
@ -227,7 +226,7 @@ private:
|
||||||
*/
|
*/
|
||||||
std::unique_ptr<BOARD_DESIGN_SETTINGS> m_designSettings;
|
std::unique_ptr<BOARD_DESIGN_SETTINGS> m_designSettings;
|
||||||
|
|
||||||
NETINFO_LIST m_NetInfo; // net info list (name, design constraints ..
|
NETINFO_LIST m_NetInfo; // net info list (name, design constraints...
|
||||||
|
|
||||||
std::vector<BOARD_LISTENER*> m_listeners;
|
std::vector<BOARD_LISTENER*> m_listeners;
|
||||||
|
|
||||||
|
|
|
@ -62,10 +62,10 @@ wxString BOARD_ITEM::GetLayerName() const
|
||||||
BOARD* board = GetBoard();
|
BOARD* board = GetBoard();
|
||||||
|
|
||||||
if( board )
|
if( board )
|
||||||
return board->GetLayerName( m_Layer );
|
return board->GetLayerName( m_layer );
|
||||||
|
|
||||||
// If no parent, return standard name
|
// If no parent, return standard name
|
||||||
return BOARD::GetStandardLayerName( m_Layer );
|
return BOARD::GetStandardLayerName( m_layer );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ void BOARD_ITEM::ViewGetLayers( int aLayers[], int& aCount ) const
|
||||||
{
|
{
|
||||||
// Basic fallback
|
// Basic fallback
|
||||||
aCount = 1;
|
aCount = 1;
|
||||||
aLayers[0] = m_Layer;
|
aLayers[0] = m_layer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ DIMENSION_BASE::DIMENSION_BASE( BOARD_ITEM* aParent, KICAD_T aType ) :
|
||||||
m_text( aParent ),
|
m_text( aParent ),
|
||||||
m_measuredValue( 0 )
|
m_measuredValue( 0 )
|
||||||
{
|
{
|
||||||
m_Layer = Dwgs_User;
|
m_layer = Dwgs_User;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -211,7 +211,7 @@ const wxString DIMENSION_BASE::GetText() const
|
||||||
|
|
||||||
void DIMENSION_BASE::SetLayer( PCB_LAYER_ID aLayer )
|
void DIMENSION_BASE::SetLayer( PCB_LAYER_ID aLayer )
|
||||||
{
|
{
|
||||||
m_Layer = aLayer;
|
m_layer = aLayer;
|
||||||
m_text.SetLayer( aLayer );
|
m_text.SetLayer( aLayer );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ FOOTPRINT::FOOTPRINT( BOARD* parent ) :
|
||||||
m_initial_comments( 0 )
|
m_initial_comments( 0 )
|
||||||
{
|
{
|
||||||
m_attributes = 0;
|
m_attributes = 0;
|
||||||
m_Layer = F_Cu;
|
m_layer = F_Cu;
|
||||||
m_orient = 0;
|
m_orient = 0;
|
||||||
m_fpStatus = FP_PADS_are_LOCKED;
|
m_fpStatus = FP_PADS_are_LOCKED;
|
||||||
m_arflag = 0;
|
m_arflag = 0;
|
||||||
|
@ -1120,7 +1120,7 @@ void FOOTPRINT::ViewGetLayers( int aLayers[], int& aCount ) const
|
||||||
aCount = 2;
|
aCount = 2;
|
||||||
aLayers[0] = LAYER_ANCHOR;
|
aLayers[0] = LAYER_ANCHOR;
|
||||||
|
|
||||||
switch( m_Layer )
|
switch( m_layer )
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
wxASSERT_MSG( false, "Illegal layer" ); // do you really have footprints placed on
|
wxASSERT_MSG( false, "Illegal layer" ); // do you really have footprints placed on
|
||||||
|
@ -1163,8 +1163,8 @@ void FOOTPRINT::ViewGetLayers( int aLayers[], int& aCount ) const
|
||||||
|
|
||||||
double FOOTPRINT::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const
|
double FOOTPRINT::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const
|
||||||
{
|
{
|
||||||
int layer = ( m_Layer == F_Cu ) ? LAYER_MOD_FR :
|
int layer = ( m_layer == F_Cu ) ? LAYER_MOD_FR :
|
||||||
( m_Layer == B_Cu ) ? LAYER_MOD_BK : LAYER_ANCHOR;
|
( m_layer == B_Cu ) ? LAYER_MOD_BK : LAYER_ANCHOR;
|
||||||
|
|
||||||
// Currently this is only pertinent for the anchor layer; everything else is drawn from the
|
// Currently this is only pertinent for the anchor layer; everything else is drawn from the
|
||||||
// children.
|
// children.
|
||||||
|
|
|
@ -40,7 +40,7 @@ FP_SHAPE::FP_SHAPE( FOOTPRINT* parent, PCB_SHAPE_TYPE_T aShape ) :
|
||||||
{
|
{
|
||||||
m_shape = aShape;
|
m_shape = aShape;
|
||||||
m_angle = 0;
|
m_angle = 0;
|
||||||
m_Layer = F_SilkS;
|
m_layer = F_SilkS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ public:
|
||||||
if( *p == PCB_LOCATE_GRAPHIC_T )
|
if( *p == PCB_LOCATE_GRAPHIC_T )
|
||||||
return true;
|
return true;
|
||||||
else if( *p == PCB_LOCATE_BOARD_EDGE_T )
|
else if( *p == PCB_LOCATE_BOARD_EDGE_T )
|
||||||
return m_Layer == Edge_Cuts;
|
return m_layer == Edge_Cuts;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -408,10 +408,10 @@ double FP_TEXT::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const
|
||||||
if( IsParentFlipped() && !aView->IsLayerVisible( LAYER_MOD_BK ) )
|
if( IsParentFlipped() && !aView->IsLayerVisible( LAYER_MOD_BK ) )
|
||||||
return HIDE;
|
return HIDE;
|
||||||
|
|
||||||
if( IsFrontLayer( m_Layer ) && !aView->IsLayerVisible( LAYER_MOD_TEXT_FR ) )
|
if( IsFrontLayer( m_layer ) && !aView->IsLayerVisible( LAYER_MOD_TEXT_FR ) )
|
||||||
return HIDE;
|
return HIDE;
|
||||||
|
|
||||||
if( IsBackLayer( m_Layer ) && !aView->IsLayerVisible( LAYER_MOD_TEXT_BK ) )
|
if( IsBackLayer( m_layer ) && !aView->IsLayerVisible( LAYER_MOD_TEXT_BK ) )
|
||||||
return HIDE;
|
return HIDE;
|
||||||
|
|
||||||
// Other layers are shown without any conditions
|
// Other layers are shown without any conditions
|
||||||
|
|
|
@ -1222,7 +1222,7 @@ void PCB_SHAPE::SwapData( BOARD_ITEM* aImage )
|
||||||
std::swap( m_bezierC2, image->m_bezierC2 );
|
std::swap( m_bezierC2, image->m_bezierC2 );
|
||||||
std::swap( m_bezierPoints, image->m_bezierPoints );
|
std::swap( m_bezierPoints, image->m_bezierPoints );
|
||||||
std::swap( m_poly, image->m_poly );
|
std::swap( m_poly, image->m_poly );
|
||||||
std::swap( m_Layer, image->m_Layer );
|
std::swap( m_layer, image->m_layer );
|
||||||
std::swap( m_Flags, image->m_Flags );
|
std::swap( m_Flags, image->m_Flags );
|
||||||
std::swap( m_Status, image->m_Status );
|
std::swap( m_Status, image->m_Status );
|
||||||
std::swap( m_Parent, image->m_Parent );
|
std::swap( m_Parent, image->m_Parent );
|
||||||
|
|
|
@ -85,7 +85,7 @@ public:
|
||||||
if( *p == PCB_LOCATE_GRAPHIC_T )
|
if( *p == PCB_LOCATE_GRAPHIC_T )
|
||||||
return true;
|
return true;
|
||||||
else if( *p == PCB_LOCATE_BOARD_EDGE_T )
|
else if( *p == PCB_LOCATE_BOARD_EDGE_T )
|
||||||
return m_Layer == Edge_Cuts;
|
return m_layer == Edge_Cuts;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -40,7 +40,7 @@ PCB_TARGET::PCB_TARGET( BOARD_ITEM* aParent ) :
|
||||||
m_Shape = 0;
|
m_Shape = 0;
|
||||||
m_Size = Millimeter2iu( 5 ); // Gives a decent size
|
m_Size = Millimeter2iu( 5 ); // Gives a decent size
|
||||||
m_Width = Millimeter2iu( DEFAULT_COPPER_LINE_WIDTH );
|
m_Width = Millimeter2iu( DEFAULT_COPPER_LINE_WIDTH );
|
||||||
m_Layer = Edge_Cuts; // a target is on all layers
|
m_layer = Edge_Cuts; // a target is on all layers
|
||||||
}
|
}
|
||||||
|
|
||||||
PCB_TARGET::PCB_TARGET( BOARD_ITEM* aParent, int aShape, PCB_LAYER_ID aLayer,
|
PCB_TARGET::PCB_TARGET( BOARD_ITEM* aParent, int aShape, PCB_LAYER_ID aLayer,
|
||||||
|
@ -48,7 +48,7 @@ PCB_TARGET::PCB_TARGET( BOARD_ITEM* aParent, int aShape, PCB_LAYER_ID aLayer,
|
||||||
BOARD_ITEM( aParent, PCB_TARGET_T )
|
BOARD_ITEM( aParent, PCB_TARGET_T )
|
||||||
{
|
{
|
||||||
m_Shape = aShape;
|
m_Shape = aShape;
|
||||||
m_Layer = aLayer;
|
m_layer = aLayer;
|
||||||
m_Pos = aPos;
|
m_Pos = aPos;
|
||||||
m_Size = aSize;
|
m_Size = aSize;
|
||||||
m_Width = aWidth;
|
m_Width = aWidth;
|
||||||
|
|
|
@ -1741,8 +1741,8 @@ void LEGACY_PLUGIN::loadFP_SHAPE( FOOTPRINT* aFootprint )
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for a reasonable layer:
|
// Check for a reasonable layer:
|
||||||
// m_Layer must be >= FIRST_NON_COPPER_LAYER, but because microwave footprints
|
// layer must be >= FIRST_NON_COPPER_LAYER, but because microwave footprints can use the
|
||||||
// can use the copper layers m_Layer < FIRST_NON_COPPER_LAYER is allowed.
|
// copper layers, layer < FIRST_NON_COPPER_LAYER is allowed.
|
||||||
if( layer < FIRST_LAYER || layer > LAST_NON_COPPER_LAYER )
|
if( layer < FIRST_LAYER || layer > LAST_NON_COPPER_LAYER )
|
||||||
layer = SILKSCREEN_N_FRONT;
|
layer = SILKSCREEN_N_FRONT;
|
||||||
|
|
||||||
|
|
|
@ -63,10 +63,10 @@ VIA::VIA( BOARD_ITEM* aParent ) :
|
||||||
TRACK( aParent, PCB_VIA_T )
|
TRACK( aParent, PCB_VIA_T )
|
||||||
{
|
{
|
||||||
SetViaType( VIATYPE::THROUGH );
|
SetViaType( VIATYPE::THROUGH );
|
||||||
m_BottomLayer = B_Cu;
|
m_bottomLayer = B_Cu;
|
||||||
SetDrillDefault();
|
SetDrillDefault();
|
||||||
m_RemoveUnconnectedLayer = false;
|
m_removeUnconnectedLayer = false;
|
||||||
m_KeepTopBottomLayer = true;
|
m_keepTopBottomLayer = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -169,8 +169,8 @@ int VIA::GetMinAnnulus( PCB_LAYER_ID aLayer, wxString* aSource ) const
|
||||||
|
|
||||||
int VIA::GetDrillValue() const
|
int VIA::GetDrillValue() const
|
||||||
{
|
{
|
||||||
if( m_Drill > 0 ) // Use the specific value.
|
if( m_drill > 0 ) // Use the specific value.
|
||||||
return m_Drill;
|
return m_drill;
|
||||||
|
|
||||||
// Use the default value from the Netclass
|
// Use the default value from the Netclass
|
||||||
NETCLASS* netclass = GetNetClass();
|
NETCLASS* netclass = GetNetClass();
|
||||||
|
@ -369,10 +369,10 @@ LSET VIA::GetLayerSet() const
|
||||||
|
|
||||||
LSET layermask;
|
LSET layermask;
|
||||||
|
|
||||||
wxASSERT( m_Layer <= m_BottomLayer );
|
wxASSERT( m_layer <= m_bottomLayer );
|
||||||
|
|
||||||
// PCB_LAYER_IDs are numbered from front to back, this is top to bottom.
|
// PCB_LAYER_IDs are numbered from front to back, this is top to bottom.
|
||||||
for( LAYER_NUM id = m_Layer; id <= m_BottomLayer; ++id )
|
for( LAYER_NUM id = m_layer; id <= m_bottomLayer; ++id )
|
||||||
{
|
{
|
||||||
layermask.set( id );
|
layermask.set( id );
|
||||||
}
|
}
|
||||||
|
@ -389,11 +389,11 @@ void VIA::SetLayerSet( LSET aLayerSet )
|
||||||
{
|
{
|
||||||
if( first )
|
if( first )
|
||||||
{
|
{
|
||||||
m_Layer = layer;
|
m_layer = layer;
|
||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_BottomLayer = layer;
|
m_bottomLayer = layer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -401,21 +401,21 @@ void VIA::SetLayerSet( LSET aLayerSet )
|
||||||
void VIA::SetLayerPair( PCB_LAYER_ID aTopLayer, PCB_LAYER_ID aBottomLayer )
|
void VIA::SetLayerPair( PCB_LAYER_ID aTopLayer, PCB_LAYER_ID aBottomLayer )
|
||||||
{
|
{
|
||||||
|
|
||||||
m_Layer = aTopLayer;
|
m_layer = aTopLayer;
|
||||||
m_BottomLayer = aBottomLayer;
|
m_bottomLayer = aBottomLayer;
|
||||||
SanitizeLayers();
|
SanitizeLayers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void VIA::SetTopLayer( PCB_LAYER_ID aLayer )
|
void VIA::SetTopLayer( PCB_LAYER_ID aLayer )
|
||||||
{
|
{
|
||||||
m_Layer = aLayer;
|
m_layer = aLayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void VIA::SetBottomLayer( PCB_LAYER_ID aLayer )
|
void VIA::SetBottomLayer( PCB_LAYER_ID aLayer )
|
||||||
{
|
{
|
||||||
m_BottomLayer = aLayer;
|
m_bottomLayer = aLayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -426,8 +426,8 @@ void VIA::LayerPair( PCB_LAYER_ID* top_layer, PCB_LAYER_ID* bottom_layer ) const
|
||||||
|
|
||||||
if( GetViaType() != VIATYPE::THROUGH )
|
if( GetViaType() != VIATYPE::THROUGH )
|
||||||
{
|
{
|
||||||
b_layer = m_BottomLayer;
|
b_layer = m_bottomLayer;
|
||||||
t_layer = m_Layer;
|
t_layer = m_layer;
|
||||||
|
|
||||||
if( b_layer < t_layer )
|
if( b_layer < t_layer )
|
||||||
std::swap( b_layer, t_layer );
|
std::swap( b_layer, t_layer );
|
||||||
|
@ -443,13 +443,13 @@ void VIA::LayerPair( PCB_LAYER_ID* top_layer, PCB_LAYER_ID* bottom_layer ) const
|
||||||
|
|
||||||
PCB_LAYER_ID VIA::TopLayer() const
|
PCB_LAYER_ID VIA::TopLayer() const
|
||||||
{
|
{
|
||||||
return m_Layer;
|
return m_layer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PCB_LAYER_ID VIA::BottomLayer() const
|
PCB_LAYER_ID VIA::BottomLayer() const
|
||||||
{
|
{
|
||||||
return m_BottomLayer;
|
return m_bottomLayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -457,12 +457,12 @@ void VIA::SanitizeLayers()
|
||||||
{
|
{
|
||||||
if( GetViaType() == VIATYPE::THROUGH )
|
if( GetViaType() == VIATYPE::THROUGH )
|
||||||
{
|
{
|
||||||
m_Layer = F_Cu;
|
m_layer = F_Cu;
|
||||||
m_BottomLayer = B_Cu;
|
m_bottomLayer = B_Cu;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_BottomLayer < m_Layer )
|
if( m_bottomLayer < m_layer )
|
||||||
std::swap( m_BottomLayer, m_Layer );
|
std::swap( m_bottomLayer, m_layer );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -492,10 +492,10 @@ bool VIA::FlashLayer( int aLayer ) const
|
||||||
if( !IsOnLayer( static_cast<PCB_LAYER_ID>( aLayer ) ) )
|
if( !IsOnLayer( static_cast<PCB_LAYER_ID>( aLayer ) ) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( !m_RemoveUnconnectedLayer )
|
if( !m_removeUnconnectedLayer )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if( m_KeepTopBottomLayer && ( aLayer == m_Layer || aLayer == m_BottomLayer ) )
|
if( m_keepTopBottomLayer && ( aLayer == m_layer || aLayer == m_bottomLayer ) )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return board->GetConnectivity()->IsConnectedOnLayer( this, static_cast<int>( aLayer ),
|
return board->GetConnectivity()->IsConnectedOnLayer( this, static_cast<int>( aLayer ),
|
||||||
|
@ -582,7 +582,7 @@ double VIA::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const
|
||||||
// Draw blind/buried/microvias only if at least one of the layers crossed is enabeld.
|
// Draw blind/buried/microvias only if at least one of the layers crossed is enabeld.
|
||||||
if( aView->IsLayerVisible( LAYER_VIAS ) )
|
if( aView->IsLayerVisible( LAYER_VIAS ) )
|
||||||
{
|
{
|
||||||
if( !onVisibleLayer && m_ViaType != VIATYPE::THROUGH )
|
if( !onVisibleLayer && m_viaType != VIATYPE::THROUGH )
|
||||||
return HIDE;
|
return HIDE;
|
||||||
|
|
||||||
return aView->IsLayerVisible( LAYER_VIAS ) ? 0.0 : HIDE;
|
return aView->IsLayerVisible( LAYER_VIAS ) ? 0.0 : HIDE;
|
||||||
|
|
|
@ -370,19 +370,19 @@ public:
|
||||||
|
|
||||||
for( const KICAD_T* p = aScanTypes; *p != EOT; ++p )
|
for( const KICAD_T* p = aScanTypes; *p != EOT; ++p )
|
||||||
{
|
{
|
||||||
if( *p == PCB_LOCATE_STDVIA_T && m_ViaType == VIATYPE::THROUGH )
|
if( *p == PCB_LOCATE_STDVIA_T && m_viaType == VIATYPE::THROUGH )
|
||||||
return true;
|
return true;
|
||||||
else if( *p == PCB_LOCATE_UVIA_T && m_ViaType == VIATYPE::MICROVIA )
|
else if( *p == PCB_LOCATE_UVIA_T && m_viaType == VIATYPE::MICROVIA )
|
||||||
return true;
|
return true;
|
||||||
else if( *p == PCB_LOCATE_BBVIA_T && m_ViaType == VIATYPE::BLIND_BURIED )
|
else if( *p == PCB_LOCATE_BBVIA_T && m_viaType == VIATYPE::BLIND_BURIED )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
VIATYPE GetViaType() const { return m_ViaType; }
|
VIATYPE GetViaType() const { return m_viaType; }
|
||||||
void SetViaType( VIATYPE aViaType ) { m_ViaType = aViaType; }
|
void SetViaType( VIATYPE aViaType ) { m_viaType = aViaType; }
|
||||||
|
|
||||||
bool IsOnLayer( PCB_LAYER_ID aLayer ) const override;
|
bool IsOnLayer( PCB_LAYER_ID aLayer ) const override;
|
||||||
|
|
||||||
|
@ -391,8 +391,7 @@ public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function SetLayerPair
|
* Function SetLayerPair
|
||||||
* For a via m_Layer contains the top layer, the other layer is in
|
* For a via m_layer contains the top layer, the other layer is in m_bottomLayer
|
||||||
* m_BottomLayer
|
|
||||||
* @param aTopLayer = first layer connected by the via
|
* @param aTopLayer = first layer connected by the via
|
||||||
* @param aBottomLayer = last layer connected by the via
|
* @param aBottomLayer = last layer connected by the via
|
||||||
*/
|
*/
|
||||||
|
@ -455,14 +454,14 @@ public:
|
||||||
* Sets the unconnected removal property. If true, the copper is removed on zone fill
|
* Sets the unconnected removal property. If true, the copper is removed on zone fill
|
||||||
* or when specifically requested when the via is not connected on a layer.
|
* or when specifically requested when the via is not connected on a layer.
|
||||||
*/
|
*/
|
||||||
void SetRemoveUnconnected( bool aSet ) { m_RemoveUnconnectedLayer = aSet; }
|
void SetRemoveUnconnected( bool aSet ) { m_removeUnconnectedLayer = aSet; }
|
||||||
bool GetRemoveUnconnected() const { return m_RemoveUnconnectedLayer; }
|
bool GetRemoveUnconnected() const { return m_removeUnconnectedLayer; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets whether we keep the top and bottom connections even if they are not connected
|
* Sets whether we keep the top and bottom connections even if they are not connected
|
||||||
*/
|
*/
|
||||||
void SetKeepTopBottom( bool aSet ) { m_KeepTopBottomLayer = aSet; }
|
void SetKeepTopBottom( bool aSet ) { m_keepTopBottomLayer = aSet; }
|
||||||
bool GetKeepTopBottom() const { return m_KeepTopBottomLayer; }
|
bool GetKeepTopBottom() const { return m_keepTopBottomLayer; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks to see whether the via should have a pad on the specific layer
|
* Checks to see whether the via should have a pad on the specific layer
|
||||||
|
@ -483,14 +482,14 @@ public:
|
||||||
* sets the drill value for vias.
|
* sets the drill value for vias.
|
||||||
* @param aDrill is the new drill diameter
|
* @param aDrill is the new drill diameter
|
||||||
*/
|
*/
|
||||||
void SetDrill( int aDrill ) { m_Drill = aDrill; }
|
void SetDrill( int aDrill ) { m_drill = aDrill; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function GetDrill
|
* Function GetDrill
|
||||||
* returns the local drill setting for this VIA. If you want the calculated value,
|
* returns the local drill setting for this VIA. If you want the calculated value,
|
||||||
* use GetDrillValue() instead.
|
* use GetDrillValue() instead.
|
||||||
*/
|
*/
|
||||||
int GetDrill() const { return m_Drill; }
|
int GetDrill() const { return m_drill; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function GetDrillValue
|
* Function GetDrillValue
|
||||||
|
@ -504,32 +503,32 @@ public:
|
||||||
* Function SetDrillDefault
|
* Function SetDrillDefault
|
||||||
* sets the drill value for vias to the default value #UNDEFINED_DRILL_DIAMETER.
|
* sets the drill value for vias to the default value #UNDEFINED_DRILL_DIAMETER.
|
||||||
*/
|
*/
|
||||||
void SetDrillDefault() { m_Drill = UNDEFINED_DRILL_DIAMETER; }
|
void SetDrillDefault() { m_drill = UNDEFINED_DRILL_DIAMETER; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function IsDrillDefault
|
* Function IsDrillDefault
|
||||||
* @return true if the drill value is default value (-1)
|
* @return true if the drill value is default value (-1)
|
||||||
*/
|
*/
|
||||||
bool IsDrillDefault() const { return m_Drill <= 0; }
|
bool IsDrillDefault() const { return m_drill <= 0; }
|
||||||
|
|
||||||
virtual void SwapData( BOARD_ITEM* aImage ) override;
|
void SwapData( BOARD_ITEM* aImage ) override;
|
||||||
|
|
||||||
// @copydoc BOARD_ITEM::GetEffectiveShape
|
// @copydoc BOARD_ITEM::GetEffectiveShape
|
||||||
virtual std::shared_ptr<SHAPE> GetEffectiveShape( PCB_LAYER_ID aLayer = UNDEFINED_LAYER ) const override;
|
std::shared_ptr<SHAPE> GetEffectiveShape( PCB_LAYER_ID aLayer = UNDEFINED_LAYER ) const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxString LayerMaskDescribe() const override;
|
wxString LayerMaskDescribe() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// The bottom layer of the via (the top layer is in m_Layer)
|
/// The bottom layer of the via (the top layer is in m_layer)
|
||||||
PCB_LAYER_ID m_BottomLayer;
|
PCB_LAYER_ID m_bottomLayer;
|
||||||
|
|
||||||
VIATYPE m_ViaType; // Type of via
|
VIATYPE m_viaType; ///< through, blind/buried or micro
|
||||||
|
|
||||||
int m_Drill; // for vias: via drill (- 1 for default value)
|
int m_drill; ///< for vias: via drill (- 1 for default value)
|
||||||
|
|
||||||
bool m_RemoveUnconnectedLayer; ///< Remove unconnected copper on a via
|
bool m_removeUnconnectedLayer; ///< Remove unconnected copper on a via
|
||||||
bool m_KeepTopBottomLayer; ///< Keep the top and bottom annular rings
|
bool m_keepTopBottomLayer; ///< Keep the top and bottom annular rings
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -235,7 +235,7 @@ void ZONE::SetLayer( PCB_LAYER_ID aLayer )
|
||||||
{
|
{
|
||||||
SetLayerSet( LSET( aLayer ) );
|
SetLayerSet( LSET( aLayer ) );
|
||||||
|
|
||||||
m_Layer = aLayer;
|
m_layer = aLayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -277,10 +277,10 @@ void ZONE::SetLayerSet( LSET aLayerSet )
|
||||||
// Set the single layer parameter. For zones that can be on many layers, this parameter
|
// Set the single layer parameter. For zones that can be on many layers, this parameter
|
||||||
// is arbitrary at best, but some code still uses it.
|
// is arbitrary at best, but some code still uses it.
|
||||||
// Priority is F_Cu then B_Cu then to the first selected layer
|
// Priority is F_Cu then B_Cu then to the first selected layer
|
||||||
m_Layer = aLayerSet.Seq()[0];
|
m_layer = aLayerSet.Seq()[0];
|
||||||
|
|
||||||
if( m_Layer != F_Cu && aLayerSet[B_Cu] )
|
if( m_layer != F_Cu && aLayerSet[B_Cu] )
|
||||||
m_Layer = B_Cu;
|
m_layer = B_Cu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -634,7 +634,7 @@ void ZONE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>&
|
||||||
msg.Printf( wxT( "%d" ), (int) m_borderHatchLines.size() );
|
msg.Printf( wxT( "%d" ), (int) m_borderHatchLines.size() );
|
||||||
aList.emplace_back( MSG_PANEL_ITEM( _( "HatchBorder Lines" ), msg, BLUE ) );
|
aList.emplace_back( MSG_PANEL_ITEM( _( "HatchBorder Lines" ), msg, BLUE ) );
|
||||||
|
|
||||||
PCB_LAYER_ID layer = m_Layer;
|
PCB_LAYER_ID layer = m_layer;
|
||||||
|
|
||||||
// NOTE: This brings in dependence on PCB_EDIT_FRAME to the qa tests, which isn't ideal.
|
// NOTE: This brings in dependence on PCB_EDIT_FRAME to the qa tests, which isn't ideal.
|
||||||
// TODO: Figure out a way for items to know the active layer without the whole edit frame?
|
// TODO: Figure out a way for items to know the active layer without the whole edit frame?
|
||||||
|
|
Loading…
Reference in New Issue