KiCad PCB EDA Suite
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

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

Enumerations

enum  GEOM_TEST::QUADRANT { GEOM_TEST::QUADRANT::Q1, GEOM_TEST::QUADRANT::Q2, GEOM_TEST::QUADRANT::Q3, GEOM_TEST::QUADRANT::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. More...
 
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. More...
 
template<typename T >
bool GEOM_TEST::ArePerpendicular (const VECTOR2< T > &a, const VECTOR2< T > &b, double aTolerance)
 
SHAPE_LINE_CHAIN GEOM_TEST::MakeSquarePolyLine (int aSize, const VECTOR2I &aCentre)
 construct a square polygon of given size width and centre More...
 
SHAPE_POLY_SET GEOM_TEST::FilletPolySet (SHAPE_POLY_SET &aPolySet, int aRadius, int aError)