38std::unique_ptr<FOOTPRINT> loadFootprint(
const std::string& aPath )
54 const std::string
path =
"plugins/cadstar/lib/footprint-with-thermal-pad.pretty/CP_32_7.kicad_mod";
56 std::unique_ptr<FOOTPRINT> before = loadFootprint(
path );
57 std::unique_ptr<FOOTPRINT> after = loadFootprint(
path );
63 for(
PAD*
pad : aFootprint.Pads() )
65 if( !
pad->GetPrimitives(
F_Cu ).empty() )
72 PAD* padBefore = customPad( *before );
73 PAD* padAfter = customPad( *after );
86 const std::string
path =
"../downgrade/golden/current/metadata.pretty/metadata.kicad_mod";
88 std::unique_ptr<FOOTPRINT> before = loadFootprint(
path );
89 std::unique_ptr<FOOTPRINT> after = loadFootprint(
path );
95 for(
BOARD_ITEM* item : aFootprint.GraphicalItems() )
118 const std::string
path =
"plugins/altium/pcblib/Tracks.pretty/KEEPOUT.kicad_mod";
120 std::unique_ptr<FOOTPRINT> before = loadFootprint(
path );
121 std::unique_ptr<FOOTPRINT> after = loadFootprint(
path );
123 BOOST_REQUIRE( before && after && !before->Zones().empty() && !after->Zones().empty() );
125 ZONE* zoneBefore = before->Zones().front();
126 ZONE* zoneAfter = after->Zones().front();
138 const std::string
path =
"plugins/cadstar/lib/footprint-with-thermal-pad.pretty/CP_32_7.kicad_mod";
140 std::unique_ptr<FOOTPRINT> before = loadFootprint(
path );
141 std::unique_ptr<FOOTPRINT> after = loadFootprint(
path );
146 after->Pads().front()->SetNumber( after->Pads().front()->GetNumber() + wxS(
"0" ) );
General utilities for PCB file IO for QA programs.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
const VECTOR2I & GetEnd() const
Return the ending point of the graphic.
LSET is a set of PCB_LAYER_IDs.
bool Contains(PCB_LAYER_ID aLayer) const
See if the layer set contains a PCB layer.
const std::vector< std::shared_ptr< PCB_SHAPE > > & GetPrimitives(PCB_LAYER_ID aLayer) const
Accessor to the basic shape list for custom-shaped pads.
A PCB_IO derivation for saving and loading Pcbnew s-expression formatted files.
std::unique_ptr< FOOTPRINT > ImportFootprint(const wxString &aFootprintPath, wxString &aFootprintNameOut, const std::map< std::string, UTF8 > *aProperties=nullptr) override
Load a single footprint from aFootprintPath and put its name in aFootprintNameOut.
void SetEnd(const VECTOR2I &aEnd) override
Handle a list of polygons defining a copper zone.
void SetLayerSet(const LSET &aLayerSet) override
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
std::string GetPcbnewTestDataDir()
Utility which returns a path to the data directory where the test board files are stored.
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_CHECK(res.column_datatype(0)==SQL_NUMERIC||res.column_datatype(0)==SQL_DECIMAL)
BOOST_REQUIRE(res.columns()==1)
BOOST_AUTO_TEST_SUITE_END()
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer
VECTOR2< int32_t > VECTOR2I