60 std::string dataPath =
63 std::unique_ptr<BOARD> board = std::make_unique<BOARD>();
65 m_fabmasterPlugin.LoadBoard( dataPath, board.get(),
nullptr );
70 BOOST_REQUIRE_GT( board->Footprints().size(), 0 );
76 for(
const FOOTPRINT* fp : board->Footprints() )
78 totalPads += fp->Pads().size();
82 "Footprints should have pads when REFDES is empty in PIN section" );
99 std::string dataPath =
102 std::unique_ptr<BOARD> board = std::make_unique<BOARD>();
104 m_fabmasterPlugin.LoadBoard( dataPath, board.get(),
nullptr );
109 int zonesWithNets = 0;
111 for(
ZONE* zone : board->Zones() )
113 if( zone->GetNetCode() > 0 )
121 "Static shape zones with nets should be preserved" );
132 if(
pad->GetNumber() == aNumber )
151 std::string dataPath =
154 std::unique_ptr<BOARD> board = std::make_unique<BOARD>();
156 m_fabmasterPlugin.LoadBoard( dataPath, board.get(),
nullptr );
159 BOOST_REQUIRE_GT( board->Footprints().size(), 0 );
161 const FOOTPRINT* fp = board->Footprints().front();
162 BOOST_REQUIRE_EQUAL( fp->
Pads().size(), 3 );
177 BOOST_CHECK_GT( pad1_front_size.
x, 0 );
182 BOOST_CHECK_GT( pad1_back_size.
x, 0 );
183 BOOST_CHECK_GT( pad1_back_size.
y, pad1_back_size.
x );
197 std::string dataPath =
200 std::unique_ptr<BOARD> board = std::make_unique<BOARD>();
202 m_fabmasterPlugin.LoadBoard( dataPath, board.get(),
nullptr );
205 BOOST_REQUIRE_GT( board->Footprints().size(), 0 );
207 const FOOTPRINT* fp = board->Footprints().front();
225 std::string dataPath =
228 std::unique_ptr<BOARD> board = std::make_unique<BOARD>();
230 m_fabmasterPlugin.LoadBoard( dataPath, board.get(),
nullptr );
233 BOOST_REQUIRE_GT( board->Footprints().size(), 0 );
235 const FOOTPRINT* fp = board->Footprints().front();
General utilities for PCB file IO for QA programs.
@ NORMAL
Shape is the same on all layers.
@ FRONT_INNER_BACK
Up to three shapes can be defined (F_Cu, inner copper layers, B_Cu)
PAD_ATTRIB GetAttribute() const
int GetDrillSizeX() const
PAD_SHAPE GetShape(PCB_LAYER_ID aLayer) const
VECTOR2I GetSize(PCB_LAYER_ID aLayer) const
const PADSTACK & Padstack() const
Handle a list of polygons defining a copper zone.
std::string GetPcbnewTestDataDir()
Utility which returns a path to the data directory where the test board files are stored.
@ SMD
Smd pad, appears on the solder paste layer (default)
@ PTH
Plated through hole pad.
PCB_IO_FABMASTER m_fabmasterPlugin
FABMASTER_IMPORT_FIXTURE()
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
static const PAD * findPadByNumber(const FOOTPRINT *aFp, const wxString &aNumber)
Helper to find a pad by its number within a footprint.
BOOST_AUTO_TEST_CASE(EmptyRefdesInPins)
Test that footprints with pads are properly imported when the REFDES column is empty in the PIN secti...
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
BOOST_CHECK_MESSAGE(totalMismatches==0, std::to_string(totalMismatches)+" board(s) with strategy disagreements")
BOOST_CHECK_EQUAL(result, "25.4")
VECTOR2< int32_t > VECTOR2I