51#define CHECK_ENUM_CLASS_EQUAL( L, R ) \
52 BOOST_CHECK_EQUAL( static_cast<int>( L ), static_cast<int>( R ) )
78 std::unique_ptr<BOARD> testBoard = kicadPlugin.LoadBoard( dataPath +
"LayerWildcard.kicad_pcb" );
81 BOOST_CHECK( testBoard->Zones().size() == 1 );
83 ZONE* z = testBoard->Zones()[0];
93 auto tmpBoard = std::filesystem::temp_directory_path() /
"Issue19775_RoundTrip.kicad_pcb";
97 std::unique_ptr<BOARD> testBoard = kicadPlugin.LoadBoard( dataPath +
"LayerEnumerate.kicad_pcb" );
98 kicadPlugin.SaveBoard( tmpBoard.string(), *testBoard );
102 std::unique_ptr<BOARD> testBoard = kicadPlugin.LoadBoard( tmpBoard.string() );
105 BOOST_CHECK( testBoard->Zones().size() == 1 );
107 ZONE* z = testBoard->Zones()[0];
128 +
"plugins/kicad_sexpr/Issue23125_EmptyZone/";
130 std::unique_ptr<BOARD> testBoard = kicadPlugin.LoadBoard( dataPath +
"EmptyZone.kicad_pcb" );
137 ZONE* z = testBoard->Zones()[0];
154 for(
int ii = 0; ii < 2; ++ii )
166 BOOST_REQUIRE_EQUAL( board.
Drawings().size(), 2u );
168 const wxString
path =
169 ( std::filesystem::temp_directory_path() /
"qa_coincident_drawings.kicad_pcb" ).
string();
171 kicadPlugin.SaveBoard(
path, board );
173 std::unique_ptr<BOARD> reloaded = kicadPlugin.LoadBoard(
path );
178 std::filesystem::remove(
path.ToStdString() );
185 +
"plugins/kicad_sexpr/";
187 std::unique_ptr<BOARD> testBoard = kicadPlugin.LoadBoard( dataPath +
"ScientificNotation.kicad_pcb" );
210 +
"plugins/kicad_sexpr/Issue23625_CorruptedStackup/";
212 std::unique_ptr<BOARD> testBoard;
214 BOOST_CHECK_NO_THROW( testBoard = kicadPlugin.LoadBoard( dataPath +
"corrupted_stackup.kicad_pcb" ) );
217 testBoard->GetDesignSettings().GetStackupDescriptor();
222 BOOST_CHECK_LE( stackup.
GetCount(), 128 );
223 BOOST_CHECK_GT( stackup.
GetCount(), 0 );
237 +
"plugins/kicad_sexpr/Issue24133_DuplicatedStackup/";
239 std::unique_ptr<BOARD> testBoard;
241 BOOST_CHECK_NO_THROW( testBoard = kicadPlugin.LoadBoard( dataPath +
"duplicated_stackup.kicad_pcb" ) );
243 const BOARD_STACKUP& stackup = testBoard->GetDesignSettings().GetStackupDescriptor();
265 std::string destinationPath = dataPath +
"issue3812.kicad_pcb";
267 std::string sourcePath = dataPath +
"issue18142.kicad_pcb";
268 std::map<std::string, UTF8> props;
282 int copperLayerCount = 0;
290 return copperLayerCount;
304 std::unique_ptr<BOARD> testBoard = kicadPlugin.LoadBoard( destinationPath );
306 const BOARD_STACKUP& initialStackup = testBoard->GetDesignSettings().GetStackupDescriptor();
307 const BOARD_STACKUP_ITEM* initialFirstDielectric = findFirstDielectric( initialStackup );
308 const int initialCopperLayerCount = testBoard->GetCopperLayerCount();
309 const LSET initialEnabledLayers = testBoard->GetEnabledLayers();
310 const wxString initialFinishType = initialStackup.
m_FinishType;
312 BOOST_REQUIRE_EQUAL( initialCopperLayerCount, 4 );
313 BOOST_REQUIRE_EQUAL( countCopperLayers( initialStackup ), 4 );
315 BOOST_REQUIRE_EQUAL( initialFinishType, wxS(
"ENIG" ) );
316 const wxString initialFirstDielectricMaterial = initialFirstDielectric->
GetMaterial();
317 const int initialFirstDielectricThickness = initialFirstDielectric->
GetThickness();
319 kicadPlugin.LoadAndAppendBoard( sourcePath, *testBoard, &props );
321 const int appendedCopperLayerCount = testBoard->GetCopperLayerCount();
323 if( appendedCopperLayerCount > initialCopperLayerCount )
324 testBoard->SetCopperLayerCount( appendedCopperLayerCount );
326 LSET enabledLayers = testBoard->GetEnabledLayers();
327 enabledLayers |= initialEnabledLayers;
328 testBoard->SetEnabledLayers( enabledLayers );
329 testBoard->GetDesignSettings().GetStackupDescriptor().SynchronizeWithBoard( &testBoard->GetDesignSettings() );
331 const BOARD_STACKUP& finalStackup = testBoard->GetDesignSettings().GetStackupDescriptor();
355 std::string destinationPath = dataPath +
"issue3812.kicad_pcb";
357 std::string sourcePath = dataPath +
"issue18142.kicad_pcb";
359 std::map<std::string, UTF8> props;
362 std::unique_ptr<BOARD> testBoard = kicadPlugin.LoadBoard( destinationPath );
364 BOOST_REQUIRE_EQUAL( testBoard->GetLayerName(
F_Cu ), wxS(
"Top_layer" ) );
365 BOOST_REQUIRE_EQUAL( testBoard->GetLayerName(
In1_Cu ), wxS(
"GND_layer" ) );
366 BOOST_REQUIRE_EQUAL( testBoard->GetLayerName(
In2_Cu ), wxS(
"VDD_layer" ) );
367 BOOST_REQUIRE_EQUAL( testBoard->GetLayerName(
B_Cu ), wxS(
"Bottom_layer" ) );
369 kicadPlugin.LoadAndAppendBoard( sourcePath, *testBoard, &props );
378 BOOST_CHECK( testBoard->IsLayerEnabled(
In3_Cu ) );
379 BOOST_CHECK( testBoard->IsLayerEnabled(
In4_Cu ) );
394 std::string sourcePath = dataPath +
"issue3812.kicad_pcb";
396 std::map<std::string, UTF8> props;
405 if( track->GetLayer() == aLayer )
413 const wxString fName = wxS(
"Top_layer" );
414 const wxString in1Name = wxS(
"GND_layer" );
415 const wxString in2Name = wxS(
"VDD_layer" );
416 const wxString bName = wxS(
"Bottom_layer" );
419 std::vector<wxString> seenNames;
421 kicadPlugin.RegisterCallback(
422 [&](
const std::vector<INPUT_LAYER_DESC>& aDescs ) -> std::map<wxString, PCB_LAYER_ID>
425 seenNames.push_back( desc.Name );
430 std::unique_ptr<BOARD> identityBoard = std::make_unique<BOARD>();
432 kicadPlugin.LoadAndAppendBoard( sourcePath, *identityBoard, &props );
435 BOOST_CHECK( std::find( seenNames.begin(), seenNames.end(), in1Name ) != seenNames.end() );
436 BOOST_CHECK( std::find( seenNames.begin(), seenNames.end(), in2Name ) != seenNames.end() );
438 const int idIn1 = countTracksOn( identityBoard.get(),
In1_Cu );
439 const int idIn2 = countTracksOn( identityBoard.get(),
In2_Cu );
441 BOOST_REQUIRE_GT( idIn2, 0 );
444 kicadPlugin.RegisterCallback(
445 [&](
const std::vector<INPUT_LAYER_DESC>& ) -> std::map<wxString, PCB_LAYER_ID>
450 std::unique_ptr<BOARD> swapBoard = std::make_unique<BOARD>();
452 kicadPlugin.LoadAndAppendBoard( sourcePath, *swapBoard, &props );
454 const int swIn1 = countTracksOn( swapBoard.get(),
In1_Cu );
455 const int swIn2 = countTracksOn( swapBoard.get(),
In2_Cu );
471 std::string standardNames = dataPath +
"issue18142.kicad_pcb";
472 std::string customNames = dataPath +
"issue3812.kicad_pcb";
474 std::map<std::string, UTF8> props;
477 bool handlerCalled =
false;
479 kicadPlugin.RegisterCallback(
480 [&](
const std::vector<INPUT_LAYER_DESC>& ) -> std::map<wxString, PCB_LAYER_ID>
482 handlerCalled =
true;
488 std::unique_ptr<BOARD> matchBoard = kicadPlugin.LoadBoard( standardNames );
489 handlerCalled =
false;
490 kicadPlugin.LoadAndAppendBoard( standardNames, *matchBoard, &props );
491 BOOST_CHECK( !handlerCalled );
496 std::unique_ptr<BOARD> mismatchBoard = kicadPlugin.LoadBoard( standardNames );
497 handlerCalled =
false;
498 kicadPlugin.LoadAndAppendBoard( customNames, *mismatchBoard, &props );
499 BOOST_CHECK( handlerCalled );
523 auto tmpLib = std::filesystem::temp_directory_path() /
"qa_fp_save_netinfo.pretty";
524 std::filesystem::remove_all( tmpLib );
525 std::filesystem::create_directories( tmpLib );
527 std::unique_ptr<BOARD> board = std::make_unique<BOARD>();
534 fp->
SetFPID(
LIB_ID( wxT(
"scratch" ), wxT(
"test_fp_save_netinfo" ) ) );
556 BOOST_REQUIRE_EQUAL(
pad->GetNet(), net );
557 BOOST_REQUIRE_EQUAL( shape->
GetNet(), net );
558 BOOST_REQUIRE_EQUAL( zone->
GetNet(), net );
561 BOOST_REQUIRE_NO_THROW( kicadPlugin.FootprintSave( tmpLib.string(), fp ) );
563 auto savedFile = tmpLib /
"test_fp_save_netinfo.kicad_mod";
566 std::ifstream in( savedFile );
567 BOOST_REQUIRE_MESSAGE( in.is_open(),
568 "Failed to open serialized footprint: " << savedFile.string() );
570 std::stringstream ss;
578 const std::string contents = ss.str();
581 BOOST_CHECK_MESSAGE( contents.find(
"(net " ) == std::string::npos,
582 "Saved footprint library file must not contain (net ...) tokens:\n"
590 std::unique_ptr<FOOTPRINT> detached(
static_cast<FOOTPRINT*
>( fp->
Clone() ) );
591 detached->SetParent(
nullptr );
592 detached->SetParentGroup(
nullptr );
593 detached->ClearAllNets();
599 detached->RunOnChildren(
602 switch( aItem->
Type() )
619 std::filesystem::remove_all( tmpLib );
633 std::unique_ptr<BOARD> writeBoard = std::make_unique<BOARD>();
635 ZONE* zone =
new ZONE( writeBoard.get() );
652 writeBoard->Add( zone );
654 std::filesystem::path tmpPath = std::filesystem::temp_directory_path()
655 /
"copper_thieving_roundtrip.kicad_pcb";
658 writer.
SaveBoard( tmpPath.string(), *writeBoard );
661 std::unique_ptr<BOARD> readBoard = reader.
LoadBoard( tmpPath.string() );
663 BOOST_REQUIRE_EQUAL( readBoard->Zones().size(), 1u );
665 ZONE* loaded = readBoard->Zones()[0];
679 std::filesystem::remove( tmpPath );
689 const std::array<THIEVING_PATTERN, 3> patterns = {
699 std::unique_ptr<BOARD> writeBoard = std::make_unique<BOARD>();
701 ZONE* zone =
new ZONE( writeBoard.get() );
713 writeBoard->Add( zone );
715 std::filesystem::path tmpPath = std::filesystem::temp_directory_path()
716 /
"copper_thieving_pattern.kicad_pcb";
718 writer.
SaveBoard( tmpPath.string(), *writeBoard );
721 std::unique_ptr<BOARD> readBoard = reader.
LoadBoard( tmpPath.string() );
723 BOOST_REQUIRE_EQUAL( readBoard->Zones().size(), 1u );
724 BOOST_CHECK( readBoard->Zones()[0]->GetThievingSettings().pattern == pattern );
726 std::filesystem::remove( tmpPath );
740 std::filesystem::path tmpPath = std::filesystem::temp_directory_path()
741 /
"copper_thieving_old_version.kicad_pcb";
742 std::ofstream out( tmpPath );
745 out <<
"(kicad_pcb (version 20260512) (generator \"test\") (generator_version \"test\")"
746 <<
" (general (thickness 1.6)) (paper \"A4\")"
747 <<
" (layers (0 \"F.Cu\" signal) (31 \"B.Cu\" signal))"
748 <<
" (zone (net 0) (net_name \"\") (layer \"F.Cu\") (uuid \"00000000-0000-0000-0000-000000000001\")"
749 <<
" (hatch edge 0.5)"
750 <<
" (connect_pads (clearance 0))"
751 <<
" (min_thickness 0.25) (filled_areas_thickness no)"
752 <<
" (fill yes (mode thieving) (thermal_gap 0.5) (thermal_bridge_width 0.5)"
753 <<
" (island_removal_mode 0))"
754 <<
" (polygon (pts (xy 0 0) (xy 5 0) (xy 5 5) (xy 0 5))))"
761 std::filesystem::remove( tmpPath );
768 std::filesystem::path tmpPath = tempDir.
Path() /
"malformed_dimension_text.kicad_pcb";
769 std::ofstream out( tmpPath );
770 out <<
"(kicad_pcb (version 20240108) (generator \"test\")"
771 <<
" (general (thickness 1.6)) (paper \"A4\")"
772 <<
" (layers (0 \"F.Cu\" signal) (31 \"B.Cu\" signal) (36 \"B.SilkS\" user \"b.silkscreen\"))"
773 <<
" (dimension (type aligned) (layer \"B.SilkS\")"
774 <<
" (gr_text \"1 mm\" (at broken))))";
791 std::filesystem::path tmpPath = std::filesystem::temp_directory_path()
792 /
"copper_thieving_malformed.kicad_pcb";
793 std::ofstream out( tmpPath );
794 out <<
"(kicad_pcb (version 20260513) (generator \"test\") (generator_version \"test\")"
795 <<
" (general (thickness 1.6)) (paper \"A4\")"
796 <<
" (layers (0 \"F.Cu\" signal) (31 \"B.Cu\" signal))"
797 <<
" (zone (net 0) (net_name \"\") (layer \"F.Cu\") (uuid \"00000000-0000-0000-0000-000000000002\")"
798 <<
" (hatch edge 0.5)"
799 <<
" (connect_pads (clearance 0))"
800 <<
" (min_thickness 0.25) (filled_areas_thickness no)"
801 <<
" (fill yes (mode thieving)"
802 <<
" (thermal_gap 0.5) (thermal_bridge_width 0.5)"
803 <<
" (island_removal_mode 0)"
804 <<
" (thieving (type dots) (size -1) (gap 0)"
805 <<
" (width -5) (stagger no) (orientation 0)))"
806 <<
" (polygon (pts (xy 0 0) (xy 5 0) (xy 5 5) (xy 0 5))))"
811 std::unique_ptr<BOARD> readBoard = reader.
LoadBoard( tmpPath.string() );
813 BOOST_REQUIRE_EQUAL( readBoard->Zones().size(), 1u );
817 BOOST_CHECK_GT( loaded.
gap, 0 );
820 std::filesystem::remove( tmpPath );
834 std::filesystem::path tmpPath = tempDir.
Path() /
"thermal_zone_block.kicad_pcb";
835 std::ofstream out( tmpPath );
839 out <<
"(kicad_pcb (version 20260513) (generator \"test\") (generator_version \"test\")"
840 <<
" (general (thickness 1.6)) (paper \"A4\")"
841 <<
" (layers (0 \"F.Cu\" signal) (31 \"B.Cu\" signal))"
842 <<
" (zone (net 0) (net_name \"\") (layer \"F.Cu\") (uuid \"00000000-0000-0000-0000-000000000001\")"
843 <<
" (hatch edge 0.5)"
844 <<
" (connect_pads (clearance 0.5))"
845 <<
" (min_thickness 0.25) (filled_areas_thickness no)"
846 <<
" (fill yes (thermal_gap 0.5) (thermal_bridge_width 0.5) (island_removal_mode 0))"
847 <<
" (polygon (pts (xy 0 0) (xy 5 0) (xy 5 5) (xy 0 5))))"
848 <<
" (zone (net 0) (net_name \"\") (layer \"F.Cu\") (uuid \"00000000-0000-0000-0000-000000000002\")"
850 <<
" (hatch edge 0.5)"
851 <<
" (connect_pads yes (clearance 0.5))"
852 <<
" (min_thickness 0.25) (filled_areas_thickness no)"
853 <<
" (fill yes (thermal_gap 0.5) (thermal_bridge_width 0.5) (island_removal_mode 0)"
854 <<
" (smoothing fillet) (radius 1))"
855 <<
" (polygon (pts (xy 10 0) (xy 15 0) (xy 15 5) (xy 10 5))))"
860 std::unique_ptr<BOARD> board = std::make_unique<BOARD>();
862 ZONE_SETTINGS settings = board->GetDesignSettings().GetDefaultZoneSettings();
869 board->GetDesignSettings().SetDefaultZoneSettings( settings );
871 kicadPlugin.LoadAndAppendBoard( tmpPath.string(), *board );
873 BOOST_REQUIRE_EQUAL( board->Zones().size(), 2u );
876 ZONE* omitted = board->Zones()[0];
882 BOOST_CHECK( !omitted->
IsLocked() );
885 ZONE* explicitZone = board->Zones()[1];
889 BOOST_CHECK( explicitZone->
IsLocked() );
904 CANCEL_AT_LINE_READER(
const std::string& aText,
unsigned aCancelLine,
bool* aCancelFlag ) :
906 m_cancelLine( aCancelLine ),
907 m_cancelFlag( aCancelFlag )
913 if( !*m_cancelFlag &&
LineNumber() >= m_cancelLine )
915 *m_cancelFlag =
true;
916 std::this_thread::sleep_for( std::chrono::milliseconds( 300 ) );
923 unsigned m_cancelLine;
930 CANCELLING_REPORTER(
bool* aCancelFlag ) :
931 m_cancelFlag( aCancelFlag )
940 void Report(
const wxString& )
override {}
944 void SetTitle(
const wxString& )
override {}
945 bool IsCancelled()
const override {
return *m_cancelFlag; }
953 std::unique_ptr<BOARD> source = std::make_unique<BOARD>();
958 for(
int i = 0; i < 400; i++ )
966 source->Add( track );
970 kicadPlugin.FormatBoardToFormatter( &fmt, source.get() );
976 unsigned lineCount = std::count(
text.begin(),
text.end(),
'\n' );
979 std::unique_ptr<BOARD> dest = std::make_unique<BOARD>();
986 dest->Add( existing );
988 size_t tracksBefore = dest->Tracks().size();
989 unsigned netsBefore = dest->GetNetInfo().GetNetCount();
991 bool cancelRequested =
false;
993 CANCEL_AT_LINE_READER reader(
text, lineCount / 2, &cancelRequested );
994 CANCELLING_REPORTER
reporter( &cancelRequested );
996 BOOST_CHECK_THROW( kicadPlugin.DoLoad( reader, *dest,
false,
nullptr, &
reporter, lineCount ),
IO_ERROR );
997 BOOST_CHECK( cancelRequested );
1010 std::filesystem::path libPath = std::filesystem::temp_directory_path() /
"kicad_qa_no_such_library.pretty";
1014 wxArrayString names;
1016 BOOST_CHECK_THROW( kicadPlugin.FootprintEnumerate( names, libPath.string(),
false ),
IO_ERROR );
1018 BOOST_CHECK_THROW( kicadPlugin.FootprintEnumerate( names, libPath.string(),
false ),
IO_ERROR );
constexpr EDA_IU_SCALE pcbIUScale
General utilities for PCB file IO for QA programs.
@ BS_ITEM_TYPE_DIELECTRIC
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
virtual void SetNet(NETINFO_ITEM *aNetInfo)
Set a NET_INFO object for the item.
void SetLayer(PCB_LAYER_ID aLayer) override
Set the layer this item is on.
NETINFO_ITEM * GetNet() const
Return #NET_INFO object for a given item.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
bool IsLocked() const override
Manage one layer needed to make a physical board.
int GetThickness(int aDielectricSubLayer=0) const
wxString GetMaterial(int aDielectricSubLayer=0) const
Manage layers needed to make a physical board.
int BuildBoardThicknessFromStackup() const
wxString m_FinishType
The name of external copper finish.
Information pertinent to a Pcbnew printed circuit board.
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT, bool aSkipConnectivity=false) override
Removes an item from the container.
const TRACKS & Tracks() const
const DRAWINGS & Drawings() const
KICAD_T Type() const
Returns the type of object.
VECTOR2I GetArcMid() const
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
const std::filesystem::path & Path() const
Get the path to the temporary directory as a std::filesystem::path.
A logical library item identifier and consists of various portions much like a URI.
virtual unsigned LineNumber() const
Return the line number of the last line read from this LINE_READER.
LSET is a set of PCB_LAYER_IDs.
bool Contains(PCB_LAYER_ID aLayer) const
See if the layer set contains a PCB layer.
Handle the data for a net.
static NETINFO_ITEM * OrphanedItem()
NETINFO_ITEM meaning that there was no net assigned for an item, as there was no board storing net li...
@ 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
A #PLUGIN derivation for saving and loading Pcbnew s-expression formatted files.
void SaveBoard(const wxString &aFileName, BOARD &aBoard, const std::map< std::string, UTF8 > *aProperties=nullptr) override
Write aBoard to a storage file in a format that this PCB_IO implementation knows about or it can be u...
std::unique_ptr< BOARD > LoadBoard(const wxString &aFileName, const std::map< std::string, UTF8 > *aProperties=nullptr, PROJECT *aProject=nullptr)
Load information from some input file format that this PCB_IO implementation knows about into new BOA...
void SetWidth(int aWidth) override
void SetEnd(const VECTOR2I &aEnd) override
void SetLayer(PCB_LAYER_ID aLayer) override
Set the layer this item is on.
void SetStart(const VECTOR2I &aStart) override
void SetEnd(const VECTOR2I &aEnd)
void SetStart(const VECTOR2I &aStart)
virtual void SetWidth(int aWidth)
A progress reporter interface for use in multi-threaded environments.
virtual bool IsCancelled() const =0
virtual void AddPhases(int aNumPhases)=0
virtual bool KeepRefreshing(bool aWait=false)=0
Update the UI (if any).
virtual void SetNumPhases(int aNumPhases)=0
Set the number of phases.
virtual void Report(const wxString &aMessage)=0
Display aMessage in the progress bar dialog.
virtual void BeginPhase(int aPhase)=0
Initialize the aPhase virtual zone of the dialog progress bar.
virtual void AdvancePhase()=0
Use the next available virtual zone of the dialog progress bar.
virtual void SetTitle(const wxString &aTitle)=0
Change the title displayed on the window caption.
virtual void AdvanceProgress()=0
Increment the progress bar length (inside the current virtual zone).
virtual void SetCurrentProgress(double aProgress)=0
Set the progress value to aProgress (0..1).
virtual void SetMaxProgress(int aMaxProgress)=0
Fix the value that gives the 100 percent progress bar length (inside the current virtual zone).
int TotalVertices() const
Return total number of vertices stored in the set.
Is a LINE_READER that reads from a multiline 8 bit wide std::string.
STRING_LINE_READER(const std::string &aString, const wxString &aSource)
Construct a string line reader.
char * ReadLine() override
Read a line of text into the buffer and increments the line number counter.
ZONE_SETTINGS handles zones parameters.
void SetCornerSmoothingType(CORNER_SMOOTHING aType)
void SetPadConnection(ZONE_CONNECTION aPadConnection)
void SetCornerRadius(int aRadius)
ZONE_FILL_MODE m_FillMode
int m_HatchSmoothingLevel
Handle a list of polygons defining a copper zone.
const THIEVING_SETTINGS & GetThievingSettings() const
bool AppendCorner(const VECTOR2I &aPosition, int aHoleIdx, bool aAllowDuplication=false)
Add a new corner to the zone outline (to the main outline or a hole)
ZONE_LAYER_PROPERTIES & LayerProperties(PCB_LAYER_ID aLayer)
std::shared_ptr< SHAPE_POLY_SET > GetFilledPolysList(PCB_LAYER_ID aLayer) const
virtual void SetLayer(PCB_LAYER_ID aLayer) override
Set the layer this item is on.
bool IsCopperThieving() const
ZONE_SETTINGS::CORNER_SMOOTHING GetCornerSmoothingType() const
void SetFillMode(ZONE_FILL_MODE aFillMode)
ZONE_CONNECTION GetPadConnection() const
void SetThievingSettings(const THIEVING_SETTINGS &aSettings)
VECTOR2I GetPosition() const override
void SetNet(NETINFO_ITEM *aNetInfo) override
Override that drops aNetInfo when this zone is in copper-thieving fill mode.
ZONE_FILL_MODE GetFillMode() const
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
int GetHatchSmoothingLevel() const
unsigned int GetCornerRadius() const
int GetNumCorners(void) const
Access to m_Poly parameters.
PCB_LAYER_ID
A quick note on layer IDs:
std::string GetPcbnewTestDataDir()
Utility which returns a path to the data directory where the test board files are stored.
constexpr char APPEND_PRESERVE_DESTINATION_STACKUP[]
PCB_IO_KICAD_SEXPR kicadPlugin
Parameters that drive copper-thieving fill generation.
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
BOOST_TEST(netlist.find("R_G1 ARM_OUT1 DIE_B R='0.001 / ((SW_STATE)") !=std::string::npos)
IbisParser parser & reporter
#define CHECK_ENUM_CLASS_EQUAL(L, R)
BOOST_AUTO_TEST_CASE(Issue19775_ZoneLayerWildcards)
Declares the struct as the Boost test fixture.
BOOST_TEST_CONTEXT("Test Clearance")
BOOST_CHECK_EQUAL(result, "25.4")
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
@ PCB_ZONE_T
class ZONE, a copper pour area
@ PCB_PAD_T
class PAD, a pad in a footprint
VECTOR2< int32_t > VECTOR2I
THIEVING_PATTERN
Shape stamped onto the grid for a copper-thieving fill.
@ THERMAL
Use thermal relief for pads.
@ FULL
pads are covered by copper