KiCad PCB EDA Suite
Loading...
Searching...
No Matches
fix_board_shape.cpp File Reference
#include "fix_board_shape.h"
#include <vector>
#include <pcb_shape.h>
#include <geometry/circle.h>

Go to the source code of this file.

Functions

static PCB_SHAPEfindNext (PCB_SHAPE *aShape, const VECTOR2I &aPoint, const std::vector< PCB_SHAPE * > &aList, unsigned aLimit)
 Searches for a PCB_SHAPE matching a given end point or start point in a list.
 
void ConnectBoardShapes (std::vector< PCB_SHAPE * > &aShapeList, std::vector< std::unique_ptr< PCB_SHAPE > > &aNewShapes, int aChainingEpsilon)
 Connects shapes to each other, making continious contours (adjacent shapes will have a common vertex) aChainingEpsilon is the max distance between vertices of different shapes to connect.
 

Function Documentation

◆ ConnectBoardShapes()

void ConnectBoardShapes ( std::vector< PCB_SHAPE * > &  aShapeList,
std::vector< std::unique_ptr< PCB_SHAPE > > &  aNewShapes,
int  aChainingEpsilon 
)

◆ findNext()

static PCB_SHAPE * findNext ( PCB_SHAPE aShape,
const VECTOR2I aPoint,
const std::vector< PCB_SHAPE * > &  aList,
unsigned  aLimit 
)
static

Searches for a PCB_SHAPE matching a given end point or start point in a list.

Parameters
aShapeThe starting shape.
aPointThe starting or ending point to search for.
aListThe list to remove from.
aLimitis the distance from aPoint that still constitutes a valid find.
Returns
PCB_SHAPE* - The first PCB_SHAPE that has a start or end point matching aPoint, otherwise NULL if none.

Definition at line 41 of file fix_board_shape.cpp.

References SKIP_STRUCT, and SEG::Square().

Referenced by ConnectBoardShapes().