60 std::string dataPath =
63 std::unique_ptr<BOARD> board = m_fabmasterPlugin.LoadBoard( dataPath );
68 BOOST_REQUIRE_GT( board->Footprints().size(), 0 );
74 for(
const FOOTPRINT* fp : board->Footprints() )
76 totalPads += fp->Pads().size();
79 BOOST_CHECK_MESSAGE( totalPads > 0,
80 "Footprints should have pads when REFDES is empty in PIN section" );
97 std::string dataPath =
100 std::unique_ptr<BOARD> board = m_fabmasterPlugin.LoadBoard( dataPath );
105 int zonesWithNets = 0;
107 for(
ZONE* zone : board->Zones() )
109 if( zone->GetNetCode() > 0 )
116 BOOST_CHECK_MESSAGE( zonesWithNets > 0,
117 "Static shape zones with nets should be preserved" );
128 if(
pad->GetNumber() == aNumber )
147 std::string dataPath =
150 std::unique_ptr<BOARD> board = m_fabmasterPlugin.LoadBoard( dataPath );
153 BOOST_REQUIRE_GT( board->Footprints().size(), 0 );
155 const FOOTPRINT* fp = board->Footprints().front();
156 BOOST_REQUIRE_EQUAL( fp->
Pads().size(), 3 );
171 BOOST_CHECK_GT( pad1_front_size.
x, 0 );
176 BOOST_CHECK_GT( pad1_back_size.
x, 0 );
177 BOOST_CHECK_GT( pad1_back_size.
y, pad1_back_size.
x );
191 std::string dataPath =
194 std::unique_ptr<BOARD> board = m_fabmasterPlugin.LoadBoard( dataPath );
197 BOOST_REQUIRE_GT( board->Footprints().size(), 0 );
199 const FOOTPRINT* fp = board->Footprints().front();
217 std::string dataPath =
220 std::unique_ptr<BOARD> board = m_fabmasterPlugin.LoadBoard( dataPath );
223 BOOST_REQUIRE_GT( board->Footprints().size(), 0 );
225 const FOOTPRINT* fp = board->Footprints().front();
255 std::string dataPath =
258 std::unique_ptr<BOARD> board = m_fabmasterPlugin.LoadBoard( dataPath );
262 int routeKeepouts = 0;
264 int footprintKeepouts = 0;
267 for(
ZONE* zone : board->Zones() )
269 if( !zone->GetIsRuleArea() )
272 if( zone->GetDoNotAllowFootprints() && !zone->GetDoNotAllowTracks()
273 && !zone->GetDoNotAllowVias() )
277 else if( zone->GetDoNotAllowTracks() && zone->GetDoNotAllowVias()
278 && zone->GetDoNotAllowPads() && zone->GetDoNotAllowZoneFills() )
282 else if( zone->GetDoNotAllowVias() && !zone->GetDoNotAllowTracks()
283 && !zone->GetDoNotAllowFootprints() )
287 else if( !zone->GetDoNotAllowTracks() && !zone->GetDoNotAllowVias()
288 && !zone->GetDoNotAllowPads() && !zone->GetDoNotAllowFootprints()
289 && !zone->GetDoNotAllowZoneFills() )
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_EQUAL(result, "25.4")
VECTOR2< int32_t > VECTOR2I