KiCad PCB EDA Suite
Loading...
Searching...
No Matches
point_editor_behavior.cpp File Reference

Go to the source code of this file.

Functions

static void editArcEndpointKeepTangent (EDA_SHAPE &aArc, const VECTOR2I &aCenter, const VECTOR2I &aStart, const VECTOR2I &aMid, const VECTOR2I &aEnd, const VECTOR2I &aCursor)
 Move an end point of the arc, while keeping the tangent at the other endpoint.
 
static void editArcCenterKeepEndpoints (EDA_SHAPE &aArc, const VECTOR2I &aCenter, const VECTOR2I &aStart, const VECTOR2I &aMid, const VECTOR2I &aEnd)
 Move the arc center but keep endpoint locations.
 
static void editArcEndpointKeepCenter (EDA_SHAPE &aArc, const VECTOR2I &aCenter, const VECTOR2I &aStart, const VECTOR2I &aMid, const VECTOR2I &aEnd, const VECTOR2I &aCursor)
 Move an end point of the arc around the circumference.
 
static void editArcEndpointKeepCenterAndRadius (EDA_SHAPE &aArc, const VECTOR2I &aCenter, const VECTOR2I &aStart, const VECTOR2I &aMid, const VECTOR2I &aEnd)
 
static void editArcMidKeepCenter (EDA_SHAPE &aArc, const VECTOR2I &aCenter, const VECTOR2I &aStart, const VECTOR2I &aMid, const VECTOR2I &aEnd, const VECTOR2I &aCursor)
 Move the mid point of the arc, while keeping the two endpoints.
 
static void editArcMidKeepEndpoints (EDA_SHAPE &aArc, const VECTOR2I &aStart, const VECTOR2I &aEnd, const VECTOR2I &aCursor)
 Move the mid point of the arc, while keeping the angle.
 
ARC_EDIT_MODE IncrementArcEditMode (ARC_EDIT_MODE aMode)
 

Function Documentation

◆ editArcCenterKeepEndpoints()

static void editArcCenterKeepEndpoints ( EDA_SHAPE & aArc,
const VECTOR2I & aCenter,
const VECTOR2I & aStart,
const VECTOR2I & aMid,
const VECTOR2I & aEnd )
static

Move the arc center but keep endpoint locations.

Definition at line 393 of file point_editor_behavior.cpp.

References SEG::A, SEG::B, VECTOR2< int32_t >::ECOORD_MAX, SEG::IntersectLines(), EDA_SHAPE::SetCenter(), and SEG::SquaredDistance().

Referenced by EDA_ARC_POINT_EDIT_BEHAVIOR::UpdateItem().

◆ editArcEndpointKeepCenter()

static void editArcEndpointKeepCenter ( EDA_SHAPE & aArc,
const VECTOR2I & aCenter,
const VECTOR2I & aStart,
const VECTOR2I & aMid,
const VECTOR2I & aEnd,
const VECTOR2I & aCursor )
static

◆ editArcEndpointKeepCenterAndRadius()

static void editArcEndpointKeepCenterAndRadius ( EDA_SHAPE & aArc,
const VECTOR2I & aCenter,
const VECTOR2I & aStart,
const VECTOR2I & aMid,
const VECTOR2I & aEnd )
static

◆ editArcEndpointKeepTangent()

static void editArcEndpointKeepTangent ( EDA_SHAPE & aArc,
const VECTOR2I & aCenter,
const VECTOR2I & aStart,
const VECTOR2I & aMid,
const VECTOR2I & aEnd,
const VECTOR2I & aCursor )
static

◆ editArcMidKeepCenter()

static void editArcMidKeepCenter ( EDA_SHAPE & aArc,
const VECTOR2I & aCenter,
const VECTOR2I & aStart,
const VECTOR2I & aMid,
const VECTOR2I & aEnd,
const VECTOR2I & aCursor )
static

Move the mid point of the arc, while keeping the two endpoints.

Definition at line 536 of file point_editor_behavior.cpp.

References end, EDA_UNIT_UTILS::Mils2IU(), pcbIUScale, radius, VECTOR2< T >::Resize(), EDA_SHAPE::SetEnd(), and EDA_SHAPE::SetStart().

Referenced by EDA_ARC_POINT_EDIT_BEHAVIOR::UpdateItem().

◆ editArcMidKeepEndpoints()

static void editArcMidKeepEndpoints ( EDA_SHAPE & aArc,
const VECTOR2I & aStart,
const VECTOR2I & aEnd,
const VECTOR2I & aCursor )
static

Move the mid point of the arc, while keeping the angle.

Definition at line 567 of file point_editor_behavior.cpp.

References EDA_SHAPE::GetArcMid(), SEG::NearestPoint(), VECTOR2< T >::Resize(), and EDA_SHAPE::SetArcGeometry().

Referenced by EDA_ARC_POINT_EDIT_BEHAVIOR::UpdateItem().

◆ IncrementArcEditMode()