KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SEG Class Reference

#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.
 
SEGoperator= (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.
 
bool IntersectsLine (double aSlope, double aOffset, VECTOR2I &aIntersection) const
 Check if this segment intersects a line defined by slope aSlope and offset aOffset.
 
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 checkCollinearOverlap (const SEG &aSeg, bool useXAxis, bool aIgnoreEndpoints, VECTOR2I *aPt) 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)
 

Detailed Description

Definition at line 41 of file seg.h.

Member Typedef Documentation

◆ ecoord

Definition at line 44 of file seg.h.

Constructor & Destructor Documentation

◆ SEG() [1/5]

◆ SEG() [2/5]

SEG::SEG ( int aX1,
int aY1,
int aX2,
int aY2 )
inline

Create a segment between (aX1, aY1) and (aX2, aY2).

Definition at line 63 of file seg.h.

References A, B, and m_index.

◆ SEG() [3/5]

SEG::SEG ( const VECTOR2I & aA,
const VECTOR2I & aB )
inline

Create a segment between (aA) and (aB).

Definition at line 73 of file seg.h.

References A, B, and m_index.

◆ SEG() [4/5]

SEG::SEG ( const VECTOR2I & aA,
const VECTOR2I & aB,
int aIndex )
inline

Create a segment between (aA) and (aB), referenced to a multi-segment shape.

Parameters
aAreference to the start point in the parent shape
aBreference to the end point in the parent shape
aIndexindex of the segment within the parent shape

Definition at line 87 of file seg.h.

References A, B, and m_index.

◆ SEG() [5/5]

SEG::SEG ( const SEG & aSeg)
inline

Copy constructor.

Definition at line 97 of file seg.h.

References A, B, m_index, and SEG().

Member Function Documentation

◆ Angle()

EDA_ANGLE SEG::Angle ( const SEG & aOther) const

Determine the smallest angle between two segments.

Parameters
aOtherpoint to determine the orientation wrs to self
Returns
smallest angle between this and aOther

Definition at line 102 of file seg.cpp.

References A, std::abs(), B, EDA_ANGLE::Normalize180(), and SEG().

Referenced by PNS::AREA_CONSTRAINT::Check(), ComputeDogbone(), ConnectBoardShapes(), EDIT_TOOL::DragArcTrack(), KIGFX::PREVIEW::ANGLE_ITEM::drawPreviewShape(), EC_CONVERGING::EC_CONVERGING(), PCB_POINT_EDITOR::OnSelectionChange(), DOGBONE_CORNER_ROUTINE::ProcessLinePair(), and LINE_FILLET_ROUTINE::ProcessLinePair().

◆ ApproxCollinear()

bool SEG::ApproxCollinear ( const SEG & aSeg,
int aDistanceThreshold = 1 ) const

◆ ApproxParallel()

◆ ApproxPerpendicular()

bool SEG::ApproxPerpendicular ( const SEG & aSeg) const

Definition at line 790 of file seg.cpp.

References A, ApproxParallel(), PerpendicularSeg(), and SEG().

◆ CanonicalCoefs()

void SEG::CanonicalCoefs ( ecoord & qA,
ecoord & qB,
ecoord & qC ) const
inline

Definition at line 273 of file seg.h.

References A, and B.

Referenced by Collinear().

◆ Center()

VECTOR2I SEG::Center ( ) const
inline

Definition at line 379 of file seg.h.

References A, and B.

Referenced by PCB_GRID_HELPER::computeAnchors(), and CIRCLE::ConstructFromTanTanPt().

◆ checkCollinearOverlap()

bool SEG::checkCollinearOverlap ( const SEG & aSeg,
bool useXAxis,
bool aIgnoreEndpoints,
VECTOR2I * aPt ) const
private

Definition at line 211 of file seg.cpp.

References A, B, rescale(), SEG(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by intersects().

◆ Collide()

bool SEG::Collide ( const SEG & aSeg,
int aClearance,
int * aActual = nullptr ) const

◆ Collinear()

bool SEG::Collinear ( const SEG & aSeg) const
inline

Check if segment aSeg lies on the same line as (this).

Parameters
aSegthe segment to check colinearity with
Returns
true, when segments are collinear.

Definition at line 286 of file seg.h.

References A, std::abs(), B, CanonicalCoefs(), SEG(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by PNS::DP_GATEWAYS::BuildGeneric(), Contains(), SHAPE_LINE_CHAIN::Intersect(), PNS::OPTIMIZER::mergeColinear(), PNS::LINE_PLACER::Move(), and Overlaps().

◆ Contains() [1/2]

◆ Contains() [2/2]

bool SEG::Contains ( const VECTOR2I & aP) const

Definition at line 598 of file seg.cpp.

References SquaredDistance().

◆ Distance() [1/2]

◆ Distance() [2/2]

int SEG::Distance ( const VECTOR2I & aP) const

Compute minimum Euclidean distance to point aP.

Parameters
aPthe point
Returns
minimum distance

Definition at line 679 of file seg.cpp.

References isqrt(), and SquaredDistance().

◆ Index()

int SEG::Index ( ) const
inline

Return the index of this segment in its parent shape (applicable only to non-local segments).

Returns
index value

Definition at line 361 of file seg.h.

References m_index.

Referenced by SHAPE_POLY_SET::IsPolygonSelfIntersecting(), PNS::OPTIMIZER::mergeDpStep(), PNS::OPTIMIZER::mergeObtuse(), and PNS::OPTIMIZER::mergeStep().

◆ Intersect()

◆ IntersectLines()

◆ Intersects()

bool SEG::Intersects ( const SEG & aSeg) const

◆ intersects()

bool SEG::intersects ( const SEG & aSeg,
bool aIgnoreEndpoints = false,
bool aLines = false,
VECTOR2I * aPt = nullptr ) const
private

◆ IntersectsLine()

bool SEG::IntersectsLine ( double aSlope,
double aOffset,
VECTOR2I & aIntersection ) const

Check if this segment intersects a line defined by slope aSlope and offset aOffset.

Parameters
aSlopeslope of the line
aOffsetoffset of the line
aIntersectionoutput intersection point, if exists
Returns
true if the segment intersects the line, false otherwise

Definition at line 448 of file seg.cpp.

References A, std::abs(), B, VECTOR2< T >::Cross(), cross_product(), KiROUND(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), SHAPE_POLY_SET::GenerateHatchLines(), and SegLineIntersectCorrect().

◆ Length()

◆ LineDistance()

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).

Parameters
aPthe point to test
aDetermineSidewhen true, the sign of the returned value indicates the side of the line at which we are (negative = left)
Returns
the distance

Definition at line 717 of file seg.cpp.

References A, std::abs(), B, isqrt(), rescale(), sgn(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by CIRCLE::ConstructFromTanTanPt(), PNS::MULTI_DRAGGER::Drag(), SHAPE_LINE_CHAIN::NearestPoint(), RULE_AREA_CREATE_HELPER::OnComplete(), ZONE_CREATE_HELPER::OnComplete(), PNS::LINE::snapToNeighbourSegments(), and PCB_TUNING_PATTERN::UpdateFromEditPoints().

◆ LineProject()

VECTOR2I SEG::LineProject ( const VECTOR2I & aP) const

◆ mutualDistanceSquared()

bool SEG::mutualDistanceSquared ( const SEG & aSeg,
ecoord & aD1,
ecoord & aD2 ) const
private

Definition at line 737 of file seg.cpp.

References A, B, rescale(), SEG(), sgn(), SquaredLength(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by ApproxCollinear(), and ApproxParallel().

◆ NearestPoint() [1/2]

const VECTOR2I SEG::NearestPoint ( const SEG & aSeg) const

Compute a point on the segment (this) that is closest to any point on aSeg.

Returns
the nearest point

Definition at line 111 of file seg.cpp.

References A, B, Intersect(), NearestPoint(), and SEG().

◆ NearestPoint() [2/2]

◆ NearestPoints()

bool SEG::NearestPoints ( const SEG & aSeg,
VECTOR2I & aPtA,
VECTOR2I & aPtB,
int64_t & aDistSq ) const

Compute closest points between this segment and aSeg.

Parameters
aPtApoint on this segment (output)
aPtBpoint on the other segment (output)
aDistSqsquared distance between points (output)
Returns
true if the operation was successful

Definition at line 153 of file seg.cpp.

References A, B, Intersect(), NearestPoint(), and SEG().

Referenced by SHAPE_LINE_CHAIN::ClosestSegments(), and extractDiffPairCoupledItems().

◆ operator!=()

bool SEG::operator!= ( const SEG & aSeg) const
inline

Definition at line 118 of file seg.h.

References A, B, and SEG().

◆ operator<()

bool SEG::operator< ( const SEG & aSeg) const
inline

Definition at line 384 of file seg.h.

References A, B, and SEG().

◆ operator=()

SEG & SEG::operator= ( const SEG & aSeg)
inline

Definition at line 104 of file seg.h.

References A, B, m_index, and SEG().

◆ operator==()

bool SEG::operator== ( const SEG & aSeg) const
inline

Definition at line 113 of file seg.h.

References A, B, and SEG().

◆ Overlaps()

bool SEG::Overlaps ( const SEG & aSeg) const
inline

Definition at line 301 of file seg.h.

References A, B, Collinear(), Contains(), and SEG().

Referenced by PNS::LINE_PLACER::Move().

◆ ParallelSeg()

SEG SEG::ParallelSeg ( const VECTOR2I & aP) const

Compute a segment parallel to this one, passing through point aP.

Parameters
aPPoint through which the new segment will pass
Returns
SEG parallel to this passing through point aP

Definition at line 527 of file seg.cpp.

References A, B, and SEG().

Referenced by BOOST_DATA_TEST_CASE(), and CIRCLE::ConstructFromTanTanPt().

◆ PerpendicularSeg()

SEG SEG::PerpendicularSeg ( const VECTOR2I & aP) const

Compute a segment perpendicular to this one, passing through point aP.

Parameters
aPPoint through which the new segment will pass
Returns
SEG perpendicular to this passing through point aP

Definition at line 518 of file seg.cpp.

References A, B, VECTOR2< T >::Perpendicular(), and SEG().

Referenced by ApproxPerpendicular(), BOOST_DATA_TEST_CASE(), CIRCLE::ConstructFromTanTanPt(), and EDIT_TOOL::DragArcTrack().

◆ ReflectPoint()

const VECTOR2I SEG::ReflectPoint ( const VECTOR2I & aP) const

Reflect a point using this segment as axis.

Returns
the reflected point

Definition at line 635 of file seg.cpp.

References A, B, VECTOR2< T >::Dot(), rescale(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by CornerListToPolygon(), SHAPE_ARC::Mirror(), and SHAPE_LINE_CHAIN::Mirror().

◆ Reverse()

void SEG::Reverse ( )
inline

Definition at line 368 of file seg.h.

References A, and B.

Referenced by ZONE_FILLER::buildThermalSpokes(), and DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZonesToZones().

◆ Reversed()

SEG SEG::Reversed ( ) const
inline

Returns the center point of the line.

Definition at line 373 of file seg.h.

References A, B, and SEG().

Referenced by KIGEOM::NormalisedSeg(), and PNS::LINE_PLACER::Start().

◆ Side()

int SEG::Side ( const VECTOR2I & aP) const
inline

Determine on which side of directed line passing via segment ends point aP lies.

Parameters
aPpoint to determine the orientation wrs to self
Returns
: < 0: left, 0 : on the line, > 0 : right

Definition at line 143 of file seg.h.

References A, and B.

Referenced by PNS::ArcHull(), CornerListToPolygon(), PNS::MEANDER_PLACER::doMove(), EDIT_TOOL::DragArcTrack(), PCB_TUNING_PATTERN::EditStart(), PNS::DP_MEANDER_PLACER::Move(), SHAPE_LINE_CHAIN::OffsetLine(), PNS::DP_MEANDER_PLACER::pairOrientation(), PNS::SegmentHull(), and PCB_TUNING_PATTERN::UpdateFromEditPoints().

◆ Square()

◆ SquaredDistance() [1/2]

◆ SquaredDistance() [2/2]

SEG::ecoord SEG::SquaredDistance ( const VECTOR2I & aP) const

◆ SquaredLength()

◆ TCoef()

SEG::ecoord SEG::TCoef ( const VECTOR2I & aP) const
inline

Definition at line 405 of file seg.h.

References A, B, and VECTOR2< T >::Dot().

Referenced by commonParallelProjection(), and PNS::commonParallelProjection().

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & aStream,
const SEG & aSeg )
friend

Definition at line 411 of file seg.h.

References A, B, and SEG().

Member Data Documentation

◆ A

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(), FEATURES_MANAGER::AddShape(), PNS::DEBUG_DECORATOR::AddShape(), CREEPAGE_GRAPH::Addshape(), BOARD_ADAPTER::addShape(), SCH_IO_EAGLE::adjustNetLabels(), PCB_GRID_HELPER::AlignToSegment(), Angle(), PNS::ApproximateSegmentAsRect(), ApproxPerpendicular(), PNS::DP_MEANDER_PLACER::baselineSegment(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), PNS::DP_GATEWAYS::BuildFromPrimitivePair(), ZONE_FILLER::buildThermalSpokes(), CanonicalCoefs(), Center(), CheckArcGeom(), SHAPE_LINE_CHAIN::CheckClearance(), checkCollinearOverlap(), checkSelfIntersections(), PNS::DRAGGER::checkVirtualVia(), LENGTH_DELAY_CALCULATION::clipLineToPad(), CollectKnockedOutSegments(), Collide(), Collide(), SHAPE_ARC::Collide(), SHAPE_COMPOUND::Collide(), SHAPE_LINE_CHAIN::Collide(), SHAPE_LINE_CHAIN_BASE::Collide(), SHAPE_RECT::Collide(), SHAPE_SEGMENT::Collide(), collideArc2Arc(), Collinear(), commonParallelProjection(), PNS::commonParallelProjection(), PCB_GRID_HELPER::computeAnchors(), ConnectBoardShapes(), CIRCLE::ConstructFromTanTanPt(), 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(), PNS::MULTI_DRAGGER::Drag(), EDIT_TOOL::DragArcTrack(), PNS::LINE::dragSegment45(), KIGFX::PCB_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::DrawDashedLine(), ROUTER_PREVIEW_ITEM::drawLineChain(), KI_TEST::DrawSegment(), ROUTER_PREVIEW_ITEM::drawShape(), SHAPE_LINE_CHAIN_BASE::EdgeContainingPoint(), editArcCenterKeepEndpoints(), PCB_TUNING_PATTERN::EditStart(), findEndSegments(), PNS::NODE::findRedundantSegment(), PNS::NODE::findRedundantSegment(), PNS::MEANDER_SHAPE::Fit(), PNS::SHOVE::fixupViaCollisions(), PNS::NODE::FixupVirtualVias(), SHAPE_POLY_SET::GenerateHatchLines(), PNS::getDanglingAnchor(), KIGEOM::GetLengthRatioFromStart(), KIGEOM::GetNearestEndpoint(), KIGEOM::GetOtherEnd(), KIGEOM::GetProjectedPointLengthRatio(), KIGEOM::GetSharedEndpoint(), ALTIUM_PCB::HelperCreateBoardOutline(), PNS::HullIntersection(), HALF_LINE::Intersect(), SHAPE_LINE_CHAIN::Intersect(), SHAPE_LINE_CHAIN::Intersect(), CIRCLE::IntersectLine(), SHAPE_ARC::IntersectLine(), intersects(), IntersectsLine(), SHAPE_POLY_SET::isExteriorWaist(), isLine45Degree(), SHAPE_POLY_SET::IsPolygonSelfIntersecting(), PNS::IsSegment45Degree(), Length(), KIGFX::VIEW_OVERLAY::Line(), LineDistance(), LineProject(), SCH_IO_EAGLE::loadSegments(), PCB_TUNING_PATTERN::MakeEditPoints(), makeWireFromChain(), PNS::MEANDERED_LINE::MeanderSegment(), PNS::OPTIMIZER::mergeDpStep(), PNS::OPTIMIZER::mergeObtuse(), PNS::OPTIMIZER::mergeStep(), PNS_KICAD_IFACE::modifyBoardItem(), PNS::LINE_PLACER::Move(), PNS::MoveDiagonal(), mutualDistanceSquared(), NearestPoint(), NearestPoint(), SHAPE_LINE_CHAIN::NearestPoint(), NearestPoints(), NearestPoints(), SHAPE_ARC::NearestPoints(), KIGEOM::NormalisedSeg(), PCB_SHAPE::Normalize(), operator!=(), operator<(), operator<<, operator=(), operator==(), Overlaps(), PNS::DP_MEANDER_PLACER::pairOrientation(), ParallelSeg(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), PCB_IO_EASYEDAPRO_PARSER::ParsePoly(), SCH_EASYEDA_PARSER::ParseSchematic(), SCH_EASYEDAPRO_PARSER::ParseSchematic(), SCH_EASYEDA_PARSER::ParseSymbolShapes(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), PCB_IO_KICAD_SEXPR_PARSER::parseZONE(), SHAPE_LINE_CHAIN::PathLength(), PerpendicularSeg(), playground_main_func(), BRDITEMS_PLOTTER::PlotDimension(), SHAPE_LINE_CHAIN::PointAlong(), KIGEOM::PointProjectsOntoSegment(), OUTSET_ROUTINE::ProcessItem(), DOGBONE_CORNER_ROUTINE::ProcessLinePair(), LINE_EXTENSION_ROUTINE::ProcessLinePair(), PNS::LINE_PLACER::reduceTail(), ReflectPoint(), PNS::NODE::removeSegmentIndex(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), Reverse(), Reversed(), DRC_TEST_PROVIDER_CONNECTION_WIDTH::Run(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run(), DRC_TEST_PROVIDER_TRACK_ANGLE::Run(), SEG(), SEG(), SEG(), SEG(), segCircleIntersection(), KIGEOM::SegIsInDirection(), GEOM_TEST::SegmentCompletelyInQuadrant(), GEOM_TEST::SegmentCompletelyWithinRadius(), GEOM_TEST::SegmentEndsInQuadrant(), PNS::SegmentHull(), GEOM_TEST::SegmentsHaveSameEndPoints(), segPolyIntersection(), SHAPE_LINE_CHAIN::SelfIntersecting(), SHAPE_LINE_CHAIN::SelfIntersectingWithArcs(), Side(), PNS::LINE::snapToNeighbourSegments(), SHAPE_LINE_CHAIN::Split(), PNS::LINE_PLACER::SplitAdjacentSegments(), SquaredDistance(), SquaredDistance(), SHAPE_POLY_SET::SquaredDistanceToPolygon(), SquaredLength(), PNS::LINE_PLACER::Start(), 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(), unfracture(), SHAPE_POLY_SET::unfractureSingle(), PCB_TUNING_PATTERN::UpdateEditPoints(), PCB_TUNING_PATTERN::UpdateFromEditPoints(), PCB_TUNING_PATTERN::ViewDraw(), and HYPERLYNX_EXPORTER::writeBoardInfo().

◆ B

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(), FEATURES_MANAGER::AddShape(), PNS::DEBUG_DECORATOR::AddShape(), CREEPAGE_GRAPH::Addshape(), BOARD_ADAPTER::addShape(), SCH_IO_EAGLE::adjustNetLabels(), PCB_GRID_HELPER::AlignToSegment(), Angle(), PNS::ApproximateSegmentAsRect(), PNS::DP_MEANDER_PLACER::baselineSegment(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), PNS::DP_GATEWAYS::BuildFromPrimitivePair(), ZONE_FILLER::buildThermalSpokes(), CanonicalCoefs(), Center(), CheckArcGeom(), SHAPE_LINE_CHAIN::CheckClearance(), checkCollinearOverlap(), checkSelfIntersections(), PNS::DRAGGER::checkVirtualVia(), LENGTH_DELAY_CALCULATION::clipLineToPad(), CollectKnockedOutSegments(), Collide(), SHAPE_ARC::Collide(), SHAPE_RECT::Collide(), SHAPE_SEGMENT::Collide(), collideArc2Arc(), Collinear(), commonParallelProjection(), PNS::commonParallelProjection(), PCB_GRID_HELPER::computeAnchors(), ComputeChamferPoints(), ComputeDogbone(), ConnectBoardShapes(), CIRCLE::ConstructFromTanTanPt(), 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(), PNS::MULTI_DRAGGER::Drag(), EDIT_TOOL::DragArcTrack(), PNS::LINE::dragSegment45(), KIGFX::PCB_PAINTER::draw(), 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(), editArcCenterKeepEndpoints(), PCB_TUNING_PATTERN::EditStart(), PNS::DIFF_PAIR::EndingPrimitives(), findEndSegments(), PNS::NODE::findRedundantSegment(), PNS::NODE::findRedundantSegment(), PNS::MEANDER_SHAPE::Fit(), PNS::SHOVE::fixupViaCollisions(), PNS::NODE::FixupVirtualVias(), SHAPE_POLY_SET::GenerateHatchLines(), PNS::getDanglingAnchor(), KIGEOM::GetNearestEndpoint(), KIGEOM::GetOtherEnd(), KIGEOM::GetProjectedPointLengthRatio(), KIGEOM::GetSharedEndpoint(), ALTIUM_PCB::HelperCreateBoardOutline(), PNS::HullIntersection(), HALF_LINE::Intersect(), SHAPE_LINE_CHAIN::Intersect(), CIRCLE::IntersectLine(), SHAPE_ARC::IntersectLine(), intersects(), IntersectsLine(), SHAPE_POLY_SET::isExteriorWaist(), isLine45Degree(), SHAPE_POLY_SET::IsPolygonSelfIntersecting(), PNS::IsSegment45Degree(), Length(), KIGFX::VIEW_OVERLAY::Line(), LineDistance(), LineProject(), SCH_IO_EAGLE::loadSegments(), PCB_TUNING_PATTERN::MakeEditPoints(), makeWireFromChain(), PNS::MEANDERED_LINE::MeanderSegment(), PNS::OPTIMIZER::mergeDpStep(), PNS::OPTIMIZER::mergeObtuse(), PNS::OPTIMIZER::mergeStep(), PNS_KICAD_IFACE::modifyBoardItem(), PNS::MoveDiagonal(), mutualDistanceSquared(), NearestPoint(), NearestPoint(), SHAPE_LINE_CHAIN::NearestPoint(), NearestPoints(), NearestPoints(), SHAPE_ARC::NearestPoints(), KIGEOM::NormalisedSeg(), PCB_SHAPE::Normalize(), operator!=(), operator<(), operator<<, operator=(), operator==(), Overlaps(), ParallelSeg(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), PCB_IO_EASYEDAPRO_PARSER::ParsePoly(), SCH_EASYEDA_PARSER::ParseSchematic(), SCH_EASYEDAPRO_PARSER::ParseSchematic(), SCH_EASYEDA_PARSER::ParseSymbolShapes(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), PCB_IO_KICAD_SEXPR_PARSER::parseZONE(), PerpendicularSeg(), playground_main_func(), BRDITEMS_PLOTTER::PlotDimension(), SHAPE_LINE_CHAIN::PointAlong(), KIGEOM::PointProjectsOntoSegment(), OUTSET_ROUTINE::ProcessItem(), DOGBONE_CORNER_ROUTINE::ProcessLinePair(), LINE_EXTENSION_ROUTINE::ProcessLinePair(), ReflectPoint(), PNS::NODE::removeSegmentIndex(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), Reverse(), Reversed(), DRC_TEST_PROVIDER_CONNECTION_WIDTH::Run(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run(), DRC_TEST_PROVIDER_TRACK_ANGLE::Run(), SEG(), SEG(), SEG(), SEG(), segCircleIntersection(), KIGEOM::SegIsInDirection(), GEOM_TEST::SegmentCompletelyInQuadrant(), GEOM_TEST::SegmentCompletelyWithinRadius(), GEOM_TEST::SegmentEndsInQuadrant(), PNS::SegmentHull(), GEOM_TEST::SegmentsHaveSameEndPoints(), segPolyIntersection(), SHAPE_LINE_CHAIN::SelfIntersecting(), SHAPE_LINE_CHAIN::SelfIntersectingWithArcs(), Side(), SHAPE_LINE_CHAIN::Split(), PNS::LINE_PLACER::SplitAdjacentSegments(), SquaredDistance(), SquaredDistance(), SHAPE_POLY_SET::SquaredDistanceToPolygon(), SquaredLength(), PNS::LINE_PLACER::Start(), 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(), unfracture(), SHAPE_POLY_SET::unfractureSingle(), PCB_TUNING_PATTERN::UpdateEditPoints(), PCB_TUNING_PATTERN::UpdateFromEditPoints(), PCB_DIM_RADIAL::updateGeometry(), PCB_TUNING_PATTERN::ViewDraw(), and HYPERLYNX_EXPORTER::writeBoardInfo().

◆ m_index

int SEG::m_index
private

< index within the parent shape (used when m_is_local == false)

Definition at line 402 of file seg.h.

Referenced by Index(), operator=(), SEG(), SEG(), SEG(), SEG(), and SEG().


The documentation for this class was generated from the following files: