KiCad PCB EDA Suite
SHAPE_LINE_CHAIN::INTERSECTION Struct Reference

Represent an intersection between two line segments. More...

#include <shape_line_chain.h>

Public Member Functions

 INTERSECTION ()
 

Public Attributes

VECTOR2I p
 < Point of intersection between our and their. More...
 
int index_our
 index of the intersecting corner/segment in the 'their' (Intersect() method parameter) line. More...
 
int index_their
 When true, the corner [index_our] of the 'our' line lies exactly on 'their' line. More...
 
bool is_corner_our
 When true, the corner [index_their] of the 'their' line lies exactly on 'our' line. More...
 
bool is_corner_their
 Auxiliary flag to avoid copying intersection info to intersection refining code, used by the refining code (e.g. More...
 
bool valid
 

Detailed Description

Represent an intersection between two line segments.

Definition at line 91 of file shape_line_chain.h.

Constructor & Destructor Documentation

◆ INTERSECTION()

SHAPE_LINE_CHAIN::INTERSECTION::INTERSECTION ( )
inline

Definition at line 116 of file shape_line_chain.h.

116 :
117 index_our( -1 ),
118 index_their( -1 ),
119 is_corner_our( false ),
120 is_corner_their( false ),
121 valid( false )
122 {
123 }
bool is_corner_their
Auxiliary flag to avoid copying intersection info to intersection refining code, used by the refining...
bool is_corner_our
When true, the corner [index_their] of the 'their' line lies exactly on 'our' line.
int index_our
index of the intersecting corner/segment in the 'their' (Intersect() method parameter) line.
int index_their
When true, the corner [index_our] of the 'our' line lies exactly on 'their' line.

Member Data Documentation

◆ index_our

int SHAPE_LINE_CHAIN::INTERSECTION::index_our

index of the intersecting corner/segment in the 'their' (Intersect() method parameter) line.

Definition at line 97 of file shape_line_chain.h.

Referenced by SHAPE_LINE_CHAIN::Intersect(), and SHAPE_LINE_CHAIN::SelfIntersecting().

◆ index_their

int SHAPE_LINE_CHAIN::INTERSECTION::index_their

When true, the corner [index_our] of the 'our' line lies exactly on 'their' line.

Definition at line 101 of file shape_line_chain.h.

Referenced by SHAPE_LINE_CHAIN::Intersect(), PNS::NODE::NearestObstacle(), and SHAPE_LINE_CHAIN::SelfIntersecting().

◆ is_corner_our

bool SHAPE_LINE_CHAIN::INTERSECTION::is_corner_our

When true, the corner [index_their] of the 'their' line lies exactly on 'our' line.

Note that when both is_corner_our and is_corner_their are set, the line chains touch with with corners.

Definition at line 104 of file shape_line_chain.h.

Referenced by SHAPE_LINE_CHAIN::Intersect().

◆ is_corner_their

bool SHAPE_LINE_CHAIN::INTERSECTION::is_corner_their

Auxiliary flag to avoid copying intersection info to intersection refining code, used by the refining code (e.g.

hull handling stuff in the P&S) to reject false intersection points.

Definition at line 109 of file shape_line_chain.h.

Referenced by SHAPE_LINE_CHAIN::Intersect().

◆ p

VECTOR2I SHAPE_LINE_CHAIN::INTERSECTION::p

< Point of intersection between our and their.

Index of the intersecting corner/segment in the 'our' (== this) line.

Definition at line 94 of file shape_line_chain.h.

Referenced by SHAPE_LINE_CHAIN::Intersect(), PNS::NODE::NearestObstacle(), SHAPE_LINE_CHAIN::compareOriginDistance::operator()(), compareOriginDistance::operator()(), and SHAPE_LINE_CHAIN::SelfIntersecting().

◆ valid

bool SHAPE_LINE_CHAIN::INTERSECTION::valid

Definition at line 114 of file shape_line_chain.h.

Referenced by PNS::HullIntersection(), and SHAPE_LINE_CHAIN::Intersect().


The documentation for this struct was generated from the following file: