Horizon
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PNS::MEANDER_PLACER Class Reference

Single track length matching/meandering tool. More...

#include <pns_meander_placer.h>

Inheritance diagram for PNS::MEANDER_PLACER:
PNS::MEANDER_PLACER_BASE PNS::PLACEMENT_ALGO PNS::ALGO_BASE PNS::MEANDER_SKEW_PLACER

Public Member Functions

 MEANDER_PLACER (ROUTER *aRouter)
 
virtual bool Start (const VECTOR2I &aP, ITEM *aStartItem) override
 Function Start()
 
virtual bool Move (const VECTOR2I &aP, ITEM *aEndItem) override
 Function Move()
 
virtual bool FixRoute (const VECTOR2I &aP, ITEM *aEndItem, bool aForceFinish=false) override
 Function FixRoute()
 
bool CommitPlacement () override
 
bool AbortPlacement () override
 
bool HasPlacedAnything () const override
 
NODECurrentNode (bool aLoopsRemoved=false) const override
 Function CurrentNode()
 
const ITEM_SET Traces () override
 Function Traces()
 
const VECTOR2ICurrentEnd () const override
 Function CurrentEnd()
 
const std::vector< int > CurrentNets () const override
 Function CurrentNets()
 
int CurrentLayer () const override
 Function CurrentLayer()
 
virtual const wxString TuningInfo (EDA_UNITS aUnits) const override
 Return a string describing the status and length of the tuned traces.
 
virtual TUNING_STATUS TuningStatus () const override
 Return the tuning status (too short, too long, etc.) of the trace(s) being tuned.
 
bool CheckFit (MEANDER_SHAPE *aShape) override
 Checks if it's OK to place the shape aShape (i.e.
 
- Public Member Functions inherited from PNS::MEANDER_PLACER_BASE
 MEANDER_PLACER_BASE (ROUTER *aRouter)
 
virtual void AmplitudeStep (int aSign)
 Increase/decreases the current meandering amplitude by one step.
 
virtual void SpacingStep (int aSign)
 Increase/decrease the current meandering spacing by one step.
 
virtual int Clearance ()
 Return the clearance of the track(s) being length tuned.
 
virtual const MEANDER_SETTINGSMeanderSettings () const
 Return the current meandering configuration.
 
virtual void UpdateSettings (const MEANDER_SETTINGS &aSettings)
 
int GetTotalPadToDieLength (const LINE &aLine) const
 
- Public Member Functions inherited from PNS::PLACEMENT_ALGO
 PLACEMENT_ALGO (ROUTER *aRouter)
 
virtual bool UnfixRoute ()
 
virtual bool ToggleVia (bool aEnabled)
 Function ToggleVia()
 
virtual bool IsPlacingVia () const
 Function IsPlacingVia()
 
virtual bool SetLayer (int aLayer)
 Function SetLayer()
 
virtual void FlipPosture ()
 Function FlipPosture()
 
virtual void UpdateSizes (const SIZES_SETTINGS &aSizes)
 Function UpdateSizes()
 
virtual void SetOrthoMode (bool aOrthoMode)
 Function SetOrthoMode()
 
virtual void GetModifiedNets (std::vector< int > &aNets) const
 Function GetModifiedNets.
 
- Public Member Functions inherited from PNS::ALGO_BASE
 ALGO_BASE (ROUTER *aRouter)
 
virtual ~ALGO_BASE ()
 Return the instance of our router.
 
ROUTERRouter () const
 Return current router settings.
 
ROUTING_SETTINGSSettings () const
 Return the logger object, allowing to dump geometry to a file.
 
virtual LOGGERLogger ()
 
void SetLogger (LOGGER *aLogger)
 
void SetDebugDecorator (DEBUG_DECORATOR *aDecorator)
 Assign a debug decorator allowing this algo to draw extra graphics for visual debugging.
 
DEBUG_DECORATORDbg () const
 
const BOX2IVisibleViewArea () const
 

Protected Member Functions

bool doMove (const VECTOR2I &aP, ITEM *aEndItem, long long int aTargetLength)
 
void setWorld (NODE *aWorld)
 
virtual long long int origPathLength () const
 current routing start point (end of tail, beginning of head)
 
- Protected Member Functions inherited from PNS::MEANDER_PLACER_BASE
void cutTunedLine (const SHAPE_LINE_CHAIN &aOrigin, const VECTOR2I &aTuneStart, const VECTOR2I &aCursorPos, SHAPE_LINE_CHAIN &aPre, SHAPE_LINE_CHAIN &aTuned, SHAPE_LINE_CHAIN &aPost)
 Extract the part of a track to be meandered, depending on the starting point and the cursor position.
 
void tuneLineLength (MEANDERED_LINE &aTuned, long long int aElongation)
 Take a set of meanders in aTuned and tunes their length to extend the original line length by aElongation.
 
int compareWithTolerance (long long int aValue, long long int aExpected, long long int aTolerance=0) const
 Compare aValue against aExpected with given tolerance.
 
VECTOR2I getSnappedStartPoint (LINKED_ITEM *aStartItem, VECTOR2I aStartPoint)
 
long long int lineLength (const ITEM_SET &aLine) const
 Calculate the total length of the line represented by an item set (tracks and vias)
 

Protected Attributes

VECTOR2I m_currentStart
 Current world state.
 
NODEm_currentNode
 
LINE m_originLine
 
LINE m_currentTrace
 
ITEM_SET m_tunedPath
 
SHAPE_LINE_CHAIN m_finalShape
 
MEANDERED_LINE m_result
 
LINKED_ITEMm_initialSegment
 
long long int m_lastLength
 
TUNING_STATUS m_lastStatus
 
- Protected Attributes inherited from PNS::MEANDER_PLACER_BASE
NODEm_world
 Total length added by pad to die size.
 
int m_padToDieLength
 Width of the meandered trace(s).
 
int m_currentWidth
 Meander settings.
 
MEANDER_SETTINGS m_settings
 The current end point.
 
VECTOR2I m_currentEnd
 
- Protected Attributes inherited from PNS::ALGO_BASE
DEBUG_DECORATORm_debugDecorator
 
ROUTERm_router
 
LOGGERm_logger
 

Additional Inherited Members

- Public Types inherited from PNS::MEANDER_PLACER_BASE
enum  TUNING_STATUS { TOO_SHORT = 0 , TOO_LONG , TUNED }
 < Result of the length tuning operation
 

Detailed Description

Single track length matching/meandering tool.

Member Function Documentation

◆ AbortPlacement()

bool PNS::MEANDER_PLACER::AbortPlacement ( )
overridevirtual

Reimplemented from PNS::PLACEMENT_ALGO.

◆ CheckFit()

bool PNS::MEANDER_PLACER::CheckFit ( MEANDER_SHAPE aShape)
overridevirtual

Checks if it's OK to place the shape aShape (i.e.

if it doesn't cause DRC violations or collide with other meanders).

Parameters
aShapethe shape to check.
Returns
true if the shape fits.

Reimplemented from PNS::MEANDER_PLACER_BASE.

◆ CommitPlacement()

bool PNS::MEANDER_PLACER::CommitPlacement ( )
overridevirtual

Reimplemented from PNS::PLACEMENT_ALGO.

◆ CurrentEnd()

const VECTOR2I & PNS::MEANDER_PLACER::CurrentEnd ( ) const
overridevirtual

Function CurrentEnd()

Returns the current end of the line(s) being placed/tuned. It may not be equal to the cursor position due to collisions.

Implements PNS::PLACEMENT_ALGO.

◆ CurrentLayer()

int PNS::MEANDER_PLACER::CurrentLayer ( ) const
overridevirtual

Function CurrentLayer()

Returns the layer of currently routed track.

Implements PNS::PLACEMENT_ALGO.

◆ CurrentNets()

const std::vector< int > PNS::MEANDER_PLACER::CurrentNets ( ) const
inlineoverridevirtual

Function CurrentNets()

Returns the net code(s) of currently routed track(s).

Implements PNS::PLACEMENT_ALGO.

◆ CurrentNode()

NODE * PNS::MEANDER_PLACER::CurrentNode ( bool  aLoopsRemoved = false) const
overridevirtual

Function CurrentNode()

Returns the most recent board state.

Implements PNS::PLACEMENT_ALGO.

◆ FixRoute()

bool PNS::MEANDER_PLACER::FixRoute ( const VECTOR2I aP,
ITEM aEndItem,
bool  aForceFinish = false 
)
overridevirtual

Function FixRoute()

Commits the currently routed items to the parent node, taking aP as the final end point and aEndItem as the final anchor (if provided).

Returns
true, if route has been committed. May return false if the routing result is violating design rules - in such case, the track is only committed if Settings.CanViolateDRC() is on.

Implements PNS::PLACEMENT_ALGO.

◆ HasPlacedAnything()

bool PNS::MEANDER_PLACER::HasPlacedAnything ( ) const
overridevirtual

Reimplemented from PNS::PLACEMENT_ALGO.

◆ Move()

bool PNS::MEANDER_PLACER::Move ( const VECTOR2I aP,
ITEM aEndItem 
)
overridevirtual

Function Move()

Moves the end of the currently routed primtive(s) to the point aP, taking aEndItem as the anchor (if not NULL). (unless NULL).

Implements PNS::PLACEMENT_ALGO.

Reimplemented in PNS::MEANDER_SKEW_PLACER.

◆ Start()

bool PNS::MEANDER_PLACER::Start ( const VECTOR2I aP,
ITEM aStartItem 
)
overridevirtual

Function Start()

Starts placement/drag operation at point aP, taking item aStartItem as anchor (unless NULL).

Implements PNS::PLACEMENT_ALGO.

Reimplemented in PNS::MEANDER_SKEW_PLACER.

◆ Traces()

const ITEM_SET PNS::MEANDER_PLACER::Traces ( )
overridevirtual

Function Traces()

Returns all routed/tuned traces.

Implements PNS::PLACEMENT_ALGO.

◆ TuningInfo()

const wxString PNS::MEANDER_PLACER::TuningInfo ( EDA_UNITS  aUnits) const
overridevirtual

Return a string describing the status and length of the tuned traces.

Implements PNS::MEANDER_PLACER_BASE.

Reimplemented in PNS::MEANDER_SKEW_PLACER.

◆ TuningStatus()

MEANDER_PLACER::TUNING_STATUS PNS::MEANDER_PLACER::TuningStatus ( ) const
overridevirtual

Return the tuning status (too short, too long, etc.) of the trace(s) being tuned.

Implements PNS::MEANDER_PLACER_BASE.


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