|
KiCad PCB EDA Suite
|
#include <board_design_settings.h>#include <pcb_track.h>#include <pad.h>#include <zone_filler.h>#include <board_commit.h>#include <drc/drc_rtree.h>#include <trigo.h>#include "teardrop.h"#include <geometry/convex_hull.h>#include <geometry/shape_line_chain.h>#include <convert_basic_shapes_to_polygon.h>#include <bezier_curves.h>#include <wx/log.h>Go to the source code of this file.
Functions | |
| static VECTOR2D | NormalizeVector (const VECTOR2I &aVector) |
| static VECTOR2I | computeCornerTangentControlPoint (const VECTOR2I &aAnchor, const VECTOR2I &aCornerCenter, double aBias, const VECTOR2I &aDesiredDir) |
| Helper to compute a control point for a teardrop anchor on a rounded rectangle corner. | |
| static bool | isPointOnOvalEnd (const VECTOR2I &aPoint, const VECTOR2I &aPadPos, const VECTOR2I &aPadSize, const EDA_ANGLE &aRotation, VECTOR2I &aArcCenter) |
| Check if a point is on the curved (semicircular) end of an oval pad. | |
| static bool | isPointOnRoundedCorner (const VECTOR2I &aPoint, const VECTOR2I &aPadPos, const VECTOR2I &aPadSize, int aCornerRadius, const EDA_ANGLE &aRotation, VECTOR2I &aCornerCenter) |
| Check if a point is within a rounded corner region of a rounded rectangle pad. | |
|
static |
Helper to compute a control point for a teardrop anchor on a rounded rectangle corner.
The control point is placed along the tangent to the corner arc at the anchor point, in the direction that best aligns with the desired direction (typically toward the track).
| aAnchor | the anchor point on the pad edge |
| aCornerCenter | the center of the corner arc |
| aBias | the distance from the anchor to place the control point |
| aDesiredDir | the direction we want the control point to go (toward track) |
Definition at line 328 of file teardrop_utils.cpp.
References VECTOR2< T >::EuclideanNorm(), KiROUND(), VECTOR2< T >::Resize(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by TEARDROP_MANAGER::computeCurvedForRectShape().
|
static |
Check if a point is on the curved (semicircular) end of an oval pad.
An oval is a stadium shape with semicircular caps on the ends of the minor axis.
| aPoint | the point to check |
| aPadPos | the pad center position |
| aPadSize | the pad size (width, height) |
| aRotation | the pad rotation |
| aArcCenter | [out] if on curved end, receives the semicircle center |
Definition at line 367 of file teardrop_utils.cpp.
References std::abs(), radius, RotatePoint(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by TEARDROP_MANAGER::computeCurvedForRectShape().
|
static |
Check if a point is within a rounded corner region of a rounded rectangle pad.
Returns true if the point is in a corner arc region and provides the corner center.
| aPoint | the point to check |
| aPadPos | the pad center position |
| aPadSize | the pad size (width, height) |
| aCornerRadius | the corner radius |
| aRotation | the pad rotation |
| aCornerCenter | [out] if in corner, receives the corner arc center |
Definition at line 430 of file teardrop_utils.cpp.
References std::abs(), RotatePoint(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by TEARDROP_MANAGER::computeCurvedForRectShape().
Definition at line 221 of file teardrop_utils.cpp.
References VECTOR2< T >::EuclideanNorm().
Referenced by TEARDROP_MANAGER::computeTeardropPolygon().