|
KiCad PCB EDA Suite
|
#include <test_diptrace_sch_import_fixture.h>
Classes | |
| struct | DCH_XML_COUNTS |
Public Member Functions | |
| DIPTRACE_SCH_IMPORT_FIXTURE () | |
| std::string | GetTestDataDir () |
| std::string | GetViewerExamplesDir () |
| int | CountItemsOfType (KICAD_T aType) |
| int | CountImportedScreens () |
| int | MaxPinCountForRefdes (const wxString &aRefdes) |
| wxString | GetFootprintForRefdes (const wxString &aRefdes) |
| wxString | GetSheetNameForRefdes (const wxString &aRefdes) |
| Return the DipTrace sheet name carrying the symbol with the given reference, or empty. | |
| void | PinOrientationCounts (const wxString &aRefdes, int &aLeft, int &aRight, int &aUp, int &aDown) |
| Count the pin orientations of the first symbol matching the reference designator, read from its embedded library symbol so the placed orientation is what is inspected. | |
| bool | HasLabelOnSheet (const wxString &aText, const wxString &aSheetName) |
| True when a global label whose text matches exists on the sheet with the given name. | |
| bool | HasLabelStartingWithOnSheet (const wxString &aPrefix, const wxString &aSheetName) |
| True when any global label on the named sheet has text beginning with the given prefix. | |
| int | CountLinesOnSheet (const wxString &aSheetName) |
| Count SCH_LINE items on the DipTrace sheet with the given name. | |
| int | RefValueFieldSeparation (const wxString &aRefdes) |
| Distance between the reference and value field positions of the first symbol matching the reference designator, or -1 when the symbol or a field is missing. | |
| wxString | GetFieldValueForRefdes (const wxString &aRefdes, const wxString &aFieldName) |
| The text of a named field on the first symbol matching the reference designator, or an empty string when the symbol or field is absent. | |
| double | ValueFieldAngleDegrees (const wxString &aRefdes) |
| The value-field text angle in degrees for the first symbol matching the reference designator, or -1 when the symbol is absent. | |
| int | ShowsPinNames (const wxString &aRefdes) |
| Whether the embedded library symbol of the first matching reference shows its pin names. | |
| int | CountSymbolShapes (const wxString &aRefdes, SHAPE_T aShapeType) |
| Count the library-symbol graphic shapes of a given type for the first matching reference. | |
| int | CountSymbolsForRefdesOnSheet (const wxString &aRefdes, const wxString &aSheetName) |
| int | CountSheetGraphicLines (const wxString &aSheetName, const VECTOR2I &aStart, const VECTOR2I &aEnd, int aWidth) |
| int | CountFilledPolysForRefdes (const wxString &aRefdes) |
| int | CountOpenPolysWithPointCountForRefdes (const wxString &aRefdes, int aPointCount) |
| std::vector< int > | UnitsForRefdesOnSheet (const wxString &aRefdes, const wxString &aSheetName) |
| Return the units of all symbols matching the resolved reference on the named sheet. | |
| int | UnitCountForRefdes (const wxString &aRefdes) |
| Return the unit count of the first library symbol matching the resolved reference. | |
| int | LibPinCountForRefdesUnitOnSheet (const wxString &aRefdes, const wxString &aSheetName, int aUnit) |
| Return the placed symbol's resolved library pin count for a specific unit on a sheet. | |
| std::set< wxString > | LibPinNamesForRefdesUnitOnSheet (const wxString &aRefdes, const wxString &aSheetName, int aUnit) |
| Return the library pin names for a specific placed unit on a sheet. | |
| int | CountJunctionsOnSheet (const wxString &aSheetName) |
| Count junctions on the sheet with the given name. | |
| VECTOR2I | FieldPosForRefdes (const wxString &aRefdes, FIELD_T aFieldType) |
| The position of a field (by type) of the first symbol matching the reference, or a sentinel far-away point when absent. | |
| int | FieldHorizJustify (const wxString &aRefdes, FIELD_T aFieldType) |
| The horizontal justification of a field (by type) of the first matching reference, as the raw enum int, or 99 when absent. | |
| int | CountLabelsOnSheet (const wxString &aText, const wxString &aSheetName) |
| Count global labels whose text matches exactly on the sheet with the given name. | |
| bool | LabelConnectsToWireOnSheet (const wxString &aPrefix, const wxString &aSheetName) |
| True when a global label whose text starts with the prefix sits on a wire endpoint on the named sheet. | |
| bool | LoadDchXmlCounts (const std::string &aXmlPath, DCH_XML_COUNTS &aCounts) |
| SCH_SHEET * | LoadDipTraceSchematic (const std::string &aFilePath) |
| void | RemoveGeneratedLibrary (const std::string &aFilePath) |
Static Public Member Functions | |
| static int | DipTraceMmToSchIU (double aMm) |
| static VECTOR2I | DipTraceXmlSheetPointToKiCad (double aXmm, double aYmm) |
| static bool | XmlSubtreeContains (wxXmlNode *aNode, const wxString &aNeedle) |
Public Attributes | |
| SCH_IO_DIPTRACE | m_plugin |
| std::unique_ptr< SCHEMATIC > | m_schematic |
| SETTINGS_MANAGER | m_manager |
| SCH_SHEET * | m_loadedRoot = nullptr |
| DIPTRACE_COUNTING_REPORTER | m_reporter |
Definition at line 116 of file test_diptrace_sch_import_fixture.h.
|
inline |
Definition at line 118 of file test_diptrace_sch_import_fixture.h.
References m_manager, and m_schematic.
|
inline |
Definition at line 584 of file test_diptrace_sch_import_fixture.h.
References LIB_SYMBOL::GetDrawItems(), EDA_SHAPE::GetFillMode(), SCH_SYMBOL::GetLibSymbolRef(), SCH_SYMBOL::GetRef(), EDA_SHAPE::GetShape(), SCH_SCREEN::Items(), m_schematic, NO_FILL, EE_RTREE::OfType(), POLY, SCH_SHAPE_T, and SCH_SYMBOL_T.
|
inline |
Definition at line 164 of file test_diptrace_sch_import_fixture.h.
References m_schematic.
|
inline |
Definition at line 142 of file test_diptrace_sch_import_fixture.h.
References SCH_SCREEN::Items(), and m_schematic.
|
inline |
Count junctions on the sheet with the given name.
Definition at line 765 of file test_diptrace_sch_import_fixture.h.
References SCH_SCREEN::Items(), m_schematic, EE_RTREE::OfType(), and SCH_JUNCTION_T.
|
inline |
Count global labels whose text matches exactly on the sheet with the given name.
Definition at line 842 of file test_diptrace_sch_import_fixture.h.
References SCH_SCREEN::Items(), m_schematic, EE_RTREE::OfType(), and SCH_GLOBAL_LABEL_T.
|
inline |
Count SCH_LINE items on the DipTrace sheet with the given name.
Definition at line 342 of file test_diptrace_sch_import_fixture.h.
References SCH_SCREEN::Items(), m_schematic, EE_RTREE::OfType(), and SCH_LINE_T.
|
inline |
Definition at line 618 of file test_diptrace_sch_import_fixture.h.
References LIB_SYMBOL::GetDrawItems(), EDA_SHAPE::GetFillMode(), SCH_SYMBOL::GetLibSymbolRef(), EDA_SHAPE::GetPolyShape(), SCH_SYMBOL::GetRef(), EDA_SHAPE::GetShape(), SCH_SCREEN::Items(), m_schematic, NO_FILL, EE_RTREE::OfType(), POLY, SCH_SHAPE_T, SCH_SYMBOL_T, and SHAPE_POLY_SET::TotalVertices().
|
inline |
Definition at line 542 of file test_diptrace_sch_import_fixture.h.
References KIGFX::COLOR4D::b, SHAPE_POLY_SET::CVertex(), KIGFX::COLOR4D::g, STROKE_PARAMS::GetColor(), EDA_SHAPE::GetPolyShape(), EDA_SHAPE::GetShape(), SCH_SHAPE::GetStroke(), STROKE_PARAMS::GetWidth(), SCH_SCREEN::Items(), m_schematic, EE_RTREE::OfType(), POLY, KIGFX::COLOR4D::r, SCH_SHAPE_T, and SHAPE_POLY_SET::TotalVertices().
|
inline |
Definition at line 509 of file test_diptrace_sch_import_fixture.h.
References SCH_SYMBOL::GetRef(), SCH_SCREEN::Items(), m_schematic, EE_RTREE::OfType(), and SCH_SYMBOL_T.
|
inline |
Count the library-symbol graphic shapes of a given type for the first matching reference.
Definition at line 476 of file test_diptrace_sch_import_fixture.h.
References LIB_SYMBOL::GetDrawItems(), SCH_SYMBOL::GetLibSymbolRef(), SCH_SYMBOL::GetRef(), EDA_SHAPE::GetShape(), SCH_SCREEN::Items(), m_schematic, EE_RTREE::OfType(), SCH_SHAPE_T, and SCH_SYMBOL_T.
|
inlinestatic |
Definition at line 535 of file test_diptrace_sch_import_fixture.h.
Referenced by DipTraceXmlSheetPointToKiCad().
|
inlinestatic |
Definition at line 537 of file test_diptrace_sch_import_fixture.h.
References DipTraceMmToSchIU().
|
inline |
The horizontal justification of a field (by type) of the first matching reference, as the raw enum int, or 99 when absent.
Definition at line 817 of file test_diptrace_sch_import_fixture.h.
References SCH_SYMBOL::GetField(), SCH_SYMBOL::GetRef(), SCH_SCREEN::Items(), m_schematic, EE_RTREE::OfType(), and SCH_SYMBOL_T.
|
inline |
The position of a field (by type) of the first symbol matching the reference, or a sentinel far-away point when absent.
Definition at line 791 of file test_diptrace_sch_import_fixture.h.
References SCH_SYMBOL::GetField(), SCH_SYMBOL::GetPosition(), SCH_SYMBOL::GetRef(), SCH_SCREEN::Items(), m_schematic, EE_RTREE::OfType(), and SCH_SYMBOL_T.
|
inline |
The text of a named field on the first symbol matching the reference designator, or an empty string when the symbol or field is absent.
Definition at line 400 of file test_diptrace_sch_import_fixture.h.
References SCH_SYMBOL::GetField(), SCH_SYMBOL::GetRef(), SCH_FIELD::GetText(), SCH_SCREEN::Items(), m_schematic, EE_RTREE::OfType(), and SCH_SYMBOL_T.
|
inline |
Definition at line 204 of file test_diptrace_sch_import_fixture.h.
References FOOTPRINT, SCH_SYMBOL::GetField(), SCH_SYMBOL::GetRef(), SCH_FIELD::GetText(), SCH_SCREEN::Items(), m_schematic, EE_RTREE::OfType(), and SCH_SYMBOL_T.
|
inline |
Return the DipTrace sheet name carrying the symbol with the given reference, or empty.
Definition at line 229 of file test_diptrace_sch_import_fixture.h.
References SCH_SYMBOL::GetRef(), SCH_SCREEN::Items(), m_schematic, EE_RTREE::OfType(), and SCH_SYMBOL_T.
|
inline |
Definition at line 133 of file test_diptrace_sch_import_fixture.h.
References KI_TEST::GetEeschemaTestDataDir().
|
inline |
Definition at line 135 of file test_diptrace_sch_import_fixture.h.
|
inline |
True when a global label whose text matches exists on the sheet with the given name.
A net can have a port on several sheets, so membership is tested per sheet rather than returning a single owning sheet.
Definition at line 290 of file test_diptrace_sch_import_fixture.h.
References EDA_TEXT::GetText(), SCH_SCREEN::Items(), m_schematic, EE_RTREE::OfType(), and SCH_GLOBAL_LABEL_T.
|
inline |
True when any global label on the named sheet has text beginning with the given prefix.
Used to assert the importer no longer fabricates internal-net labels ("Net 36" and the like) that DipTrace itself never draws.
Definition at line 317 of file test_diptrace_sch_import_fixture.h.
References EDA_TEXT::GetText(), SCH_SCREEN::Items(), m_schematic, EE_RTREE::OfType(), and SCH_GLOBAL_LABEL_T.
|
inline |
True when a global label whose text starts with the prefix sits on a wire endpoint on the named sheet.
A net-port label must connect to its net, so its anchor coincides with a wire end rather than floating at the symbol body.
Definition at line 869 of file test_diptrace_sch_import_fixture.h.
References anchor, SCH_LINE::GetEndPoint(), SCH_TEXT::GetPosition(), SCH_LINE::GetStartPoint(), EDA_TEXT::GetText(), SCH_SCREEN::Items(), m_schematic, EE_RTREE::OfType(), SCH_GLOBAL_LABEL_T, and SCH_LINE_T.
|
inline |
Return the placed symbol's resolved library pin count for a specific unit on a sheet.
Definition at line 708 of file test_diptrace_sch_import_fixture.h.
References SCH_SYMBOL::GetLibPins(), SCH_SYMBOL::GetRef(), SCH_ITEM::GetUnit(), SCH_SCREEN::Items(), m_schematic, EE_RTREE::OfType(), and SCH_SYMBOL_T.
|
inline |
Return the library pin names for a specific placed unit on a sheet.
Definition at line 733 of file test_diptrace_sch_import_fixture.h.
References SCH_SYMBOL::GetLibPins(), SCH_SYMBOL::GetRef(), SCH_ITEM::GetUnit(), SCH_SCREEN::Items(), m_schematic, EE_RTREE::OfType(), pin, and SCH_SYMBOL_T.
|
inline |
|
inline |
Definition at line 992 of file test_diptrace_sch_import_fixture.h.
References m_loadedRoot, m_manager, m_plugin, m_reporter, m_schematic, and SCHEMATIC.
|
inline |
Definition at line 181 of file test_diptrace_sch_import_fixture.h.
References SCH_SYMBOL::GetPins(), SCH_SYMBOL::GetRef(), SCH_SCREEN::Items(), m_schematic, EE_RTREE::OfType(), and SCH_SYMBOL_T.
|
inline |
Count the pin orientations of the first symbol matching the reference designator, read from its embedded library symbol so the placed orientation is what is inspected.
Definition at line 252 of file test_diptrace_sch_import_fixture.h.
References SCH_SYMBOL::GetLibSymbolRef(), LIB_SYMBOL::GetPins(), SCH_SYMBOL::GetRef(), SCH_SCREEN::Items(), m_schematic, EE_RTREE::OfType(), pin, PIN_DOWN, PIN_LEFT, PIN_RIGHT, PIN_UP, and SCH_SYMBOL_T.
|
inline |
Distance between the reference and value field positions of the first symbol matching the reference designator, or -1 when the symbol or a field is missing.
Used to confirm the two fields are not stacked on the symbol origin.
Definition at line 369 of file test_diptrace_sch_import_fixture.h.
References SCH_SYMBOL::GetField(), SCH_FIELD::GetPosition(), SCH_SYMBOL::GetRef(), SCH_SCREEN::Items(), m_schematic, EE_RTREE::OfType(), REFERENCE, SCH_SYMBOL_T, and VALUE.
|
inline |
Definition at line 1006 of file test_diptrace_sch_import_fixture.h.
|
inline |
Whether the embedded library symbol of the first matching reference shows its pin names.
Returns -1 when the symbol is absent, otherwise 0 or 1.
Definition at line 452 of file test_diptrace_sch_import_fixture.h.
References SCH_SYMBOL::GetLibSymbolRef(), SCH_SYMBOL::GetRef(), SYMBOL::GetShowPinNames(), SCH_SCREEN::Items(), m_schematic, EE_RTREE::OfType(), and SCH_SYMBOL_T.
|
inline |
Return the unit count of the first library symbol matching the resolved reference.
Definition at line 686 of file test_diptrace_sch_import_fixture.h.
References SCH_SYMBOL::GetRef(), SCH_SYMBOL::GetUnitCount(), SCH_SCREEN::Items(), m_schematic, EE_RTREE::OfType(), and SCH_SYMBOL_T.
|
inline |
Return the units of all symbols matching the resolved reference on the named sheet.
Definition at line 658 of file test_diptrace_sch_import_fixture.h.
References SCH_SYMBOL::GetRef(), SCH_ITEM::GetUnit(), SCH_SCREEN::Items(), m_schematic, EE_RTREE::OfType(), and SCH_SYMBOL_T.
|
inline |
The value-field text angle in degrees for the first symbol matching the reference designator, or -1 when the symbol is absent.
Definition at line 426 of file test_diptrace_sch_import_fixture.h.
References EDA_ANGLE::AsDegrees(), SCH_SYMBOL::GetField(), SCH_SYMBOL::GetRef(), EDA_TEXT::GetTextAngle(), SCH_SCREEN::Items(), m_schematic, EE_RTREE::OfType(), SCH_SYMBOL_T, and VALUE.
|
inlinestatic |
Definition at line 910 of file test_diptrace_sch_import_fixture.h.
References XmlSubtreeContains().
Referenced by LoadDchXmlCounts(), and XmlSubtreeContains().
| SCH_SHEET* DIPTRACE_SCH_IMPORT_FIXTURE::m_loadedRoot = nullptr |
Definition at line 130 of file test_diptrace_sch_import_fixture.h.
Referenced by LoadDipTraceSchematic().
| SETTINGS_MANAGER DIPTRACE_SCH_IMPORT_FIXTURE::m_manager |
Definition at line 129 of file test_diptrace_sch_import_fixture.h.
Referenced by DIPTRACE_SCH_IMPORT_FIXTURE(), and LoadDipTraceSchematic().
| SCH_IO_DIPTRACE DIPTRACE_SCH_IMPORT_FIXTURE::m_plugin |
Definition at line 127 of file test_diptrace_sch_import_fixture.h.
Referenced by LoadDipTraceSchematic().
| DIPTRACE_COUNTING_REPORTER DIPTRACE_SCH_IMPORT_FIXTURE::m_reporter |
Definition at line 131 of file test_diptrace_sch_import_fixture.h.
Referenced by LoadDipTraceSchematic().
| std::unique_ptr<SCHEMATIC> DIPTRACE_SCH_IMPORT_FIXTURE::m_schematic |
Definition at line 128 of file test_diptrace_sch_import_fixture.h.
Referenced by CountFilledPolysForRefdes(), CountImportedScreens(), CountItemsOfType(), CountJunctionsOnSheet(), CountLabelsOnSheet(), CountLinesOnSheet(), CountOpenPolysWithPointCountForRefdes(), CountSheetGraphicLines(), CountSymbolsForRefdesOnSheet(), CountSymbolShapes(), DIPTRACE_SCH_IMPORT_FIXTURE(), FieldHorizJustify(), FieldPosForRefdes(), GetFieldValueForRefdes(), GetFootprintForRefdes(), GetSheetNameForRefdes(), HasLabelOnSheet(), HasLabelStartingWithOnSheet(), LabelConnectsToWireOnSheet(), LibPinCountForRefdesUnitOnSheet(), LibPinNamesForRefdesUnitOnSheet(), LoadDipTraceSchematic(), MaxPinCountForRefdes(), PinOrientationCounts(), RefValueFieldSeparation(), ShowsPinNames(), UnitCountForRefdes(), UnitsForRefdesOnSheet(), and ValueFieldAngleDegrees().