59 const EDA_ANGLE& aCenterAngle,
int aWidth = 0 );
78 SHAPE_ARC(
const SEG& aSegmentA,
const SEG& aSegmentB,
int aRadius,
int aWidth = 0 );
99 const EDA_ANGLE& aAngle,
double aWidth = 0 );
111 const VECTOR2I& aCenter,
bool aClockwise =
false,
119 const BOX2I BBox(
int aClearance = 0 )
const override;
123 bool Collide(
const SEG& aSeg,
int aClearance = 0,
int* aActual =
nullptr,
124 VECTOR2I* aLocation =
nullptr )
const override;
125 bool Collide(
const VECTOR2I& aP,
int aClearance = 0,
int* aActual =
nullptr,
126 VECTOR2I* aLocation =
nullptr )
const override;
129 bool Collide(
const SHAPE* aShape,
int aClearance = 0,
int* aActual =
nullptr,
130 VECTOR2I* aLocation =
nullptr )
const override
143 int IntersectLine(
const SEG& aSeg, std::vector<VECTOR2I>* aIpsBuffer )
const;
152 int Intersect(
const CIRCLE& aArc, std::vector<VECTOR2I>* aIpsBuffer )
const;
250 double* aEffectiveAccuracy =
nullptr )
const;
ERROR_LOC
When approximating an arc or circle, should the error be placed on the outside or inside of the curve...
constexpr double PCB_IU_PER_MM
Represent basic circle geometry with utility geometry functions.
EDA_ANGLE GetCentralAngle() const
const VECTOR2I & GetArcMid() const
bool Collide(const SHAPE *aShape, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override
void Move(const VECTOR2I &aVector) override
SHAPE_ARC & ConstructFromStartEndAngle(const VECTOR2I &aStart, const VECTOR2I &aEnd, const EDA_ANGLE &aAngle, double aWidth=0)
Construct this arc from the given start, end and angle.
const BOX2I BBox(int aClearance=0) const override
Compute a bounding box of the shape, with a margin of aClearance a collision.
EDA_ANGLE GetEndAngle() const
void Rotate(const EDA_ANGLE &aAngle, const VECTOR2I &aCenter) override
Rotate the arc by a given angle about a point.
bool sliceContainsPoint(const VECTOR2I &p) const
VECTOR2I NearestPoint(const VECTOR2I &aP) const
int Intersect(const CIRCLE &aArc, std::vector< VECTOR2I > *aIpsBuffer) const
Find intersection points between this arc and a CIRCLE.
void SetWidth(int aWidth)
SHAPE_ARC & ConstructFromStartEndCenter(const VECTOR2I &aStart, const VECTOR2I &aEnd, const VECTOR2I &aCenter, bool aClockwise=false, double aWidth=0)
Constructs this arc from the given start, end and center.
void Mirror(const VECTOR2I &aRef, FLIP_DIRECTION aFlipDirection)
SHAPE_ARC Reversed() const
const VECTOR2I & GetP1() const
int IntersectLine(const SEG &aSeg, std::vector< VECTOR2I > *aIpsBuffer) const
Find intersection points between this arc and aSeg, treating aSeg as an infinite line.
bool Collide(const SEG &aSeg, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override
Check if the boundary of shape (this) lies closer to the segment aSeg than aClearance,...
const SHAPE_LINE_CHAIN ConvertToPolyline(double aAccuracy=DefaultAccuracyForPCB(), double *aEffectiveAccuracy=nullptr) const
Construct a SHAPE_LINE_CHAIN of segments from a given arc.
EDA_ANGLE GetStartAngle() const
void TransformToPolygon(SHAPE_POLY_SET &aBuffer, int aError, ERROR_LOC aErrorLoc) const override
Fills a SHAPE_POLY_SET with a polygon representation of this shape.
static double DefaultAccuracyForPCB()
bool operator==(SHAPE_ARC const &aArc) const
SHAPE * Clone() const override
Return a dynamically allocated copy of the shape.
const VECTOR2I & GetP0() const
bool IsSolid() const override
const VECTOR2I & GetCenter() const
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
Represent a set of closed polygons.
An abstract shape on 2D plane.
virtual bool Collide(const VECTOR2I &aP, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const
Check if the boundary of shape (this) lies closer to the point aP than aClearance,...
VECTOR3< T > Cross(const VECTOR3< T > &aVector) const
Compute cross product of self with aVector.
std::ostream & operator<<(std::ostream &aStream, const EDA_TEXT &aText)