23#ifndef __PNS_DIFF_PLACER_H
24#define __PNS_DIFF_PLACER_H
26#include <math/vector2d.h>
28#include "pns_sizes_settings.h"
32#include "pns_algo_base.h"
33#include "pns_diff_pair.h"
35#include "pns_placement_algo.h"
58 static bool FindDpPrimitivePair(
NODE* aWorld,
const VECTOR2I& aP,
ITEM* aItem,
99 bool SetLayer(
int aLayer )
override;
118 const std::vector<int>
CurrentNets()
const override;
125 return m_currentLayer;
171 void updateLeadingRatLine();
176 void setWorld(
NODE* aWorld );
181 void initPlacement( );
188 void setInitialDirection(
const DIRECTION_45& aDirection );
191 bool routeHead(
const VECTOR2I& aP );
192 bool tryWalkDp(
NODE* aNode,
DIFF_PAIR& aPair,
bool aSolidsOnly );
195 bool rhWalkOnly(
const VECTOR2I& aP );
198 bool rhShoveOnly (
const VECTOR2I& aP );
201 bool rhMarkObstacles(
const VECTOR2I& aP );
203 const VIA makeVia (
const VECTOR2I& aP,
int aNet );
206 bool aWindCw,
bool aSolidsOnly );
217 bool m_chainedPlacement;
218 bool m_initialDiagonal;
219 bool m_startDiagonal;
224 DP_PRIMITIVE_PAIR m_start;
225 std::optional<DP_PRIMITIVE_PAIR> m_prevPair;
237 std::unique_ptr<SHOVE> m_shove;
245 SIZES_SETTINGS m_sizes;
266 VECTOR2I m_currentEnd, m_currentStart;
267 DIFF_PAIR m_currentTrace;
268 bool m_currentTraceOk;
270 ITEM* m_currentEndItem;
Represent route directions & corner angles in a 45-degree metric.
Definition direction45.h:37
Single track placement algorithm.
Definition pns_diff_pair_placer.h:53
NODE * CurrentNode(bool aLoopsRemoved=false) const override
Return the most recent world state.
Definition pns_diff_pair_placer.cpp:400
void SetOrthoMode(bool aOrthoMode) override
Function SetOrthoMode()
Definition pns_diff_pair_placer.cpp:83
bool HasPlacedAnything() const override
Definition pns_diff_pair_placer.cpp:822
void GetModifiedNets(std::vector< int > &aNets) const override
Function GetModifiedNets.
Definition pns_diff_pair_placer.cpp:839
bool ToggleVia(bool aEnabled) override
Enable/disable a via at the end of currently routed trace.
Definition pns_diff_pair_placer.cpp:92
bool AbortPlacement() override
Definition pns_diff_pair_placer.cpp:815
const std::vector< int > CurrentNets() const override
Return the net code of currently routed track.
Definition pns_diff_pair_placer.cpp:859
bool Start(const VECTOR2I &aP, ITEM *aStartItem) override
Start routing a single track at point aP, taking item aStartItem as anchor (unless NULL).
Definition pns_diff_pair_placer.cpp:573
bool CommitPlacement() override
Definition pns_diff_pair_placer.cpp:828
const ITEM_SET Traces() override
Return the complete routed line, as a single-member ITEM_SET.
Definition pns_diff_pair_placer.cpp:380
void FlipPosture() override
Toggle the current posture (straight/diagonal) of the trace head.
Definition pns_diff_pair_placer.cpp:391
void UpdateSizes(const SIZES_SETTINGS &aSizes) override
Perform on-the-fly update of the width, via diameter & drill size from a settings class.
Definition pns_diff_pair_placer.cpp:731
bool Move(const VECTOR2I &aP, ITEM *aEndItem) override
Move the end of the currently routed trace to the point aP, taking aEndItem as anchor (if not NULL).
Definition pns_diff_pair_placer.cpp:709
bool IsPlacingVia() const override
Function IsPlacingVia()
Definition pns_diff_pair_placer.h:145
bool FixRoute(const VECTOR2I &aP, ITEM *aEndItem, bool aForceFinish) override
Commit the currently routed track to the parent node, taking aP as the final end point and aEndItem a...
Definition pns_diff_pair_placer.cpp:749
int CurrentLayer() const override
Return the layer of currently routed track.
Definition pns_diff_pair_placer.h:123
bool SetLayer(int aLayer) override
Set the current routing layer.
Definition pns_diff_pair_placer.cpp:409
const VECTOR2I & CurrentEnd() const override
Return the current end of the line being placed.
Definition pns_diff_pair_placer.h:110
Basic class for a differential pair.
Definition pns_diff_pair.h:235
Store starting/ending primitives (pads, vias or segments) for a differential pair.
Definition pns_diff_pair.h:120
Definition pns_itemset.h:37
Base class for PNS router board items.
Definition pns_item.h:57
Keep the router "world" - i.e.
Definition pns_node.h:148
PLACEMENT_ALGO.
Definition pns_placement_algo.h:46
Definition pns_router.h:116
Definition pns_sizes_settings.h:42
Definition wx_compat.h:13