2007-12-10 05:42:42 +00:00
|
|
|
/*
|
2011-09-30 18:15:37 +00:00
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
2007-12-10 05:42:42 +00:00
|
|
|
*
|
|
|
|
* Copyright (C) 2007 Dick Hollenbeck, dick@softplc.com
|
2011-09-30 18:15:37 +00:00
|
|
|
* Copyright (C) 2007 KiCad Developers, see change_log.txt for contributors.
|
2007-12-10 05:42:42 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
2008-05-05 19:54:21 +00:00
|
|
|
|
2007-12-09 12:59:06 +00:00
|
|
|
/*************************************************/
|
|
|
|
/* class_drc_item.cpp - DRC_ITEM class functions */
|
|
|
|
/*************************************************/
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <fctsys.h>
|
|
|
|
#include <common.h>
|
2007-12-09 12:59:06 +00:00
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <pcbnew.h>
|
|
|
|
#include <drc_stuff.h>
|
|
|
|
#include <class_drc_item.h>
|
2012-04-27 14:15:11 +00:00
|
|
|
#include <base_units.h>
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2007-12-09 12:59:06 +00:00
|
|
|
|
|
|
|
wxString DRC_ITEM::GetErrorText() const
|
|
|
|
{
|
|
|
|
switch( m_ErrorCode )
|
|
|
|
{
|
|
|
|
case DRCE_UNCONNECTED_PADS:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Unconnected pads" ) );
|
2007-12-09 12:59:06 +00:00
|
|
|
case DRCE_TRACK_NEAR_THROUGH_HOLE:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Track near thru-hole" ) );
|
2007-12-09 12:59:06 +00:00
|
|
|
case DRCE_TRACK_NEAR_PAD:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Track near pad" ) );
|
2007-12-09 12:59:06 +00:00
|
|
|
case DRCE_TRACK_NEAR_VIA:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Track near via" ) );
|
2007-12-09 12:59:06 +00:00
|
|
|
case DRCE_VIA_NEAR_VIA:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Via near via" ) );
|
2007-12-09 12:59:06 +00:00
|
|
|
case DRCE_VIA_NEAR_TRACK:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Via near track" ) );
|
2007-12-09 12:59:06 +00:00
|
|
|
case DRCE_TRACK_ENDS1:
|
|
|
|
case DRCE_TRACK_ENDS2:
|
|
|
|
case DRCE_TRACK_ENDS3:
|
|
|
|
case DRCE_TRACK_ENDS4:
|
2008-05-05 19:54:21 +00:00
|
|
|
case DRCE_ENDS_PROBLEM1:
|
2007-12-09 12:59:06 +00:00
|
|
|
case DRCE_ENDS_PROBLEM2:
|
|
|
|
case DRCE_ENDS_PROBLEM3:
|
|
|
|
case DRCE_ENDS_PROBLEM4:
|
|
|
|
case DRCE_ENDS_PROBLEM5:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Two track ends too close" ) );
|
2013-09-11 15:30:21 +00:00
|
|
|
case DRCE_TRACK_SEGMENTS_TOO_CLOSE:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Two parallel track segments too close" ) );
|
2007-12-09 12:59:06 +00:00
|
|
|
case DRCE_TRACKS_CROSSING:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Tracks crossing" ) );
|
2007-12-09 12:59:06 +00:00
|
|
|
case DRCE_PAD_NEAR_PAD1:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Pad near pad" ) );
|
2007-12-09 12:59:06 +00:00
|
|
|
case DRCE_VIA_HOLE_BIGGER:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Via hole > diameter" ) );
|
2008-01-12 20:31:56 +00:00
|
|
|
case DRCE_MICRO_VIA_INCORRECT_LAYER_PAIR:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Micro Via: incorrect layer pairs (not adjacent)" ) );
|
2008-01-10 20:53:41 +00:00
|
|
|
case COPPERAREA_INSIDE_COPPERAREA:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Copper area inside copper area" ) );
|
2008-01-10 20:53:41 +00:00
|
|
|
case COPPERAREA_CLOSE_TO_COPPERAREA:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Copper areas intersect or are too close" ) );
|
2008-05-05 19:54:21 +00:00
|
|
|
case DRCE_NON_EXISTANT_NET_FOR_ZONE_OUTLINE:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Copper area has a nonexistent net name" ) );
|
2009-03-23 19:54:15 +00:00
|
|
|
case DRCE_HOLE_NEAR_PAD:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Hole near pad" ) );
|
2009-03-23 19:54:15 +00:00
|
|
|
case DRCE_HOLE_NEAR_TRACK:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Hole near track" ) );
|
2009-06-18 13:30:52 +00:00
|
|
|
case DRCE_TOO_SMALL_TRACK_WIDTH:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Too small track width" ) );
|
2009-06-18 13:30:52 +00:00
|
|
|
case DRCE_TOO_SMALL_VIA:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Too small via size" ) );
|
2009-06-18 13:30:52 +00:00
|
|
|
case DRCE_TOO_SMALL_MICROVIA:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Too small micro via size" ) );
|
2008-05-05 19:54:21 +00:00
|
|
|
|
2009-09-10 15:22:26 +00:00
|
|
|
// use < since this is text ultimately embedded in HTML
|
|
|
|
case DRCE_NETCLASS_TRACKWIDTH:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "NetClass Track Width < global limit" ) );
|
2009-09-10 15:22:26 +00:00
|
|
|
case DRCE_NETCLASS_CLEARANCE:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "NetClass Clearance < global limit" ) );
|
2009-09-10 15:22:26 +00:00
|
|
|
case DRCE_NETCLASS_VIASIZE:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "NetClass Via Dia < global limit" ) );
|
2009-09-10 15:22:26 +00:00
|
|
|
case DRCE_NETCLASS_VIADRILLSIZE:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "NetClass Via Drill < global limit" ) );
|
2009-09-10 15:22:26 +00:00
|
|
|
case DRCE_NETCLASS_uVIASIZE:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "NetClass uVia Dia < global limit" ) );
|
2009-09-10 15:22:26 +00:00
|
|
|
case DRCE_NETCLASS_uVIADRILLSIZE:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "NetClass uVia Drill < global limit" ) );
|
2008-05-05 19:54:21 +00:00
|
|
|
|
2012-07-13 18:55:29 +00:00
|
|
|
case DRCE_VIA_INSIDE_KEEPOUT:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Via inside a keepout area" ) );
|
2012-07-13 18:55:29 +00:00
|
|
|
|
|
|
|
case DRCE_TRACK_INSIDE_KEEPOUT:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Track inside a keepout area" ) );
|
2012-07-13 18:55:29 +00:00
|
|
|
|
|
|
|
case DRCE_PAD_INSIDE_KEEPOUT:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Pad inside a keepout area" ) );
|
2012-07-13 18:55:29 +00:00
|
|
|
|
2014-08-13 15:47:02 +00:00
|
|
|
case DRCE_VIA_INSIDE_TEXT:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Via inside a text" ) );
|
2014-08-13 15:47:02 +00:00
|
|
|
|
|
|
|
case DRCE_TRACK_INSIDE_TEXT:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Track inside a text" ) );
|
2014-08-13 15:47:02 +00:00
|
|
|
|
|
|
|
case DRCE_PAD_INSIDE_TEXT:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString( _( "Pad inside a text" ) );
|
2014-08-13 15:47:02 +00:00
|
|
|
|
2007-12-09 12:59:06 +00:00
|
|
|
default:
|
2014-08-13 19:26:31 +00:00
|
|
|
return wxString::Format( wxT( "Unknown DRC error code %d" ), m_ErrorCode );
|
2007-12-09 12:59:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString DRC_ITEM::ShowCoord( const wxPoint& aPos )
|
|
|
|
{
|
|
|
|
wxString ret;
|
|
|
|
|
2008-05-05 19:54:21 +00:00
|
|
|
ret << aPos;
|
2007-12-09 12:59:06 +00:00
|
|
|
return ret;
|
|
|
|
}
|