58static const std::vector<COURTYARD_SEGMENT>
l5Segments = {
59 { -6.025, -1.500000, -6.025, 1.500000 },
60 { -5.502647, -2.214616, -5.500000, -2.225000 },
61 { -5.502647, 2.214616, -5.500000, 2.225000 },
62 { -5.500000, -5.250000, -5.500000, -2.225000 },
63 { -5.500000, 5.250000, -5.500000, 2.225000 },
64 { -5.250000, -5.500000, 5.250000, -5.500000 },
65 { -5.250000, 5.500000, 5.250000, 5.500000 },
66 { 5.500000, -5.250000, 5.500000, -2.221321 },
67 { 5.500000, -2.221321, 5.502647, -2.214616 },
68 { 5.500000, 5.250000, 5.500000, 2.225000 },
69 { 5.502647, 2.214616, 5.500000, 2.225000 },
70 { 6.025, 1.500000, 6.025, -1.500000 },
74static const std::vector<COURTYARD_ARC>
l5Arcs = {
75 { -6.025000, -1.500000, -5.880489, -1.942586, -5.502647, -2.214616 },
76 { -5.502647, 2.214616, -5.880490, 1.942586, -6.025000, 1.500000 },
77 { -5.500000, -5.250000, -5.426777, -5.426777, -5.250000, -5.500000 },
78 { -5.250000, 5.500000, -5.426777, 5.426777, -5.500000, 5.250000 },
79 { 5.250000, -5.500000, 5.426777, -5.426777, 5.500000, -5.250000 },
80 { 5.500000, 5.250000, 5.426777, 5.426777, 5.250000, 5.500000 },
81 { 5.502647, -2.214616, 5.880489, -1.942586, 6.025000, -1.500000 },
82 { 6.025000, 1.500000, 5.880490, 1.942586, 5.502647, 2.214616 },
93 const std::vector<COURTYARD_ARC>& aArcs,
const std::vector<size_t>& aOrder )
95 std::vector<PCB_SHAPE*> shapes;
104 shapes.push_back( shape );
112 mmPoint( arc.m_endX, arc.m_endY ) );
114 shapes.push_back( shape );
117 for(
size_t idx : aOrder )
118 aFootprint.
Add( shapes[idx] );
146 std::vector<size_t> order( shapeCount );
147 std::iota( order.begin(), order.end(), 0 );
150 for(
size_t rotation = 0; rotation < shapeCount; ++rotation )
155 std::rotate( order.begin(), order.begin() + 1, order.end() );
164 std::vector<size_t> order( shapeCount );
165 std::iota( order.begin(), order.end(), 0 );
168 std::mt19937
rng( 42 );
170 for(
size_t trial = 0; trial < 64; ++trial )
172 std::shuffle( order.begin(), order.end(),
rng );
BOOST_CHECK_EQUAL(result, "25.4")