KiCad PCB EDA Suite
Loading...
Searching...
No Matches
drc_test_provider_annular_width.cpp File Reference
#include <common.h>
#include <pcb_track.h>
#include <pad.h>
#include <footprint.h>
#include <drc/drc_engine.h>
#include <drc/drc_item.h>
#include <drc/drc_rule.h>
#include <drc/drc_test_provider.h>
#include <macros.h>
#include <convert_basic_shapes_to_polygon.h>
#include <board_design_settings.h>

Go to the source code of this file.

Classes

class  DRC_TEST_PROVIDER_ANNULAR_WIDTH
 

Namespaces

namespace  detail
 

Functions

static bool collide (const SHAPE_LINE_CHAIN &aLhs, const SHAPE_LINE_CHAIN &aRhs, int aClearance, int *aDistance=nullptr, VECTOR2I *aPt1=nullptr)
 Find the nearest collision point between two shape line chains.
 
static bool collide (const SHAPE_POLY_SET &aLhs, const SHAPE_LINE_CHAIN &aRhs, int aClearance, int *aDistance=nullptr, VECTOR2I *aPt1=nullptr)
 

Variables

static DRC_REGISTER_TEST_PROVIDER< DRC_TEST_PROVIDER_ANNULAR_WIDTHdetail::dummy
 

Function Documentation

◆ collide() [1/2]

static bool collide ( const SHAPE_LINE_CHAIN aLhs,
const SHAPE_LINE_CHAIN aRhs,
int  aClearance,
int *  aDistance = nullptr,
VECTOR2I aPt1 = nullptr 
)
inlinestatic

Find the nearest collision point between two shape line chains.

Note
This collision test only tests the shape line chain segments (outline) by setting the shape closed status to false.
Parameters
aLhsis the left hand shape line chain to run the collision test on.
aRhsis the right hand shape line chain the run the collision test against aLhs.
aClearanceis the collision clearance between the two shape line changes.
[out]aDistanceis an optional pointer to store the nearest collision distance.
[out]aPt1is an optional pointer to store the nearest collision point. @retrun true if a collision occurs between aLhs and aRhs otherwise false.

Definition at line 60 of file drc_test_provider_annular_width.cpp.

References SHAPE_LINE_CHAIN::Append(), SHAPE_LINE_CHAIN::Collide(), SHAPE_LINE_CHAIN::CPoint(), SHAPE_LINE_CHAIN::CSegment(), SHAPE_LINE_CHAIN::PointCount(), SHAPE_LINE_CHAIN::SegmentCount(), and SHAPE_LINE_CHAIN::SetClosed().

Referenced by collide(), and DRC_TEST_PROVIDER_ANNULAR_WIDTH::Run().

◆ collide() [2/2]

static bool collide ( const SHAPE_POLY_SET aLhs,
const SHAPE_LINE_CHAIN aRhs,
int  aClearance,
int *  aDistance = nullptr,
VECTOR2I aPt1 = nullptr 
)
static