KiCad PCB EDA Suite
Loading...
Searching...
No Matches
graphic_extend.cpp File Reference
#include <tools/graphic_extend.h>
#include <board_item.h>
#include <geometry/half_line.h>
#include <geometry/intersection.h>
#include <geometry/seg.h>
#include <geometry/shape_circle.h>
#include <geometry/shape_utils.h>
#include <pcb_shape.h>
#include <tools/board_item_geometry.h>
#include <cmath>
#include <limits>

Go to the source code of this file.

Functions

static HALF_LINE extensionRay (const PCB_SHAPE &aSource, GRAPHIC_ENDPOINT aEndpoint)
 The ray the shape grows along.
 

Function Documentation

◆ extensionRay()

static HALF_LINE extensionRay ( const PCB_SHAPE & aSource,
GRAPHIC_ENDPOINT aEndpoint )
static

The ray the shape grows along.

Runs from the fixed end through the extended one.

Anchoring on the two existing endpoints keeps the direction exact. Projecting a third point would overflow at full range. The ray also covers the shape, so drop candidates behind it.

Definition at line 40 of file graphic_extend.cpp.

References EDA_SHAPE::GetEnd(), EDA_SHAPE::GetStart(), and START.

Referenced by GRAPHIC_EXTEND_PLANNER::Plan(), and GRAPHIC_EXTEND_PLANNER::QueryBounds().