Horizon
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PNS::MEANDER_PLACER Class Reference

Class MEANDER_PLACER. 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() More...
 
virtual bool Move (const VECTOR2I &aP, ITEM *aEndItem) override
 Function Move() More...
 
virtual bool FixRoute (const VECTOR2I &aP, ITEM *aEndItem, bool aForceFinish=false) override
 Function FixRoute() More...
 
NODECurrentNode (bool aLoopsRemoved=false) const override
 Function CurrentNode() More...
 
const ITEM_SET Traces () override
 Function Traces() More...
 
const VECTOR2ICurrentEnd () const override
 Function CurrentEnd() More...
 
const std::vector< int > CurrentNets () const override
 Function CurrentNets() More...
 
int CurrentLayer () const override
 Function CurrentLayer() More...
 
virtual const std::string TuningInfo () const override
 Function TuningInfo() More...
 
virtual TUNING_STATUS TuningStatus () const override
 Function TuningStatus() More...
 
bool CheckFit (MEANDER_SHAPE *aShape) override
 Function CheckFit() More...
 
 MEANDER_PLACER (ROUTER *aRouter)
 
virtual bool Start (const VECTOR2I &aP, ITEM *aStartItem) override
 Function Start() More...
 
virtual bool Move (const VECTOR2I &aP, ITEM *aEndItem) override
 Function Move() More...
 
virtual bool FixRoute (const VECTOR2I &aP, ITEM *aEndItem, bool aForceFinish=false) override
 Function FixRoute() More...
 
NODECurrentNode (bool aLoopsRemoved=false) const override
 Function CurrentNode() More...
 
const ITEM_SET Traces () override
 Function Traces() More...
 
const VECTOR2ICurrentEnd () const override
 Function CurrentEnd() More...
 
const std::vector< int > CurrentNets () const override
 Function CurrentNets() More...
 
int CurrentLayer () const override
 Function CurrentLayer() More...
 
virtual const std::string TuningInfo () const override
 Function TuningInfo() More...
 
virtual TUNING_STATUS TuningStatus () const override
 Function TuningStatus() More...
 
bool CheckFit (MEANDER_SHAPE *aShape) override
 Function CheckFit() More...
 
- Public Member Functions inherited from PNS::MEANDER_PLACER_BASE
 MEANDER_PLACER_BASE (ROUTER *aRouter)
 
virtual void AmplitudeStep (int aSign)
 Function AmplitudeStep() More...
 
virtual void SpacingStep (int aSign)
 Function SpacingStep() More...
 
virtual const MEANDER_SETTINGSMeanderSettings () const
 Function MeanderSettings() More...
 
virtual void UpdateSettings (const MEANDER_SETTINGS &aSettings)
 
 MEANDER_PLACER_BASE (ROUTER *aRouter)
 
virtual void AmplitudeStep (int aSign)
 Function AmplitudeStep() More...
 
virtual void SpacingStep (int aSign)
 Function SpacingStep() More...
 
virtual const MEANDER_SETTINGSMeanderSettings () const
 Function MeanderSettings() More...
 
virtual void UpdateSettings (const MEANDER_SETTINGS &aSettings)
 
- Public Member Functions inherited from PNS::PLACEMENT_ALGO
 PLACEMENT_ALGO (ROUTER *aRouter)
 
virtual bool ToggleVia (bool aEnabled)
 Function ToggleVia() More...
 
virtual bool IsPlacingVia () const
 Function IsPlacingVia() More...
 
virtual bool SetLayer (int aLayer)
 Function SetLayer() More...
 
virtual void FlipPosture ()
 Function FlipPosture() More...
 
virtual void UpdateSizes (const SIZES_SETTINGS &aSizes)
 Function UpdateSizes() More...
 
virtual void SetOrthoMode (bool aOrthoMode)
 Function SetOrthoMode() More...
 
virtual void GetModifiedNets (std::vector< int > &aNets) const
 Function GetModifiedNets. More...
 
 PLACEMENT_ALGO (ROUTER *aRouter)
 
virtual bool ToggleVia (bool aEnabled)
 Function ToggleVia() More...
 
virtual bool IsPlacingVia () const
 Function IsPlacingVia() More...
 
virtual bool SetLayer (int aLayer)
 Function SetLayer() More...
 
virtual void FlipPosture ()
 Function FlipPosture() More...
 
virtual void UpdateSizes (const SIZES_SETTINGS &aSizes)
 Function UpdateSizes() More...
 
virtual void SetOrthoMode (bool aOrthoMode)
 Function SetOrthoMode() More...
 
virtual void GetModifiedNets (std::vector< int > &aNets) const
 Function GetModifiedNets. More...
 
- Public Member Functions inherited from PNS::ALGO_BASE
 ALGO_BASE (ROUTER *aRouter)
 
ROUTERRouter () const
 

Returns the instance of our router


 
ROUTING_SETTINGSSettings () const
 

Returns current router settings


 
virtual LOGGERLogger ()
 

Returns the logger object, allowing to dump geometry to a file.


 
void SetDebugDecorator (DEBUG_DECORATOR *aDecorator)
 Function SetDebugDecorator. More...
 
DEBUG_DECORATORDbg () const
 
 ALGO_BASE (ROUTER *aRouter)
 
ROUTERRouter () const
 

Returns the instance of our router


 
ROUTING_SETTINGSSettings () const
 

Returns current router settings


 
virtual LOGGERLogger ()
 

Returns the logger object, allowing to dump geometry to a file.


 
void SetDebugDecorator (DEBUG_DECORATOR *aDecorator)
 Function SetDebugDecorator. More...
 
DEBUG_DECORATORDbg () const
 

Protected Member Functions

bool doMove (const VECTOR2I &aP, ITEM *aEndItem, int aTargetLength)
 
void setWorld (NODE *aWorld)
 
virtual int origPathLength () const
 
bool doMove (const VECTOR2I &aP, ITEM *aEndItem, int aTargetLength)
 
void setWorld (NODE *aWorld)
 
virtual int origPathLength () const
 
- 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)
 Function cutTunedLine() More...
 
void tuneLineLength (MEANDERED_LINE &aTuned, int aElongation)
 Function tuneLineLength() More...
 
int compareWithTolerance (int aValue, int aExpected, int aTolerance=0) const
 Function compareWithTolerance() More...
 
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)
 Function cutTunedLine() More...
 
void tuneLineLength (MEANDERED_LINE &aTuned, int aElongation)
 Function tuneLineLength() More...
 
int compareWithTolerance (int aValue, int aExpected, int aTolerance=0) const
 Function compareWithTolerance() More...
 

Protected Attributes

NODEm_world
 

pointer to world to search colliding items


 
VECTOR2I m_currentStart
 

current routing start point (end of tail, beginning of head)


 
NODEm_currentNode
 

Current world state


 
LINE m_originLine
 
LINE m_currentTrace
 
ITEM_SET m_tunedPath
 
SHAPE_LINE_CHAIN m_finalShape
 
MEANDERED_LINE m_result
 
SEGMENTm_initialSegment
 
int m_lastLength
 
TUNING_STATUS m_lastStatus
 
- Protected Attributes inherited from PNS::MEANDER_PLACER_BASE
int m_currentWidth
 

width of the meandered trace(s)


 
MEANDER_SETTINGS m_settings
 

meandering settings


 
VECTOR2I m_currentEnd
 

current end point


 

Additional Inherited Members

- Public Types inherited from PNS::MEANDER_PLACER_BASE
enum  TUNING_STATUS {
  TOO_SHORT = 0, TOO_LONG, TUNED, TOO_SHORT = 0,
  TOO_LONG, TUNED
}
 

Result of the length tuning operation


 
enum  TUNING_STATUS {
  TOO_SHORT = 0, TOO_LONG, TUNED, TOO_SHORT = 0,
  TOO_LONG, TUNED
}
 

Result of the length tuning operation


 

Detailed Description

Class MEANDER_PLACER.

Single track length matching/meandering tool.

Member Function Documentation

◆ CheckFit() [1/2]

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

Function CheckFit()

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.

◆ CheckFit() [2/2]

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

Function CheckFit()

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.

◆ CurrentEnd() [1/2]

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.

◆ CurrentEnd() [2/2]

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() [1/2]

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

Function CurrentLayer()

Returns the layer of currently routed track.

Implements PNS::PLACEMENT_ALGO.

◆ CurrentLayer() [2/2]

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

Function CurrentLayer()

Returns the layer of currently routed track.

Implements PNS::PLACEMENT_ALGO.

◆ CurrentNets() [1/2]

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.

◆ CurrentNets() [2/2]

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() [1/2]

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

Function CurrentNode()

Returns the most recent board state.

Implements PNS::PLACEMENT_ALGO.

◆ CurrentNode() [2/2]

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

Function CurrentNode()

Returns the most recent board state.

Implements PNS::PLACEMENT_ALGO.

◆ FixRoute() [1/2]

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

◆ FixRoute() [2/2]

virtual 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 commited. 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.

◆ Move() [1/2]

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, and PNS::MEANDER_SKEW_PLACER.

◆ Move() [2/2]

virtual 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, and PNS::MEANDER_SKEW_PLACER.

◆ Start() [1/2]

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, and PNS::MEANDER_SKEW_PLACER.

◆ Start() [2/2]

virtual 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, and PNS::MEANDER_SKEW_PLACER.

◆ Traces() [1/2]

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

Function Traces()

Returns all routed/tuned traces.

Implements PNS::PLACEMENT_ALGO.

◆ Traces() [2/2]

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

Function Traces()

Returns all routed/tuned traces.

Implements PNS::PLACEMENT_ALGO.

◆ TuningInfo() [1/2]

const std::string PNS::MEANDER_PLACER::TuningInfo ( ) const
overridevirtual

Function TuningInfo()

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

Implements PNS::MEANDER_PLACER_BASE.

Reimplemented in PNS::MEANDER_SKEW_PLACER, and PNS::MEANDER_SKEW_PLACER.

◆ TuningInfo() [2/2]

virtual const std::string PNS::MEANDER_PLACER::TuningInfo ( ) const
overridevirtual

Function TuningInfo()

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

Implements PNS::MEANDER_PLACER_BASE.

Reimplemented in PNS::MEANDER_SKEW_PLACER, and PNS::MEANDER_SKEW_PLACER.

◆ TuningStatus() [1/2]

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

Function TuningStatus()

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

Implements PNS::MEANDER_PLACER_BASE.

◆ TuningStatus() [2/2]

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

Function TuningStatus()

Returns 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: