|
KiCad PCB EDA Suite
|
#include <qa_utils/wx_utils/unit_test_utils.h>#include <geometry/shape.h>#include <geometry/shape_arc.h>#include <geometry/shape_line_chain.h>#include <geometry/shape_poly_set.h>#include <geometry/segment_index.h>#include "fixtures_geometry.h"#include <algorithm>#include <fstream>#include <limits>#include <sstream>#include <utility>#include <vector>Go to the source code of this file.
Classes | |
| struct | COLLISION_OUTPUT |
| struct | CORPUS_CASE |
Enumerations | |
| enum | COLLISION_OUTPUTS { WANT_NOTHING = 0 , WANT_ACTUAL = 1 , WANT_LOCATION = 2 , WANT_BOTH = 3 } |
Functions | |
| static SHAPE_POLY_SET | loadZone (const std::string &aFilename, int aZone) |
| static SHAPE_LINE_CHAIN | extractSubchain (const SHAPE_LINE_CHAIN &aSource, int aStart, int aSegmentCount) |
| static COLLISION_OUTPUT | referenceCollision (const SHAPE_LINE_CHAIN &aA, const SHAPE_LINE_CHAIN &aB, int aClearance, int aOutputs) |
| static COLLISION_OUTPUT | indexedCollision (const SHAPE_LINE_CHAIN &aA, const SHAPE_LINE_CHAIN &aB, int aClearance, int aOutputs) |
| static void | checkCollisionParity (const SHAPE_LINE_CHAIN &aA, const SHAPE_LINE_CHAIN &aB, int aClearance) |
| BOOST_AUTO_TEST_CASE (Collide_RealContourParity) | |
| BOOST_AUTO_TEST_CASE (Collide_RealContourGateBoundaries) | |
| BOOST_AUTO_TEST_CASE (Collide_RealContourSharedSegments) | |
| BOOST_AUTO_TEST_CASE (SegmentIndex_RealContourCandidateSet) | |
| BOOST_AUTO_TEST_CASE (Collide_LineToLine) | |
| BOOST_AUTO_TEST_CASE (Collide_LineToArc) | |
| BOOST_AUTO_TEST_CASE (Collide_ArcToArc) | |
| BOOST_AUTO_TEST_CASE (Collide_WithClearance) | |
| BOOST_AUTO_TEST_CASE (Collide_NoClearance) | |
Variables | |
| static constexpr int | NO_ACTUAL = 123456789 |
| static const VECTOR2I | NO_LOCATION (123456789, -123456789) |
| enum COLLISION_OUTPUTS |
| Enumerator | |
|---|---|
| WANT_NOTHING | |
| WANT_ACTUAL | |
| WANT_LOCATION | |
| WANT_BOTH | |
Definition at line 47 of file test_shape_line_chain_collision.cpp.
| BOOST_AUTO_TEST_CASE | ( | Collide_ArcToArc | ) |
Definition at line 379 of file test_shape_line_chain_collision.cpp.
References actual, SHAPE_LINE_CHAIN::Append(), BOOST_TEST(), Collide(), and location.
| BOOST_AUTO_TEST_CASE | ( | Collide_LineToArc | ) |
Definition at line 361 of file test_shape_line_chain_collision.cpp.
References actual, SHAPE_LINE_CHAIN::Append(), BOOST_TEST(), Collide(), and location.
| BOOST_AUTO_TEST_CASE | ( | Collide_LineToLine | ) |
Definition at line 342 of file test_shape_line_chain_collision.cpp.
References actual, SHAPE_LINE_CHAIN::Append(), BOOST_TEST(), Collide(), and location.
| BOOST_AUTO_TEST_CASE | ( | Collide_NoClearance | ) |
Definition at line 415 of file test_shape_line_chain_collision.cpp.
References actual, SHAPE_LINE_CHAIN::Append(), Collide(), and location.
| BOOST_AUTO_TEST_CASE | ( | Collide_RealContourGateBoundaries | ) |
Definition at line 240 of file test_shape_line_chain_collision.cpp.
References checkCollisionParity(), clearance, SHAPE_POLY_SET::COutline(), extractSubchain(), loadZone(), and SHAPE_LINE_CHAIN::SegmentCount().
| BOOST_AUTO_TEST_CASE | ( | Collide_RealContourParity | ) |
Definition at line 215 of file test_shape_line_chain_collision.cpp.
References SHAPE_LINE_CHAIN::ArcCount(), checkCollisionParity(), clearance, SHAPE_POLY_SET::COutline(), loadZone(), and SHAPE_POLY_SET::OutlineCount().
| BOOST_AUTO_TEST_CASE | ( | Collide_RealContourSharedSegments | ) |
Definition at line 268 of file test_shape_line_chain_collision.cpp.
References checkCollisionParity(), SHAPE_POLY_SET::COutline(), extractSubchain(), loadZone(), and source.
| BOOST_AUTO_TEST_CASE | ( | Collide_WithClearance | ) |
Definition at line 396 of file test_shape_line_chain_collision.cpp.
References actual, SHAPE_LINE_CHAIN::Append(), Collide(), and location.
| BOOST_AUTO_TEST_CASE | ( | SegmentIndex_RealContourCandidateSet | ) |
Definition at line 282 of file test_shape_line_chain_collision.cpp.
References SEG::A, actual, SEG::B, BOOST_CHECK_EQUAL(), SHAPE_POLY_SET::COutline(), SHAPE_LINE_CHAIN::CSegment(), expected, index, loadZone(), SHAPE_LINE_CHAIN::SegmentCount(), VECTOR2< T >::x, and VECTOR2< T >::y.
|
static |
Definition at line 192 of file test_shape_line_chain_collision.cpp.
References actual, BOOST_CHECK_EQUAL(), expected, indexedCollision(), referenceCollision(), WANT_BOTH, and WANT_NOTHING.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 84 of file test_shape_line_chain_collision.cpp.
References SEG::A, SEG::B, SHAPE_LINE_CHAIN::CSegment(), and result.
Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 179 of file test_shape_line_chain_collision.cpp.
References actual, Collide(), location, NO_ACTUAL, NO_LOCATION, result, WANT_ACTUAL, and WANT_LOCATION.
Referenced by checkCollisionParity().
|
static |
Definition at line 56 of file test_shape_line_chain_collision.cpp.
References KI_TEST::GetTestDataRootDir(), path, and result.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 106 of file test_shape_line_chain_collision.cpp.
References SEG::A, SHAPE_LINE_CHAIN::CSegment(), distance(), SHAPE_LINE_CHAIN::GetPoint(), SHAPE_LINE_CHAIN::GetPointCount(), SHAPE_LINE_CHAIN::IsClosed(), NO_ACTUAL, NO_LOCATION, SHAPE_LINE_CHAIN::PointInside(), result, SHAPE_LINE_CHAIN::SegmentCount(), WANT_ACTUAL, WANT_LOCATION, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by checkCollisionParity().
|
staticconstexpr |
Definition at line 43 of file test_shape_line_chain_collision.cpp.
Referenced by indexedCollision(), and referenceCollision().
|
static |
Referenced by indexedCollision(), and referenceCollision().