46 pad->SetPosition(
VECTOR2I( 189190000, 46760000 ) );
64 const VECTOR2I arcStart( 189190000, 46760000 );
65 const VECTOR2I arcMid( 190382763, 46815467 );
66 const VECTOR2I arcEnd( 189758445, 47833301 );
69 chain.Append( arcStart );
71 SHAPE_ARC arc( arcStart, arcMid, arcEnd, 0 );
83 int64_t lengthForward = chainForward.
Length();
84 int64_t lengthBackward = chainBackward.
Length();
86 BOOST_CHECK_CLOSE(
static_cast<double>( lengthForward ),
static_cast<double>( lengthBackward ), 0.5 );
88 BOOST_CHECK_CLOSE( lengthForward / 1000000.0, 2.4778, 2.0 );
96 const VECTOR2I arc1Start( 189190000, 46760000 );
97 const VECTOR2I arc1Mid( 189810000, 46140000 );
98 const VECTOR2I arc1End( 190430000, 46760000 );
101 const VECTOR2I arc2Start( 190430000, 46760000 );
102 const VECTOR2I arc2Mid( 191310000, 47640000 );
103 const VECTOR2I arc2End( 192190000, 46760000 );
106 chain.Append( arc1Start );
108 SHAPE_ARC arc1( arc1Start, arc1Mid, arc1End, 0 );
109 chain.Append( arc1 );
123 int64_t lengthForward = chainForward.
Length();
124 int64_t lengthBackward = chainBackward.
Length();
126 BOOST_CHECK_CLOSE(
static_cast<double>( lengthForward ),
static_cast<double>( lengthBackward ), 0.5 );
128 BOOST_CHECK_CLOSE( lengthForward / 1000000.0, 3.8246, 2.0 );
Information pertinent to a Pcbnew printed circuit board.
static void OptimiseTraceInPad(SHAPE_LINE_CHAIN &aLine, const PAD *aPad, PCB_LAYER_ID aPcbLayer)
Optimises the given trace / line to minimise the electrical path length within the given pad.
LSET is a set of PCB_LAYER_IDs.
@ NORMAL
Shape is the same on all layers.
static constexpr PCB_LAYER_ID ALL_LAYERS
! The layer identifier to use for the single defintion on normal padstacks
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
const SHAPE_LINE_CHAIN Reverse() const
Reverse point order in the line chain.
long long int Length() const
Return length of the line chain in Euclidean metric.
@ SMD
Smd pad, appears on the solder paste layer (default)
std::unique_ptr< PAD > MakePad()
CLIP_LINE_TO_PAD_FIXTURE()
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_CASE(Issue22612_ArcStartsAtPadCenter)
BOOST_REQUIRE_EQUAL(rows.size(), 1)
BOOST_AUTO_TEST_SUITE_END()
SHAPE_ARC arc2(c.m_arc2.GenerateArc())
const SHAPE_LINE_CHAIN chain
VECTOR2< int32_t > VECTOR2I