KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcb_tool_utils.cpp File Reference
#include "tools/pcb_tool_utils.h"
#include <board.h>
#include <pcb_shape.h>
#include <pcb_track.h>

Go to the source code of this file.

Functions

std::optional< int > GetBoardItemWidth (const BOARD_ITEM &aItem)
 Gets the width of a BOARD_ITEM, for items that have a meaningful width.
 

Function Documentation

◆ GetBoardItemWidth()

std::optional< int > GetBoardItemWidth ( const BOARD_ITEM aItem)

Gets the width of a BOARD_ITEM, for items that have a meaningful width.

(e.g. some graphics, tracks).

Parameters
aItemThe item to get the width of.
Returns
The width of the item, or std::nullopt if the item has no useful width.

Definition at line 30 of file pcb_tool_utils.cpp.

References PCB_TRACK::GetWidth(), PCB_SHAPE::GetWidth(), PCB_SHAPE_T, PCB_TRACE_T, and EDA_ITEM::Type().

Referenced by OUTSET_ROUTINE::ProcessItem().