33#include <wx/filename.h>
54 pad->SetNumber( wxS(
"1" ) );
82 for(
FORMAT format : { FORMAT::ASCII, FORMAT::CSV } )
84 for( FILTER
filter : { FILTER::SMD_ONLY, FILTER::EXCLUDE_TH, FILTER::EXCLUDE_DNP,
85 FILTER::EXCLUDE_BOM } )
108 wxFileName tmpFile( tmpDir.
PathStr(), wxS(
"pnp.gbr" ) );
113 [&](
bool aExcludeDNP,
bool aExcludeBOM ) -> wxString
118 BOOST_REQUIRE_GE( count, 0 );
120 wxFFile file( tmpFile.GetFullPath() );
128 wxString unfiltered = generate(
false,
false );
130 BOOST_CHECK( unfiltered.Contains( wxS(
"R1" ) ) );
131 BOOST_CHECK( unfiltered.Contains( wxS(
"R2" ) ) );
132 BOOST_CHECK( unfiltered.Contains( wxS(
"R3" ) ) );
133 BOOST_CHECK( !unfiltered.Contains( wxS(
"R4" ) ) );
135 wxString filtered = generate(
true,
true );
137 BOOST_CHECK( filtered.Contains( wxS(
"R1" ) ) );
138 BOOST_CHECK( !filtered.Contains( wxS(
"R2" ) ) );
139 BOOST_CHECK( !filtered.Contains( wxS(
"R3" ) ) );
140 BOOST_CHECK( !filtered.Contains( wxS(
"R4" ) ) );
constexpr EDA_IU_SCALE pcbIUScale
Information pertinent to a Pcbnew printed circuit board.
FILTER
The footprint selection filters that may be applied while generating position data.
static bool FormatSupportsFilter(FORMAT aFormat, FILTER aFilter)
wxString PathStr() const
Get the path to the temporary directory as a wxString.
LSET is a set of PCB_LAYER_IDs.
@ NORMAL
Shape is the same on all layers.
static constexpr PCB_LAYER_ID ALL_LAYERS
! The layer identifier to use for the single defintion on normal padstacks
Used to create Gerber drill files.
int CreatePlaceFile(const wxString &aFullFilename, PCB_LAYER_ID aLayer, bool aIncludeBrdEdges, bool aExcludeDNP, bool aExcludeBOM)
Create an pnp gerber file.
Classes used in place file generation.
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(GerberFormatSupportsPopulationFilters)
The format capability table drives the dialog's checkbox enable state.
static FOOTPRINT * addFootprint(BOARD &aBoard, const wxString &aReference)
VECTOR2< int32_t > VECTOR2I