65 std::vector<PCB_SHAPE*> shapes{ ref, free };
69 BOOST_CHECK_LE( slopeDiffY( free ), 100 );
94 std::vector<PCB_SHAPE*> shapes{ ref, free };
97 BOOST_CHECK_LE( slopeDiffY( free ), 100 );
116 std::vector<PCB_SHAPE*> modified;
123 BOOST_CHECK_LE( ( a->
GetEnd() - b->GetStart() ).EuclideanNorm(), 100 );
124 BOOST_CHECK_LE( ( a->
GetEnd() -
VECTOR2I( 12 *
MM, 3 *
MM ) ).EuclideanNorm(), 1000 );
127 BOOST_CHECK( std::find( modified.begin(), modified.end(), b ) != modified.end() );
128 BOOST_CHECK( std::find( modified.begin(), modified.end(), a ) == modified.end() );
141 std::vector<PCB_SHAPE*> shapes{ seg };
149 BOOST_CHECK( diag.
freeDof > 0 );
167 std::vector<PCB_SHAPE*> shapes{ seg };
179 bool attributed =
false;
185 if( c->m_Uuid ==
id )
190 BOOST_CHECK( attributed );
213 std::vector<PCB_SHAPE*> shapes{ ref, free };
219 bool solved = adapter.
Solve();
247 std::vector<PCB_SHAPE*> shapes{ ref, free };
250 BOOST_CHECK_LE(
std::abs( free->GetEnd().x - free->GetStart().x ), 100 );
272 std::vector<PCB_SHAPE*> shapes{ ref, free };
275 double freeLen = ( free->GetEnd() - free->GetStart() ).EuclideanNorm();
276 BOOST_CHECK_LE(
std::abs( freeLen - 10.0 *
MM ), 1000 );
296 std::vector<PCB_SHAPE*> shapes{ line, probe };
300 BOOST_CHECK_LE(
std::abs( probe->GetStart().y ), 100 );
312 circle->SetLocked(
true );
317 std::vector<PCB_SHAPE*> shapes{
circle, probe };
320 double distToCenter = ( probe->GetEnd() -
circle->GetCenter() ).EuclideanNorm();
322 BOOST_CHECK_LE(
std::abs( distToCenter - 5.0 *
MM ), 5000.0 );
341 std::vector<PCB_SHAPE*> shapes{ ellipse, probe };
365 std::vector<PCB_SHAPE*> shapes{ arc, probe };
381 circle->SetLocked(
true );
386 std::vector<PCB_SHAPE*> shapes{
circle, line };
393 BOOST_CHECK_LE(
std::abs( dist - 5.0 *
MM ), 5000.0 );
411 std::vector<PCB_SHAPE*> shapes{ fixed, free };
415 double centerDist = ( free->GetCenter() - fixed->
GetCenter() ).EuclideanNorm();
416 double radiusSum = 5.0 *
MM + free->GetRadius();
418 BOOST_CHECK_LE(
std::abs( centerDist - radiusSum ), 5000.0 );
419 BOOST_CHECK_GT( free->GetRadius(), 0 );
439 std::vector<PCB_SHAPE*> modified;
443 double centerDist = ( neighbor->GetCenter() - resized->
GetCenter() ).EuclideanNorm();
445 BOOST_CHECK_LE(
std::abs( centerDist - ( 7.0 *
MM + neighbor->GetRadius() ) ), 5000.0 );
448 BOOST_CHECK( std::find( modified.begin(), modified.end(), neighbor ) != modified.end() );
452 BOOST_CHECK_LE(
std::abs( centerDist - 10 *
MM ), 5000.0 );
465 locked->SetLocked(
true );
470 resized->SetRadius( 4 *
MM );
472 std::vector<PCB_SHAPE*> modified;
475 double centerDist = ( resized->GetCenter() -
locked->GetCenter() ).EuclideanNorm();
478 BOOST_CHECK_LE(
std::abs( centerDist - 9 *
MM ), 5000.0 );
501 BOOST_CHECK_LE(
std::abs( neighbor->GetRadius() - 8 *
MM ), 5000 );
524 BOOST_CHECK_LE(
std::abs( neighbor->GetRadius() - 8 *
MM ), 5000 );
534 std::vector<VECTOR2I> pts = { { 0, 0 },
536 { 15 *
MM, 20 *
MM },
538 { -5 *
MM, 10 *
MM } };
546 std::vector<VECTOR2I> dragged = pts;
551 std::vector<PCB_SHAPE*> modified;
556 BOOST_CHECK_LE( ( outline.CPoint( 1 ) - dragged[1] ).EuclideanNorm(), 5000.0 );
557 BOOST_CHECK_LE( ( outline.CPoint( 2 ) - dragged[2] ).EuclideanNorm(), 5000.0 );
558 BOOST_CHECK_LE( ( seg->
GetStart() - dragged[1] ).EuclideanNorm(), 5000.0 );
559 BOOST_CHECK( std::find( modified.begin(), modified.end(), seg ) != modified.end() );
561 for(
int i : { 0, 3, 4 } )
562 BOOST_CHECK_LE( ( outline.CPoint( i ) - pts[i] ).EuclideanNorm(), 5000.0 );
591 BOOST_CHECK_LE( ( neighbor->GetCenter() - resized->
GetEllipseCenter() ).EuclideanNorm(), 5000.0 );
604 circle->SetLocked(
true );
609 std::vector<PCB_SHAPE*> shapes{
circle, ellipse };
612 BOOST_CHECK_LE( ( ellipse->GetEllipseCenter() -
VECTOR2I( 20 *
MM, 15 *
MM ) ).EuclideanNorm(), 5000.0 );
613 BOOST_CHECK_LE(
std::abs( ellipse->GetEllipseMajorRadius() - 8 *
MM ), 5000 );
614 BOOST_CHECK_LE(
std::abs( ellipse->GetEllipseMinorRadius() - 4 *
MM ), 5000 );
637 std::vector<PCB_SHAPE*> shapes{ seg, probe };
640 BOOST_CHECK_LE( ( probe->GetStart() -
VECTOR2I( 5 *
MM, 2 *
MM ) ).EuclideanNorm(), 1000 );
660 std::vector<PCB_SHAPE*> shapes{ ref, free };
663 BOOST_CHECK_LE(
std::abs( free->GetStart().y ), 100 );
664 BOOST_CHECK_LE(
std::abs( free->GetEnd().y ), 100 );
689 std::vector<PCB_SHAPE*> shapes{ axis, segA, segB };
693 BOOST_CHECK_LE(
std::abs( segB->GetStart().x - 8 *
MM ), 1000 );
694 BOOST_CHECK_LE(
std::abs( segB->GetStart().y - segA->GetStart().y ), 1000 );
712 std::vector<PCB_SHAPE*> shapes{ seg };
715 double length = ( seg->
GetEnd() - seg->
GetStart() ).EuclideanNorm();
716 BOOST_CHECK_LE(
std::abs( length - 8.0 *
MM ), 1000 );
735 len->SetDriving(
true );
737 std::vector<PCB_SHAPE*> shapes{ seg };
740 double length = ( seg->
GetEnd() - seg->
GetStart() ).EuclideanNorm();
741 BOOST_CHECK_LE(
std::abs( length - 8.0 *
MM ), 1000 );
742 BOOST_CHECK_LE( ( seg->
GetEnd() -
VECTOR2I( 8 *
MM, 0 ) ).EuclideanNorm(), 5000 );
761 std::vector<PCB_SHAPE*> shapes{ rect };
773 BOOST_CHECK_LE(
std::abs( width - 30 *
MM ), 5000 );
774 BOOST_CHECK_LE(
std::abs( height - 30 *
MM ), 5000 );
797 std::vector<PCB_SHAPE*> shapes{ rect };
809 BOOST_CHECK_LE(
std::abs( height - 20 *
MM ), 5000 );
810 BOOST_CHECK_LE(
std::abs( width - 40 *
MM ), 5000 );
827 std::vector<PCB_SHAPE*> shapes{ rect };
859 std::vector<PCB_SHAPE*> shapes{ rect };
869 BOOST_CHECK_LE(
std::abs( width - 8 *
MM ), 5000 );
892 std::vector<PCB_SHAPE*> shapes{ rect };
897 adapter.
Solve(
true );
899 std::vector<PCB_SHAPE*> changed = adapter.
Apply();
901 BOOST_CHECK( changed.empty() );
913 const std::vector<VECTOR2I> points{ { 30 *
MM, 20 *
MM },
914 { 39 *
MM, 27 *
MM },
915 { 36 *
MM, 38 *
MM },
916 { 24 *
MM, 38 *
MM },
917 { 21 *
MM, 27 *
MM } };
928 std::vector<PCB_SHAPE*> shapes{ poly };
938 BOOST_REQUIRE_EQUAL( outline.
PointCount(), 5 );
940 double driven = ( outline.
CPoint( 3 ) - outline.
CPoint( 1 ) ).EuclideanNorm();
941 BOOST_CHECK_LE(
std::abs( driven - 24.0 *
MM ), 5000 );
944 for(
int i : { 0, 2, 4 } )
945 BOOST_CHECK_LE( ( outline.
CPoint( i ) - points[i] ).EuclideanNorm(), 1000 );
955 const std::vector<VECTOR2I> points{ { 30 *
MM, 20 *
MM },
956 { 39 *
MM, 27 *
MM },
957 { 36 *
MM, 38 *
MM },
958 { 24 *
MM, 38 *
MM },
959 { 21 *
MM, 27 *
MM } };
969 std::vector<PCB_SHAPE*> shapes{ poly };
983 for(
int i = 0; i < 5; ++i )
994 const std::vector<VECTOR2I> points{ { 10 *
MM, 10 *
MM },
995 { 50 *
MM, 10 *
MM },
996 { 50 *
MM, 40 *
MM },
997 { 10 *
MM, 40 *
MM } };
1013 std::vector<PCB_SHAPE*> shapes{ poly };
1029 for(
int i = 0; i < 4; ++i )
1047 chain.SetClosed(
true );
1060 std::vector<PCB_SHAPE*> shapes{ poly };
1074 BOOST_CHECK_GT( outline.
ArcCount(), 0 );
1086 const std::vector<VECTOR2I> points{ { 10 *
MM, 10 *
MM },
1087 { 50 *
MM, 10 *
MM },
1088 { 50 *
MM, 40 *
MM },
1089 { 10 *
MM, 40 *
MM } };
1105 std::vector<PCB_SHAPE*> shapes{ poly };
1121 for(
int i = 0; i < 4; ++i )
1141 std::vector<PCB_SHAPE*> shapes{ poly, seg };
1172 std::vector<PCB_SHAPE*> shapes{
circle };
1196 std::vector<PCB_SHAPE*> shapes{ ref, other };
1199 BOOST_CHECK_LE(
std::abs( other->GetRadius() - 4 *
MM ), 1000 );
1217 std::vector<PCB_SHAPE*> shapes{ ref, other };
1220 BOOST_CHECK_LE( ( other->GetCenter() -
VECTOR2I( 5 *
MM, 5 *
MM ) ).EuclideanNorm(), 1000 );
1244 std::vector<PCB_SHAPE*> shapes{ ref, arm };
1248 BOOST_CHECK_LE(
std::abs( arm->GetEnd().x - arm->GetStart().x ), 100 );
1263 std::vector<PCB_SHAPE*> shapes{ arc };
1286 std::vector<PCB_SHAPE*> shapes{ ref, other };
1289 BOOST_CHECK_LE(
std::abs( other->GetRadius() - 5 *
MM ), 3000 );
1302 const VECTOR2I startBefore = bezier->GetStart();
1303 const VECTOR2I c1Before = bezier->GetBezierC1();
1304 const VECTOR2I c2Before = bezier->GetBezierC2();
1305 const VECTOR2I endBefore = bezier->GetEnd();
1313 std::vector<PCB_SHAPE*> shapes{
anchor, bezier };
1326 BOOST_CHECK_LE( ( bezier->GetEnd() -
VECTOR2I( 20 *
MM, 5 *
MM ) ).EuclideanNorm(), 1000 );
1333 VECTOR2I endDelta = bezier->GetEnd() - endBefore;
1351 std::vector<PCB_SHAPE*> shapes{ a, b };
1379 std::vector<PCB_SHAPE*> shapes{ a, b };
1406 std::vector<PCB_SHAPE*> modified;
1413 BOOST_CHECK_LE( ( bezier->
GetEnd() - seg->GetStart() ).EuclideanNorm(), 100 );
1414 BOOST_CHECK_LE( ( bezier->
GetEnd() -
VECTOR2I( 13 *
MM, 4 *
MM ) ).EuclideanNorm(), 1000 );
1417 BOOST_CHECK( std::find( modified.begin(), modified.end(), seg ) != modified.end() );
1418 BOOST_CHECK( std::find( modified.begin(), modified.end(), bezier ) == modified.end() );
1437 const VECTOR2I yEnd0 = y->GetEnd();
1439 std::vector<PCB_SHAPE*> modified;
1443 BOOST_CHECK_LE( slopeDiffY( x ), 100 );
1446 BOOST_CHECK_LE( ( y->GetStart() - x->
GetEnd() ).EuclideanNorm(), 5000.0 );
1447 BOOST_CHECK( x->
GetEnd() != xEnd0 );
1450 BOOST_CHECK_LE( ( y->GetEnd() - yEnd0 ).EuclideanNorm(), 5000.0 );
1472 const VECTOR2I yEnd0 = y->GetEnd();
1474 std::vector<PCB_SHAPE*> modified;
1478 BOOST_CHECK_LE( ( x->
GetEnd() -
VECTOR2I( 10 *
MM, 0 ) ).EuclideanNorm(), 5000.0 );
1479 BOOST_CHECK_LE( ( y->GetStart() - x->
GetEnd() ).EuclideanNorm(), 5000.0 );
1482 BOOST_CHECK_LE( ( y->GetEnd() - yEnd0 ).EuclideanNorm(), 5000.0 );
1499 const VECTOR2I bEnd0 = b->GetEnd();
1501 std::vector<PCB_SHAPE*> modified;
1503 { 12 *
MM, 3 *
MM }, &modified );
1508 BOOST_CHECK_LE( ( a->
GetEnd() - b->GetStart() ).EuclideanNorm(), 100 );
1509 BOOST_CHECK_LE( ( a->
GetEnd() -
VECTOR2I( 12 *
MM, 3 *
MM ) ).EuclideanNorm(), 5000.0 );
1510 BOOST_CHECK( std::find( modified.begin(), modified.end(), b ) != modified.end() );
1513 BOOST_CHECK_LE( ( b->GetEnd() - bEnd0 ).EuclideanNorm(), 5000.0 );
1532 const VECTOR2I nStart0 = n->GetStart();
1533 const VECTOR2I nEnd0 = n->GetEnd();
1535 a->
Move( { 0, 5 *
MM } );
1536 b->Move( { 0, 5 *
MM } );
1538 std::vector<PCB_SHAPE*> modified;
1542 BOOST_CHECK_LE( ( n->GetStart() - nStart0 ).EuclideanNorm(), 100 );
1543 BOOST_CHECK_LE( ( n->GetEnd() - nEnd0 ).EuclideanNorm(), 100 );
1544 BOOST_CHECK( std::find( modified.begin(), modified.end(), n ) == modified.end() );
1548 BOOST_CHECK_LE( ( a->
GetEnd() -
VECTOR2I( 10 *
MM, 5 *
MM ) ).EuclideanNorm(), 5000.0 );
1549 BOOST_CHECK_LE( ( b->GetStart() -
VECTOR2I( 10 *
MM, 5 *
MM ) ).EuclideanNorm(), 5000.0 );
1562 std::vector<DIMENSION_ENDPOINT_BINDING> bindings =
1565 BOOST_REQUIRE_EQUAL( bindings.size(), 2 );
1585 std::vector<DIMENSION_ENDPOINT_BINDING> bindings =
1588 BOOST_REQUIRE_EQUAL( bindings.size(), 2 );
1602 std::vector<DIMENSION_ENDPOINT_BINDING> bindings =
1605 BOOST_REQUIRE_EQUAL( bindings.size(), 1 );
1622 std::vector<DIMENSION_ENDPOINT_BINDING> bindings =
1626 BOOST_REQUIRE_EQUAL( bindings.size(), 2 );
void ReSolveAfterShapeResize(BOARD *aBoard, PCB_SHAPE *aShape, std::vector< PCB_SHAPE * > *aModified, const std::function< void(BOARD_ITEM *)> &aBeforeModify)
Re-solve after a resize, e.g. a circle radius edit. Holds aShape fixed so its neighbors adjust.
void ReSolveShapeClustersHoldingEdited(BOARD *aBoard, const std::vector< PCB_SHAPE * > &aEditedShapes, std::vector< PCB_SHAPE * > *aModified, const std::function< void(BOARD_ITEM *)> &aBeforeModify)
Re-solve clusters whose new geometry is authoritative holding every edited shape fully fixed so only ...
CONSTRAINT_DIAGNOSIS ApplyConstraintImmediately(BOARD *aBoard, const PCB_CONSTRAINT *aConstraint, std::vector< PCB_SHAPE * > *aModified, const std::function< void(BOARD_ITEM *)> &aBeforeModify)
Solve a just-created constraint's cluster so the geometry snaps to satisfy it (SolidWorks-style),...
void ReSolveShapeClusters(BOARD *aBoard, const std::vector< PCB_SHAPE * > &aShapes, std::vector< PCB_SHAPE * > *aModified, const std::function< void(BOARD_ITEM *)> &aBeforeModify)
Re-solve the clusters of shapes edited outside the solver, e.g.
CONSTRAINT_DIAGNOSIS SolveCluster(BOARD *aBoard, const CONSTRAINT_MEMBER &aDragged, const VECTOR2I &aCursor, std::vector< PCB_SHAPE * > *aModified, const std::function< void(BOARD_ITEM *)> &aBeforeModify, bool aIncludeDragged, bool aStabilize, const std::set< KIID > &aEdited, const std::optional< std::pair< CONSTRAINT_MEMBER, VECTOR2I > > &aCoDragged)
Gather the cluster of shapes transitively constrained with the dragged shape, solve with the dragged ...
Translates KiCad board geometry to and from the planegcs solver (issue #2329).
bool Solve(const CONSTRAINT_MEMBER &aDragged, const VECTOR2I &aCursor, bool aStabilize=false, const std::set< KIID > &aEdited={}, const std::optional< std::pair< CONSTRAINT_MEMBER, VECTOR2I > > &aCoDragged=std::nullopt)
Solve the system, pinning a dragged anchor to a cursor position.
const std::vector< KIID > & UnmappedConstraints() const
Constraints from the last Build() that could not be mapped onto a solver primitive (wrong member coun...
bool Build(const std::vector< PCB_SHAPE * > &aShapes, const std::vector< PCB_CONSTRAINT * > &aConstraints, const std::set< KIID > *aFixedShapes=nullptr, const std::vector< PCB_DIMENSION_BASE * > &aDimensions={})
Translate a cluster into a planegcs system.
std::vector< PCB_SHAPE * > Apply(const std::function< void(BOARD_ITEM *)> &aBeforeWrite={})
Write the solved coordinates back into the shapes, de-normalized to IU.
CONSTRAINT_DIAGNOSIS Diagnose()
Report degrees of freedom and conflicting/redundant constraints.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
void SetLocked(bool aLocked) override
Information pertinent to a Pcbnew printed circuit board.
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT, bool aSkipConnectivity=false) override
Removes an item from the container.
const CONSTRAINTS & Constraints() const
Geometric constraints (#2329) owned by this board.
int GetEllipseMinorRadius() const
const VECTOR2I & GetEllipseCenter() const
void SetCornerRadius(int aRadius)
int GetEllipseMajorRadius() const
SHAPE_POLY_SET & GetPolyShape()
EDA_ANGLE GetEllipseRotation() const
const VECTOR2I & GetEnd() const
Return the ending point of the graphic.
const VECTOR2I & GetStart() const
Return the starting point of the graphic.
void SetPolyPoints(const std::vector< VECTOR2I > &aPoints)
int GetCornerRadius() const
A geometric constraint between board items (issue #2329).
void SetValue(std::optional< double > aValue)
void SetDriving(bool aDriving)
VECTOR2I GetCenter() const override
This defaults to the center of the bounding box if not overridden.
void SetEllipseMinorRadius(int aR) override
void Move(const VECTOR2I &aMoveVector) override
Move this object.
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
int PointCount() const
Return the number of points (vertices) in this line chain.
const VECTOR2I & CPoint(int aIndex) const
Return a reference to a given point in the line chain.
Represent a set of closed polygons.
int AddOutline(const SHAPE_LINE_CHAIN &aOutline)
Adds a new outline to the set and returns its index.
int HoleCount(int aOutline) const
Returns the number of holes in a given outline.
int Append(int x, int y, int aOutline=-1, int aHole=-1, bool aAllowDuplication=false)
Appends a vertex at the end of the given outline/hole (default: the last outline)
int NewOutline()
Creates a new empty polygon in the set and returns its index.
int NewHole(int aOutline=-1)
Creates a new hole in a given outline.
int OutlineCount() const
Return the number of outlines in the set.
const SHAPE_LINE_CHAIN & COutline(int aIndex) const
constexpr extended_type Cross(const VECTOR2< T > &aVector) const
Compute cross product of self with aVector.
T EuclideanNorm() const
Compute the Euclidean norm of the vector, which is defined as sqrt(x ** 2 + y ** 2).
std::vector< DIMENSION_ENDPOINT_BINDING > SelectDimensionEndpointBindings(BOARD *aBoard, const KIID &aDimension, const VECTOR2I &aStart, const std::optional< VECTOR2I > &aEnd, double aMaxDist)
Choose the coincident bindings a freshly drawn dimension endpoints should take so it tracks the geome...
PCB_SHAPE * addSegment(BOARD &aBoard, const VECTOR2I &aStart, const VECTOR2I &aEnd)
PCB_SHAPE * addEllipseArc(BOARD &aBoard, const VECTOR2I &aCenter, int aMajor, int aMinor, const EDA_ANGLE &aRotation, const EDA_ANGLE &aStart, const EDA_ANGLE &aEnd)
PCB_SHAPE * addPoly(BOARD &aBoard, const std::vector< VECTOR2I > &aPoints)
double ellipseEquationAt(const PCB_SHAPE *aEllipse, const VECTOR2I &aPos)
Squared-normalized ellipse equation value at aPos: 1.0 exactly on the outline.
PCB_SHAPE * addArc(BOARD &aBoard, const VECTOR2I &aStart, const VECTOR2I &aMid, const VECTOR2I &aEnd)
PCB_SHAPE * addCircle(BOARD &aBoard, const VECTOR2I &aCenter, int aRadius)
PCB_SHAPE * addBezier(BOARD &aBoard, const VECTOR2I &aStart, const VECTOR2I &aCtrl1, const VECTOR2I &aCtrl2, const VECTOR2I &aEnd)
void solveAndApply(BOARD &aBoard, const std::vector< PCB_SHAPE * > &aShapes)
Build the cluster of aShapes against every constraint on aBoard, solve it, and write the result back ...
PCB_SHAPE * addEllipse(BOARD &aBoard, const VECTOR2I &aCenter, int aMajor, int aMinor, const EDA_ANGLE &aRotation)
PCB_CONSTRAINT * addConstraint(BOARD &aBoard, PCB_CONSTRAINT_TYPE aType, const std::vector< CONSTRAINT_MEMBER > &aMembers, std::optional< double > aValue=std::nullopt)
PCB_SHAPE * addRect(BOARD &aBoard, const VECTOR2I &aStart, const VECTOR2I &aEnd)
EDA_ANGLE abs(const EDA_ANGLE &aAngle)
@ VERTEX
An indexed rectangle corner or polygon outline vertex; pairs with CONSTRAINT_MEMBER::m_index.
@ 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.
@ CENTER
Center of an arc or circle.
@ CONCENTRIC
Two arcs/circles share a center.
@ SYMMETRIC
Two points are mirror images about an axis.
@ FIXED_POSITION
A point is locked at its current location.
@ VERTICAL
A segment (or two points) is vertical.
@ TANGENT
A line and a curve, or two curves, touch tangentially.
@ COINCIDENT
Two points are made to coincide.
@ PERPENDICULAR
Two segments are perpendicular.
@ FIXED_RADIUS
An arc/circle has a driving radius value.
@ HORIZONTAL
A segment (or two points) is horizontal.
@ EQUAL_RADIUS
Two arcs/circles have equal radius.
@ 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.
@ ANGULAR_DIMENSION
An angle between members (driving or reference).
@ COLLINEAR
Two segments lie on the same line.
@ PARALLEL
Two segments are parallel.
@ EQUAL_LENGTH
Two segments have equal length.
The outcome of a constraint solve, in plain data so callers need not know planegcs.
bool solved
Solver reached Success or Converged.
bool IsOverConstrained() const
bool IsWellConstrained() const
std::vector< KIID > redundant
Constraints the solver reports as redundant.
int freeDof
Remaining degrees of freedom (-1 if not diagnosed).
One participant in a constraint: a referenced board item plus the feature of that item that participa...
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_CASE(ParallelToFixedHorizontal)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
const SHAPE_LINE_CHAIN chain
SHAPE_CIRCLE circle(c.m_circle_center, c.m_circle_radius)
BOOST_CHECK_EQUAL(result, "25.4")
VECTOR2< int32_t > VECTOR2I
VECTOR2< double > VECTOR2D