| 
    KiCad PCB EDA Suite
    
   | 
 
Represent a set of meanders fitted over a single or two lines. More...
#include <pns_meander.h>
Public Member Functions | |
| MEANDERED_LINE () | |
| MEANDERED_LINE (MEANDER_PLACER_BASE *aPlacer, bool aIsDual=false) | |
| ~MEANDERED_LINE () | |
| void | AddCorner (const VECTOR2I &aA, const VECTOR2I &aB=VECTOR2I(0, 0)) | 
| Create a dummy meander shape representing a line corner.   | |
| void | AddArc (const SHAPE_ARC &aArc1, const SHAPE_ARC &aArc2=SHAPE_ARC()) | 
| Create a dummy meander shape representing an arc corner.   | |
| void | AddArcAndPt (const SHAPE_ARC &aArc1, const VECTOR2I &aPt2) | 
| Create a dummy meander shape representing an arc corner.   | |
| void | AddPtAndArc (const VECTOR2I &aPt1, const SHAPE_ARC &aArc2) | 
| Create a dummy meander shape representing an arc corner.   | |
| void | AddMeander (MEANDER_SHAPE *aShape) | 
| Add a new meander shape to the meandered line.   | |
| void | Clear () | 
| Clear the line geometry, removing all corners and meanders.   | |
| void | SetWidth (int aWidth) | 
| Set the line width.   | |
| void | MeanderSegment (const SEG &aSeg, bool aSide, int aBaseIndex=0) | 
| Fit maximum amplitude meanders on a given segment and adds to the current line.   | |
| void | SetBaselineOffset (int aOffset) | 
| Set the parallel offset between the base segment and the meandered line.      | |
| std::vector< MEANDER_SHAPE * > & | Meanders () | 
| bool | CheckSelfIntersections (MEANDER_SHAPE *aShape, int aClearance) | 
| Check if the given shape is intersecting with any other meander in the current line.   | |
| const MEANDER_SETTINGS & | Settings () const | 
| MEANDERED_LINE & | operator= (MEANDERED_LINE &&aOther) noexcept | 
Private Attributes | |
| VECTOR2I | m_last | 
| MEANDER_PLACER_BASE * | m_placer | 
| std::vector< MEANDER_SHAPE * > | m_meanders | 
| bool | m_dual | 
| int | m_width | 
| int | m_baselineOffset | 
Represent a set of meanders fitted over a single or two lines.
Definition at line 446 of file pns_meander.h.
      
  | 
  inline | 
Definition at line 449 of file pns_meander.h.
References m_baselineOffset, m_dual, m_placer, and m_width.
Referenced by operator=().
      
  | 
  inline | 
| aPlacer | the meander placer instance | 
| aIsDual | when true, the meanders are generated for two coupled lines | 
Definition at line 462 of file pns_meander.h.
References m_baselineOffset, m_dual, m_placer, and m_width.
      
  | 
  inline | 
Definition at line 471 of file pns_meander.h.
References Clear().
Create a dummy meander shape representing an arc corner.
Allows representing existing arc tracks so they can be reconstructed after length tuning.
| aArc1 | Arc shape on the 1st line. | 
| aArc2 | Arc shape on the 2nd line (if m_dual == true). | 
Definition at line 811 of file pns_meander.cpp.
References SHAPE_ARC::GetP1(), m_dual, m_last, m_meanders, m_placer, m_width, and PNS::MEANDER_SHAPE::MakeArc().
Referenced by AddArcAndPt(), and AddPtAndArc().
Create a dummy meander shape representing an arc corner.
Allows representing existing arc tracks so they can be reconstructed after length tuning.
| aArc1 | Arc shape on the 1st line. | 
| aPt2 | corner point of the 2nd line (if m_dual == true). | 
Definition at line 822 of file pns_meander.cpp.
Create a dummy meander shape representing a line corner.
Used to define the starts/ends of meandered segments.
| aA | corner point of the 1st line. | 
| aB | corner point of the 2nd line (if m_dual == true). | 
Definition at line 800 of file pns_meander.cpp.
References m_dual, m_last, m_meanders, m_placer, m_width, and PNS::MEANDER_SHAPE::MakeCorner().
Referenced by MeanderSegment().
| void PNS::MEANDERED_LINE::AddMeander | ( | MEANDER_SHAPE * | aShape | ) | 
Add a new meander shape to the meandered line.
| aShape | the meander shape to add | 
Definition at line 862 of file pns_meander.cpp.
References SEG::B, PNS::MEANDER_SHAPE::BaseSegment(), m_last, and m_meanders.
Referenced by MeanderSegment().
Create a dummy meander shape representing an arc corner.
Allows representing existing arc tracks so they can be reconstructed after length tuning.
| aPt1 | corner point of the 1st line. | 
| aArc2 | Arc shape on the 2nd line (if m_dual == true). | 
Definition at line 830 of file pns_meander.cpp.
References AddArc().
| bool PNS::MEANDERED_LINE::CheckSelfIntersections | ( | MEANDER_SHAPE * | aShape, | 
| int | aClearance ) | 
Check if the given shape is intersecting with any other meander in the current line.
| aShape | the shape to check. | 
| aClearance | clearance value. | 
Definition at line 643 of file pns_meander.cpp.
References SEG::ApproxParallel(), PNS::MEANDER_SHAPE::BaseSegment(), PNS::MEANDER_SHAPE::CLine(), SHAPE_LINE_CHAIN::Collide(), SHAPE_LINE_CHAIN::CSegment(), m_meanders, PNS::MT_CORNER, PNS::MT_EMPTY, SHAPE_LINE_CHAIN::SegmentCount(), and PNS::MEANDER_SHAPE::Type().
| void PNS::MEANDERED_LINE::Clear | ( | ) | 
Clear the line geometry, removing all corners and meanders.
Definition at line 869 of file pns_meander.cpp.
References m_meanders.
Referenced by ~MEANDERED_LINE().
      
  | 
  inline | 
Definition at line 550 of file pns_meander.h.
References m_meanders.
Referenced by PNS::MEANDER_PLACER_BASE::tuneLineLength().
| void PNS::MEANDERED_LINE::MeanderSegment | ( | const SEG & | aSeg, | 
| bool | aSide, | ||
| int | aBaseIndex = 0 ) | 
Fit maximum amplitude meanders on a given segment and adds to the current line.
| aSeg | the base segment to meander. | 
| aSide | Side to start meandering the segment. True=left, False=Right | 
| aBaseIndex | index of the base segment in the original line. | 
Definition at line 191 of file pns_meander.cpp.
References SEG::A, AddCorner(), AddMeander(), SEG::B, SEG::Contains(), PNS::MEANDER_SHAPE::cornerRadius(), PNS::MEANDER_SHAPE::Fit(), SEG::Length(), m_baselineOffset, m_dual, PNS::MEANDER_SETTINGS::m_initialSide, m_last, m_placer, PNS::MEANDER_SETTINGS::m_singleSided, PNS::MEANDER_SETTINGS::m_step, m_width, PNS::MT_CHECK_FINISH, PNS::MT_CHECK_START, PNS::MT_FINISH, PNS::MT_SINGLE, PNS::MT_TURN, VECTOR2< T >::Resize(), PNS::MEANDER_SHAPE::SetBaseIndex(), PNS::MEANDER_SHAPE::SetBaselineOffset(), Settings(), and PNS::MEANDER_SHAPE::spacing().
      
  | 
  inlinenoexcept | 
Definition at line 570 of file pns_meander.h.
References m_baselineOffset, m_dual, m_last, m_meanders, m_placer, m_width, and MEANDERED_LINE().
      
  | 
  inline | 
Set the parallel offset between the base segment and the meandered line.
Used for dual meanders (diff pair) only.
| aOffset | the offset. | 
Definition at line 542 of file pns_meander.h.
References m_baselineOffset.
| const MEANDER_SETTINGS & PNS::MEANDERED_LINE::Settings | ( | ) | const | 
Definition at line 185 of file pns_meander.cpp.
References m_placer.
Referenced by MeanderSegment().
      
  | 
  inline | 
      
  | 
  private | 
Definition at line 595 of file pns_meander.h.
Referenced by MEANDERED_LINE(), MEANDERED_LINE(), MeanderSegment(), operator=(), and SetBaselineOffset().
      
  | 
  private | 
Definition at line 593 of file pns_meander.h.
Referenced by AddArc(), AddCorner(), MEANDERED_LINE(), MEANDERED_LINE(), MeanderSegment(), and operator=().
      
  | 
  private | 
Definition at line 588 of file pns_meander.h.
Referenced by AddArc(), AddCorner(), AddMeander(), MeanderSegment(), and operator=().
      
  | 
  private | 
Definition at line 591 of file pns_meander.h.
Referenced by AddArc(), AddCorner(), AddMeander(), CheckSelfIntersections(), Clear(), Meanders(), and operator=().
      
  | 
  private | 
Definition at line 590 of file pns_meander.h.
Referenced by AddArc(), AddCorner(), MEANDERED_LINE(), MEANDERED_LINE(), MeanderSegment(), operator=(), and Settings().
      
  | 
  private | 
Definition at line 594 of file pns_meander.h.
Referenced by AddArc(), AddCorner(), MEANDERED_LINE(), MEANDERED_LINE(), MeanderSegment(), operator=(), and SetWidth().