|
KiCad PCB EDA Suite
|
#include <edit_relations.h>
Public Member Functions | |
| EDIT_RELATION_KIND | Kind () const |
| const EDIT_POINT * | Reference () const |
| const EDIT_POINT * | SecondaryReference () const |
| const VECTOR2I & | Origin () const |
| const VECTOR2I & | Direction () const |
| void | Apply (EDIT_POINT &aHandle, const GRID_HELPER &aGrid) const |
| void | Apply (EDIT_LINE &aHandle, const GRID_HELPER &aGrid) const |
Static Public Member Functions | |
| static std::unique_ptr< EDIT_RELATION > | SameX (const EDIT_POINT &aReference) |
| static std::unique_ptr< EDIT_RELATION > | SameY (const EDIT_POINT &aReference) |
| static std::unique_ptr< EDIT_RELATION > | Angle45 (const EDIT_POINT &aReference) |
| static std::unique_ptr< EDIT_RELATION > | Angle90 (const EDIT_POINT &aReference) |
| static std::unique_ptr< EDIT_RELATION > | PointOnLine (const EDIT_POINT &aConstrained, const EDIT_POINT &aReference) |
| static std::unique_ptr< EDIT_RELATION > | PointOnCircle (const EDIT_POINT &aCenter, const EDIT_POINT &aEnd) |
| static std::unique_ptr< EDIT_RELATION > | PerpendicularTranslation (const EDIT_LINE &aLine) |
Private Member Functions | |
| EDIT_RELATION (EDIT_RELATION_KIND aKind) | |
Static Private Member Functions | |
| static std::unique_ptr< EDIT_RELATION > | make (EDIT_RELATION_KIND aKind, const EDIT_POINT &aReference) |
Private Attributes | |
| EDIT_RELATION_KIND | m_kind |
| const EDIT_POINT * | m_reference = nullptr |
| const EDIT_POINT * | m_secondaryReference = nullptr |
| VECTOR2I | m_origin |
| VECTOR2I | m_direction |
Definition at line 68 of file edit_relations.h.
|
inlineexplicitprivate |
Definition at line 89 of file edit_relations.h.
References m_kind.
Referenced by make(), and PerpendicularTranslation().
|
static |
Definition at line 50 of file edit_relations.cpp.
References ANGLE_STEP_45, and make().
Referenced by BARCODE_POINT_EDIT_BEHAVIOR::MakePoints(), DIM_CENTER_POINT_EDIT_BEHAVIOR::MakePoints(), DIM_LEADER_POINT_EDIT_BEHAVIOR::MakePoints(), DIM_RADIAL_POINT_EDIT_BEHAVIOR::MakePoints(), and PCB_POINT_EDITOR::setAltConstraint().
|
static |
Definition at line 56 of file edit_relations.cpp.
References ANGLE_STEP_90, and make().
Referenced by PCB_POINT_EDITOR::setAltConstraint().
| void EDIT_RELATION::Apply | ( | EDIT_LINE & | aHandle, |
| const GRID_HELPER & | aGrid ) const |
Definition at line 167 of file edit_relations.cpp.
References EDIT_LINE::GetPosition(), m_direction, m_kind, m_origin, PERPENDICULAR_TRANSLATION, and EDIT_LINE::SetPosition().
| void EDIT_RELATION::Apply | ( | EDIT_POINT & | aHandle, |
| const GRID_HELPER & | aGrid ) const |
Definition at line 89 of file edit_relations.cpp.
References GRID_HELPER::AlignGrid(), ANGLE_STEP_45, ANGLE_STEP_90, center, CIRCLE, EDIT_POINT::GetGridConstraint(), EDIT_POINT::GetPosition(), GetVectorSnapped45(), GetVectorSnapped90(), m_direction, m_kind, m_reference, m_secondaryReference, PERPENDICULAR_TRANSLATION, POINT_ON_CIRCLE, POINT_ON_LINE, radius, SAME_X, SAME_Y, EDIT_POINT::SetPosition(), SNAP_TO_GRID, VECTOR2< T >::x, and VECTOR2< T >::y.
|
inline |
Definition at line 83 of file edit_relations.h.
References m_direction.
Referenced by authoredSnapRelation(), and getConstraintDirections().
|
inline |
Definition at line 79 of file edit_relations.h.
References m_kind.
Referenced by authoredSnapRelation(), BOOST_AUTO_TEST_CASE(), getConstraintDirections(), and SCH_POINT_EDITOR::Main().
|
staticprivate |
Definition at line 30 of file edit_relations.cpp.
References EDIT_RELATION().
Referenced by Angle45(), Angle90(), PointOnCircle(), PointOnLine(), SameX(), and SameY().
|
inline |
Definition at line 82 of file edit_relations.h.
References m_origin.
Referenced by authoredSnapRelation().
|
static |
Definition at line 79 of file edit_relations.cpp.
References EDIT_RELATION(), EDIT_LINE::GetEnd(), EDIT_LINE::GetOrigin(), EDIT_LINE::GetPosition(), EDIT_POINT::GetPosition(), VECTOR2< T >::Perpendicular(), and PERPENDICULAR_TRANSLATION.
Referenced by BOOST_AUTO_TEST_CASE(), RECTANGLE_POINT_EDIT_BEHAVIOR::MakePoints(), RECTANGLE_POINT_EDIT_BEHAVIOR::MakePoints(), SHEET_POINT_EDIT_BEHAVIOR::MakePoints(), RECTANGLE_POINT_EDIT_BEHAVIOR::UpdateItem(), and SHEET_POINT_EDIT_BEHAVIOR::UpdateItem().
|
static |
Definition at line 71 of file edit_relations.cpp.
References make(), and POINT_ON_CIRCLE.
|
static |
Definition at line 62 of file edit_relations.cpp.
References EDIT_POINT::GetPosition(), make(), and POINT_ON_LINE.
Referenced by ALIGNED_DIMENSION_POINT_EDIT_BEHAVIOR::MakePoints(), DIM_RADIAL_POINT_EDIT_BEHAVIOR::MakePoints(), ALIGNED_DIMENSION_POINT_EDIT_BEHAVIOR::updateAlignedDimension(), and DIM_RADIAL_POINT_EDIT_BEHAVIOR::UpdateItem().
|
inline |
Definition at line 80 of file edit_relations.h.
References m_reference.
Referenced by authoredSnapRelation(), and SCH_POINT_EDITOR::Main().
|
static |
Definition at line 38 of file edit_relations.cpp.
References make(), and SAME_X.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 44 of file edit_relations.cpp.
|
inline |
Definition at line 81 of file edit_relations.h.
References m_secondaryReference.
Referenced by authoredSnapRelation().
|
private |
Definition at line 100 of file edit_relations.h.
Referenced by Apply(), Apply(), and Direction().
|
private |
Definition at line 96 of file edit_relations.h.
Referenced by Apply(), Apply(), EDIT_RELATION(), and Kind().
|
private |
Definition at line 99 of file edit_relations.h.
|
private |
Definition at line 97 of file edit_relations.h.
Referenced by Apply(), and Reference().
|
private |
Definition at line 98 of file edit_relations.h.
Referenced by Apply(), and SecondaryReference().