wxString LayerMaskDescribe( const BOARD *aBoard, LSET aMask ) { // Try the single or no- layer case (easy) PCB_LAYER_ID layer = aMask.ExtractLayer(); switch( (int) layer ) { case UNSELECTED_LAYER: return _( "No layers" ); case UNDEFINED_LAYER: break; default: return aBoard->GetLayerName( layer ); } // Try to be smart and useful, starting with outer copper // (which are more important than internal ones) wxString layerInfo; if( aMask[F_Cu] ) AccumulateDescription( layerInfo, aBoard->GetLayerName( F_Cu ) ); if( aMask[B_Cu] ) AccumulateDescription( layerInfo, aBoard->GetLayerName( B_Cu ) ); if( ( aMask & LSET::InternalCuMask() ).any() ) AccumulateDescription( layerInfo, _("Internal" ) ); if( ( aMask & LSET::AllNonCuMask() ).any() ) AccumulateDescription( layerInfo, _("Non-copper" ) ); return layerInfo; }
void ZONE_CONTAINER::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) { wxString msg; msg = _( "Zone Outline" ); // Display Cutout instead of Outline for holes inside a zone // i.e. when num contour !=0 int ncont = m_Poly->GetContour( m_CornerSelection ); if( ncont ) msg << wxT( " " ) << _( "(Cutout)" ); aList.push_back( MSG_PANEL_ITEM( _( "Type" ), msg, DARKCYAN ) ); if( GetIsKeepout() ) { msg.Empty(); if( GetDoNotAllowVias() ) AccumulateDescription( msg, _("No via") ); if( GetDoNotAllowTracks() ) AccumulateDescription( msg, _("No track") ); if( GetDoNotAllowCopperPour() ) AccumulateDescription( msg, _("No copper pour") ); aList.push_back( MSG_PANEL_ITEM( _( "Keepout" ), msg, RED ) ); } else if( IsOnCopperLayer() ) { if( GetNetCode() >= 0 ) { NETINFO_ITEM* equipot = GetNet(); if( equipot ) msg = equipot->GetNetname(); else msg = wxT( "<noname>" ); } else // a netcode < 0 is an error { msg = wxT( " [" ); msg << GetNetname() + wxT( "]" ); msg << wxT( " <" ) << _( "Not Found" ) << wxT( ">" ); } aList.push_back( MSG_PANEL_ITEM( _( "NetName" ), msg, RED ) ); #if 1 // Display net code : (useful in test or debug) msg.Printf( wxT( "%d" ), GetNetCode() ); aList.push_back( MSG_PANEL_ITEM( _( "NetCode" ), msg, RED ) ); #endif // Display priority level msg.Printf( wxT( "%d" ), GetPriority() ); aList.push_back( MSG_PANEL_ITEM( _( "Priority" ), msg, BLUE ) ); } else { aList.push_back( MSG_PANEL_ITEM( _( "Non Copper Zone" ), wxEmptyString, RED ) ); } aList.push_back( MSG_PANEL_ITEM( _( "Layer" ), GetLayerName(), BROWN ) ); msg.Printf( wxT( "%d" ), (int) m_Poly->m_CornersList.GetCornersCount() ); aList.push_back( MSG_PANEL_ITEM( _( "Corners" ), msg, BLUE ) ); if( m_FillMode ) msg = _( "Segments" ); else msg = _( "Polygons" ); aList.push_back( MSG_PANEL_ITEM( _( "Fill mode" ), msg, BROWN ) ); // Useful for statistics : msg.Printf( wxT( "%d" ), (int) m_Poly->m_HatchLines.size() ); aList.push_back( MSG_PANEL_ITEM( _( "Hatch lines" ), msg, BLUE ) ); if( m_FilledPolysList.GetCornersCount() ) { msg.Printf( wxT( "%d" ), (int) m_FilledPolysList.GetCornersCount() ); aList.push_back( MSG_PANEL_ITEM( _( "Corners in DrawList" ), msg, BLUE ) ); } }