Record layer for starved thermal exclusions.
This commit is contained in:
parent
20791c99ac
commit
3501ad1b4d
|
@ -176,7 +176,7 @@ void DRC_TEST_PROVIDER_ZONE_CONNECTIONS::testZoneLayer( ZONE* aZone, PCB_LAYER_I
|
||||||
drce->SetItems( aZone, pad );
|
drce->SetItems( aZone, pad );
|
||||||
drce->SetViolatingRule( constraint.GetParentRule() );
|
drce->SetViolatingRule( constraint.GetParentRule() );
|
||||||
|
|
||||||
reportViolation( drce, pad->GetPosition(), UNDEFINED_LAYER );
|
reportViolation( drce, pad->GetPosition(), aLayer );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -962,7 +962,7 @@ void PCB_EDIT_FRAME::RecordDRCExclusions()
|
||||||
|
|
||||||
for( PCB_MARKER* marker : GetBoard()->Markers() )
|
for( PCB_MARKER* marker : GetBoard()->Markers() )
|
||||||
{
|
{
|
||||||
if( marker->GetSeverity() == RPT_SEVERITY_EXCLUSION )
|
if( marker->IsExcluded() )
|
||||||
bds.m_DrcExclusions.insert( marker->Serialize() );
|
bds.m_DrcExclusions.insert( marker->Serialize() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,8 +94,6 @@ PCB_MARKER::~PCB_MARKER()
|
||||||
|
|
||||||
wxString PCB_MARKER::Serialize() const
|
wxString PCB_MARKER::Serialize() const
|
||||||
{
|
{
|
||||||
wxString lastItem;
|
|
||||||
|
|
||||||
if( m_rcItem->GetErrorCode() == DRCE_COPPER_SLIVER )
|
if( m_rcItem->GetErrorCode() == DRCE_COPPER_SLIVER )
|
||||||
{
|
{
|
||||||
return wxString::Format( wxT( "%s|%d|%d|%s|%s" ),
|
return wxString::Format( wxT( "%s|%d|%d|%s|%s" ),
|
||||||
|
@ -105,6 +103,16 @@ wxString PCB_MARKER::Serialize() const
|
||||||
m_rcItem->GetMainItemID().AsString(),
|
m_rcItem->GetMainItemID().AsString(),
|
||||||
LayerName( m_layer ) );
|
LayerName( m_layer ) );
|
||||||
}
|
}
|
||||||
|
else if( m_rcItem->GetErrorCode() == DRCE_STARVED_THERMAL )
|
||||||
|
{
|
||||||
|
return wxString::Format( wxT( "%s|%d|%d|%s|%s|%s" ),
|
||||||
|
m_rcItem->GetSettingsKey(),
|
||||||
|
m_Pos.x,
|
||||||
|
m_Pos.y,
|
||||||
|
m_rcItem->GetMainItemID().AsString(),
|
||||||
|
m_rcItem->GetAuxItemID().AsString(),
|
||||||
|
LayerName( m_layer ) );
|
||||||
|
}
|
||||||
else if( m_rcItem->GetErrorCode() == DRCE_UNRESOLVED_VARIABLE
|
else if( m_rcItem->GetErrorCode() == DRCE_UNRESOLVED_VARIABLE
|
||||||
&& m_rcItem->GetParent()->GetMarkerType() == MARKER_DRAWING_SHEET )
|
&& m_rcItem->GetParent()->GetMarkerType() == MARKER_DRAWING_SHEET )
|
||||||
{
|
{
|
||||||
|
@ -130,6 +138,18 @@ wxString PCB_MARKER::Serialize() const
|
||||||
|
|
||||||
PCB_MARKER* PCB_MARKER::Deserialize( const wxString& data )
|
PCB_MARKER* PCB_MARKER::Deserialize( const wxString& data )
|
||||||
{
|
{
|
||||||
|
auto getMarkerLayer =
|
||||||
|
[]( const wxString& layerName ) -> int
|
||||||
|
{
|
||||||
|
for( int layer = 0; layer < PCB_LAYER_ID_COUNT; ++layer )
|
||||||
|
{
|
||||||
|
if( LayerName( ToLAYER_ID( layer ) ) == layerName )
|
||||||
|
return layer;
|
||||||
|
}
|
||||||
|
|
||||||
|
return F_Cu;
|
||||||
|
};
|
||||||
|
|
||||||
wxArrayString props = wxSplit( data, '|' );
|
wxArrayString props = wxSplit( data, '|' );
|
||||||
int markerLayer = F_Cu;
|
int markerLayer = F_Cu;
|
||||||
VECTOR2I markerPos( (int) strtol( props[1].c_str(), nullptr, 10 ),
|
VECTOR2I markerPos( (int) strtol( props[1].c_str(), nullptr, 10 ),
|
||||||
|
@ -143,15 +163,15 @@ PCB_MARKER* PCB_MARKER::Deserialize( const wxString& data )
|
||||||
if( drcItem->GetErrorCode() == DRCE_COPPER_SLIVER )
|
if( drcItem->GetErrorCode() == DRCE_COPPER_SLIVER )
|
||||||
{
|
{
|
||||||
drcItem->SetItems( KIID( props[3] ) );
|
drcItem->SetItems( KIID( props[3] ) );
|
||||||
|
markerLayer = getMarkerLayer( props[4] );
|
||||||
|
}
|
||||||
|
else if( drcItem->GetErrorCode() == DRCE_STARVED_THERMAL )
|
||||||
|
{
|
||||||
|
drcItem->SetItems( KIID( props[3] ), KIID( props[4] ) );
|
||||||
|
|
||||||
for( int layer = 0; layer < PCB_LAYER_ID_COUNT; ++layer )
|
// Pre-7.0 versions didn't differentiate between layers
|
||||||
{
|
if( props.size() == 6 )
|
||||||
if( LayerName( ToLAYER_ID( layer ) ) == props[4] )
|
markerLayer = getMarkerLayer( props[5] );
|
||||||
{
|
|
||||||
markerLayer = layer;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if( drcItem->GetErrorCode() == DRCE_UNRESOLVED_VARIABLE
|
else if( drcItem->GetErrorCode() == DRCE_UNRESOLVED_VARIABLE
|
||||||
&& props[3].IsEmpty() && props[4].IsEmpty() )
|
&& props[3].IsEmpty() && props[4].IsEmpty() )
|
||||||
|
|
Loading…
Reference in New Issue