54void buildBoard(
BOARD& aBoard )
59 segment->
SetEnd( mm( 5, 0 ) );
61 aBoard.
Add( segment );
72 via->SetPosition( mm( 9, 0 ) );
83 userField->
SetText( wxS(
"ACME" ) );
88 pad->SetPosition( mm( 20, 0 ) );
93 fpText->
SetText( wxS(
"fp text" ) );
101 shape->
SetEnd( mm( 10, 10 ) );
105 text->SetText( wxS(
"board text" ) );
110 textbox->
SetText( wxS(
"box" ) );
113 textbox->
SetEnd( mm( 5, 25 ) );
114 aBoard.
Add( textbox );
119 dimension->
SetEnd( mm( 10, 30 ) );
120 aBoard.
Add( dimension );
125 aBoard.
Add( target );
136 table->SetColCount( 1 );
181 const std::filesystem::path
path = tempDir.
Path() /
"custom_property.kicad_pcb";
187 std::map<KIID, wxString> found;
189 restored->RunOnChildren(
199 for(
const auto& [uuid, className] :
expected )
203 BOOST_CHECK( found.contains( uuid ) );
constexpr EDA_IU_SCALE pcbIUScale
General utilities for PCB file IO for QA programs.
void SetLayer(PCB_LAYER_ID aLayer) override
Set the layer this item is on.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
BOARD_ITEM_CONTAINER * GetParent() const
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.
void RunOnChildren(const std::function< void(BOARD_ITEM *)> &aFunction, RECURSE_MODE aMode) const override
Invoke a function on all children.
bool GetCustomProperty(const wxString &aKey, wxString &aValue) const
KICAD_T Type() const
Returns the type of object.
void SetCustomProperty(const wxString &aKey, const wxString &aValue)
virtual void SetText(const wxString &aText)
virtual wxString GetClass() const =0
Return the class name.
wxString AsString() const
const std::filesystem::path & Path() const
Get the path to the temporary directory as a std::filesystem::path.
static constexpr PCB_LAYER_ID ALL_LAYERS
! The layer identifier to use for the single defintion on normal padstacks
void SetMid(const VECTOR2I &aMid)
virtual void SetEnd(const VECTOR2I &aPoint)
virtual void SetStart(const VECTOR2I &aPoint)
For better understanding of the points that make a dimension:
A drill chart placed on the board, kept in step with the holes.
Turns on drill symbols at the holes, for one layer.
void RebuildCells(const BOARD &aBoard, GENERATED_TABLE_REFRESH *aRefresh=nullptr)
Regenerate the cells from the board.
A set of BOARD_ITEMs (i.e., without duplicates).
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 SetLayer(PCB_LAYER_ID aLayer) override
Set the layer this item is on.
void SetPosition(const VECTOR2I &aPos) override
void SetEnd(const VECTOR2I &aEnd)
void SetStart(const VECTOR2I &aStart)
virtual void SetWidth(int aWidth)
Handle a list of polygons defining a copper zone.
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)
virtual void SetLayer(PCB_LAYER_ID aLayer) override
Set the layer this item is on.
std::unique_ptr< BOARD > ReadBoardFromFileOrStream(const std::string &aFilename, std::istream &aFallback)
Read a board from a file, or another stream, as appropriate.
void DumpBoardToFile(BOARD &board, const std::filesystem::path &aFilename)
Utility function to simply write a Board out to a file.
Class to handle a set of BOARD_ITEMs.
@ USER
The field ID hasn't been set yet; field is invalid.
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
VECTOR3I expected(15, 30, 45)
BOOST_TEST_CONTEXT("Test Clearance")
@ PCB_TABLECELL_T
class PCB_TABLECELL, PCB_TEXTBOX for use in tables
@ PCB_DRILL_CHART_T
class PCB_DRILL_CHART, a live drill chart derived from PCB_TABLE
VECTOR2< int32_t > VECTOR2I