A base class for any item which can be embedded within the BOARD container class, and therefore insta...
A base class for most all the KiCad significant classes used in schematics and boards.
GRAPHIC_EDIT_REFUSAL
Why a planner refused. Each one gets its own message.
SHAPE_ARC GraphicEditArc(const PCB_SHAPE &aShape)
bool IsGraphicEditArcUsable(const SHAPE_ARC &aArc)
False for radii and sweeps the planners refuse. Check before planning an arc.
bool IsGraphicTrimSource(const PCB_SHAPE &aShape)
Trim also takes the closed shapes, which it opens up.
constexpr int MAX_GRAPHIC_EDIT_ARC_RADIUS
Larger arcs overflow the boundary search box.
const PCB_SHAPE * GraphicEditBoundary(const BOARD_ITEM *aBoundary, const PCB_SHAPE &aSource)
A boundary usable against aSource. Null if it is the source, off-layer or unusable.
const PCB_SHAPE * GraphicEditSource(const BOARD_ITEM &aSource, bool(*aAccepts)(const PCB_SHAPE &), GRAPHIC_EDIT_RESULT &aResult)
The shape to edit, or null with the reason in aResult. aAccepts decides the kinds.
bool GraphicEditCoincident(const VECTOR2I &aA, const VECTOR2I &aB)
Points built by different routes land a rounding step apart.
bool IsGraphicExtendSource(const PCB_SHAPE &aShape)
Extend needs two ends to work with.
const PCB_SHAPE * GraphicEditShape(const EDA_ITEM *aItem)
Any graphical shape a planner or a boundary search might use. Anything else gives null.
constexpr double GRAPHIC_EDIT_ANGLE_EPSILON
Sweeps this near zero or a full turn are ambiguous.
SHAPE_T m_Shape
A result need not be the same kind as the source.
VECTOR2I m_Mid
Arcs only. Everything else leaves it default.
std::vector< GRAPHIC_EDIT_GEOMETRY > m_Geometry
What the source becomes. Empty means the whole source goes.
std::vector< const BOARD_ITEM * > m_Boundaries
GRAPHIC_EDIT_REFUSAL m_Refusal
std::vector< GRAPHIC_EDIT_GEOMETRY > m_Preview
What the preview draws.
VECTOR2< int32_t > VECTOR2I