KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_shape_line_chain_collision.cpp File Reference
#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)
 

Enumeration Type Documentation

◆ COLLISION_OUTPUTS

Enumerator
WANT_NOTHING 
WANT_ACTUAL 
WANT_LOCATION 
WANT_BOTH 

Definition at line 47 of file test_shape_line_chain_collision.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/9]

BOOST_AUTO_TEST_CASE ( Collide_ArcToArc )

◆ BOOST_AUTO_TEST_CASE() [2/9]

BOOST_AUTO_TEST_CASE ( Collide_LineToArc )

◆ BOOST_AUTO_TEST_CASE() [3/9]

BOOST_AUTO_TEST_CASE ( Collide_LineToLine )

◆ BOOST_AUTO_TEST_CASE() [4/9]

BOOST_AUTO_TEST_CASE ( Collide_NoClearance )

◆ BOOST_AUTO_TEST_CASE() [5/9]

BOOST_AUTO_TEST_CASE ( Collide_RealContourGateBoundaries )

◆ BOOST_AUTO_TEST_CASE() [6/9]

BOOST_AUTO_TEST_CASE ( Collide_RealContourParity )

◆ BOOST_AUTO_TEST_CASE() [7/9]

BOOST_AUTO_TEST_CASE ( Collide_RealContourSharedSegments )

◆ BOOST_AUTO_TEST_CASE() [8/9]

BOOST_AUTO_TEST_CASE ( Collide_WithClearance )

◆ BOOST_AUTO_TEST_CASE() [9/9]

◆ checkCollisionParity()

static void checkCollisionParity ( const SHAPE_LINE_CHAIN & aA,
const SHAPE_LINE_CHAIN & aB,
int aClearance )
static

◆ extractSubchain()

static SHAPE_LINE_CHAIN extractSubchain ( const SHAPE_LINE_CHAIN & aSource,
int aStart,
int aSegmentCount )
static

◆ indexedCollision()

static COLLISION_OUTPUT indexedCollision ( const SHAPE_LINE_CHAIN & aA,
const SHAPE_LINE_CHAIN & aB,
int aClearance,
int aOutputs )
static

◆ loadZone()

static SHAPE_POLY_SET loadZone ( const std::string & aFilename,
int aZone )
static

◆ referenceCollision()

Variable Documentation

◆ NO_ACTUAL

int NO_ACTUAL = 123456789
staticconstexpr

Definition at line 43 of file test_shape_line_chain_collision.cpp.

Referenced by indexedCollision(), and referenceCollision().

◆ NO_LOCATION

const VECTOR2I NO_LOCATION(123456789, -123456789) ( 123456789 ,
- 123456789 )
static