Pcbnew: do not display the outlines of a very special zone used by DRC
to show layer mask bridges created by DRC to show these bridges. This is not a real ZONE, just a container to displays these filled areas.
This commit is contained in:
parent
57efde1bbb
commit
38c7fa6db9
|
@ -101,6 +101,7 @@ BOARD::BOARD() :
|
||||||
// Creates a zone to show sloder mask bridges created by a min web value
|
// Creates a zone to show sloder mask bridges created by a min web value
|
||||||
// it it just to show them
|
// it it just to show them
|
||||||
m_SolderMaskBridges = new ZONE( this );
|
m_SolderMaskBridges = new ZONE( this );
|
||||||
|
m_SolderMaskBridges->SetHatchStyle( ZONE_BORDER_DISPLAY_STYLE::INVISIBLE_BORDER );
|
||||||
m_SolderMaskBridges->SetLayerSet( LSET().set( F_Mask ).set( B_Mask ) );
|
m_SolderMaskBridges->SetLayerSet( LSET().set( F_Mask ).set( B_Mask ) );
|
||||||
int infinity = ( std::numeric_limits<int>::max() / 2 ) - pcbIUScale.mmToIU( 1 );
|
int infinity = ( std::numeric_limits<int>::max() / 2 ) - pcbIUScale.mmToIU( 1 );
|
||||||
m_SolderMaskBridges->Outline()->NewOutline();
|
m_SolderMaskBridges->Outline()->NewOutline();
|
||||||
|
|
|
@ -294,6 +294,7 @@ bool DIALOG_COPPER_ZONE::TransferDataToWindow()
|
||||||
case ZONE_BORDER_DISPLAY_STYLE::NO_HATCH: m_OutlineDisplayCtrl->SetSelection( 0 ); break;
|
case ZONE_BORDER_DISPLAY_STYLE::NO_HATCH: m_OutlineDisplayCtrl->SetSelection( 0 ); break;
|
||||||
case ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_EDGE: m_OutlineDisplayCtrl->SetSelection( 1 ); break;
|
case ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_EDGE: m_OutlineDisplayCtrl->SetSelection( 1 ); break;
|
||||||
case ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_FULL: m_OutlineDisplayCtrl->SetSelection( 2 ); break;
|
case ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_FULL: m_OutlineDisplayCtrl->SetSelection( 2 ); break;
|
||||||
|
case ZONE_BORDER_DISPLAY_STYLE::INVISIBLE_BORDER: break; // Not used for standard zones
|
||||||
}
|
}
|
||||||
|
|
||||||
m_outlineHatchPitch.SetValue( m_settings.m_BorderHatchPitch );
|
m_outlineHatchPitch.SetValue( m_settings.m_BorderHatchPitch );
|
||||||
|
|
|
@ -178,6 +178,7 @@ bool DIALOG_NON_COPPER_ZONES_EDITOR::TransferDataToWindow()
|
||||||
case ZONE_BORDER_DISPLAY_STYLE::NO_HATCH: m_OutlineDisplayCtrl->SetSelection( 0 ); break;
|
case ZONE_BORDER_DISPLAY_STYLE::NO_HATCH: m_OutlineDisplayCtrl->SetSelection( 0 ); break;
|
||||||
case ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_EDGE: m_OutlineDisplayCtrl->SetSelection( 1 ); break;
|
case ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_EDGE: m_OutlineDisplayCtrl->SetSelection( 1 ); break;
|
||||||
case ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_FULL: m_OutlineDisplayCtrl->SetSelection( 2 ); break;
|
case ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_FULL: m_OutlineDisplayCtrl->SetSelection( 2 ); break;
|
||||||
|
case ZONE_BORDER_DISPLAY_STYLE::INVISIBLE_BORDER: break; // Not used for standard zones
|
||||||
}
|
}
|
||||||
|
|
||||||
m_outlineHatchPitch.SetValue( m_settings.m_BorderHatchPitch );
|
m_outlineHatchPitch.SetValue( m_settings.m_BorderHatchPitch );
|
||||||
|
|
|
@ -156,6 +156,7 @@ bool DIALOG_RULE_AREA_PROPERTIES::TransferDataToWindow()
|
||||||
|
|
||||||
switch( m_zonesettings.m_ZoneBorderDisplayStyle )
|
switch( m_zonesettings.m_ZoneBorderDisplayStyle )
|
||||||
{
|
{
|
||||||
|
case ZONE_BORDER_DISPLAY_STYLE::INVISIBLE_BORDER: // Not used for standard zones. Here use NO_HATCH
|
||||||
case ZONE_BORDER_DISPLAY_STYLE::NO_HATCH: m_OutlineDisplayCtrl->SetSelection( 0 ); break;
|
case ZONE_BORDER_DISPLAY_STYLE::NO_HATCH: m_OutlineDisplayCtrl->SetSelection( 0 ); break;
|
||||||
case ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_EDGE: m_OutlineDisplayCtrl->SetSelection( 1 ); break;
|
case ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_EDGE: m_OutlineDisplayCtrl->SetSelection( 1 ); break;
|
||||||
case ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_FULL: m_OutlineDisplayCtrl->SetSelection( 2 ); break;
|
case ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_FULL: m_OutlineDisplayCtrl->SetSelection( 2 ); break;
|
||||||
|
|
|
@ -2423,8 +2423,9 @@ void PCB_PAINTER::draw( const ZONE* aZone, int aLayer )
|
||||||
if( !IsZoneFillLayer( aLayer ) )
|
if( !IsZoneFillLayer( aLayer ) )
|
||||||
{
|
{
|
||||||
const SHAPE_POLY_SET* outline = aZone->Outline();
|
const SHAPE_POLY_SET* outline = aZone->Outline();
|
||||||
|
bool allowDrawOutline = aZone->GetHatchStyle() != ZONE_BORDER_DISPLAY_STYLE::INVISIBLE_BORDER;
|
||||||
|
|
||||||
if( !m_pcbSettings.m_isPrinting && outline && outline->OutlineCount() > 0 )
|
if( allowDrawOutline && !m_pcbSettings.m_isPrinting && outline && outline->OutlineCount() > 0 )
|
||||||
{
|
{
|
||||||
m_gal->SetStrokeColor( color.a > 0.0 ? color.WithAlpha( 1.0 ) : color );
|
m_gal->SetStrokeColor( color.a > 0.0 ? color.WithAlpha( 1.0 ) : color );
|
||||||
m_gal->SetIsFill( false );
|
m_gal->SetIsFill( false );
|
||||||
|
|
|
@ -49,7 +49,8 @@ enum class ZONE_BORDER_DISPLAY_STYLE
|
||||||
{
|
{
|
||||||
NO_HATCH,
|
NO_HATCH,
|
||||||
DIAGONAL_FULL,
|
DIAGONAL_FULL,
|
||||||
DIAGONAL_EDGE
|
DIAGONAL_EDGE,
|
||||||
|
INVISIBLE_BORDER // Disable outline drawing for very special cases
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Whether or not to remove isolated islands from a zone
|
/// Whether or not to remove isolated islands from a zone
|
||||||
|
|
Loading…
Reference in New Issue