28#ifndef __PNS_LOG_VIEWER_FRAME_H
29#define __PNS_LOG_VIEWER_FRAME_H
45#define ID_LIST_COPY 10001
46#define ID_LIST_SHOW_ALL 10002
47#define ID_LIST_SHOW_NONE 10003
48#define ID_LIST_DISPLAY_LINE 10004
67 int aFlags = 0 )
override {}
76 int StackupHeight(
int aFirstLayer,
int aSecondLayer )
const override {
return 0; }
92 if( aLayer ==
m_board->GetCopperLayerCount() - 1 )
105 return m_board->GetCopperLayerCount() - 1;
107 return ( aLayer / 2 ) - 1;
113 std::vector<LENGTH_CALCULATION_ITEM> lengthItems;
115 for(
int idx = 0; idx < aLine.
Size(); idx++ )
119 if(
const PNS::LINE* l = dyn_cast<const PNS::LINE*>( lineItem ) )
127 lengthItems.emplace_back( std::move( item ) );
131 const int layerPrev = aLine[idx - 1]->Layer();
132 const int layerNext = aLine[idx + 1]->Layer();
136 if( layerPrev != layerNext )
140 item.
SetLayers( pcbLayerPrev, pcbLayerNext );
141 lengthItems.emplace_back( std::move( item ) );
146 const PAD* startPad =
nullptr;
147 const PAD* endPad =
nullptr;
150 startPad =
static_cast<PAD*
>( aStartPad->
Parent() );
153 endPad =
static_cast<PAD*
>( aEndPad->
Parent() );
156 .
OptimiseViaLayers =
false, .MergeTracks =
false, .OptimiseTracesInPads =
false, .InferViaInPad =
true
159 return m_board->GetLengthCalculation()->CalculateLength( lengthItems, opts, startPad, endPad );
174 void SetBoard2( std::shared_ptr<BOARD> aBoard );
190 virtual void onOpen( wxCommandEvent& event )
override;
191 virtual void onSaveAs( wxCommandEvent& event )
override;
192 virtual void onExit( wxCommandEvent& event )
override;
203 virtual void onFilterText( wxCommandEvent& event )
override;
230 bool aShowVertexNumbers =
false );
232 bool aShowVertexNumbers =
false );
234 bool aShowVertexNumbers =
false );
Abstract interface for drawing on a 2D-surface.
Lightweight class which holds a pad, via, or a routed trace outline.
void SetLayers(const PCB_LAYER_ID aStart, const PCB_LAYER_ID aEnd=PCB_LAYER_ID::UNDEFINED_LAYER)
Sets the first and last layers associated with this item.
void SetLine(const SHAPE_LINE_CHAIN &aLine)
Sets the source SHAPE_LINE_CHAIN of this item.
void SetVia(PCB_VIA *aVia)
Sets the VIA associated with this item.
Base class for PNS router board items.
BOARD_ITEM * Parent() const
BOARD_ITEM * GetSourceItem() const
virtual int Layer() const
bool OfKind(int aKindMask) const
Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads,...
Keep the router "world" - i.e.
Represent a contiguous set of PCB layers.
Class PNS_LOG_VIEWER_FRAME_BASE.
std::shared_ptr< WX_TEXT_CTRL_REPORTER > m_reporter
std::shared_ptr< PNS_LOG_FILE > m_logFile
virtual void onListRightClick(wxMouseEvent &event)
std::shared_ptr< PNS_LOG_PLAYER > m_logPlayer
std::shared_ptr< PNS_LOG_VIEWER_OVERLAY > GetOverlay() const
std::map< wxString, wxString > m_filenameToPathMap
void drawSimpleShape(SHAPE *aShape, bool aIsSelected, const std::string &aName)
virtual void onRewindCountText(wxCommandEvent &event) override
std::shared_ptr< KIGFX::VIEW_GROUP > m_previewItems
PNS_DEBUG_STAGE * getCurrentStage()
bool filterStringMatches(PNS_DEBUG_SHAPE *ent)
void SetBoard2(std::shared_ptr< BOARD > aBoard)
void updateDumpPanel(int iter)
virtual void createUserTools() override
virtual ~PNS_LOG_VIEWER_FRAME()
void buildListTree(wxTreeListItem item, PNS_DEBUG_SHAPE *ent, int depth=0)
virtual void onShowVerticesChecked(wxCommandEvent &event) override
void SetLogFile(PNS_LOG_FILE *aLog)
virtual void onShowThinLinesChecked(wxCommandEvent &event) override
std::shared_ptr< PNS_LOG_VIEWER_OVERLAY > m_overlay
void LoadLogFile(const wxString &aFile)
virtual void onListChecked(wxCommandEvent &event)
std::shared_ptr< PNS_VIEWER_IFACE > m_viewerIface
virtual void onListSelect(wxCommandEvent &event)
virtual void onSaveAs(wxCommandEvent &event) override
virtual void onRewindScroll(wxScrollEvent &event) override
REPORTER * GetConsoleReporter()
virtual void onShowRPIsChecked(wxCommandEvent &event) override
void updatePnsPreviewItems(int iter)
virtual void onBtnRewindRight(wxCommandEvent &event) override
virtual void onFilterText(wxCommandEvent &event) override
void drawLoggedItems(int iter)
virtual void onOpen(wxCommandEvent &event) override
virtual void onBtnRewindLeft(wxCommandEvent &event) override
virtual void onExit(wxCommandEvent &event) override
void AnnotatedPoint(const VECTOR2I p, int size, std::string name="", bool aShowVertexNumbers=false)
void AnnotatedPolyset(const SHAPE_POLY_SET &aL, std::string name="", bool aShowVertexNumbers=false)
void AnnotatedPolyline(const SHAPE_LINE_CHAIN &aL, std::string name, bool aShowVertexNumbers=false)
std::unique_ptr< LABEL_MANAGER > m_labelMgr
void Arc(const SHAPE_ARC &arc)
int StackupHeight(int aFirstLayer, int aSecondLayer) const override
void RemoveItem(PNS::ITEM *aItem) override
void AddItem(PNS::ITEM *aItem) override
int GetPNSLayerFromBoardLayer(PCB_LAYER_ID aLayer) const override
PNS::DEBUG_DECORATOR * GetDebugDecorator() override
bool IsFlashedOnLayer(const PNS::ITEM *aItem, int aLayer) const override
int GetNetCode(PNS::NET_HANDLE aNet) const override
PNS_VIEWER_IFACE(std::shared_ptr< BOARD > aBoard)
void DisplayPathLine(const SHAPE_LINE_CHAIN &aLine, int aImportance) override
PCB_LAYER_ID GetBoardLayerFromPNSLayer(int aLayer) const override
void SyncWorld(PNS::NODE *aWorld) override
bool IsPNSCopperLayer(int aLayer) const override
bool IsAnyLayerVisible(const PNS_LAYER_RANGE &aLayer) const override
void UpdateItem(PNS::ITEM *aItem) override
bool IsFlashedOnLayer(const PNS::ITEM *aItem, const PNS_LAYER_RANGE &aLayer) const override
long long int CalculateRoutedPathLength(const PNS::ITEM_SET &aLine, const PNS::SOLID *aStartPad, const PNS::SOLID *aEndPad) override
void UpdateNet(PNS::NET_HANDLE aNet) override
bool ImportSizes(PNS::SIZES_SETTINGS &aSizes, PNS::ITEM *aStartItem, PNS::NET_HANDLE aNet, VECTOR2D aStartPosition) override
wxString GetNetName(PNS::NET_HANDLE aNet) const override
PNS::NET_HANDLE GetOrphanedNetHandle() override
~PNS_VIEWER_IFACE() override
void DisplayRatline(const SHAPE_LINE_CHAIN &aRatline, PNS::NET_HANDLE aNet) override
bool IsItemVisible(const PNS::ITEM *aItem) const override
virtual PNS::NODE * GetWorld() const override
PNS::RULE_RESOLVER * GetRuleResolver() override
std::shared_ptr< BOARD > m_board
void HideItem(PNS::ITEM *aItem) override
void EraseView() override
void DisplayItem(const PNS::ITEM *aItem, int aClearance, bool aEdit=false, int aFlags=0) override
A pure virtual class used to derive REPORTER objects from.
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
Represent a set of closed polygons.
An abstract shape on 2D plane.
PCB_LAYER_ID
A quick note on layer IDs:
PCB_LAYER_ID ToLAYER_ID(int aLayer)
Struct to control which optimisations the length calculation code runs on the given path objects.
bool OptimiseViaLayers
Optimise via layers for height calculations, ensuring only the distance between routed segments is co...