KiCad PCB EDA Suite
|
#include <seg.h>
Public Types | |
using | ecoord = VECTOR2I::extended_type |
Public Member Functions | |
SEG () | |
Create an empty (0, 0) segment. | |
SEG (int aX1, int aY1, int aX2, int aY2) | |
Create a segment between (aX1, aY1) and (aX2, aY2). | |
SEG (const VECTOR2I &aA, const VECTOR2I &aB) | |
Create a segment between (aA) and (aB). | |
SEG (const VECTOR2I &aA, const VECTOR2I &aB, int aIndex) | |
Create a segment between (aA) and (aB), referenced to a multi-segment shape. | |
SEG (const SEG &aSeg) | |
Copy constructor. | |
SEG & | operator= (const SEG &aSeg) |
bool | operator== (const SEG &aSeg) const |
bool | operator!= (const SEG &aSeg) const |
VECTOR2I | LineProject (const VECTOR2I &aP) const |
Compute the perpendicular projection point of aP on a line passing through ends of the segment. | |
int | Side (const VECTOR2I &aP) const |
Determine on which side of directed line passing via segment ends point aP lies. | |
int | LineDistance (const VECTOR2I &aP, bool aDetermineSide=false) const |
Return the closest Euclidean distance between point aP and the line defined by the ends of segment (this). | |
EDA_ANGLE | Angle (const SEG &aOther) const |
Determine the smallest angle between two segments. | |
const VECTOR2I | NearestPoint (const VECTOR2I &aP) const |
Compute a point on the segment (this) that is closest to point aP. | |
const VECTOR2I | NearestPoint (const SEG &aSeg) const |
Compute a point on the segment (this) that is closest to any point on aSeg. | |
bool | NearestPoints (const SEG &aSeg, VECTOR2I &aPtA, VECTOR2I &aPtB, int64_t &aDistSq) const |
Compute closest points between this segment and aSeg. | |
const VECTOR2I | ReflectPoint (const VECTOR2I &aP) const |
Reflect a point using this segment as axis. | |
OPT_VECTOR2I | Intersect (const SEG &aSeg, bool aIgnoreEndpoints=false, bool aLines=false) const |
Compute intersection point of segment (this) with segment aSeg. | |
bool | Intersects (const SEG &aSeg) const |
OPT_VECTOR2I | IntersectLines (const SEG &aSeg) const |
Compute the intersection point of lines passing through ends of (this) and aSeg. | |
SEG | PerpendicularSeg (const VECTOR2I &aP) const |
Compute a segment perpendicular to this one, passing through point aP. | |
SEG | ParallelSeg (const VECTOR2I &aP) const |
Compute a segment parallel to this one, passing through point aP. | |
bool | Collide (const SEG &aSeg, int aClearance, int *aActual=nullptr) const |
ecoord | SquaredDistance (const SEG &aSeg) const |
int | Distance (const SEG &aSeg) const |
Compute minimum Euclidean distance to segment aSeg. | |
ecoord | SquaredDistance (const VECTOR2I &aP) const |
int | Distance (const VECTOR2I &aP) const |
Compute minimum Euclidean distance to point aP. | |
void | CanonicalCoefs (ecoord &qA, ecoord &qB, ecoord &qC) const |
bool | Collinear (const SEG &aSeg) const |
Check if segment aSeg lies on the same line as (this). | |
bool | ApproxCollinear (const SEG &aSeg, int aDistanceThreshold=1) const |
bool | ApproxParallel (const SEG &aSeg, int aDistanceThreshold=1) const |
bool | ApproxPerpendicular (const SEG &aSeg) const |
bool | Overlaps (const SEG &aSeg) const |
bool | Contains (const SEG &aSeg) const |
int | Length () const |
Return the length (this). | |
ecoord | SquaredLength () const |
ecoord | TCoef (const VECTOR2I &aP) const |
int | Index () const |
Return the index of this segment in its parent shape (applicable only to non-local segments). | |
bool | Contains (const VECTOR2I &aP) const |
void | Reverse () |
SEG | Reversed () const |
Returns the center point of the line. | |
VECTOR2I | Center () const |
bool | operator< (const SEG &aSeg) const |
Static Public Member Functions | |
static SEG::ecoord | Square (int a) |
Public Attributes | |
VECTOR2I | A |
VECTOR2I | B |
Private Member Functions | |
bool | ccw (const VECTOR2I &aA, const VECTOR2I &aB, const VECTOR2I &aC) const |
bool | intersects (const SEG &aSeg, bool aIgnoreEndpoints=false, bool aLines=false, VECTOR2I *aPt=nullptr) const |
bool | mutualDistanceSquared (const SEG &aSeg, ecoord &aD1, ecoord &aD2) const |
Private Attributes | |
int | m_index |
< index within the parent shape (used when m_is_local == false) | |
Friends | |
std::ostream & | operator<< (std::ostream &aStream, const SEG &aSeg) |
using SEG::ecoord = VECTOR2I::extended_type |
|
inline |
Create an empty (0, 0) segment.
Definition at line 55 of file seg.h.
References m_index.
Referenced by ParallelSeg(), PerpendicularSeg(), and Reversed().
|
inline |
Determine the smallest angle between two segments.
aOther | point to determine the orientation wrs to self |
Definition at line 97 of file seg.cpp.
References A, std::abs(), ANGLE_180, B, and EDA_ANGLE::Normalize180().
Referenced by ComputeDogbone(), ConnectBoardShapes(), EDIT_TOOL::DragArcTrack(), EC_CONVERGING::EC_CONVERGING(), LINE_FILLET_ROUTINE::ProcessLinePair(), and DOGBONE_CORNER_ROUTINE::ProcessLinePair().
bool SEG::ApproxCollinear | ( | const SEG & | aSeg, |
int | aDistanceThreshold = 1 |
||
) | const |
Definition at line 477 of file seg.cpp.
References std::abs(), mutualDistanceSquared(), and Square().
Referenced by PCB_TRACK::ApproxCollinear(), and EDIT_TOOL::FilletTracks().
bool SEG::ApproxParallel | ( | const SEG & | aSeg, |
int | aDistanceThreshold = 1 |
||
) | const |
Definition at line 489 of file seg.cpp.
References std::abs(), mutualDistanceSquared(), and Square().
Referenced by ApproxPerpendicular(), PNS::TOPOLOGY::AssembleDiffPair(), PNS::MEANDERED_LINE::CheckSelfIntersections(), CIRCLE::ConstructFromTanTanPt(), PNS::DIFF_PAIR::CoupledLength(), PNS::DIFF_PAIR::CoupledSegmentPairs(), PNS::DP_PRIMITIVE_PAIR::CursorOrientation(), extractDiffPairCoupledItems(), PNS::findCoupledVertices(), and SegParallelCorrect().
bool SEG::ApproxPerpendicular | ( | const SEG & | aSeg | ) | const |
Definition at line 501 of file seg.cpp.
References ApproxParallel(), and PerpendicularSeg().
Referenced by SegPerpendicularCorrect().
Definition at line 263 of file seg.h.
Referenced by Collinear().
Definition at line 283 of file seg.cpp.
References VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by Collide().
|
inline |
Definition at line 369 of file seg.h.
References A.
Referenced by Collide(), PCB_GRID_HELPER::computeAnchors(), CIRCLE::ConstructFromTanTanPt(), OVAL::GetCenter(), DIM_ALIGNED_TEXT_UPDATER::getDimensionNewTextPosition(), and SHAPE_ARC::SHAPE_ARC().
bool SEG::Collide | ( | const SEG & | aSeg, |
int | aClearance, | ||
int * | aActual = nullptr |
||
) | const |
Definition at line 289 of file seg.cpp.
References A, B, ccw(), VECTOR2< int32_t >::ECOORD_MAX, isqrt(), and SquaredDistance().
Referenced by SHAPE_POLY_SET::IsPolygonSelfIntersecting(), SegCollideCorrect(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testShapeLineChain(), and BOARD::TestZoneIntersection().
|
inline |
Check if segment aSeg lies on the same line as (this).
aSeg | the segment to check colinearity with |
Definition at line 276 of file seg.h.
References A, std::abs(), B, CanonicalCoefs(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PNS::DP_GATEWAYS::BuildGeneric(), Contains(), SHAPE_LINE_CHAIN::Intersect(), PNS::OPTIMIZER::mergeColinear(), Overlaps(), and SegCollinearCorrect().
|
inline |
Definition at line 314 of file seg.h.
References A, B, Collinear(), and Contains().
Referenced by SCH_IO_EAGLE::adjustNetLabels(), BuildFootprintPolygonOutlines(), PNS::LINE::ChangedArea(), Contains(), DRAWING_TOOL::DrawVia(), findEndSegments(), LINE::Intersect(), CIRCLE::Intersect(), HALF_LINE::Intersect(), SHAPE_LINE_CHAIN::Intersect(), PNS::MEANDERED_LINE::MeanderSegment(), Overlaps(), LINE_EXTENSION_ROUTINE::ProcessLinePair(), SHAPE_LINE_CHAIN::SelfIntersectingWithArcs(), and PNS::LINE_PLACER::simplifyNewLine().
bool SEG::Contains | ( | const VECTOR2I & | aP | ) | const |
Definition at line 321 of file seg.cpp.
References Distance().
int SEG::Distance | ( | const SEG & | aSeg | ) | const |
Compute minimum Euclidean distance to segment aSeg.
aSeg | other segment |
Definition at line 388 of file seg.cpp.
References isqrt(), and SquaredDistance().
Referenced by EE_POINT_EDITOR::addCorner(), PCB_POINT_EDITOR::addCorner(), SHAPE_LINE_CHAIN::CheckClearance(), Collide(), ConnectBoardShapes(), Contains(), SHAPE_ARC::ConvertToPolyline(), PNS::DIFF_PAIR::CoupledLength(), PNS::DIFF_PAIR::CoupledSegmentPairs(), DRAWING_TOOL::DrawVia(), SHAPE_LINE_CHAIN_BASE::EdgeContainingPoint(), SHAPE_LINE_CHAIN::FindSegment(), EE_SELECTION_TOOL::GuessSelectionCandidates(), SHAPE_LINE_CHAIN::NearestPoint(), SHAPE_LINE_CHAIN::NearestSegment(), pushoutForce(), SegDistanceCorrect(), SegVecDistanceCorrect(), SHAPE_LINE_CHAIN::Split(), and TransformArcToPolygon().
int SEG::Distance | ( | const VECTOR2I & | aP | ) | const |
Compute minimum Euclidean distance to point aP.
aP | the point |
Definition at line 394 of file seg.cpp.
References isqrt(), and SquaredDistance().
|
inline |
Return the index of this segment in its parent shape (applicable only to non-local segments).
Definition at line 351 of file seg.h.
References m_index.
Referenced by SHAPE_POLY_SET::IsPolygonSelfIntersecting(), PNS::OPTIMIZER::mergeDpStep(), PNS::OPTIMIZER::mergeObtuse(), and PNS::OPTIMIZER::mergeStep().
OPT_VECTOR2I SEG::Intersect | ( | const SEG & | aSeg, |
bool | aIgnoreEndpoints = false , |
||
bool | aLines = false |
||
) | const |
Compute intersection point of segment (this) with segment aSeg.
aSeg | segment to intersect with |
aIgnoreEndpoints | don't treat corner cases (i.e. end of one segment touching the other) as intersections. |
aLines | treat segments as infinite lines |
Definition at line 254 of file seg.cpp.
References intersects().
Referenced by EC_CONVERGING::Apply(), PNS::LINE::dragSegment45(), ALTIUM_PCB::HelperParseDimensions6Linear(), LINE::Intersect(), HALF_LINE::Intersect(), SHAPE_LINE_CHAIN::Intersect(), IntersectLines(), SCH_IO_EAGLE::loadSegments(), NearestPoint(), NearestPoints(), SHAPE_LINE_CHAIN::SelfIntersecting(), SHAPE_LINE_CHAIN::SelfIntersectingWithArcs(), SHAPE_ARC::SHAPE_ARC(), and DRC_TEST_PROVIDER_COPPER_CLEARANCE::testSingleLayerItemAgainstItem().
|
inline |
Compute the intersection point of lines passing through ends of (this) and aSeg.
aSeg | segment defining the line to intersect with |
Definition at line 220 of file seg.h.
References Intersect().
Referenced by PCB_GRID_HELPER::AlignToSegment(), EC_CONVERGING::Apply(), EC_PERPLINE::Apply(), EC_LINE::Apply(), BuildFootprintPolygonOutlines(), PNS::DP_GATEWAYS::BuildGeneric(), ConnectBoardShapes(), CIRCLE::ConstructFromTanTanPt(), PNS::ConvexHull(), CornerListToPolygon(), EDIT_TOOL::DragArcTrack(), PNS::LINE::dragSegment45(), PCB_POINT_EDITOR::editArcCenterKeepEndpoints(), PNS::OPTIMIZER::mergeObtuse(), LINE_EXTENSION_ROUTINE::ProcessLinePair(), and PNS::LINE::snapDraggedCorner().
bool SEG::Intersects | ( | const SEG & | aSeg | ) | const |
Definition at line 248 of file seg.cpp.
References intersects().
Referenced by ConnectBoardShapes(), LINE_EXTENSION_ROUTINE::ProcessLinePair(), and SquaredDistance().
|
private |
Definition at line 208 of file seg.cpp.
References A, B, VECTOR2< T >::Cross(), rescale(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by Intersect(), and Intersects().
|
inline |
Return the length (this).
Definition at line 333 of file seg.h.
Referenced by PNS::ArcHull(), PNS::MEANDER_SHAPE::BaselineLength(), Collide(), ComputeChamferPoints(), TEARDROP_MANAGER::computeCurvedForRoundShape(), PNS::DIFF_PAIR::CoupledLength(), PNS::LINE_PLACER::cursorDistMinimum(), PNS::dragCornerInternal(), DIALOG_BOARD_STATISTICS::getDataFromPCB(), EDA_SHAPE::GetLength(), OVAL::GetLength(), KIGEOM::GetLengthRatioFromStart(), PNS::MOUSE_TRAIL_TRACER::GetPosture(), OVAL::GetSideLength(), BOARD::GetTrackLength(), isLine45Degree(), SHAPE_LINE_CHAIN::Length(), PNS::MEANDERED_LINE::MeanderSegment(), SHAPE_LINE_CHAIN::PathLength(), playground_main_func(), SHAPE_LINE_CHAIN::PointAlong(), OUTSET_ROUTINE::ProcessItem(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run(), PNS::SegmentHull(), SHAPE_ARC::SHAPE_ARC(), and PNS::tightenSegment().
int SEG::LineDistance | ( | const VECTOR2I & | aP, |
bool | aDetermineSide = false |
||
) | const |
Return the closest Euclidean distance between point aP and the line defined by the ends of segment (this).
aP | the point to test |
aDetermineSide | when true, the sign of the returned value indicates the side of the line at which we are (negative = left) |
Definition at line 428 of file seg.cpp.
References std::abs(), isqrt(), rescale(), sgn(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by CIRCLE::ConstructFromTanTanPt(), HALF_LINE::Contains(), LINE::Distance(), SHAPE_LINE_CHAIN::NearestPoint(), RULE_AREA_CREATE_HELPER::OnComplete(), ZONE_CREATE_HELPER::OnComplete(), PNS::LINE::snapToNeighbourSegments(), and PCB_TUNING_PATTERN::UpdateFromEditPoints().
Compute the perpendicular projection point of aP on a line passing through ends of the segment.
aP | point to project |
Definition at line 371 of file seg.cpp.
References A, VECTOR2< T >::Dot(), rescale(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PNS::LINE_PLACER::buildInitialLine(), PNS::DP_GATEWAYS::BuildOrthoProjections(), commonParallelProjection(), PNS::commonParallelProjection(), ConnectBoardShapes(), CIRCLE::ConstructFromTanTanPt(), EDIT_TOOL::DragArcTrack(), PNS::findCoupledVertices(), CIRCLE::IntersectLine(), PNS::DIFF_PAIR_PLACER::routeHead(), SHAPE_ARC::SHAPE_ARC(), PNS::MEANDER_SHAPE::updateBaseSegment(), and DIM_ALIGNED_TEXT_UPDATER::UpdateTextAfterChange().
Definition at line 448 of file seg.cpp.
References A, B, rescale(), sgn(), SquaredLength(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ApproxCollinear(), and ApproxParallel().
Compute a point on the segment (this) that is closest to any point on aSeg.
Definition at line 108 of file seg.cpp.
References A, B, Intersect(), and NearestPoint().
Compute a point on the segment (this) that is closest to point aP.
Definition at line 327 of file seg.cpp.
References A, B, VECTOR2< T >::Dot(), rescale(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PCB_POINT_EDITOR::addCorner(), PNS::LINE::ClipToNearestObstacle(), SHAPE_ARC::Collide(), SHAPE_CIRCLE::Collide(), SHAPE_RECT::Collide(), SHAPE_SEGMENT::Collide(), Collide(), SHAPE_LINE_CHAIN_BASE::Collide(), SHAPE_LINE_CHAIN::Collide(), PNS::LINE_PLACER::cursorDistMinimum(), SCH_LINE_WIRE_BUS_TOOL::doUnfoldBus(), EDIT_TOOL::DragArcTrack(), PCB_POINT_EDITOR::editArcMidKeepEndpoints(), DIM_ALIGNED_TEXT_UPDATER::getDimensionNewTextPosition(), KIGEOM::GetProjectedPointLengthRatio(), SCH_MOVE_TOOL::moveItem(), NearestPoint(), SHAPE_LINE_CHAIN::NearestPoint(), NearestPoints(), KIGEOM::PointProjectsOntoSegment(), pushoutForce(), SCH_DRAWING_TOOLS::SingleClickPlace(), snapToNearestTrack(), SquaredDistance(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testShapeLineChain(), DIM_ALIGNED_TEXT_UPDATER::UpdateTextAfterChange(), and PNS::LINE::Walkaround().
bool SEG::NearestPoints | ( | const SEG & | aSeg, |
VECTOR2I & | aPtA, | ||
VECTOR2I & | aPtB, | ||
int64_t & | aDistSq | ||
) | const |
Compute closest points between this segment and aSeg.
aPtA | point on this segment (output) |
aPtB | point on the other segment (output) |
aDistSq | squared distance between points (output) |
Definition at line 150 of file seg.cpp.
References A, B, Intersect(), and NearestPoint().
Referenced by SHAPE_LINE_CHAIN::ClosestSegments().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 291 of file seg.h.
References A, B, Collinear(), and Contains().
Compute a segment parallel to this one, passing through point aP.
aP | Point through which the new segment will pass |
Definition at line 274 of file seg.cpp.
References SEG().
Referenced by BOOST_AUTO_TEST_CASE(), and CIRCLE::ConstructFromTanTanPt().
Compute a segment perpendicular to this one, passing through point aP.
aP | Point through which the new segment will pass |
Definition at line 265 of file seg.cpp.
References VECTOR2< T >::Perpendicular(), and SEG().
Referenced by ApproxPerpendicular(), BOOST_AUTO_TEST_CASE(), CIRCLE::ConstructFromTanTanPt(), and EDIT_TOOL::DragArcTrack().
Reflect a point using this segment as axis.
Definition at line 350 of file seg.cpp.
References A, VECTOR2< T >::Dot(), rescale(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by CornerListToPolygon(), SHAPE_ARC::Mirror(), and SHAPE_LINE_CHAIN::Mirror().
|
inline |
Definition at line 358 of file seg.h.
Referenced by ZONE_FILLER::buildThermalSpokes(), and DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZonesToZones().
|
inline |
Returns the center point of the line.
Definition at line 363 of file seg.h.
References SEG().
Referenced by KIGEOM::NormalisedSeg(), and PNS::LINE_PLACER::Start().
|
inline |
Determine on which side of directed line passing via segment ends point aP lies.
aP | point to determine the orientation wrs to self |
Definition at line 143 of file seg.h.
References A.
Referenced by PNS::ArcHull(), CornerListToPolygon(), PNS::MEANDER_PLACER::doMove(), EDIT_TOOL::DragArcTrack(), PNS::DP_MEANDER_PLACER::Move(), SHAPE_LINE_CHAIN::OffsetLine(), PNS::DP_MEANDER_PLACER::pairOrientation(), PNS::SegmentHull(), and PCB_TUNING_PATTERN::UpdateFromEditPoints().
|
inlinestatic |
Definition at line 123 of file seg.h.
Referenced by ApproxCollinear(), ApproxParallel(), PNS::TOPOLOGY::AssembleDiffPair(), PNS::checkGap(), close_enough(), SHAPE_ARC::Collide(), SHAPE_CIRCLE::Collide(), SHAPE_POLY_SET::Collide(), SHAPE_RECT::Collide(), SHAPE_SEGMENT::Collide(), Collide(), SHAPE_LINE_CHAIN_BASE::Collide(), SHAPE_LINE_CHAIN::Collide(), SHAPE_POLY_SET::CollideEdge(), SHAPE_POLY_SET::CollideVertex(), ConnectBoardShapes(), findNext(), POLYGON_TEST::getKink(), VERTEX_CONNECTOR::getPoint(), PCB_SELECTION_TOOL::GuessSelectionCandidates(), PAD::HitTest(), CONVERT_TOOL::makePolysFromChainedSegs(), RN_NET::NearestBicoloredPair(), PNS::TOOL_BASE::snapToItem(), DRC_TEST_PROVIDER_HOLE_TO_HOLE::testHoleAgainstHole(), TestSegmentHit(), and DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testShapeLineChain().
SEG::ecoord SEG::SquaredDistance | ( | const SEG & | aSeg | ) | const |
Definition at line 75 of file seg.cpp.
References A, B, VECTOR2< int32_t >::ECOORD_MAX, Intersects(), and NearestPoint().
Referenced by PNS::MOUSE_TRAIL_TRACER::AddTrailPoint(), PCB_GRID_HELPER::AlignToSegment(), PNS::TOPOLOGY::AssembleDiffPair(), PNS::PRESERVE_VERTEX_CONSTRAINT::Check(), PNS::checkGap(), Collide(), SHAPE_LINE_CHAIN_BASE::Collide(), SHAPE_LINE_CHAIN::Collide(), SHAPE_RECT::Collide(), SHAPE_SEGMENT::Collide(), SHAPE_POLY_SET::CollideEdge(), ConnectBoardShapes(), Distance(), PCB_POINT_EDITOR::editArcCenterKeepEndpoints(), SegVecDistanceCorrect(), SHAPE_LINE_CHAIN_BASE::SquaredDistance(), TestSegmentHit(), and PCB_CONTROL::UpdateMessagePanel().
SEG::ecoord SEG::SquaredDistance | ( | const VECTOR2I & | aP | ) | const |
Definition at line 400 of file seg.cpp.
References A, VECTOR2< T >::Dot(), and VECTOR2< T >::SquaredEuclideanNorm().
|
inline |
Definition at line 338 of file seg.h.
Referenced by commonParallelProjection(), PNS::commonParallelProjection(), extractDiffPairCoupledItems(), PNS::OPTIMIZER::mergeColinear(), mutualDistanceSquared(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), and DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testShapeLineChain().
|
inline |
Definition at line 395 of file seg.h.
References A, and VECTOR2< T >::Dot().
Referenced by commonParallelProjection(), and PNS::commonParallelProjection().
|
friend |
VECTOR2I SEG::A |
Definition at line 49 of file seg.h.
Referenced by PNS::NODE::Add(), STEP_PCB_MODEL::AddBarrel(), STEP_PCB_MODEL::AddHole(), PNS::NODE::addSegment(), BOARD_ADAPTER::addShape(), PNS::DEBUG_DECORATOR::AddShape(), SCH_IO_EAGLE::adjustNetLabels(), PCB_GRID_HELPER::AlignToSegment(), PNS::SEGMENT::Anchor(), Angle(), PNS::ApproximateSegmentAsRect(), PNS::TOPOLOGY::AssembleTuningPath(), PNS::DP_MEANDER_PLACER::baselineSegment(), OVAL::BBox(), SHAPE_SEGMENT::BBox(), BOOST_AUTO_TEST_CASE(), PNS::DP_GATEWAYS::BuildFromPrimitivePair(), ZONE_FILLER::buildThermalSpokes(), Center(), SHAPE_LINE_CHAIN::CheckClearance(), PNS::DRAGGER::checkVirtualVia(), Collide(), SHAPE_LINE_CHAIN_BASE::Collide(), SHAPE_ARC::Collide(), SHAPE_COMPOUND::Collide(), SHAPE_LINE_CHAIN::Collide(), SHAPE_RECT::Collide(), SHAPE_SEGMENT::Collide(), Collide(), collideArc2Arc(), Collinear(), commonParallelProjection(), PNS::commonParallelProjection(), PCB_GRID_HELPER::computeAnchors(), ConnectBoardShapes(), CIRCLE::ConstructFromTanTanPt(), Contains(), HALF_LINE::Contains(), KIGEOM::ConvertToChain(), PNS_KICAD_IFACE::createBoardItem(), GENCAD_EXPORTER::CreateBoardSection(), BOARD_ADAPTER::createPadWithMargin(), PNS::LINE_PLACER::cursorDistMinimum(), PNS::DP_PRIMITIVE_PAIR::CursorOrientation(), DIRECTION_45::DIRECTION_45(), PNS::MEANDER_PLACER::doMove(), PNS::COMPONENT_DRAGGER::Drag(), EDIT_TOOL::DragArcTrack(), PNS::LINE::dragSegment45(), KIGFX::PCB_PAINTER::draw(), KIGFX::DrawDashedLine(), ROUTER_PREVIEW_ITEM::drawLineChain(), KI_TEST::DrawSegment(), ROUTER_PREVIEW_ITEM::drawShape(), SHAPE_LINE_CHAIN_BASE::EdgeContainingPoint(), PCB_POINT_EDITOR::editArcCenterKeepEndpoints(), extractDiffPairCoupledItems(), findEndSegments(), PNS::NODE::findRedundantSegment(), PNS::MEANDER_SHAPE::Fit(), PNS::SHOVE::fixupViaCollisions(), PNS::NODE::FixupVirtualVias(), SHAPE_SEGMENT::Format(), OVAL::GetAngle(), PNS::getDanglingAnchor(), DIM_ALIGNED_TEXT_UPDATER::getDimensionNewTextPosition(), KIGEOM::GetLengthRatioFromStart(), KIGEOM::GetNearestEndpoint(), KIGEOM::GetOtherEnd(), KIGEOM::GetProjectedPointLengthRatio(), KIGEOM::GetSharedEndpoint(), HALF_LINE::GetStart(), BOARD::GetTrackLength(), ZONE::HatchBorder(), ALTIUM_PCB::HelperCreateBoardOutline(), PNS::HullIntersection(), HALF_LINE::Intersect(), SHAPE_LINE_CHAIN::Intersect(), CIRCLE::IntersectLine(), SHAPE_ARC::IntersectLine(), intersects(), SHAPE_SEGMENT::Is45Degree(), isLine45Degree(), SHAPE_POLY_SET::IsPolygonSelfIntersecting(), PNS::IsSegment45Degree(), KIGFX::VIEW_OVERLAY::Line(), LineProject(), SCH_IO_EAGLE::loadSegments(), PNS::MEANDER_SHAPE::MakeArc(), PNS::MEANDER_SHAPE::MakeCorner(), PCB_TUNING_PATTERN::MakeEditPoints(), PNS::MEANDER_SHAPE::MakeEmpty(), makeWireFromChain(), PNS::MEANDERED_LINE::MeanderSegment(), PNS::OPTIMIZER::mergeDpStep(), PNS::OPTIMIZER::mergeObtuse(), PNS::OPTIMIZER::mergeStep(), PNS_KICAD_IFACE::modifyBoardItem(), SHAPE_SEGMENT::Move(), PNS::MoveDiagonal(), mutualDistanceSquared(), NearestPoint(), SHAPE_LINE_CHAIN::NearestPoint(), HALF_LINE::NearestPoint(), LINE::NearestPoint(), NearestPoints(), KIGEOM::NormalisedSeg(), PCB_SHAPE::Normalize(), operator!=(), operator<(), operator=(), operator==(), Overlaps(), PNS::DP_MEANDER_PLACER::pairOrientation(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), PCB_IO_EASYEDAPRO_PARSER::ParsePoly(), SCH_EASYEDAPRO_PARSER::ParseSchematic(), SCH_EASYEDA_PARSER::ParseSchematic(), SCH_EASYEDA_PARSER::ParseSymbolShapes(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), PCB_IO_KICAD_SEXPR_PARSER::parseZONE(), SHAPE_LINE_CHAIN::PathLength(), playground_main_func(), BRDITEMS_PLOTTER::PlotDimension(), BRDITEMS_PLOTTER::PlotShape(), SHAPE_LINE_CHAIN::PointAlong(), KIGEOM::PointProjectsOntoSegment(), OUTSET_ROUTINE::ProcessItem(), LINE_EXTENSION_ROUTINE::ProcessLinePair(), PNS::MEANDER_SHAPE::Recalculate(), PNS::LINE_PLACER::reduceTail(), ReflectPoint(), PNS::NODE::removeSegmentIndex(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), DRC_TEST_PROVIDER_CONNECTION_WIDTH::Run(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run(), PCB_DIMENSION_BASE::segCircleIntersection(), KIGEOM::SegIsInDirection(), GEOM_TEST::SegmentCompletelyInQuadrant(), GEOM_TEST::SegmentCompletelyWithinRadius(), GEOM_TEST::SegmentEndsInQuadrant(), PNS::SegmentHull(), GEOM_TEST::SegmentsHaveSameEndPoints(), PCB_DIMENSION_BASE::segPolyIntersection(), SHAPE_LINE_CHAIN::SelfIntersecting(), SHAPE_LINE_CHAIN::SelfIntersectingWithArcs(), SHAPE_ARC::SHAPE_ARC(), Side(), PNS::LINE::snapToNeighbourSegments(), SHAPE_LINE_CHAIN::Split(), PNS::LINE_PLACER::SplitAdjacentSegments(), SquaredDistance(), SHAPE_POLY_SET::SquaredDistanceToPolygon(), PNS::LINE_PLACER::Start(), PNS::DRAGGER::startDragSegment(), STROKE_PARAMS::Stroke(), PNS::SEGMENT::SwapEnds(), TCoef(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testShapeLineChain(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZonesToZones(), PNS::tightenSegment(), EDA_SHAPE::TransformShapeToPolygon(), PCB_DIMENSION_BASE::TransformShapeToPolygon(), PCB_TEXTBOX::TransformShapeToPolygon(), SHAPE_SEGMENT::TransformToPolygon(), unfracture(), SHAPE_POLY_SET::unfractureSingle(), PNS::MEANDER_SHAPE::updateBaseSegment(), PCB_TUNING_PATTERN::UpdateEditPoints(), PCB_TUNING_PATTERN::UpdateFromEditPoints(), PCB_DIM_ALIGNED::updateGeometry(), PCB_DIM_ORTHOGONAL::updateGeometry(), PCB_TUNING_PATTERN::ViewDraw(), and HYPERLYNX_EXPORTER::writeBoardInfo().
VECTOR2I SEG::B |
Definition at line 50 of file seg.h.
Referenced by PNS::NODE::Add(), STEP_PCB_MODEL::AddBarrel(), PCB_POINT_EDITOR::addCorner(), STEP_PCB_MODEL::AddHole(), PNS::MEANDERED_LINE::AddMeander(), PNS::NODE::addSegment(), BOARD_ADAPTER::addShape(), PNS::DEBUG_DECORATOR::AddShape(), SCH_IO_EAGLE::adjustNetLabels(), PCB_GRID_HELPER::AlignToSegment(), PNS::SEGMENT::Anchor(), Angle(), PNS::ApproximateSegmentAsRect(), PNS::TOPOLOGY::AssembleTuningPath(), PNS::DP_MEANDER_PLACER::baselineSegment(), OVAL::BBox(), SHAPE_SEGMENT::BBox(), BOOST_AUTO_TEST_CASE(), PNS::DP_GATEWAYS::BuildFromPrimitivePair(), ZONE_FILLER::buildThermalSpokes(), SHAPE_LINE_CHAIN::CheckClearance(), PNS::DRAGGER::checkVirtualVia(), PNS::SEGMENT::CLine(), Collide(), SHAPE_ARC::Collide(), SHAPE_RECT::Collide(), SHAPE_SEGMENT::Collide(), Collide(), collideArc2Arc(), Collinear(), commonParallelProjection(), PNS::commonParallelProjection(), PCB_GRID_HELPER::computeAnchors(), ComputeChamferPoints(), ComputeDogbone(), ConnectBoardShapes(), CIRCLE::ConstructFromTanTanPt(), Contains(), HALF_LINE::Contains(), KIGEOM::ConvertToChain(), PNS_KICAD_IFACE::createBoardItem(), GENCAD_EXPORTER::CreateBoardSection(), BOARD_ADAPTER::createPadWithMargin(), PNS::LINE_PLACER::cursorDistMinimum(), PNS::DP_PRIMITIVE_PAIR::CursorOrientation(), DIRECTION_45::DIRECTION_45(), PNS::MEANDER_PLACER::doMove(), PNS::COMPONENT_DRAGGER::Drag(), EDIT_TOOL::DragArcTrack(), PNS::LINE::dragSegment45(), KIGFX::PCB_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), KIGFX::DrawDashedLine(), ROUTER_PREVIEW_ITEM::drawLineChain(), KI_TEST::DrawSegment(), ROUTER_PREVIEW_ITEM::drawShape(), SHAPE_LINE_CHAIN_BASE::EdgeContainingPoint(), PCB_POINT_EDITOR::editArcCenterKeepEndpoints(), PNS::MEANDER_SHAPE::End(), PNS::DIFF_PAIR::EndingPrimitives(), findEndSegments(), PNS::NODE::findRedundantSegment(), PNS::MEANDER_SHAPE::Fit(), PNS::SHOVE::fixupViaCollisions(), PNS::NODE::FixupVirtualVias(), SHAPE_SEGMENT::Format(), OVAL::GetAngle(), HALF_LINE::GetContainedPoint(), PNS::getDanglingAnchor(), DIM_ALIGNED_TEXT_UPDATER::getDimensionNewTextPosition(), KIGEOM::GetNearestEndpoint(), KIGEOM::GetOtherEnd(), KIGEOM::GetProjectedPointLengthRatio(), KIGEOM::GetSharedEndpoint(), BOARD::GetTrackLength(), ZONE::HatchBorder(), ALTIUM_PCB::HelperCreateBoardOutline(), PNS::HullIntersection(), HALF_LINE::Intersect(), SHAPE_LINE_CHAIN::Intersect(), CIRCLE::IntersectLine(), SHAPE_ARC::IntersectLine(), intersects(), SHAPE_SEGMENT::Is45Degree(), isLine45Degree(), SHAPE_POLY_SET::IsPolygonSelfIntersecting(), PNS::IsSegment45Degree(), KIGFX::VIEW_OVERLAY::Line(), SCH_IO_EAGLE::loadSegments(), PNS::MEANDER_SHAPE::MakeArc(), PNS::MEANDER_SHAPE::MakeCorner(), PCB_TUNING_PATTERN::MakeEditPoints(), PNS::MEANDER_SHAPE::MakeEmpty(), makeWireFromChain(), PNS::MEANDERED_LINE::MeanderSegment(), PNS::OPTIMIZER::mergeDpStep(), PNS::OPTIMIZER::mergeObtuse(), PNS::OPTIMIZER::mergeStep(), PNS_KICAD_IFACE::modifyBoardItem(), SHAPE_SEGMENT::Move(), PNS::MoveDiagonal(), mutualDistanceSquared(), NearestPoint(), SHAPE_LINE_CHAIN::NearestPoint(), HALF_LINE::NearestPoint(), LINE::NearestPoint(), NearestPoints(), KIGEOM::NormalisedSeg(), PCB_SHAPE::Normalize(), operator!=(), operator<(), operator=(), operator==(), Overlaps(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), PCB_IO_EASYEDAPRO_PARSER::ParsePoly(), SCH_EASYEDAPRO_PARSER::ParseSchematic(), SCH_EASYEDA_PARSER::ParseSchematic(), SCH_EASYEDA_PARSER::ParseSymbolShapes(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), PCB_IO_KICAD_SEXPR_PARSER::parseZONE(), playground_main_func(), BRDITEMS_PLOTTER::PlotDimension(), BRDITEMS_PLOTTER::PlotShape(), SHAPE_LINE_CHAIN::PointAlong(), KIGEOM::PointProjectsOntoSegment(), OUTSET_ROUTINE::ProcessItem(), LINE_EXTENSION_ROUTINE::ProcessLinePair(), DOGBONE_CORNER_ROUTINE::ProcessLinePair(), PNS::MEANDER_SHAPE::Recalculate(), PNS::NODE::removeSegmentIndex(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), DRC_TEST_PROVIDER_CONNECTION_WIDTH::Run(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run(), PCB_DIMENSION_BASE::segCircleIntersection(), KIGEOM::SegIsInDirection(), GEOM_TEST::SegmentCompletelyInQuadrant(), GEOM_TEST::SegmentCompletelyWithinRadius(), GEOM_TEST::SegmentEndsInQuadrant(), PNS::SegmentHull(), GEOM_TEST::SegmentsHaveSameEndPoints(), PCB_DIMENSION_BASE::segPolyIntersection(), SHAPE_LINE_CHAIN::SelfIntersecting(), SHAPE_LINE_CHAIN::SelfIntersectingWithArcs(), SHAPE_ARC::SHAPE_ARC(), SHAPE_LINE_CHAIN::Split(), PNS::LINE_PLACER::SplitAdjacentSegments(), SquaredDistance(), SHAPE_POLY_SET::SquaredDistanceToPolygon(), PNS::LINE_PLACER::Start(), PNS::DRAGGER::startDragSegment(), STROKE_PARAMS::Stroke(), PNS::SEGMENT::SwapEnds(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testShapeLineChain(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZonesToZones(), PNS::tightenSegment(), EDA_SHAPE::TransformShapeToPolygon(), PCB_DIMENSION_BASE::TransformShapeToPolygon(), PCB_TEXTBOX::TransformShapeToPolygon(), SHAPE_SEGMENT::TransformToPolygon(), unfracture(), SHAPE_POLY_SET::unfractureSingle(), PNS::MEANDER_SHAPE::updateBaseSegment(), PCB_TUNING_PATTERN::UpdateEditPoints(), PCB_TUNING_PATTERN::UpdateFromEditPoints(), PCB_DIM_ALIGNED::updateGeometry(), PCB_DIM_ORTHOGONAL::updateGeometry(), PCB_DIM_RADIAL::updateGeometry(), PCB_TUNING_PATTERN::ViewDraw(), and HYPERLYNX_EXPORTER::writeBoardInfo().
|
private |
< index within the parent shape (used when m_is_local == false)
Definition at line 392 of file seg.h.
Referenced by Index(), operator=(), and SEG().