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";
104 PCB_SHAPE* loadedLine = findFirstSegment( loadedFootprint.get() );
115 footprint.
SetValue( wxS(
"LineEndingEqualSizeFootprint" ) );
117 auto* line =
new PCB_SHAPE( &footprint );
120 line->SetEnd(
VECTOR2I( 1000000, 0 ) );
122 line->SetWidth( 100000 );
125 line->SetStartEndingLength( 300000 );
126 line->SetStartEndingWidth( 300000 );
131 const std::filesystem::path libPath =
133 const std::filesystem::path savePath = libPath /
"line_ending_equal_size.kicad_mod";
140 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.
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)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(FootprintLineEndingsRoundTrip)
BOOST_CHECK_EQUAL(result, "25.4")
VECTOR2< int32_t > VECTOR2I