73 std::unique_ptr<BOARD> testBoard = std::make_unique<BOARD>();
75 kicadPlugin.LoadBoard( dataPath +
"LayerWildcard.kicad_pcb", testBoard.get() );
78 BOOST_CHECK( testBoard->Zones().size() == 1 );
80 ZONE* z = testBoard->Zones()[0];
90 auto tmpBoard = std::filesystem::temp_directory_path() /
"Issue19775_RoundTrip.kicad_pcb";
94 std::unique_ptr<BOARD> testBoard = std::make_unique<BOARD>();
95 kicadPlugin.LoadBoard( dataPath +
"LayerEnumerate.kicad_pcb", testBoard.get() );
96 kicadPlugin.SaveBoard( tmpBoard.string(), testBoard.get() );
100 std::unique_ptr<BOARD> testBoard = std::make_unique<BOARD>();
101 kicadPlugin.LoadBoard( tmpBoard.string(), testBoard.get() );
104 BOOST_CHECK( testBoard->Zones().size() == 1 );
106 ZONE* z = testBoard->Zones()[0];
127 +
"plugins/kicad_sexpr/Issue23125_EmptyZone/";
129 std::unique_ptr<BOARD> testBoard = std::make_unique<BOARD>();
131 kicadPlugin.LoadBoard( dataPath +
"EmptyZone.kicad_pcb", testBoard.get() );
138 ZONE* z = testBoard->Zones()[0];
152 +
"plugins/kicad_sexpr/";
154 std::unique_ptr<BOARD> testBoard = std::make_unique<BOARD>();
156 kicadPlugin.LoadBoard( dataPath +
"ScientificNotation.kicad_pcb", testBoard.get() );
179 +
"plugins/kicad_sexpr/Issue23625_CorruptedStackup/";
181 std::unique_ptr<BOARD> testBoard = std::make_unique<BOARD>();
183 BOOST_CHECK_NO_THROW( kicadPlugin.LoadBoard( dataPath +
"corrupted_stackup.kicad_pcb",
187 testBoard->GetDesignSettings().GetStackupDescriptor();
192 BOOST_CHECK_LE( stackup.
GetCount(), 128 );
193 BOOST_CHECK_GT( stackup.
GetCount(), 0 );
207 +
"plugins/kicad_sexpr/Issue24133_DuplicatedStackup/";
209 std::unique_ptr<BOARD> testBoard = std::make_unique<BOARD>();
211 BOOST_CHECK_NO_THROW( kicadPlugin.LoadBoard( dataPath +
"duplicated_stackup.kicad_pcb",
214 const BOARD_STACKUP& stackup = testBoard->GetDesignSettings().GetStackupDescriptor();
236 std::string destinationPath = dataPath +
"issue3812.kicad_pcb";
238 std::string sourcePath = dataPath +
"issue18142.kicad_pcb";
239 std::map<std::string, UTF8> props;
253 int copperLayerCount = 0;
261 return copperLayerCount;
275 std::unique_ptr<BOARD> testBoard = std::make_unique<BOARD>();
277 kicadPlugin.LoadBoard( destinationPath, testBoard.get() );
279 const BOARD_STACKUP& initialStackup = testBoard->GetDesignSettings().GetStackupDescriptor();
280 const BOARD_STACKUP_ITEM* initialFirstDielectric = findFirstDielectric( initialStackup );
281 const int initialCopperLayerCount = testBoard->GetCopperLayerCount();
282 const LSET initialEnabledLayers = testBoard->GetEnabledLayers();
283 const wxString initialFinishType = initialStackup.
m_FinishType;
285 BOOST_REQUIRE_EQUAL( initialCopperLayerCount, 4 );
286 BOOST_REQUIRE_EQUAL( countCopperLayers( initialStackup ), 4 );
288 BOOST_REQUIRE_EQUAL( initialFinishType, wxS(
"ENIG" ) );
289 const wxString initialFirstDielectricMaterial = initialFirstDielectric->
GetMaterial();
290 const int initialFirstDielectricThickness = initialFirstDielectric->
GetThickness();
292 kicadPlugin.LoadBoard( sourcePath, testBoard.get(), &props );
294 const int appendedCopperLayerCount = testBoard->GetCopperLayerCount();
296 if( appendedCopperLayerCount > initialCopperLayerCount )
297 testBoard->SetCopperLayerCount( appendedCopperLayerCount );
299 LSET enabledLayers = testBoard->GetEnabledLayers();
300 enabledLayers |= initialEnabledLayers;
301 testBoard->SetEnabledLayers( enabledLayers );
302 testBoard->GetDesignSettings().GetStackupDescriptor().SynchronizeWithBoard( &testBoard->GetDesignSettings() );
304 const BOARD_STACKUP& finalStackup = testBoard->GetDesignSettings().GetStackupDescriptor();
328 std::string destinationPath = dataPath +
"issue3812.kicad_pcb";
330 std::string sourcePath = dataPath +
"issue18142.kicad_pcb";
332 std::map<std::string, UTF8> props;
335 std::unique_ptr<BOARD> testBoard = std::make_unique<BOARD>();
337 kicadPlugin.LoadBoard( destinationPath, testBoard.get() );
339 BOOST_REQUIRE_EQUAL( testBoard->GetLayerName(
F_Cu ), wxS(
"Top_layer" ) );
340 BOOST_REQUIRE_EQUAL( testBoard->GetLayerName(
In1_Cu ), wxS(
"GND_layer" ) );
341 BOOST_REQUIRE_EQUAL( testBoard->GetLayerName(
In2_Cu ), wxS(
"VDD_layer" ) );
342 BOOST_REQUIRE_EQUAL( testBoard->GetLayerName(
B_Cu ), wxS(
"Bottom_layer" ) );
344 kicadPlugin.LoadBoard( sourcePath, testBoard.get(), &props );
353 BOOST_CHECK( testBoard->IsLayerEnabled(
In3_Cu ) );
354 BOOST_CHECK( testBoard->IsLayerEnabled(
In4_Cu ) );
369 std::string sourcePath = dataPath +
"issue3812.kicad_pcb";
371 std::map<std::string, UTF8> props;
380 if( track->GetLayer() == aLayer )
388 const wxString fName = wxS(
"Top_layer" );
389 const wxString in1Name = wxS(
"GND_layer" );
390 const wxString in2Name = wxS(
"VDD_layer" );
391 const wxString bName = wxS(
"Bottom_layer" );
394 std::vector<wxString> seenNames;
396 kicadPlugin.RegisterCallback(
397 [&](
const std::vector<INPUT_LAYER_DESC>& aDescs ) -> std::map<wxString, PCB_LAYER_ID>
400 seenNames.push_back( desc.Name );
405 std::unique_ptr<BOARD> identityBoard = std::make_unique<BOARD>();
406 kicadPlugin.LoadBoard( sourcePath, identityBoard.get(), &props );
409 BOOST_CHECK( std::find( seenNames.begin(), seenNames.end(), in1Name ) != seenNames.end() );
410 BOOST_CHECK( std::find( seenNames.begin(), seenNames.end(), in2Name ) != seenNames.end() );
412 const int idIn1 = countTracksOn( identityBoard.get(),
In1_Cu );
413 const int idIn2 = countTracksOn( identityBoard.get(),
In2_Cu );
415 BOOST_REQUIRE_GT( idIn2, 0 );
418 kicadPlugin.RegisterCallback(
419 [&](
const std::vector<INPUT_LAYER_DESC>& ) -> std::map<wxString, PCB_LAYER_ID>
424 std::unique_ptr<BOARD> swapBoard = std::make_unique<BOARD>();
425 kicadPlugin.LoadBoard( sourcePath, swapBoard.get(), &props );
427 const int swIn1 = countTracksOn( swapBoard.get(),
In1_Cu );
428 const int swIn2 = countTracksOn( swapBoard.get(),
In2_Cu );
444 std::string standardNames = dataPath +
"issue18142.kicad_pcb";
445 std::string customNames = dataPath +
"issue3812.kicad_pcb";
447 std::map<std::string, UTF8> props;
450 bool handlerCalled =
false;
452 kicadPlugin.RegisterCallback(
453 [&](
const std::vector<INPUT_LAYER_DESC>& ) -> std::map<wxString, PCB_LAYER_ID>
455 handlerCalled =
true;
460 std::unique_ptr<BOARD> matchBoard = std::make_unique<BOARD>();
461 kicadPlugin.LoadBoard( standardNames, matchBoard.get() );
462 handlerCalled =
false;
463 kicadPlugin.LoadBoard( standardNames, matchBoard.get(), &props );
464 BOOST_CHECK( !handlerCalled );
467 std::unique_ptr<BOARD> mismatchBoard = std::make_unique<BOARD>();
468 kicadPlugin.LoadBoard( standardNames, mismatchBoard.get() );
469 handlerCalled =
false;
470 kicadPlugin.LoadBoard( customNames, mismatchBoard.get(), &props );
471 BOOST_CHECK( handlerCalled );
494 auto tmpLib = std::filesystem::temp_directory_path() /
"qa_fp_save_netinfo.pretty";
495 std::filesystem::remove_all( tmpLib );
496 std::filesystem::create_directories( tmpLib );
498 std::unique_ptr<BOARD> board = std::make_unique<BOARD>();
505 fp->
SetFPID(
LIB_ID( wxT(
"scratch" ), wxT(
"test_fp_save_netinfo" ) ) );
526 BOOST_REQUIRE_EQUAL(
pad->GetNet(), net );
527 BOOST_REQUIRE_EQUAL( shape->
GetNet(), net );
528 BOOST_REQUIRE_EQUAL( zone->
GetNet(), net );
531 BOOST_REQUIRE_NO_THROW( kicadPlugin.FootprintSave( tmpLib.string(), fp ) );
533 auto savedFile = tmpLib /
"test_fp_save_netinfo.kicad_mod";
536 std::ifstream in( savedFile );
537 BOOST_REQUIRE_MESSAGE( in.is_open(),
538 "Failed to open serialized footprint: " << savedFile.string() );
540 std::stringstream ss;
544 const std::string contents = ss.str();
548 "Saved footprint library file must not contain (net ...) tokens:\n"
556 std::unique_ptr<FOOTPRINT> detached(
static_cast<FOOTPRINT*
>( fp->
Clone() ) );
557 detached->SetParent(
nullptr );
558 detached->SetParentGroup(
nullptr );
559 detached->ClearAllNets();
565 detached->RunOnChildren(
568 switch( aItem->
Type() )
585 std::filesystem::remove_all( tmpLib );
599 std::unique_ptr<BOARD> writeBoard = std::make_unique<BOARD>();
601 ZONE* zone =
new ZONE( writeBoard.get() );
618 writeBoard->Add( zone );
620 std::filesystem::path tmpPath = std::filesystem::temp_directory_path()
621 /
"copper_thieving_roundtrip.kicad_pcb";
624 writer.
SaveBoard( tmpPath.string(), writeBoard.get() );
626 std::unique_ptr<BOARD> readBoard = std::make_unique<BOARD>();
628 reader.
LoadBoard( tmpPath.string(), readBoard.get() );
630 BOOST_REQUIRE_EQUAL( readBoard->Zones().size(), 1u );
632 ZONE* loaded = readBoard->Zones()[0];
646 std::filesystem::remove( tmpPath );
656 const std::array<THIEVING_PATTERN, 3> patterns = {
666 std::unique_ptr<BOARD> writeBoard = std::make_unique<BOARD>();
668 ZONE* zone =
new ZONE( writeBoard.get() );
680 writeBoard->Add( zone );
682 std::filesystem::path tmpPath = std::filesystem::temp_directory_path()
683 /
"copper_thieving_pattern.kicad_pcb";
685 writer.
SaveBoard( tmpPath.string(), writeBoard.get() );
687 std::unique_ptr<BOARD> readBoard = std::make_unique<BOARD>();
689 reader.
LoadBoard( tmpPath.string(), readBoard.get() );
691 BOOST_REQUIRE_EQUAL( readBoard->Zones().size(), 1u );
692 BOOST_CHECK( readBoard->Zones()[0]->GetThievingSettings().pattern == pattern );
694 std::filesystem::remove( tmpPath );
708 std::filesystem::path tmpPath = std::filesystem::temp_directory_path()
709 /
"copper_thieving_old_version.kicad_pcb";
710 std::ofstream out( tmpPath );
713 out <<
"(kicad_pcb (version 20260512) (generator \"test\") (generator_version \"test\")"
714 <<
" (general (thickness 1.6)) (paper \"A4\")"
715 <<
" (layers (0 \"F.Cu\" signal) (31 \"B.Cu\" signal))"
716 <<
" (zone (net 0) (net_name \"\") (layer \"F.Cu\") (uuid \"00000000-0000-0000-0000-000000000001\")"
717 <<
" (hatch edge 0.5)"
718 <<
" (connect_pads (clearance 0))"
719 <<
" (min_thickness 0.25) (filled_areas_thickness no)"
720 <<
" (fill yes (mode thieving) (thermal_gap 0.5) (thermal_bridge_width 0.5)"
721 <<
" (island_removal_mode 0))"
722 <<
" (polygon (pts (xy 0 0) (xy 5 0) (xy 5 5) (xy 0 5))))"
726 std::unique_ptr<BOARD> readBoard = std::make_unique<BOARD>();
728 BOOST_CHECK_THROW( reader.
LoadBoard( tmpPath.string(), readBoard.get() ),
IO_ERROR );
730 std::filesystem::remove( tmpPath );
737 std::filesystem::path tmpPath = tempDir.
GetPath() /
"malformed_dimension_text.kicad_pcb";
738 std::ofstream out( tmpPath );
739 out <<
"(kicad_pcb (version 20240108) (generator \"test\")"
740 <<
" (general (thickness 1.6)) (paper \"A4\")"
741 <<
" (layers (0 \"F.Cu\" signal) (31 \"B.Cu\" signal) (36 \"B.SilkS\" user \"b.silkscreen\"))"
742 <<
" (dimension (type aligned) (layer \"B.SilkS\")"
743 <<
" (gr_text \"1 mm\" (at broken))))";
746 std::unique_ptr<BOARD> readBoard = std::make_unique<BOARD>();
748 BOOST_CHECK_THROW( reader.
LoadBoard( tmpPath.string(), readBoard.get() ),
IO_ERROR );
760 std::filesystem::path tmpPath = std::filesystem::temp_directory_path()
761 /
"copper_thieving_malformed.kicad_pcb";
762 std::ofstream out( tmpPath );
763 out <<
"(kicad_pcb (version 20260513) (generator \"test\") (generator_version \"test\")"
764 <<
" (general (thickness 1.6)) (paper \"A4\")"
765 <<
" (layers (0 \"F.Cu\" signal) (31 \"B.Cu\" signal))"
766 <<
" (zone (net 0) (net_name \"\") (layer \"F.Cu\") (uuid \"00000000-0000-0000-0000-000000000002\")"
767 <<
" (hatch edge 0.5)"
768 <<
" (connect_pads (clearance 0))"
769 <<
" (min_thickness 0.25) (filled_areas_thickness no)"
770 <<
" (fill yes (mode thieving)"
771 <<
" (thermal_gap 0.5) (thermal_bridge_width 0.5)"
772 <<
" (island_removal_mode 0)"
773 <<
" (thieving (type dots) (size -1) (gap 0)"
774 <<
" (width -5) (stagger no) (orientation 0)))"
775 <<
" (polygon (pts (xy 0 0) (xy 5 0) (xy 5 5) (xy 0 5))))"
779 std::unique_ptr<BOARD> readBoard = std::make_unique<BOARD>();
781 reader.
LoadBoard( tmpPath.string(), readBoard.get() );
783 BOOST_REQUIRE_EQUAL( readBoard->Zones().size(), 1u );
787 BOOST_CHECK_GT( loaded.
gap, 0 );
790 std::filesystem::remove( tmpPath );
804 std::filesystem::path tmpPath = tempDir.
GetPath() /
"thermal_zone_block.kicad_pcb";
805 std::ofstream out( tmpPath );
809 out <<
"(kicad_pcb (version 20260513) (generator \"test\") (generator_version \"test\")"
810 <<
" (general (thickness 1.6)) (paper \"A4\")"
811 <<
" (layers (0 \"F.Cu\" signal) (31 \"B.Cu\" signal))"
812 <<
" (zone (net 0) (net_name \"\") (layer \"F.Cu\") (uuid \"00000000-0000-0000-0000-000000000001\")"
813 <<
" (hatch edge 0.5)"
814 <<
" (connect_pads (clearance 0.5))"
815 <<
" (min_thickness 0.25) (filled_areas_thickness no)"
816 <<
" (fill yes (thermal_gap 0.5) (thermal_bridge_width 0.5) (island_removal_mode 0))"
817 <<
" (polygon (pts (xy 0 0) (xy 5 0) (xy 5 5) (xy 0 5))))"
818 <<
" (zone (net 0) (net_name \"\") (layer \"F.Cu\") (uuid \"00000000-0000-0000-0000-000000000002\")"
820 <<
" (hatch edge 0.5)"
821 <<
" (connect_pads yes (clearance 0.5))"
822 <<
" (min_thickness 0.25) (filled_areas_thickness no)"
823 <<
" (fill yes (thermal_gap 0.5) (thermal_bridge_width 0.5) (island_removal_mode 0)"
824 <<
" (smoothing fillet) (radius 1))"
825 <<
" (polygon (pts (xy 10 0) (xy 15 0) (xy 15 5) (xy 10 5))))"
830 std::unique_ptr<BOARD> board = std::make_unique<BOARD>();
832 ZONE_SETTINGS settings = board->GetDesignSettings().GetDefaultZoneSettings();
839 board->GetDesignSettings().SetDefaultZoneSettings( settings );
841 kicadPlugin.LoadBoard( tmpPath.string(), board.get() );
843 BOOST_REQUIRE_EQUAL( board->Zones().size(), 2u );
846 ZONE* omitted = board->Zones()[0];
852 BOOST_CHECK( !omitted->
IsLocked() );
855 ZONE* explicitZone = board->Zones()[1];
859 BOOST_CHECK( explicitZone->
IsLocked() );
874 CANCEL_AT_LINE_READER(
const std::string& aText,
unsigned aCancelLine,
bool* aCancelFlag ) :
876 m_cancelLine( aCancelLine ),
877 m_cancelFlag( aCancelFlag )
883 if( !*m_cancelFlag &&
LineNumber() >= m_cancelLine )
885 *m_cancelFlag =
true;
886 std::this_thread::sleep_for( std::chrono::milliseconds( 300 ) );
893 unsigned m_cancelLine;
900 CANCELLING_REPORTER(
bool* aCancelFlag ) :
901 m_cancelFlag( aCancelFlag )
910 void Report(
const wxString& )
override {}
914 void SetTitle(
const wxString& )
override {}
915 bool IsCancelled()
const override {
return *m_cancelFlag; }
923 std::unique_ptr<BOARD> source = std::make_unique<BOARD>();
928 for(
int i = 0; i < 400; i++ )
936 source->Add( track );
940 kicadPlugin.FormatBoardToFormatter( &fmt, source.get() );
946 unsigned lineCount = std::count(
text.begin(),
text.end(),
'\n' );
949 std::unique_ptr<BOARD> dest = std::make_unique<BOARD>();
956 dest->Add( existing );
958 size_t tracksBefore = dest->Tracks().size();
959 unsigned netsBefore = dest->GetNetInfo().GetNetCount();
961 bool cancelRequested =
false;
963 CANCEL_AT_LINE_READER reader(
text, lineCount / 2, &cancelRequested );
964 CANCELLING_REPORTER
reporter( &cancelRequested );
966 BOOST_CHECK_THROW( kicadPlugin.DoLoad( reader, dest.get(),
nullptr, &
reporter, lineCount ),
IO_ERROR );
967 BOOST_CHECK( cancelRequested );
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.
const TRACKS & Tracks() 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.
A temporary directory that will be deleted when it goes out of scope.
const std::filesystem::path & GetPath() const
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...
static constexpr PCB_LAYER_ID ALL_LAYERS
! Temporary layer identifier to identify code that is not padstack-aware
A #PLUGIN derivation for saving and loading Pcbnew s-expression formatted files.
BOARD * LoadBoard(const wxString &aFileName, BOARD *aAppendToMe, const std::map< std::string, UTF8 > *aProperties=nullptr, PROJECT *aProject=nullptr) override
Load information from some input file format that this PCB_IO implementation knows about into either ...
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...
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 SetPadConnection(ZONE_CONNECTION aPadConnection)
void SetCornerRadius(int aRadius)
ZONE_FILL_MODE m_FillMode
void SetCornerSmoothingType(int aType)
int m_HatchSmoothingLevel
Handle a list of polygons defining a copper zone.
const THIEVING_SETTINGS & GetThievingSettings() const
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
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.
bool AppendCorner(VECTOR2I aPosition, int aHoleIdx, bool aAllowDuplication=false)
Add a new corner to the zone outline (to the main outline or a hole)
int GetHatchSmoothingLevel() const
unsigned int GetCornerRadius() const
int GetCornerSmoothingType() 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
BOOST_AUTO_TEST_CASE(Issue19775_ZoneLayerWildcards)
Declares the struct as the Boost test fixture.
BOOST_CHECK_MESSAGE(totalMismatches==0, std::to_string(totalMismatches)+" board(s) with strategy disagreements")
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