KiCad PCB EDA Suite
|
#include <shape_arc.h>
Public Member Functions | |
SHAPE_ARC () | |
SHAPE_ARC (const VECTOR2I &aArcCenter, const VECTOR2I &aArcStartPoint, const EDA_ANGLE &aCenterAngle, int aWidth=0) | |
Construct and arc using center, start, angle. More... | |
SHAPE_ARC (const VECTOR2I &aArcStart, const VECTOR2I &aArcMid, const VECTOR2I &aArcEnd, int aWidth) | |
SHAPE_ARC (const SEG &aSegmentA, const SEG &aSegmentB, int aRadius, int aWidth=0) | |
Build a SHAPE_ARC which is tangent to two segments and a given radius. More... | |
SHAPE_ARC (const SHAPE_ARC &aOther) | |
virtual | ~SHAPE_ARC () |
SHAPE * | Clone () const override |
Return a dynamically allocated copy of the shape. More... | |
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. More... | |
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. More... | |
const VECTOR2I & | GetP0 () const |
const VECTOR2I & | GetP1 () const |
const VECTOR2I & | GetArcMid () const |
VECTOR2I | GetCenter () const |
const BOX2I | BBox (int aClearance=0) const override |
Compute a bounding box of the shape, with a margin of aClearance a collision. More... | |
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, indicating a collision. More... | |
bool | Collide (const VECTOR2I &aP, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override |
Check if the boundary of shape (this) lies closer to the point aP than aClearance, indicating a collision. More... | |
bool | Collide (const SHAPE *aShape, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override |
int | IntersectLine (const SEG &aSeg, std::vector< VECTOR2I > *aIpsBuffer) const |
Find intersection points between this arc and aSeg, treating aSeg as an infinite line. More... | |
int | Intersect (const SHAPE_ARC &aArc, std::vector< VECTOR2I > *aIpsBuffer) const |
Find intersection points between this arc and aArc. More... | |
bool | IsClockwise () const |
void | SetWidth (int aWidth) |
int | GetWidth () const |
bool | IsSolid () const override |
void | Move (const VECTOR2I &aVector) override |
void | Rotate (const EDA_ANGLE &aAngle, const VECTOR2I &aCenter) override |
Rotate the arc by a given angle about a point. More... | |
void | Mirror (bool aX=true, bool aY=false, const VECTOR2I &aVector={ 0, 0 }) |
void | Mirror (const SEG &axis) |
void | Reverse () |
SHAPE_ARC | Reversed () const |
double | GetRadius () const |
SEG | GetChord () const |
EDA_ANGLE | GetCentralAngle () const |
EDA_ANGLE | GetStartAngle () const |
EDA_ANGLE | GetEndAngle () const |
double | GetLength () const |
const SHAPE_LINE_CHAIN | ConvertToPolyline (double aAccuracy=DefaultAccuracyForPCB(), double *aEffectiveAccuracy=nullptr) const |
Construct a SHAPE_LINE_CHAIN of segments from a given arc. More... | |
bool | operator== (SHAPE_ARC const &aArc) const |
int | GetClearance (const SHAPE *aOther) const |
Return the actual minimum distance between two shapes. More... | |
bool | IsNull () const |
Return true if the shape is a null shape. More... | |
virtual bool | Collide (const SHAPE *aShape, int aClearance, VECTOR2I *aMTV) const |
Check if the boundary of shape (this) lies closer to the shape aShape than aClearance, indicating a collision. More... | |
virtual VECTOR2I | Centre () const |
Compute a center-of-mass of the shape. More... | |
virtual bool | Parse (std::stringstream &aStream) |
virtual const std::string | Format (bool aCplusPlus=true) const |
FACET * | NewFacet () |
SGNODE * | CalcShape (SGNODE *aParent, SGNODE *aColor, WRL1_ORDER aVertexOrder, float aCreaseLimit=0.74317, bool isVRML2=false) |
SHAPE_TYPE | Type () const |
Return the type of the shape. More... | |
wxString | TypeName () const |
virtual bool | HasIndexableSubshapes () const |
virtual size_t | GetIndexableSubshapeCount () const |
virtual void | GetIndexableSubshapes (std::vector< const SHAPE * > &aSubshapes) const |
Static Public Member Functions | |
static double | DefaultAccuracyForPCB () |
Static Public Attributes | |
static const int | MIN_PRECISION_IU = 4 |
This is the minimum precision for all the points in a shape. More... | |
Protected Types | |
typedef VECTOR2I::extended_type | ecoord |
Protected Attributes | |
SHAPE_TYPE | m_type |
< type of our shape More... | |
Private Member Functions | |
bool | ccw (const VECTOR2I &aA, const VECTOR2I &aB, const VECTOR2I &aC) const |
void | update_bbox () |
bool | sliceContainsPoint (const VECTOR2I &p) const |
Private Attributes | |
VECTOR2I | m_start |
VECTOR2I | m_mid |
VECTOR2I | m_end |
int | m_width |
BOX2I | m_bbox |
std::list< FACET * > | facets |
Definition at line 36 of file shape_arc.h.
|
protectedinherited |
|
inline |
Definition at line 40 of file shape_arc.h.
Referenced by Clone(), and Reversed().
SHAPE_ARC::SHAPE_ARC | ( | const VECTOR2I & | aArcCenter, |
const VECTOR2I & | aArcStartPoint, | ||
const EDA_ANGLE & | aCenterAngle, | ||
int | aWidth = 0 |
||
) |
Construct and arc using center, start, angle.
Center and angle are used to calculate the mid and end points of the arc, and are not stored.
aArcCenter | is the arc center. |
aArcStartPoint | is the arc start point. |
aCenterAngle | is the arc angle. |
aWidth | is the arc line thickness. |
Definition at line 43 of file shape_arc.cpp.
References KiROUND(), m_end, m_mid, m_start, RotatePoint(), update_bbox(), VECTOR2< T >::x, and VECTOR2< T >::y.
SHAPE_ARC::SHAPE_ARC | ( | const VECTOR2I & | aArcStart, |
const VECTOR2I & | aArcMid, | ||
const VECTOR2I & | aArcEnd, | ||
int | aWidth | ||
) |
aArcStart | is the arc start point. |
aArcEnd | is the arc end point. |
aArcMid | is the arc mid point. |
aWidth | is the arc line thickness. |
Definition at line 64 of file shape_arc.cpp.
References update_bbox().
Build a SHAPE_ARC which is tangent to two segments and a given radius.
aSegmentA | is the first segment |
aSegmentB | is the second segment |
aRadius | is the arc radius |
aWidth | is the arc line thickness |
Definition at line 76 of file shape_arc.cpp.
References SEG::A, std::abs(), ANGLE_90, EDA_ANGLE::AsRadians(), SEG::B, SEG::Center(), EDA_ANGLE::Cos(), VECTOR2< T >::EuclideanNorm(), SEG::Intersect(), KiROUND(), SEG::Length(), SEG::LineProject(), m_end, m_mid, m_start, m_width, RotatePoint(), EDA_ANGLE::Sin(), update_bbox(), VECTOR2< T >::x, and VECTOR2< T >::y.
SHAPE_ARC::SHAPE_ARC | ( | const SHAPE_ARC & | aOther | ) |
Definition at line 180 of file shape_arc.cpp.
|
inlinevirtual |
Definition at line 80 of file shape_arc.h.
|
overridevirtual |
Compute a bounding box of the shape, with a margin of aClearance a collision.
aClearance | how much the bounding box is expanded wrs to the minimum enclosing rectangle for the shape. |
Implements SHAPE.
Definition at line 355 of file shape_arc.cpp.
References BOX2< Vec >::Inflate(), and m_bbox.
Referenced by BOOST_AUTO_TEST_CASE(), CheckArcGeom(), Collide(), drawShapes(), GERBER_DRAW_ITEM::GetBoundingBox(), and playground_main_func().
|
inherited |
Definition at line 703 of file wrlfacet.cpp.
References IFSG_NODE::AddChildNode(), IFSG_INDEX::AddIndex(), IFSG_NODE::AddRefNode(), SHAPE::facets, IFSG_NODE::GetRawPtr(), S3D::GetSGNodeParent(), IFSG_FACESET::NewNode(), IFSG_SHAPE::NewNode(), IFSG_COLORS::SetColorList(), IFSG_COORDS::SetCoordsList(), IFSG_NORMALS::SetNormalList(), SGPOINT::x, SGPOINT::y, and SGPOINT::z.
Referenced by WRL2FACESET::TranslateToSG(), X3DIFACESET::TranslateToSG(), and WRL1FACESET::TranslateToSG().
|
inlineprivate |
Definition at line 248 of file shape_arc.h.
References VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by Collide().
|
inlinevirtualinherited |
Compute a center-of-mass of the shape.
Definition at line 230 of file shape.h.
References SHAPE::BBox(), and BOX2< Vec >::Centre().
Referenced by Collide().
|
inlineoverridevirtual |
Return a dynamically allocated copy of the shape.
copy | of the shape |
Reimplemented from SHAPE.
Definition at line 82 of file shape_arc.h.
References SHAPE_ARC().
Referenced by CheckArc().
|
overridevirtual |
Check if the boundary of shape (this) lies closer to the segment aSeg than aClearance, indicating a collision.
aActual | [out] an optional pointer to an int to be updated with the actual distance int the event of a collision. |
aLocation | [out] an option pointer to a point to store a nearby location in the event of a collision. |
Implements SHAPE.
Definition at line 241 of file shape_arc.cpp.
References SEG::A, SEG::B, Collide(), GetCenter(), GetRadius(), CIRCLE::Intersect(), m_end, m_start, and SEG::NearestPoint().
Referenced by BOOST_AUTO_TEST_CASE(), Collide(), Collide(), SHAPE_LINE_CHAIN::Collide(), drawShapes(), and GEOM_TEST::IsOutlineValid().
|
virtualinherited |
Check if the boundary of shape (this) lies closer to the shape aShape than aClearance, indicating a collision.
aShape | shape to check collision against |
aClearance | minimum clearance |
aMTV | minimum translation vector |
aActual | [out] an optional pointer to an int to store the actual distance in the event of a collision. |
aLocation | [out] an option pointer to a point to store a nearby location in the event of a collision. |
Reimplemented in SHAPE_COMPOUND, SHAPE_RECT, and SHAPE_SEGMENT.
Definition at line 1109 of file shape_collisions.cpp.
References collideShapes().
|
inlineoverridevirtual |
Reimplemented from SHAPE.
Definition at line 125 of file shape_arc.h.
References SHAPE::Collide().
|
overridevirtual |
Check if the boundary of shape (this) lies closer to the point aP than aClearance, indicating a collision.
aActual | [out] an optional pointer to an int to store the actual distance in the event of a collision. |
aLocation | [out] an option pointer to a point to store a nearby location in the event of a collision. |
Reimplemented from SHAPE.
Definition at line 372 of file shape_arc.cpp.
References ANGLE_0, BBox(), ccw(), CIRCLE::Center, EuclideanNorm(), GetCenter(), GetCentralAngle(), GetEndAngle(), GetRadius(), GetStartAngle(), m_end, m_start, m_width, CIRCLE::NearestPoint(), and EDA_ANGLE::Normalize().
SHAPE_ARC & 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.
aStart | is the arc starting point |
aEnd | is the arc endpoint |
aAngle | is the arc included angle |
aWidth | is the arc line thickness |
Definition at line 191 of file shape_arc.cpp.
References CalcArcCenter(), m_end, m_mid, m_start, m_width, RotatePoint(), and update_bbox().
Referenced by DIRECTION_45::BuildInitialTrace(), SCH_EAGLE_PLUGIN::loadPolyLine(), and SCH_EAGLE_PLUGIN::loadSymbolPolyLine().
SHAPE_ARC & 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.
aStart | is the arc starting point |
aEnd | is the arc endpoint |
aCenter | is the arc center |
aClockwise | determines which of the two solutions to construct |
aWidth | is the arc line thickness |
Definition at line 209 of file shape_arc.cpp.
References PNS::angle(), ANGLE_360, m_end, m_mid, m_start, EDA_ANGLE::Normalize(), RotatePoint(), and update_bbox().
Referenced by SHAPE_LINE_CHAIN::amendArc(), BOOST_AUTO_TEST_CASE(), CADSTAR_ARCHIVE_PARSER::VERTEX::BuildArc(), DIRECTION_45::BuildInitialTrace(), SHAPE_LINE_CHAIN::Slice(), and SHAPE_LINE_CHAIN::splitArc().
const SHAPE_LINE_CHAIN SHAPE_ARC::ConvertToPolyline | ( | double | aAccuracy = DefaultAccuracyForPCB() , |
double * | aEffectiveAccuracy = nullptr |
||
) | const |
Construct a SHAPE_LINE_CHAIN of segments from a given arc.
aAccuracy | maximum divergence from true arc given in internal units. |
aEffectiveAccuracy | is the actual divergence from true arc given. the approximation error is between -aEffectiveAccuracy/2 and +aEffectiveAccuracy/2 in internal units |
Definition at line 470 of file shape_arc.cpp.
References SHAPE_LINE_CHAIN::Append(), EDA_ANGLE::AsDegrees(), CircleToEndSegmentDeltaRadius(), EDA_ANGLE::Cos(), GetArcToSegmentCount(), GetCenter(), GetCentralAngle(), GetRadius(), GetStartAngle(), KiROUND(), m_end, m_start, m_width, EDA_ANGLE::Sin(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by SHAPE_LINE_CHAIN::Append(), PNS::ArcHull(), BOARD_ADAPTER::createPadWithMargin(), KIGFX::PCB_PAINTER::draw(), TEARDROP_MANAGER::findAnchorPointsOnTrack(), SHAPE_LINE_CHAIN::Insert(), and SHAPE_LINE_CHAIN::SHAPE_LINE_CHAIN().
|
inlinestatic |
Definition at line 221 of file shape_arc.h.
References PCB_IU_PER_MM.
Referenced by SHAPE_LINE_CHAIN::Append(), PNS::ArcHull(), BOOST_AUTO_TEST_CASE(), GEOM_TEST::IsOutlineValid(), and PNS::SHOVE::ShoveObstacleLine().
|
virtualinherited |
Reimplemented in SHAPE_CIRCLE, SHAPE_COMPOUND, SHAPE_LINE_CHAIN, SHAPE_POLY_SET, SHAPE_RECT, and SHAPE_SEGMENT.
Definition at line 41 of file shape.cpp.
References SHAPE_BASE::m_type.
Referenced by SHAPE_CIRCLE::Format(), SHAPE_SEGMENT::Format(), and SHAPE_FILE_IO::Write().
|
inline |
Definition at line 114 of file shape_arc.h.
References m_mid.
Referenced by SHAPE_LINE_CHAIN::Append(), BOOST_AUTO_TEST_CASE(), PCB_PLUGIN::formatPolyPts(), ALTIUM_PCB::HelperCreateBoardOutline(), FABMASTER::loadFootprints(), FABMASTER::loadGraphics(), FABMASTER::loadOutline(), CADSTAR_SCH_ARCHIVE_LOADER::loadShapeVertices(), operator<<(), PCB_ARC::PCB_ARC(), GERBER_PLOTTER::plotArc(), and PNS_KICAD_IFACE::UpdateItem().
VECTOR2I SHAPE_ARC::GetCenter | ( | ) | const |
Definition at line 433 of file shape_arc.cpp.
References CalcArcCenter(), m_end, m_mid, and m_start.
Referenced by SHAPE_LINE_CHAIN::amendArc(), PNS_LOG_VIEWER_OVERLAY::Arc(), CheckArcGeom(), Collide(), Collide(), collideArc2Arc(), ConvertToPolyline(), ROUTER_PREVIEW_ITEM::drawLineChain(), ROUTER_PREVIEW_ITEM::drawShape(), GetCentralAngle(), GetEndAngle(), GetRadius(), GetStartAngle(), Intersect(), IntersectLine(), GERBER_PLOTTER::plotArc(), SHAPE_LINE_CHAIN::Slice(), sliceContainsPoint(), SHAPE_LINE_CHAIN::splitArc(), STROKE_PARAMS::Stroke(), TransformArcToPolygon(), and update_bbox().
EDA_ANGLE SHAPE_ARC::GetCentralAngle | ( | ) | const |
Definition at line 448 of file shape_arc.cpp.
References ANGLE_360, GetCenter(), m_end, m_mid, m_start, and EDA_ANGLE::Normalize180().
Referenced by PNS_LOG_VIEWER_OVERLAY::Arc(), CheckArcGeom(), Collide(), ConvertToPolyline(), ROUTER_PREVIEW_ITEM::drawLineChain(), ROUTER_PREVIEW_ITEM::drawShape(), GetLength(), IsClockwise(), sliceContainsPoint(), TransformArcToPolygon(), and update_bbox().
|
inline |
Definition at line 187 of file shape_arc.h.
References m_end, and m_start.
Referenced by CheckArcGeom().
|
inherited |
Return the actual minimum distance between two shapes.
distance | in IU |
Definition at line 49 of file shape.cpp.
References SHAPE_BASE::GetIndexableSubshapeCount(), and SHAPE_BASE::GetIndexableSubshapes().
EDA_ANGLE SHAPE_ARC::GetEndAngle | ( | ) | const |
Definition at line 426 of file shape_arc.cpp.
References PNS::angle(), GetCenter(), and m_end.
Referenced by CheckArcGeom(), and Collide().
|
inlinevirtualinherited |
Reimplemented in SHAPE_COMPOUND, and SHAPE_POLY_SET.
Definition at line 111 of file shape.h.
Referenced by SHAPE::GetClearance().
|
inlinevirtualinherited |
Reimplemented in SHAPE_COMPOUND, and SHAPE_POLY_SET.
Definition at line 113 of file shape.h.
Referenced by SHAPE_COMPOUND::AddShape(), SHAPE::GetClearance(), and ROUTER_PREVIEW_ITEM::ViewDraw().
double SHAPE_ARC::GetLength | ( | ) | const |
Definition at line 439 of file shape_arc.cpp.
References std::abs(), EDA_ANGLE::AsRadians(), GetCentralAngle(), and GetRadius().
|
inline |
Definition at line 112 of file shape_arc.h.
References m_start.
Referenced by PNS::NODE::Add(), PCB_GRID_HELPER::AlignToArc(), PNS::ARC::Anchor(), SHAPE_LINE_CHAIN::Append(), BOOST_AUTO_TEST_CASE(), DIRECTION_45::BuildInitialTrace(), Collide(), collideArc2Arc(), DIRECTION_45::DIRECTION_45(), EDIT_TOOL::FilletTracks(), PCB_PLUGIN::formatPolyPts(), ALTIUM_PCB::HelperCreateBoardOutline(), GEOM_TEST::IsOutlineValid(), FABMASTER::loadFootprints(), FABMASTER::loadGraphics(), FABMASTER::loadOutline(), CADSTAR_SCH_ARCHIVE_LOADER::loadShapeVertices(), CONVERT_TOOL::makePolysFromChainedSegs(), SHAPE_LINE_CHAIN::NearestPoint(), operator<<(), PCB_ARC::PCB_ARC(), GERBER_PLOTTER::plotArc(), SHAPE_LINE_CHAIN::Slice(), SHAPE_LINE_CHAIN::splitArc(), STROKE_PARAMS::Stroke(), TransformArcToPolygon(), and PNS_KICAD_IFACE::UpdateItem().
|
inline |
Definition at line 113 of file shape_arc.h.
References m_end.
Referenced by PNS::NODE::Add(), PNS::MEANDERED_LINE::AddArc(), PCB_GRID_HELPER::AlignToArc(), PNS::ARC::Anchor(), SHAPE_LINE_CHAIN::Append(), BOOST_AUTO_TEST_CASE(), DIRECTION_45::BuildInitialTrace(), CheckArcGeom(), Collide(), collideArc2Arc(), DIRECTION_45::DIRECTION_45(), EDIT_TOOL::FilletTracks(), PCB_PLUGIN::formatPolyPts(), ALTIUM_PCB::HelperCreateBoardOutline(), GEOM_TEST::IsOutlineValid(), FABMASTER::loadFootprints(), FABMASTER::loadGraphics(), FABMASTER::loadOutline(), CADSTAR_SCH_ARCHIVE_LOADER::loadShapeVertices(), PNS::MEANDER_SHAPE::MakeArc(), SHAPE_LINE_CHAIN::NearestPoint(), operator<<(), PCB_ARC::PCB_ARC(), GERBER_PLOTTER::plotArc(), SHAPE_LINE_CHAIN::Slice(), SHAPE_LINE_CHAIN::splitArc(), STROKE_PARAMS::Stroke(), TransformArcToPolygon(), and PNS_KICAD_IFACE::UpdateItem().
double SHAPE_ARC::GetRadius | ( | ) | const |
Definition at line 464 of file shape_arc.cpp.
References GetCenter(), and m_start.
Referenced by PNS_LOG_VIEWER_OVERLAY::Arc(), CheckArcGeom(), Collide(), ConvertToPolyline(), ROUTER_PREVIEW_ITEM::drawLineChain(), ROUTER_PREVIEW_ITEM::drawShape(), GetLength(), Intersect(), IntersectLine(), STROKE_PARAMS::Stroke(), TransformArcToPolygon(), and update_bbox().
EDA_ANGLE SHAPE_ARC::GetStartAngle | ( | ) | const |
Definition at line 419 of file shape_arc.cpp.
References PNS::angle(), GetCenter(), and m_start.
Referenced by PNS_LOG_VIEWER_OVERLAY::Arc(), CheckArcGeom(), Collide(), ConvertToPolyline(), ROUTER_PREVIEW_ITEM::drawLineChain(), ROUTER_PREVIEW_ITEM::drawShape(), sliceContainsPoint(), TransformArcToPolygon(), and update_bbox().
|
inline |
Definition at line 157 of file shape_arc.h.
References m_width.
Referenced by PNS_LOG_VIEWER_OVERLAY::Arc(), PNS::ArcHull(), BOOST_AUTO_TEST_CASE(), Collide(), SHAPE_LINE_CHAIN::Collide(), collideArc2Arc(), BOARD_ADAPTER::createPadWithMargin(), ROUTER_PREVIEW_ITEM::drawShape(), drawShapes(), operator<<(), TransformArcToPolygon(), and PNS::ARC::Width().
|
inlinevirtualinherited |
Reimplemented in SHAPE_COMPOUND, and SHAPE_POLY_SET.
Definition at line 106 of file shape.h.
Referenced by SHAPE_COMPOUND::AddShape(), and ROUTER_PREVIEW_ITEM::ViewDraw().
Find intersection points between this arc and aArc.
Ignores arc width.
aSeg | |
aIpsBuffer | Buffer to store the resulting intersection points (if any) |
Definition at line 294 of file shape_arc.cpp.
References GetCenter(), GetRadius(), CIRCLE::Intersect(), and sliceContainsPoint().
Referenced by Collide(), and collideArc2Arc().
Find intersection points between this arc and aSeg, treating aSeg as an infinite line.
Ignores arc width.
aSeg | Line to intersect against (treated as an infinite line) |
aIpsBuffer | Buffer to store the resulting intersection points (if any) |
Definition at line 273 of file shape_arc.cpp.
References SEG::A, SEG::B, GetCenter(), GetRadius(), CIRCLE::IntersectLine(), and sliceContainsPoint().
Referenced by PCB_GRID_HELPER::AlignToArc(), Collide(), and collideArc2Arc().
bool SHAPE_ARC::IsClockwise | ( | ) | const |
Definition at line 366 of file shape_arc.cpp.
References ANGLE_0, and GetCentralAngle().
Referenced by SHAPE_LINE_CHAIN::amendArc(), GERBER_PLOTTER::plotArc(), SHAPE_LINE_CHAIN::Slice(), and SHAPE_LINE_CHAIN::splitArc().
|
inlineinherited |
Return true if the shape is a null shape.
true | if null :-) |
Definition at line 164 of file shape.h.
References SHAPE_BASE::m_type, and SH_NULL.
|
inlineoverridevirtual |
Implements SHAPE.
Definition at line 162 of file shape_arc.h.
Referenced by CheckArcGeom().
void SHAPE_ARC::Mirror | ( | bool | aX = true , |
bool | aY = false , |
||
const VECTOR2I & | aVector = { 0, 0 } |
||
) |
Definition at line 551 of file shape_arc.cpp.
References m_end, m_mid, m_start, update_bbox(), VECTOR2< T >::x, and VECTOR2< T >::y.
void SHAPE_ARC::Mirror | ( | const SEG & | axis | ) |
Definition at line 571 of file shape_arc.cpp.
References m_end, m_mid, m_start, SEG::ReflectPoint(), and update_bbox().
|
overridevirtual |
Implements SHAPE.
Definition at line 532 of file shape_arc.cpp.
References m_end, m_mid, m_start, and update_bbox().
Referenced by PNS::COMPONENT_DRAGGER::Drag().
|
inherited |
Definition at line 695 of file wrlfacet.cpp.
References SHAPE::facets.
Referenced by WRL2FACESET::TranslateToSG(), X3DIFACESET::TranslateToSG(), and WRL1FACESET::TranslateToSG().
|
inline |
|
virtualinherited |
Reimplemented in SHAPE_LINE_CHAIN, and SHAPE_POLY_SET.
Definition at line 34 of file shape.cpp.
void SHAPE_ARC::Reverse | ( | ) |
Definition at line 581 of file shape_arc.cpp.
References m_end, and m_start.
Referenced by TEARDROP_MANAGER::findAnchorPointsOnTrack(), CADSTAR_PCB_ARCHIVE_LOADER::getLineChainFromShapes(), CADSTAR_PCB_ARCHIVE_LOADER::makeTracksFromShapes(), and SHAPE_LINE_CHAIN::Reverse().
SHAPE_ARC SHAPE_ARC::Reversed | ( | ) | const |
Definition at line 587 of file shape_arc.cpp.
References m_end, m_mid, m_start, m_width, and SHAPE_ARC().
Referenced by PNS::NODE::AssembleLine(), BOOST_AUTO_TEST_CASE(), and CONVERT_TOOL::makePolysFromChainedSegs().
Rotate the arc by a given angle about a point.
aCenter | is the rotation center. |
aAngle | rotation angle. |
Implements SHAPE.
Definition at line 541 of file shape_arc.cpp.
References m_end, m_mid, m_start, RotatePoint(), and update_bbox().
|
inline |
Definition at line 152 of file shape_arc.h.
References m_width.
Referenced by BOOST_AUTO_TEST_CASE(), SHAPE_LINE_CHAIN::Insert(), and PNS::ARC::SetWidth().
|
private |
Definition at line 593 of file shape_arc.cpp.
References ANGLE_0, EDA_ANGLE::AsDegrees(), GetCenter(), GetCentralAngle(), GetStartAngle(), and alg::within_wrapped_range().
Referenced by Intersect(), and IntersectLine().
|
inlineinherited |
Return the type of the shape.
the | type |
Definition at line 96 of file shape.h.
References SHAPE_BASE::m_type.
Referenced by PNS::DP_GATEWAYS::BuildFromPrimitivePair(), PNS::buildHullForPrimitiveShape(), PNS_LOG_VIEWER_FRAME::buildListTree(), SHAPE_POLY_SET::Collide(), Collide(), collideShapes(), collideSingleShapes(), PNS::OPTIMIZER::computeBreakouts(), ROUTER_PREVIEW_ITEM::drawShape(), PNS_LOG_VIEWER_FRAME::drawSimpleShape(), PNS::SOLID::HoleHull(), PNS::SOLID::Hull(), STROKE_PARAMS::Stroke(), and SHAPE_FILE_IO::Write().
|
inlineinherited |
Definition at line 101 of file shape.h.
References SHAPE_BASE::m_type, and SHAPE_TYPE_asString().
Referenced by Collide().
|
private |
Definition at line 313 of file shape_arc.cpp.
References EDA_ANGLE::AsDegrees(), BOX2< Vec >::Compute(), GetCenter(), GetCentralAngle(), GetRadius(), GetStartAngle(), KiROUND(), m_bbox, m_end, and m_start.
Referenced by ConstructFromStartEndAngle(), ConstructFromStartEndCenter(), Mirror(), Move(), Rotate(), and SHAPE_ARC().
|
privateinherited |
Definition at line 143 of file wrlfacet.h.
Referenced by SHAPE::CalcShape(), and SHAPE::NewFacet().
|
private |
Definition at line 264 of file shape_arc.h.
Referenced by BBox(), SHAPE_ARC(), and update_bbox().
|
private |
Definition at line 261 of file shape_arc.h.
Referenced by Collide(), ConstructFromStartEndAngle(), ConstructFromStartEndCenter(), ConvertToPolyline(), GetCenter(), GetCentralAngle(), GetChord(), GetEndAngle(), GetP1(), Mirror(), Move(), operator==(), Reverse(), Reversed(), Rotate(), SHAPE_ARC(), and update_bbox().
|
private |
Definition at line 260 of file shape_arc.h.
Referenced by ConstructFromStartEndAngle(), ConstructFromStartEndCenter(), GetArcMid(), GetCenter(), GetCentralAngle(), Mirror(), Move(), operator==(), Reversed(), Rotate(), and SHAPE_ARC().
|
private |
Definition at line 259 of file shape_arc.h.
Referenced by Collide(), ConstructFromStartEndAngle(), ConstructFromStartEndCenter(), ConvertToPolyline(), GetCenter(), GetCentralAngle(), GetChord(), GetP0(), GetRadius(), GetStartAngle(), Mirror(), Move(), operator==(), Reverse(), Reversed(), Rotate(), SHAPE_ARC(), and update_bbox().
|
protectedinherited |
< type of our shape
Definition at line 117 of file shape.h.
Referenced by SHAPE::Format(), SHAPE::IsNull(), SHAPE_BASE::Type(), and SHAPE_BASE::TypeName().
|
private |
Definition at line 263 of file shape_arc.h.
Referenced by Collide(), ConstructFromStartEndAngle(), ConvertToPolyline(), GetWidth(), operator==(), Reversed(), SetWidth(), and SHAPE_ARC().
|
staticinherited |
This is the minimum precision for all the points in a shape.
Definition at line 129 of file shape.h.
Referenced by BOOST_AUTO_TEST_CASE(), DIRECTION_45::BuildInitialTrace(), CompareLength(), CIRCLE::Contains(), EDIT_TOOL::FilletTracks(), and CIRCLE::IntersectLine().