KiCad PCB EDA Suite
Loading...
Searching...
No Matches
symbol_checker.cpp File Reference
#include <vector>
#include <eda_draw_frame.h>
#include <lib_symbol.h>
#include <sch_shape.h>
#include <macros.h>

Go to the source code of this file.

Functions

static bool sort_by_pin_number (const SCH_PIN *ref, const SCH_PIN *tst)
 
static void CheckLibSymbolGraphics (LIB_SYMBOL *aSymbol, std::vector< wxString > &aMessages, UNITS_PROVIDER *aUnitsProvider)
 
void CheckDuplicatePins (LIB_SYMBOL *aSymbol, std::vector< wxString > &aMessages, UNITS_PROVIDER *aUnitsProvider)
 
void CheckLibSymbol (LIB_SYMBOL *aSymbol, std::vector< wxString > &aMessages, int aGridForPins, UNITS_PROVIDER *aUnitsProvider)
 Check a lib symbol to find incorrect settings Pins not on a valid grid Pins duplicated Conflict with pins at same location Incorrect Power Symbols illegal reference prefix (cannot ends by a digit or a '?')
 

Function Documentation

◆ CheckDuplicatePins()

void CheckDuplicatePins ( LIB_SYMBOL aSymbol,
std::vector< wxString > &  aMessages,
UNITS_PROVIDER aUnitsProvider 
)

◆ CheckLibSymbol()

void CheckLibSymbol ( LIB_SYMBOL aSymbol,
std::vector< wxString > &  aMessages,
int  aGridForPins,
UNITS_PROVIDER aUnitsProvider 
)

Check a lib symbol to find incorrect settings Pins not on a valid grid Pins duplicated Conflict with pins at same location Incorrect Power Symbols illegal reference prefix (cannot ends by a digit or a '?')

Parameters
aSymbolis the library symbol to check
aMessagesis a room to store error messages
aGridForPins(in IU) is the grid to test pin positions ( >= 25 mils ) should be 25, 50 or 100 mils (convered to IUs)
aUnitsProvidera frame to format coordinates in messages

Definition at line 159 of file symbol_checker.cpp.

References _, CheckDuplicatePins(), CheckLibSymbolGraphics(), SCH_ITEM::GetBodyStyleDescription(), LIB_SYMBOL::GetPins(), LIB_SYMBOL::GetReferenceField(), EDA_TEXT::GetText(), LIB_SYMBOL::GetUnitCount(), LIB_SYMBOL::HasAlternateBodyStyle(), LIB_SYMBOL::IsPower(), UNITS_PROVIDER::MessageTextFromValue(), EDA_IU_SCALE::MilsToIU(), pin, PT_POWER_IN, PT_POWER_OUT, schIUScale, and sort_by_pin_number().

Referenced by EE_INSPECTION_TOOL::CheckSymbol().

◆ CheckLibSymbolGraphics()

◆ sort_by_pin_number()

bool sort_by_pin_number ( const SCH_PIN ref,
const SCH_PIN tst 
)
static