KiCad PCB EDA Suite
|
#include <cmath>
#include <geometry/point_types.h>
#include <geometry/seg.h>
#include <geometry/shape_line_chain.h>
#include <geometry/shape_poly_set.h>
#include <qa_utils/numeric.h>
#include <qa_utils/wx_utils/unit_test_utils.h>
Go to the source code of this file.
Namespaces | |
namespace | GEOM_TEST |
Utility functions for testing geometry functions. | |
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_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. | |
std::ostream & | boost_test_print_type (std::ostream &os, const SHAPE_LINE_CHAIN &c) |
std::ostream & | operator<< (std::ostream &os, const TYPED_POINT2I &c) |
std::ostream & boost_test_print_type | ( | std::ostream & | os, |
const SHAPE_LINE_CHAIN & | c | ||
) |
Definition at line 6 of file geom_test_utils.cpp.
References SHAPE_LINE_CHAIN::CPoint(), and SHAPE_LINE_CHAIN::PointCount().
std::ostream & operator<< | ( | std::ostream & | os, |
const TYPED_POINT2I & | c | ||
) |
Definition at line 34 of file geom_test_utils.cpp.
References TYPED_POINT2I::m_point, TYPED_POINT2I::m_types, and operator<<().