KiCad PCB EDA Suite
Loading...
Searching...
No Matches
geom_test_utils.h File Reference

Go to the source code of this file.

Classes

struct  BOOST_TEST_PRINT_NAMESPACE_OPEN::print_log_value< SHAPE_LINE_CHAIN >
 

Namespaces

namespace  GEOM_TEST
 Utility functions for testing geometry functions.
 
namespace  BOOST_TEST_PRINT_NAMESPACE_OPEN
 Before Boost 1.64, nullptr_t wasn't handled.
 

Enumerations

enum class  GEOM_TEST::QUADRANT { GEOM_TEST::Q1 , GEOM_TEST::Q2 , GEOM_TEST::Q3 , GEOM_TEST::Q4 }
 Geometric quadrants, from top-right, anti-clockwise. More...
 

Functions

template<typename T >
bool GEOM_TEST::IsInQuadrant (const VECTOR2< T > &aPoint, QUADRANT aQuadrant)
 
bool GEOM_TEST::SegmentCompletelyInQuadrant (const SEG &aSeg, QUADRANT aQuadrant)
 
bool GEOM_TEST::SegmentEndsInQuadrant (const SEG &aSeg, QUADRANT aQuadrant)
 
bool GEOM_TEST::SegmentCompletelyWithinRadius (const SEG &aSeg, const VECTOR2I &aPt, const int aRadius)
 
template<typename T >
bool GEOM_TEST::IsPointAtDistance (const VECTOR2< T > &aPtA, const VECTOR2< T > &aPtB, T aExpDist, T aTol)
 Check that two points are the given distance apart, within the given tolerance.
 
template<typename T >
bool GEOM_TEST::ArePointsNearCircle (const std::vector< VECTOR2< T > > &aPoints, const VECTOR2< T > &aCentre, T aRad, T aTol)
 Predicate for checking a set of points is within a certain tolerance of a circle.
 
template<typename T >
bool GEOM_TEST::ArePerpendicular (const VECTOR2< T > &a, const VECTOR2< T > &b, const EDA_ANGLE &aTolerance)
 
SHAPE_LINE_CHAIN GEOM_TEST::MakeSquarePolyLine (int aSize, const VECTOR2I &aCentre)
 construct a square polygon of given size width and centre
 
SHAPE_POLY_SET GEOM_TEST::FilletPolySet (SHAPE_POLY_SET &aPolySet, int aRadius, int aError)
 
bool GEOM_TEST::IsOutlineValid (const SHAPE_LINE_CHAIN &aChain)
 Verify that a SHAPE_LINE_CHAIN has been assembled correctly by ensuring that the arc start and end points match points on the chain and that any points inside the arcs actually collide with the arc segments (with an error margin of 5000 IU)
 
bool GEOM_TEST::IsPolySetValid (const SHAPE_POLY_SET &aSet)
 Verify that a SHAPE_POLY_SET has been assembled correctly by verifying each of the outlines and holes contained within.
 
bool GEOM_TEST::SegmentsHaveSameEndPoints (const SEG &aSeg1, const SEG &aSeg2)
 Check that two SEGs have the same end points, in either order.