router: expose current view area to the router algorithms so that the optimizer could know not to mess with traces/vias not currently visible to the user (wip)
This commit is contained in:
parent
6936b98469
commit
12dfb541fc
|
@ -36,4 +36,10 @@ LOGGER* ALGO_BASE::Logger()
|
|||
return NULL;
|
||||
}
|
||||
|
||||
const BOX2I& ALGO_BASE::VisibleViewArea() const
|
||||
{
|
||||
auto bb = m_router->VisibleViewArea();
|
||||
return m_router->VisibleViewArea();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#ifndef __PNS_ALGO_BASE_H
|
||||
#define __PNS_ALGO_BASE_H
|
||||
|
||||
#include <math/box2.h>
|
||||
|
||||
#include "pns_routing_settings.h"
|
||||
|
||||
namespace PNS {
|
||||
|
@ -78,6 +80,8 @@ public:
|
|||
return m_debugDecorator;
|
||||
}
|
||||
|
||||
const BOX2I& VisibleViewArea() const;
|
||||
|
||||
protected:
|
||||
DEBUG_DECORATOR *m_debugDecorator;
|
||||
ROUTER* m_router;
|
||||
|
|
|
@ -71,9 +71,8 @@ ROUTER::ROUTER()
|
|||
m_lastNode = nullptr;
|
||||
m_iterLimit = 0;
|
||||
m_settings = nullptr;
|
||||
m_showInterSteps = false;
|
||||
m_snapshotIter = 0;
|
||||
m_iface = nullptr;
|
||||
m_visibleViewArea.SetMaximum();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -26,10 +26,10 @@
|
|||
|
||||
#include <memory>
|
||||
#include <core/optional.h>
|
||||
#include <boost/unordered_set.hpp>
|
||||
|
||||
#include <layers_id_colors_and_visibility.h>
|
||||
#include <geometry/shape_line_chain.h>
|
||||
#include <math/box2.h>
|
||||
|
||||
#include "pns_routing_settings.h"
|
||||
#include "pns_sizes_settings.h"
|
||||
|
@ -186,15 +186,6 @@ public:
|
|||
void SetIterLimit( int aX ) { m_iterLimit = aX; }
|
||||
int GetIterLimit() const { return m_iterLimit; };
|
||||
|
||||
void SetShowIntermediateSteps( bool aX, int aSnapshotIter = -1 )
|
||||
{
|
||||
m_showInterSteps = aX;
|
||||
m_snapshotIter = aSnapshotIter;
|
||||
}
|
||||
|
||||
bool GetShowIntermediateSteps() const { return m_showInterSteps; }
|
||||
int GetShapshotIter() const { return m_snapshotIter; }
|
||||
|
||||
ROUTING_SETTINGS& Settings() { return *m_settings; }
|
||||
|
||||
void CommitRouting( NODE* aNode );
|
||||
|
@ -226,6 +217,16 @@ public:
|
|||
return m_iface;
|
||||
}
|
||||
|
||||
void SetVisibleViewArea( const BOX2I& aExtents )
|
||||
{
|
||||
m_visibleViewArea = aExtents;
|
||||
}
|
||||
|
||||
const BOX2I& VisibleViewArea() const
|
||||
{
|
||||
return m_visibleViewArea;
|
||||
}
|
||||
|
||||
private:
|
||||
void movePlacing( const VECTOR2I& aP, ITEM* aItem );
|
||||
void moveDragging( const VECTOR2I& aP, ITEM* aItem );
|
||||
|
@ -237,6 +238,7 @@ private:
|
|||
void markViolations( NODE* aNode, ITEM_SET& aCurrent, NODE::ITEM_VECTOR& aRemoved );
|
||||
bool isStartingPointRoutable( const VECTOR2I& aWhere, ITEM* aItem, int aLayer );
|
||||
|
||||
BOX2I m_visibleViewArea;
|
||||
VECTOR2I m_currentEnd;
|
||||
RouterState m_state;
|
||||
|
||||
|
@ -250,8 +252,6 @@ private:
|
|||
ROUTER_IFACE* m_iface;
|
||||
|
||||
int m_iterLimit;
|
||||
bool m_showInterSteps;
|
||||
int m_snapshotIter;
|
||||
bool m_forceMarkObstaclesMode = false;
|
||||
|
||||
ROUTING_SETTINGS* m_settings;
|
||||
|
|
Loading…
Reference in New Issue