24#include <boost/test/unit_test.hpp>
74 footprint.
SetValue( wxS(
"LineEndingFootprint" ) );
79 line->SetEnd(
VECTOR2I( 1000000, 0 ) );
81 line->SetWidth( 100000 );
84 line->SetStartEndingLength( 300000 );
85 line->SetStartEndingWidth( 200000 );
86 line->SetStartEndingStrokeWidth( 50000 );
89 line->SetEndEndingLength( 500000 );
90 line->SetEndEndingWidth( 400000 );
91 line->SetEndEndingStrokeWidth( 100000 );
96 const std::filesystem::path libPath = tempLib.
CreateChildDir(
"line_ending_roundtrip.pretty" );
97 const std::filesystem::path savePath = libPath /
"line_ending_roundtrip.kicad_mod";
103 wxT(
"line_ending_roundtrip" ) );
107 PCB_SHAPE* loadedLine = findFirstSegment( loadedFootprint.get() );
118 footprint.
SetValue( wxS(
"LineEndingEqualSizeFootprint" ) );
120 auto* line =
new PCB_SHAPE( &footprint );
123 line->SetEnd(
VECTOR2I( 1000000, 0 ) );
125 line->SetWidth( 100000 );
128 line->SetStartEndingLength( 300000 );
129 line->SetStartEndingWidth( 300000 );
134 const std::filesystem::path libPath =
136 const std::filesystem::path savePath = libPath /
"line_ending_equal_size.kicad_mod";
142 wxT(
"line_ending_equal_size" ) );
146 PCB_SHAPE* loadedLine = findFirstSegment( loadedFootprint.get() );
General utilities for PCB file IO for QA programs.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
const LINE_ENDING & GetStartEnding() const
const LINE_ENDING & GetEndEnding() const
std::filesystem::path CreateChildDir(const wxString &aName) const
Create and return the path to a direct child directory.
A logical library item identifier and consists of various portions much like a URI.
Decorative shape (arrowhead, circle, square) at the start or end of a graphic line,...
int GetLength() const
Along-line size. 0 = auto.
int GetWidth() const
Perpendicular size. 0 = auto.
LINE_ENDING_STYLE GetStyle() const
int GetStrokeWidth() const
Outline stroke width.
LINE_ENDING_STYLE
Line ending styles for graphic lines, arcs, and beziers.
void DumpFootprintToFile(const FOOTPRINT &aFootprint, const std::filesystem::path &aLibraryPath)
Same as DumpBoardToFile, but for footprints.
std::unique_ptr< FOOTPRINT > ReadFootprintFromFile(const std::filesystem::path &aFilename, const wxString &aFootprintName)
Read a footprint object aFootprintName from aFileName.
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_CHECK_EQUAL(std::any_cast< std::string >(rows[0].at("val")), "12345678901234567.89")
BOOST_REQUIRE(res.columns()==1)
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(FootprintLineEndingsRoundTrip)
VECTOR2< int32_t > VECTOR2I