KiCad PCB EDA Suite
|
#include <vector>
#include <footprint.h>
#include <base_units.h>
#include <math/vector2d.h>
#include <board.h>
Go to the source code of this file.
Functions | |
void | SpreadFootprints (std::vector< FOOTPRINT * > *aFootprints, VECTOR2I aTargetBoxPosition, bool aGroupBySheet=true, int aComponentGap=pcbIUScale.mmToIU(1), int aGroupGap=pcbIUScale.mmToIU(1.5)) |
Footprints (after loaded by reading a netlist for instance) are moved to be in a small free area (outside the current board) without overlapping. | |
void SpreadFootprints | ( | std::vector< FOOTPRINT * > * | aFootprints, |
VECTOR2I | aTargetBoxPosition, | ||
bool | aGroupBySheet = true , |
||
int | aComponentGap = pcbIUScale.mmToIU(1) , |
||
int | aGroupGap = pcbIUScale.mmToIU(1.5) |
||
) |
Footprints (after loaded by reading a netlist for instance) are moved to be in a small free area (outside the current board) without overlapping.
aBoard | is the board to edit. |
aFootprints | a list of footprints to be spread out. |
aTargetBoxPosition | the position of the upper left corner of the area allowed to spread footprints |
Definition at line 125 of file spread_footprints.cpp.
References compareFootprintsbyRef(), BOX2< Vec >::GetArea(), FOOTPRINT::GetBoundingBox(), BOX2< Vec >::GetHeight(), BOX2< Vec >::GetOrigin(), BOX2< Vec >::GetWidth(), BOX2< Vec >::Inflate(), BOX2< Vec >::Merge(), FOOTPRINT::Move(), path, scale, spreadRectangles(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PCB_EDIT_FRAME::OnNetlistChanged(), and EDIT_TOOL::PackAndMoveFootprints().