|
KiCad PCB EDA Suite
|
#include <tools/graphic_trim.h>#include <board_item.h>#include <geometry/circle.h>#include <geometry/intersection.h>#include <geometry/seg.h>#include <geometry/shape_utils.h>#include <pcb_shape.h>#include <tools/board_item_geometry.h>#include <algorithm>#include <cmath>#include <numbers>Go to the source code of this file.
Classes | |
| struct | TRIM_CUT |
| struct | TRIM_CARRIER |
| The one curve the pointer is trimming. More... | |
Functions | |
| static double | arcParameter (const SHAPE_ARC &aSource, const VECTOR2I &aPoint) |
| static GRAPHIC_EDIT_REFUSAL | buildCarrier (const PCB_SHAPE &aSource, const VECTOR2I &aPointer, TRIM_CARRIER &aCarrier) |
| Fills aCarrier from aSource, or returns the reason it cannot. | |
Variables | |
| static constexpr double | PARAM_EPSILON = 1e-7 |
| A fraction of the carrier's own length. Same meaning at every scale. | |
Definition at line 45 of file graphic_trim.cpp.
References std::abs(), EDA_ANGLE::AsDegrees(), SHAPE_ARC::ConstructFromStartEndCenter(), SHAPE_ARC::GetCenter(), SHAPE_ARC::GetCentralAngle(), SHAPE_ARC::GetP0(), SHAPE_ARC::GetP1(), GraphicEditCoincident(), and SHAPE_ARC::IsClockwise().
Referenced by TRIM_CARRIER::Parameter().
|
static |
Fills aCarrier from aSource, or returns the reason it cannot.
Definition at line 149 of file graphic_trim.cpp.
References SEG::A, ARC, SEG::B, CIRCLE, DEGENERATE, PCB_SHAPE::GetCenter(), EDA_SHAPE::GetEnd(), EDA_SHAPE::GetRadius(), EDA_SHAPE::GetRectCorners(), EDA_SHAPE::GetShape(), EDA_SHAPE::GetStart(), GraphicEditArc(), IsGraphicEditArcUsable(), TRIM_CARRIER::m_Arc, TRIM_CARRIER::m_Circle, TRIM_CARRIER::m_Geometry, TRIM_CARRIER::m_Kind, TRIM_CARRIER::m_Seg, TRIM_CARRIER::m_Untouched, MAX_GRAPHIC_EDIT_ARC_RADIUS, NONE, CIRCLE::Radius, RECTANGLE, SEGMENT, SEG::SquaredDistance(), UNSUPPORTED_SOURCE, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by GRAPHIC_TRIM_PLANNER::Plan().
|
staticconstexpr |
A fraction of the carrier's own length. Same meaning at every scale.
Definition at line 35 of file graphic_trim.cpp.
Referenced by GRAPHIC_TRIM_PLANNER::Plan().