28 #include "pns_optimizer.h" 29 #include "pns_routing_settings.h" 30 #include "pns_algo_base.h" 31 #include "pns_logger.h" 67 SHOVE_STATUS ShoveLines(
const LINE& aCurrentHead );
68 SHOVE_STATUS ShoveMultiLines(
const ITEM_SET& aHeadSet );
70 SHOVE_STATUS ShoveDraggingVia(
VIA* aVia,
const VECTOR2I& aWhere,
VIA** aNewVia );
71 SHOVE_STATUS ProcessSingleLine(
LINE& aCurrent,
LINE& aObstacle,
74 void ForceClearance (
bool aEnabled,
int aClearance )
77 m_forceClearance = aClearance;
79 m_forceClearance = -1;
84 const LINE NewHead()
const;
86 void SetInitialLine(
LINE& aInitial );
89 typedef std::vector<SHAPE_LINE_CHAIN> HULL_SET;
90 typedef boost::optional<LINE> OPT_LINE;
91 typedef std::pair<LINE, LINE> LINE_PAIR;
92 typedef std::vector<LINE_PAIR> LINE_PAIR_VEC;
102 OPT_BOX2I m_affectedArea;
105 SHOVE_STATUS processHullSet(
LINE& aCurrent,
LINE& aObstacle,
106 LINE& aShoved,
const HULL_SET& hulls );
108 bool reduceSpringback(
const ITEM_SET& aHeadItems );
109 bool pushSpringback(
NODE* aNode,
const ITEM_SET& aHeadItems,
112 SHOVE_STATUS walkaroundLoneVia(
LINE& aCurrent,
LINE& aObstacle,
LINE& aShoved );
113 bool checkBumpDirection(
const LINE& aCurrent,
const LINE& aShoved )
const;
115 SHOVE_STATUS onCollidingLine(
LINE& aCurrent,
LINE& aObstacle );
116 SHOVE_STATUS onCollidingSegment(
LINE& aCurrent,
SEGMENT* aObstacleSeg );
117 SHOVE_STATUS onCollidingSolid(
LINE& aCurrent,
ITEM* aObstacle );
118 SHOVE_STATUS onCollidingVia(
ITEM* aCurrent,
VIA* aObstacleVia );
119 SHOVE_STATUS onReverseCollidingVia(
LINE& aCurrent,
VIA* aObstacleVia );
120 SHOVE_STATUS pushVia(
VIA* aVia,
const VECTOR2I& aForce,
int aCurrentRank,
bool aDryRun =
false );
122 OPT_BOX2I totalAffectedArea()
const;
124 void unwindStack(
SEGMENT* aSeg );
125 void unwindStack(
ITEM* aItem );
127 void runOptimizer(
NODE* aNode );
129 bool pushLine(
const LINE& aL,
bool aKeepCurrentOnTop =
false );
132 LINE assembleLine(
const SEGMENT* aSeg,
int* aIndex = NULL );
134 void replaceItems(
ITEM* aOld, std::unique_ptr< ITEM > aNew );
135 void replaceLine(
LINE& aOld,
LINE& aNew );
137 OPT_BOX2I m_affectedAreaSum;
139 SHOVE_STATUS shoveIteration(
int aIter );
140 SHOVE_STATUS shoveMainLoop();
142 int getClearance(
const ITEM* aA,
const ITEM* aB )
const;
144 std::vector<SPRINGBACK_TAG> m_nodeStack;
145 std::vector<LINE> m_lineStack;
146 std::vector<LINE> m_optimizerQueue;
158 int m_forceClearance;
159 bool m_multiLineMode;
160 void sanityCheck(
LINE* aOld,
LINE* aNew );
165 #endif // __PNS_SHOVE_H Class ITEM.
Definition: pns_item.h:54
Class NODE.
Definition: pns_node.h:138
Definition: pns_itemset.h:39
Class SHOVE.
Definition: pns_shove.h:46
Class ALGO_BASE.
Definition: pns_algo_base.h:39
Definition: pns_logger.h:39
Definition: pns_line.h:60
Definition: pns_router.h:109
virtual LOGGER * Logger() override
Returns the logger object, allowing to dump geometry to a file.
Definition: pns_shove.h:62
Class COST_ESTIMATOR.
Definition: pns_optimizer.h:45
Definition: pns_segment.h:38
Definition: pns_algo_base.cpp:26