56 std::vector<PCB_SHAPE*> modified;
78 std::vector<PCB_SHAPE*> modified;
82 BOOST_TEST( ( std::find( modified.begin(), modified.end(), seg ) != modified.end() ) );
100 std::vector<PCB_SHAPE*> modified;
124 std::vector<PCB_SHAPE*> modified;
132 BOOST_CHECK_LE( ( seg->GetStart() -
VECTOR2I( 5 *
MM, 0 ) ).EuclideanNorm(), 1000 );
133 BOOST_CHECK_LE( ( seg->GetEnd() -
VECTOR2I( 8 *
MM, 4 *
MM ) ).EuclideanNorm(), 1000 );
135 BOOST_TEST( ( std::find( modified.begin(), modified.end(), seg ) != modified.end() ) );
136 BOOST_TEST( ( std::find( modified.begin(), modified.end(), line ) == modified.end() ) );
152 std::vector<PCB_SHAPE*> modified;
161 BOOST_CHECK_LE( ( seg->GetStart() -
VECTOR2I( 5 *
MM, 0 ) ).EuclideanNorm(), 1000 );
162 BOOST_CHECK_LE( ( seg->GetEnd() -
VECTOR2I( 5 *
MM, 5 *
MM ) ).EuclideanNorm(), 1000 );
164 BOOST_TEST( ( std::find( modified.begin(), modified.end(), line ) == modified.end() ) );
180 std::vector<PCB_SHAPE*> modified;
187 BOOST_CHECK_LE(
std::abs( ( seg->GetStart() -
circle->GetCenter() ).EuclideanNorm() - 5.0 *
MM ), 1000.0 );
190 BOOST_CHECK_LE(
std::abs( ( seg->GetEnd() - seg->GetStart() ).EuclideanNorm() - 4.0 *
MM ), 1000.0 );
208 std::vector<PCB_SHAPE*> modified;
213 BOOST_CHECK_LE( ( existing->
GetStart() -
VECTOR2I( 5 *
MM, 0 ) ).EuclideanNorm(), 1000 );
214 BOOST_CHECK_LE( ( existing->
GetEnd() -
VECTOR2I( 5 *
MM, 10 *
MM ) ).EuclideanNorm(), 1000 );
215 BOOST_CHECK_LE(
std::abs( drawn->GetStart().y ), 1000 );
216 BOOST_CHECK_LE(
std::abs( drawn->GetEnd().y ), 1000 );
240 BOOST_CHECK_LE( ( seg->GetStart() -
VECTOR2I( 5 *
MM, 0 ) ).EuclideanNorm(), 1000 );
243 BOOST_CHECK_LE( ( seg->GetEnd() -
VECTOR2I( 5 *
MM, 5 *
MM ) ).EuclideanNorm(), 1000 );
244 BOOST_CHECK_LE( ( neighbour->GetStart() - seg->GetEnd() ).EuclideanNorm(), 1000 );
257 locked->SetLocked(
true );
302 std::vector<PCB_SHAPE*> modified;
std::set< KIID > ConstraintReferenceShapes(BOARD *aBoard, const PCB_CONSTRAINT *aConstraint)
The shapes a just-authored constraint should treat as an immovable reference, for the caller to pass ...
CONSTRAINT_DIAGNOSIS ApplyConstraintImmediately(BOARD *aBoard, const PCB_CONSTRAINT *aConstraint, std::vector< PCB_SHAPE * > *aModified, const std::function< void(BOARD_ITEM *)> &aBeforeModify, const std::set< KIID > &aFixedShapes)
Solve a just-created constraint's cluster so the geometry snaps to satisfy it (SolidWorks-style),...
Information pertinent to a Pcbnew printed circuit board.
const VECTOR2I & GetEnd() const
Return the ending point of the graphic.
const VECTOR2I & GetStart() const
Return the starting point of the graphic.
A geometric constraint between board items (issue #2329).
VECTOR2I GetCenter() const override
This defaults to the center of the bounding box if not overridden.
static bool empty(const wxTextEntryBase *aCtrl)
PCB_SHAPE * addSegment(BOARD &aBoard, const VECTOR2I &aStart, const VECTOR2I &aEnd)
PCB_SHAPE * addCircle(BOARD &aBoard, const VECTOR2I &aCenter, int aRadius)
PCB_CONSTRAINT * addConstraint(BOARD &aBoard, PCB_CONSTRAINT_TYPE aType, const std::vector< CONSTRAINT_MEMBER > &aMembers, std::optional< double > aValue=std::nullopt)
EDA_ANGLE abs(const EDA_ANGLE &aAngle)
@ WHOLE
The item as a whole (a segment as a line, a circle).
@ START
First endpoint of a segment or arc.
@ END
Second endpoint of a segment or arc.
@ CONCENTRIC
Two arcs/circles share a center.
@ FIXED_POSITION
A point is locked at its current location.
@ COINCIDENT
Two points are made to coincide.
@ MIDPOINT
A point is the midpoint of a segment.
@ POINT_ON_LINE
A point lies on a segment's supporting line.
@ FIXED_LENGTH
A segment has a driving length value.
@ PARALLEL
Two segments are parallel.
The outcome of a constraint solve, in plain data so callers need not know planegcs.
bool solved
Solver reached Success or Converged.
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_CASE(CoincidentSnapsSecondPointToFirst)
BOOST_AUTO_TEST_SUITE_END()
BOOST_TEST(netlist.find("R_G1 ARM_OUT1 DIE_B R='0.001 / ((SW_STATE)") !=std::string::npos)
SHAPE_CIRCLE circle(c.m_circle_center, c.m_circle_radius)
BOOST_CHECK_EQUAL(result, "25.4")
VECTOR2< int32_t > VECTOR2I