KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_graphic_extend.cpp File Reference
#include <boost/test/unit_test.hpp>
#include <board.h>
#include <geometry/circle.h>
#include <geometry/seg.h>
#include <geometry/shape_arc.h>
#include <layer_ids.h>
#include <pcb_shape.h>
#include <pcb_track.h>
#include <tools/graphic_extend.h>
#include <limits>

Go to the source code of this file.

Functions

static const GRAPHIC_EDIT_GEOMETRYplanned (const GRAPHIC_EDIT_RESULT &aResult)
 
static PCB_SHAPE makeLine (const VECTOR2I &aStart, const VECTOR2I &aEnd, PCB_LAYER_ID aLayer=Dwgs_User)
 
static PCB_SHAPE makeArc (const VECTOR2I &aCenter, const VECTOR2I &aStart, double aAngle, PCB_LAYER_ID aLayer=Dwgs_User)
 
 BOOST_AUTO_TEST_CASE (ExtendsSelectedLineEndToFiniteLineBoundary)
 
 BOOST_AUTO_TEST_CASE (ExtendsSelectedLineStartInOppositeDirection)
 
 BOOST_AUTO_TEST_CASE (ChoosesNearestPositiveIntersection)
 
 BOOST_AUTO_TEST_CASE (IgnoresWrongLayerAndNonGraphicItems)
 
 BOOST_AUTO_TEST_CASE (RejectsTrackSource)
 
 BOOST_AUTO_TEST_CASE (ExtendsLineToFiniteArcBoundary)
 
 BOOST_AUTO_TEST_CASE (ExtendsArcEndToFiniteLineBoundary)
 
 BOOST_AUTO_TEST_CASE (ExtendsArcStartBackwardAlongCurvature)
 
 BOOST_AUTO_TEST_CASE (ExtendsArcToFiniteArcBoundary)
 
 BOOST_AUTO_TEST_CASE (ExtendsToATangentTouch)
 
 BOOST_AUTO_TEST_CASE (LockedSourceIsRejectedButLockedBoundaryIsEligible)
 
 BOOST_AUTO_TEST_CASE (PointerChoosesNearestEndpoint)
 
 BOOST_AUTO_TEST_CASE (QueryBoundsFollowTheExtensionRay)
 
 BOOST_AUTO_TEST_CASE (ExtendsBoardScaleLineForward)
 
 BOOST_AUTO_TEST_CASE (IgnoresBoundaryBehindTheExtendedEndpoint)
 
static CIRCLE closedCircle (const GRAPHIC_EDIT_RESULT &aResult)
 The circle an arc closed into, for checking.
 
 BOOST_AUTO_TEST_CASE (ArcPastAFullTurnClosesIntoACircle)
 
 BOOST_AUTO_TEST_CASE (ArcWithNothingToReachClosesIntoACircle)
 
 BOOST_AUTO_TEST_CASE (ReachableBoundaryBeatsClosingTheCircle)
 
 BOOST_AUTO_TEST_CASE (LineWithNothingToReachStillRefuses)
 
 BOOST_AUTO_TEST_CASE (WideArcWhoseChordIsOutOfReachCloses)
 
 BOOST_AUTO_TEST_CASE (DegenerateSourcesReportWhyTheyWereRefused)
 
 BOOST_AUTO_TEST_CASE (ExtendedLargeArcLandsOnItsBoundary)
 
 BOOST_AUTO_TEST_CASE (CollinearBoundariesAreRejectedInBothEndpointOrders)
 
 BOOST_AUTO_TEST_CASE (ExtendsNegativeSweepArc)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/24]

BOOST_AUTO_TEST_CASE ( ArcPastAFullTurnClosesIntoACircle )

◆ BOOST_AUTO_TEST_CASE() [2/24]

BOOST_AUTO_TEST_CASE ( ArcWithNothingToReachClosesIntoACircle )

◆ BOOST_AUTO_TEST_CASE() [3/24]

BOOST_AUTO_TEST_CASE ( ChoosesNearestPositiveIntersection )

◆ BOOST_AUTO_TEST_CASE() [4/24]

BOOST_AUTO_TEST_CASE ( CollinearBoundariesAreRejectedInBothEndpointOrders )

Definition at line 412 of file test_graphic_extend.cpp.

References END, makeLine(), and GRAPHIC_EXTEND_PLANNER::Plan().

◆ BOOST_AUTO_TEST_CASE() [5/24]

BOOST_AUTO_TEST_CASE ( DegenerateSourcesReportWhyTheyWereRefused )

◆ BOOST_AUTO_TEST_CASE() [6/24]

BOOST_AUTO_TEST_CASE ( ExtendedLargeArcLandsOnItsBoundary )

◆ BOOST_AUTO_TEST_CASE() [7/24]

◆ BOOST_AUTO_TEST_CASE() [8/24]

BOOST_AUTO_TEST_CASE ( ExtendsArcStartBackwardAlongCurvature )

◆ BOOST_AUTO_TEST_CASE() [9/24]

◆ BOOST_AUTO_TEST_CASE() [10/24]

BOOST_AUTO_TEST_CASE ( ExtendsBoardScaleLineForward )

◆ BOOST_AUTO_TEST_CASE() [11/24]

BOOST_AUTO_TEST_CASE ( ExtendsLineToFiniteArcBoundary )

◆ BOOST_AUTO_TEST_CASE() [12/24]

◆ BOOST_AUTO_TEST_CASE() [13/24]

BOOST_AUTO_TEST_CASE ( ExtendsSelectedLineEndToFiniteLineBoundary )

◆ BOOST_AUTO_TEST_CASE() [14/24]

BOOST_AUTO_TEST_CASE ( ExtendsSelectedLineStartInOppositeDirection )

◆ BOOST_AUTO_TEST_CASE() [15/24]

BOOST_AUTO_TEST_CASE ( ExtendsToATangentTouch )

◆ BOOST_AUTO_TEST_CASE() [16/24]

BOOST_AUTO_TEST_CASE ( IgnoresBoundaryBehindTheExtendedEndpoint )

◆ BOOST_AUTO_TEST_CASE() [17/24]

BOOST_AUTO_TEST_CASE ( IgnoresWrongLayerAndNonGraphicItems )

◆ BOOST_AUTO_TEST_CASE() [18/24]

BOOST_AUTO_TEST_CASE ( LineWithNothingToReachStillRefuses )

◆ BOOST_AUTO_TEST_CASE() [19/24]

BOOST_AUTO_TEST_CASE ( LockedSourceIsRejectedButLockedBoundaryIsEligible )

◆ BOOST_AUTO_TEST_CASE() [20/24]

BOOST_AUTO_TEST_CASE ( PointerChoosesNearestEndpoint )

◆ BOOST_AUTO_TEST_CASE() [21/24]

BOOST_AUTO_TEST_CASE ( QueryBoundsFollowTheExtensionRay )

◆ BOOST_AUTO_TEST_CASE() [22/24]

BOOST_AUTO_TEST_CASE ( ReachableBoundaryBeatsClosingTheCircle )

◆ BOOST_AUTO_TEST_CASE() [23/24]

BOOST_AUTO_TEST_CASE ( RejectsTrackSource )

◆ BOOST_AUTO_TEST_CASE() [24/24]

BOOST_AUTO_TEST_CASE ( WideArcWhoseChordIsOutOfReachCloses )

◆ closedCircle()

static CIRCLE closedCircle ( const GRAPHIC_EDIT_RESULT & aResult)
static

◆ makeArc()

◆ makeLine()

◆ planned()