44 bool aUseNetclassValue )
53 int initial_width, new_width;
54 int initial_drill = -1,new_drill = -1;
55 bool change_ok =
false;
58 if( aUseNetclassValue )
59 net = aTrackItem->
GetNet();
61 initial_width = aTrackItem->
GetWidth();
70 const VIA *via =
static_cast<const VIA *
>( aTrackItem );
76 net = aTrackItem->
GetNet();
83 new_width = net->GetViaSize();
84 new_drill = net->GetViaDrillSize();
96 new_width = net->GetMicroViaSize();
97 new_drill = net->GetMicroViaDrillSize();
118 if( initial_width < new_width )
128 else if( initial_width > new_width )
135 if( initial_drill != new_drill )
143 if( aItemsListPicker )
145 aTrackItem->
SetWidth( initial_width );
148 aItemsListPicker->
PushItem( picker );
154 VIA *via =
static_cast<VIA *
>( aTrackItem );
164 aTrackItem->
SetWidth( initial_width );
182 if( change == 0 || aTrackItem->
GetFlags() )
211 if( aTrackSegment == NULL )
219 for(
int ii = 0; ii < nb_segm; ii++, pt_track = pt_track->
Next() )
221 pt_track->SetState(
BUSY,
false );
235 for(
unsigned ii = 0; ii < itemsListPicker.
GetCount(); ii++ )
269 for( pt_segm =
GetBoard()->m_Track; pt_segm != NULL; pt_segm = pt_segm->
Next() )
296 for( pt_segm =
GetBoard()->m_Track; pt_segm != NULL; pt_segm = pt_segm->
Next() )
void Edit_Track_Width(wxDC *aDC, TRACK *aTrackSegment)
Function Edit_Track_Width Modify a full track width (using DRC control).
KICAD_T Type() const
Function Type()
virtual void OnModify() override
Function OnModify must be called after a board change to set the modified flag.
STATUS_FLAGS GetFlags() const
int GetCurrentViaDrill() const
Function GetCurrentViaDrill.
Class BOARD to handle a board.
virtual EDA_ITEM * Clone() const override
Function Clone creates a duplicate of this item with linked list members set to NULL.
void PushItem(const ITEM_PICKER &aItem)
Function PushItem pushes aItem to the top of the list.
#define BUSY
Pcbnew: flag indicating that the structure has.
DRC * m_drc
the DRC controller, see drc.cpp
int GetCurrentViaSize() const
Function GetCurrentViaSize.
int GetDrill() const
Function GetDrill returns the local drill setting for this VIA.
void SetLink(EDA_ITEM *aItem)
bool SetTrackSegmentWidth(TRACK *aTrackItem, PICKED_ITEMS_LIST *aItemsListPicker, bool aUseNetclassValue)
Function SetTrackSegmentWidth Modify one track segment width or one via diameter (using DRC control)...
EDA_ITEM * GetPickedItemLink(unsigned int aIdx) const
Function GetPickedItemLink.
Functions relatives to tracks, vias and segments used to fill zones.
class TRACK, a track segment (segment on a copper layer)
void SetWidth(int aWidth)
VIATYPE_T GetViaType() const
PCB_GENERAL_SETTINGS & Settings()
virtual BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Function GetDesignSettings returns the BOARD_DESIGN_SETTINGS for the BOARD owned by this frame...
TRACK * MarkTrace(TRACK *aTrace, int *aCount, double *aTraceLength, double *aInPackageLength, bool aReorder)
Function MarkTrace marks a chain of trace segments, connected to aTrace.
Class PICKED_ITEMS_LIST is a holder to handle information on schematic or board items.
int GetTrackWidth()
Function GetTrackWidth returns the width of tracks used to route this net.
void SaveCopyInUndoList(BOARD_ITEM *aItemToCopy, UNDO_REDO_T aTypeCommand, const wxPoint &aTransformPoint=wxPoint(0, 0)) override
Function SaveCopyInUndoList Creates a new entry in undo list of commands.
void CrossHairOff(wxDC *DC)
void SetDrillDefault()
Function SetDrillDefault sets the drill value for vias to the default value UNDEFINED_DRILL_DIAMETER...
unsigned GetCount() const
Function GetCount.
int GetNetCode() const
Function GetNetCode.
void Draw(EDA_DRAW_PANEL *panel, wxDC *DC, GR_DRAWMODE aDrawMode, const wxPoint &aOffset=ZeroOffset) override
Function Draw BOARD_ITEMs have their own color information.
EDA_DRAW_PANEL * m_canvas
The area to draw on.
Class NETINFO_ITEM handles the data for a net.
void CrossHairOn(wxDC *DC)
EDA_ITEM * GetPickedItem(unsigned int aIdx) const
Function GetPickedItem.
int GetDrillValue() const
Function GetDrillValue "calculates" the drill value for vias (m-Drill if > 0, or default drill value ...
void SetDrill(int aDrill)
Function SetDrill sets the drill value for vias.
int Drc(TRACK *aRefSeg, TRACK *aList)
Function Drc tests the current segment and returns the result and displays the error in the status pa...
class VIA, a via (like a track segment on a copper layer)
int GetCurrentTrackWidth() const
Function GetCurrentTrackWidth.
bool Change_Net_Tracks_And_Vias_Sizes(int aNetcode, bool aUseNetclassValue)
Function Change_Net_Tracks_And_Vias_Sizes Reset all tracks width and vias diameters and drill to thei...
NETINFO_ITEM * GetNet() const
Function GetNet Returns NET_INFO object for a given item.
bool Reset_All_Tracks_And_Vias_To_Netclass_Values(bool aTrack, bool aVia)
Function Reset_All_Tracks_And_Vias_To_Netclass_Values Reset all tracks width and/or vias diameters an...
void Edit_TrackSegm_Width(wxDC *aDC, TRACK *aTrackItem)
Function Edit_TrackSegm_Width Modify one track segment width or one via diameter (using DRC control)...