KiCad PCB EDA Suite
|
Go to the source code of this file.
Classes | |
struct | CHAMFER_PARAMS |
Parameters that define a simple chamfer operation. More... | |
struct | CHAMFER_RESULT |
struct | DOGBONE_RESULT |
Functions | |
std::optional< CHAMFER_RESULT > | ComputeChamferPoints (const SEG &aSegA, const SEG &aSegB, const CHAMFER_PARAMS &aChamferParams) |
Compute the chamfer points for a given line pair and chamfer parameters. | |
std::optional< DOGBONE_RESULT > | ComputeDogbone (const SEG &aSegA, const SEG &aSegB, int aDogboneRadius, bool aAddSlots) |
Compute the dogbone geometry for a given line pair and dogbone parameters. | |
std::optional< CHAMFER_RESULT > ComputeChamferPoints | ( | const SEG & | aSegA, |
const SEG & | aSegB, | ||
const CHAMFER_PARAMS & | aChamferParams | ||
) |
Compute the chamfer points for a given line pair and chamfer parameters.
Definition at line 69 of file corner_operations.cpp.
References SEG::B, chamfer, KIGEOM::GetOtherEnd(), KIGEOM::GetSharedEndpoint(), SEG::Length(), CHAMFER_PARAMS::m_chamfer_setback_a, and CHAMFER_PARAMS::m_chamfer_setback_b.
Referenced by PCB_POINT_EDITOR::chamferCorner(), DoChamferTestChecks(), and LINE_CHAMFER_ROUTINE::ProcessLinePair().
std::optional< DOGBONE_RESULT > ComputeDogbone | ( | const SEG & | aSegA, |
const SEG & | aSegB, | ||
int | aDogboneRadius, | ||
bool | aAddSlots | ||
) |
Compute the dogbone geometry for a given line pair and dogbone parameters.
This turns a sharp internal corner into a "dogbone" shape, which allows it to be routed with a cutter that has a radius, and still allows a sharp external corner to fit into the space.
_----_
---—/ | ------—+ / | | | |
Definition at line 129 of file corner_operations.cpp.
References std::abs(), SEG::Angle(), ANGLE_180, ANGLE_90, SEG::B, DEGREES_T, SHAPE_ARC::GetCentralAngle(), KIGEOM::GetOtherEnd(), SHAPE_ARC::GetP0(), SHAPE_ARC::GetP1(), GetRotated(), KIGEOM::GetSharedEndpoint(), CIRCLE::Intersect(), EDA_ANGLE::IsHorizontal(), KIGEOM::PointsAreInSameDirection(), and SHAPE_ARC::Reverse().
Referenced by DoDogboneTestChecks(), and DOGBONE_CORNER_ROUTINE::ProcessLinePair().