88 virtual wxString
NetName(
int aNet )
override;
92 int matchDpSuffix(
const wxString& aNetName, wxString& aComplementNet, wxString& aBaseDpName );
109 m_routerIface( aRouterIface ),
111 m_dummyTrack( aBoard ),
112 m_dummyArc( aBoard ),
127 const PAD* pad = dynamic_cast<const PAD*>( aItem->
Parent() );
137 return via->GetDrillValue() / 2;
151 if( aA->
Net() == net_p && aB->
Net() == net_n )
153 if( aB->
Net() == net_p && aA->
Net() == net_n )
166 PAD* pad = static_cast<PAD*>( parent );
209 default:
return false;
217 if( aItemA && !parentA )
219 switch( aItemA->
Kind() )
231 static_cast<BOARD_CONNECTED_ITEM*>( parentA )->SetNetCode( aItemA->
Net(), true );
235 if( aItemB && !parentB )
237 switch( aItemB->
Kind() )
249 static_cast<BOARD_CONNECTED_ITEM*>( parentB )->SetNetCode( aItemB->
Net(), true );
254 hostConstraint = drcEngine->EvalRules( hostType, parentA, parentB, (
PCB_LAYER_ID) aLayer );
256 if( hostConstraint.
IsNull() )
271 aConstraint->
m_Type = aType;
282 std::pair<const PNS::ITEM*, const PNS::ITEM*> key( aA, aB );
300 rv = constraint.m_Value.Min();
307 if( constraint.m_Value.Min() > rv )
308 rv = constraint.m_Value.Min();
319 std::pair<const PNS::ITEM*, const PNS::ITEM*> key( aA, aB );
335 rv = constraint.m_Value.Min();
344 std::pair<const PNS::ITEM*, const PNS::ITEM*> key( aA, aB );
360 rv = constraint.m_Value.Min();
373 switch( aItem->
Kind() )
376 p = static_cast<PNS::VIA*>( aItem )->Pos();
380 p = static_cast<PNS::SOLID*>( aItem )->Pos();
384 *aInheritedWidth = static_cast<PNS::SEGMENT*>( aItem )->Width();
391 PNS::JOINT* jt = static_cast<PNS::NODE*>( aItem->
Owner() )->FindJoint( p, aItem );
393 assert( jt !=
NULL );
402 int w = static_cast<PNS::SEGMENT*>( item )->Width();
403 mval = std::min( w, mval );
406 if( mval == INT_MAX )
409 *aInheritedWidth = mval;
430 aStartItem->
Layer(), &constraint ) )
450 nullptr, aStartItem->
Layer(), &constraint ) )
456 nullptr, aStartItem->
Layer(), &constraint ) )
477 nullptr, aStartItem->
Layer(), &constraint ) )
483 nullptr, aStartItem->
Layer(), &constraint ) )
520 wxString& aBaseDpName )
524 if( aNetName.EndsWith(
"+" ) )
526 aComplementNet =
"-";
529 else if( aNetName.EndsWith(
"P" ) )
531 aComplementNet =
"N";
534 else if( aNetName.EndsWith(
"-" ) )
536 aComplementNet =
"+";
539 else if( aNetName.EndsWith(
"N" ) )
541 aComplementNet =
"P";
545 else if( aNetName.Right( 2 ).IsNumber() && aNetName.Right( 3 ).Left( 1 ) ==
"P" )
547 aComplementNet =
"N" + aNetName.Right( 2 );
551 else if( aNetName.Right( 1 ).IsNumber() && aNetName.Right( 2 ).Left( 1 ) ==
"P" )
553 aComplementNet =
"N" + aNetName.Right( 1 );
557 else if( aNetName.Right( 2 ).IsNumber() && aNetName.Right( 3 ).Left( 1 ) ==
"N" )
559 aComplementNet =
"P" + aNetName.Right( 2 );
563 else if( aNetName.Right( 1 ).IsNumber() && aNetName.Right( 2 ).Left( 1 ) ==
"N" )
565 aComplementNet =
"P" + aNetName.Right( 1 );
570 aBaseDpName = aNetName.Left( aNetName.Length() - aComplementNet.Length() );
571 aComplementNet = aBaseDpName + aComplementNet;
581 wxString
dummy, coupledNetName;
606 wxString dummy1, dummy2;
624 wxString netNameN, netNameCoupled, netNameBase;
626 int r =
matchDpSuffix( netNameP, netNameCoupled, netNameBase );
634 netNameN = netNameCoupled;
639 netNameP = netNameCoupled;
649 if( !netInfoP || !netInfoN )
691 virtual void AddPoint(
VECTOR2I aP,
int aColor,
int aSize,
const std::string aName )
override 707 void AddBox(
BOX2I aB,
int aColor,
const std::string aName =
"" )
override 723 void AddSegment(
SEG aS,
int aColor,
const std::string aName =
"" )
override 734 const std::string aName =
"" )
override 739 for(
int i = 0; i < 8; i++ )
741 if( ( 1 << i ) & aMask )
750 const std::string aName =
"" )
override 757 pitem->
Line( aLine, aWidth, aType );
837 bool is_copper =
false;
858 wxLogTrace(
"PNS",
"unsupported pad type 0x%x", aPad->
GetAttribute() );
862 std::unique_ptr<PNS::SOLID> solid = std::make_unique<PNS::SOLID>();
874 solid->SetHole( slot );
878 solid->SetRoutable(
false );
880 solid->SetLayers( layers );
882 solid->SetParent( aPad );
893 solid->SetPos(
VECTOR2I( c.
x - offset.x, c.
y - offset.y ) );
894 solid->SetOffset(
VECTOR2I( offset.x, offset.y ) );
897 auto shapes = std::dynamic_pointer_cast<SHAPE_COMPOUND>( aPad->
GetEffectiveShape() );
899 if( shapes && shapes->Size() == 1 )
901 solid->SetShape( shapes->Shapes()[0]->Clone() );
915 for(
auto iter = outline->CIterate( 0 ); iter; iter++ )
918 solid->SetShape( shape );
927 auto segment = std::make_unique<PNS::SEGMENT>(
SEG( aTrack->
GetStart(), aTrack->
GetEnd() ),
930 segment->SetWidth( aTrack->
GetWidth() );
932 segment->SetParent( aTrack );
948 arc->SetParent( aArc );
962 auto via = std::make_unique<PNS::VIA>( aVia->
GetPosition(),
969 via->SetParent( aVia );
1010 dlg.ShowDetailedText(
wxString::Format(
_(
"This zone cannot be handled by the track " 1012 "Please verify it is not a " 1013 "self-intersecting polygon." ) ) );
1020 for(
int layer =
F_Cu; layer <=
B_Cu; layer++ )
1022 if( !layers[ layer ] )
1025 for(
int outline = 0; outline < poly->
OutlineCount(); outline++ )
1039 std::unique_ptr<PNS::SOLID> solid = std::make_unique<PNS::SOLID>();
1041 solid->SetLayer( layer );
1042 solid->SetNet( -1 );
1043 solid->SetParent( aZone );
1044 solid->SetShape( triShape );
1045 solid->SetRoutable(
false );
1047 aWorld->
Add( std::move( solid ) );
1064 if( textShape.size() < 2 )
1067 for(
size_t jj = 0; jj < textShape.size(); jj += 2 )
1071 std::unique_ptr<PNS::SOLID> solid = std::make_unique<PNS::SOLID>();
1073 solid->SetLayer( aLayer );
1074 solid->SetNet( -1 );
1075 solid->SetParent( dynamic_cast<BOARD_ITEM*>( aText ) );
1076 solid->SetShape(
new SHAPE_SEGMENT( start, end, textWidth ) );
1077 solid->SetRoutable(
false );
1079 aWorld->
Add( std::move( solid ) );
1118 std::unique_ptr<PNS::SOLID> solid = std::make_unique<PNS::SOLID>();
1123 solid->SetLayer( aItem->
GetLayer() );
1127 switch( shape->Type() )
1129 case SH_SEGMENT: static_cast<SHAPE_SEGMENT*>( shape )->SetWidth( 0 );
break;
1130 case SH_ARC: static_cast<SHAPE_ARC*>( shape )->SetWidth( 0 );
break;
1131 case SH_LINE_CHAIN: static_cast<SHAPE_LINE_CHAIN*>( shape )->SetWidth( 0 );
break;
1136 solid->SetNet( -1 );
1137 solid->SetParent( aItem );
1138 solid->SetShape( shape );
1139 solid->SetRoutable(
false );
1141 aWorld->
Add( std::move( solid ) );
1154 wxLogTrace(
"PNS",
"m_board = %p",
m_board );
1163 for(
int i = aLayer.
Start(); i <= aLayer.
End(); i++ )
1183 const VIA* via = static_cast<const VIA*>( aItem->
Parent() );
1185 return via->
FlashLayer( static_cast<PCB_LAYER_ID>( aLayer ) );
1190 const PAD* pad = static_cast<const PAD*>( aItem->
Parent() );
1192 return pad->
FlashLayer( static_cast<PCB_LAYER_ID>( aLayer ) );
1212 bool isOnVisibleLayer =
true;
1236 wxLogTrace(
"PNS",
"No board attached, aborting sync." );
1252 syncTextItem( aWorld, static_cast<PCB_TEXT*>( gitem ), gitem->GetLayer() );
1260 boardOutline = &buffer;
1264 syncZone( aWorld, zone, boardOutline );
1269 for(
PAD* pad : footprint->Pads() )
1271 if( std::unique_ptr<PNS::SOLID> solid =
syncPad( pad ) )
1272 aWorld->
Add( std::move( solid ) );
1274 worstClearance = std::max( worstClearance, pad->GetLocalClearance() );
1277 syncTextItem( aWorld, &footprint->Reference(), footprint->Reference().GetLayer() );
1278 syncTextItem( aWorld, &footprint->Value(), footprint->Value().GetLayer() );
1280 for(
FP_ZONE* zone : footprint->Zones() )
1281 syncZone( aWorld, zone, boardOutline );
1283 if( footprint->IsNetTie() )
1286 for(
BOARD_ITEM* mgitem : footprint->GraphicalItems() )
1294 syncTextItem( aWorld, static_cast<FP_TEXT*>( mgitem ), mgitem->GetLayer() );
1306 aWorld->
Add( std::move( segment ) );
1310 if(
auto arc =
syncArc( static_cast<ARC*>( t ) ) )
1311 aWorld->
Add( std::move( arc ) );
1315 if(
auto via =
syncVia( static_cast<VIA*>( t ) ) )
1316 aWorld->
Add( std::move( via ) );
1356 if( aClearance >= 0 )
1393 pitem->
Line( aRatline, 10000, aColor );
1426 PAD* pad = static_cast<PAD*>( parent );
1427 VECTOR2I pos = static_cast<PNS::SOLID*>( aItem )->Pos();
1452 switch( aItem->
Kind() )
1456 PNS::ARC* arc = static_cast<PNS::ARC*>( aItem );
1457 ARC* arc_board = static_cast<ARC*>( board_item );
1458 const SHAPE_ARC* arc_shape = static_cast<const SHAPE_ARC*>( arc->
Shape() );
1460 arc_board->
SetEnd( wxPoint( arc_shape->
GetP1() ) );
1468 PNS::SEGMENT* seg = static_cast<PNS::SEGMENT*>( aItem );
1469 TRACK* track = static_cast<TRACK*>( board_item );
1470 const SEG& s = seg->
Seg();
1479 VIA* via_board = static_cast<VIA*>( board_item );
1480 PNS::VIA* via = static_cast<PNS::VIA*>( aItem );
1494 PAD* pad = static_cast<PAD*>( aItem->
Parent() );
1495 VECTOR2I pos = static_cast<PNS::SOLID*>( aItem )->Pos();
1518 switch( aItem->
Kind() )
1522 auto arc = static_cast<PNS::ARC*>( aItem );
1523 ARC* new_arc =
new ARC(
m_board, static_cast<const SHAPE_ARC*>( arc->Shape() ) );
1526 new_arc->
SetNetCode( std::max<int>( 0, arc->Net() ) );
1533 PNS::SEGMENT* seg = static_cast<PNS::SEGMENT*>( aItem );
1535 const SEG& s = seg->
Seg();
1548 PNS::VIA* via = static_cast<PNS::VIA*>( aItem );
1563 PAD* pad = static_cast<PAD*>( aItem->
Parent() );
1564 VECTOR2I pos = static_cast<PNS::SOLID*>( aItem )->Pos();
1587 std::set<FOOTPRINT*> processedMods;
1593 VECTOR2I offset = fpOffset.second.p_new - fpOffset.second.p_old;
1599 if( processedMods.find( footprint ) != processedMods.end() )
1602 processedMods.insert( footprint );
1609 m_commit->Push(
_(
"Interactive Router" ) );
1616 wxLogTrace(
"PNS",
"SetView %p", aView );
1643 wxLogTrace(
"PNS",
"Update-net %d", aNetCode );
Directions
Available directions, there are 8 of them, as on a rectilinear map (north = up) + an extra undefined ...
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
VECTOR2_TRAITS< int >::extended_type extended_type
void SetHostTool(PCB_TOOL_BASE *aTool)
std::unique_ptr< PNS::VIA > syncVia(VIA *aVia)
Base class for PNS router board items.
void DisplayRatline(const SHAPE_LINE_CHAIN &aRatline, int aColor=-1) override
void AddSegment(SEG aS, int aColor, const std::string aName="") override
bool syncTextItem(PNS::NODE *aWorld, EDA_TEXT *aText, PCB_LAYER_ID aLayer)
NETINFO_ITEM * FindNet(int aNetcode) const
Search for a net with the given netcode.
void AddDirections(VECTOR2D aP, int aMask, int aColor, const std::string aName="") override
bool UseNetClassTrack() const
Return true if netclass values should be used to obtain appropriate track width.
virtual int HoleToHoleClearance(const PNS::ITEM *aA, const PNS::ITEM *aB) override
int holeRadius(const PNS::ITEM *aItem) const
void LayerPair(PCB_LAYER_ID *top_layer, PCB_LAYER_ID *bottom_layer) const
Function LayerPair Return the 2 layers used by the via (the via actually uses all layers between thes...
void SetView(KIGFX::VIEW *aView)
void DoNotShowCheckbox(wxString file, int line)
Checks the 'do not show again' setting for the dialog.
virtual int Layer() const
int OutlineCount() const
Return the number of vertices in a given outline/hole.
PNS::RULE_RESOLVER * GetRuleResolver() override
Keep the router "world" - i.e.
class FP_TEXT, text in a footprint
bool GetBoardPolygonOutlines(SHAPE_POLY_SET &aOutlines, OUTLINE_ERROR_HANDLER *aErrorHandler=nullptr)
Extract the board outlines and build a closed polygon from lines, arcs and circle items on edge cut l...
bool syncGraphicalItem(PNS::NODE *aWorld, PCB_SHAPE *aItem)
int GetCurrentViaDrill() const
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
int GetCurrentTrackWidth() const
Helper class to create more flexible dialogs, including 'do not show again' checkbox handling.
void SetPosition(const wxPoint &aPoint) override
bool GetIsRuleArea() const
Accessors to parameters used in Rule Area zones:
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
This file is part of the common library.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
void SetEnd(const wxPoint &aEnd)
void GetTriangle(int index, VECTOR2I &a, VECTOR2I &b, VECTOR2I &c) const
bool IsMultilayer() const
NETINFO_ITEM * GetNet() const
Return #NET_INFO object for a given item.
int GetCurrentDiffPairGap() const
const wxPoint & GetStart() const
void UpdateItem(PNS::ITEM *aItem) override
bool inheritTrackWidth(PNS::ITEM *aItem, int *aInheritedWidth)
std::vector< wxPoint > TransformToSegmentList() const
Convert the text shape to a list of segment.
bool UseNetClassDiffPair() const
Return true if netclass values should be used to obtain appropriate diff pair dimensions.
int Width() const override
PNS::DEBUG_DECORATOR * m_debugDecorator
int GetHolePlatingThickness() const
Pad & via drills are finish size.
const VECTOR2I ToVector() const
std::map< std::pair< const PNS::ITEM *, const PNS::ITEM * >, int > m_clearanceCache
int Width() const override
SHAPE_POLY_SET * Outline()
void UpdateNet(int aNetCode) override
ITEM_SET & FilterKinds(int aKindMask, bool aInvert=false)
void SetParent(BOARD_ITEM *aParent)
Smd pad, appears on the solder paste layer (default)
polygon (not yet used for tracks, but could be in microwave apps)
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
bool GetIsFree() const
Checks if the via is a free via (as opposed to one created on a track by the router).
void SetClearance(int aClearance)
class PCB_TEXT, text on a layer
bool SetNetCode(int aNetCode, bool aNoAssert)
Set net using a net code.
class ARC, an arc track segment on a copper layer
bool Overlaps(const LAYER_RANGE &aOther) const
static LIB_PART * dummy()
Used to draw a dummy shape when a LIB_PART is not found in library.
const SHAPE_SEGMENT * GetEffectiveHoleShape() const
Return a SHAPE object representing the pad's hole.
std::map< std::pair< const PNS::ITEM *, const PNS::ITEM * >, int > m_holeToHoleClearanceCache
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
BOARD_ITEM * Parent() const
void SetDebugDecorator(PNS::DEBUG_DECORATOR *aDec)
class FP_SHAPE, a footprint edge
class PAD, a pad in a footprint
virtual ~PNS_PCBNEW_RULE_RESOLVER()
Visibility flag has changed.
PNS_PCBNEW_DEBUG_DECORATOR(KIGFX::VIEW *aView=NULL)
void Line(const SHAPE_LINE_CHAIN &aLine, int aWidth=0, int aStyle=0)
void ShowTrackClearance(bool aEnabled)
ITEM_SET & ExcludeItem(const ITEM *aItem)
void SetViaDrill(int aDrill)
PNS_PCBNEW_RULE_RESOLVER(BOARD *aBoard, PNS::ROUTER_IFACE *aRouterIface)
void RotatePoint(int *pX, int *pY, double angle)
like PAD_PTH, but not plated mechanical use only, no connection allowed
void SetRuleResolver(RULE_RESOLVER *aFunc)
void HideItem(PNS::ITEM *aItem) override
void AddBox(BOX2I aB, int aColor, const std::string aName="") override
std::map< std::pair< const PNS::ITEM *, const PNS::ITEM * >, int > m_holeClearanceCache
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
const VECTOR2I & Pos() const
bool m_UseConnectedTrackWidth
PNS::ROUTER_IFACE * m_routerIface
bool IsTriangulationUpToDate() const
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
std::unordered_set< BOARD_ITEM * > m_hiddenItems
class TRACK, a track segment (segment on a copper layer)
int GetEffectiveTextPenWidth(int aDefaultWidth=0) const
The EffectiveTextPenWidth uses the text thickness if > 1 or aDefaultWidth.
void Append(int aX, int aY, bool aAllowDuplication=false)
Function Append()
KIGFX::VIEW_GROUP * m_items
TRACE_CLEARANCE_DISPLAY_MODE_T m_ShowTrackClearanceMode
How trace clearances are displayed.
void SetWidth(int aWidth)
PAD_ATTR_T GetAttribute() const
void DisplayItem(const PNS::ITEM *aItem, int aClearance, bool aEdit=false) override
void SetTrackWidth(int aWidth)
virtual int DpNetPolarity(int aNet) override
void SetMaxClearance(int aClearance)
Assign a clearance resolution function object.
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
const wxPoint & GetOffset() const
Represents a 2D point on a given set of layers and belonging to a certain net, that links together a ...
virtual int HoleClearance(const PNS::ITEM *aA, const PNS::ITEM *aB) override
const wxSize & GetDrillSize() const
Container for display options like enable/disable some optional drawings.
PCB_LAYER_ID
A quick note on layer IDs:
void SetDiffPairViaGap(int aGap)
void FreeItems()
Free all the items that were added to the group.
bool FlashLayer(int aLayer) const
Check to see whether the pad should be flashed on the specific layer.
LSET is a set of PCB_LAYER_IDs.
VIEW_ITEM class definition.
const wxPoint & GetMid() const
virtual bool IsOnLayer(PCB_LAYER_ID aLayer) const
Test to see if this object is on the given layer.
virtual bool DpNetPair(const PNS::ITEM *aItem, int &aNetP, int &aNetN) override
double GetOrientation() const
Return the rotation angle of the pad in a variety of units (the basic call returns tenths of degrees)...
bool isEdge(const PNS::ITEM *aItem)
int GetDrillValue() const
Function GetDrillValue "calculates" the drill value for vias (m-Drill if > 0, or default drill value ...
bool IsVisible(const VIEW_ITEM *aItem) const
Return information if the item is visible (or not).
Represent a set of closed polygons.
size_t GetTriangleCount() const
bool FlashLayer(int aLayer) const
Checks to see whether the via should have a pad on the specific layer.
std::unique_ptr< BOARD_COMMIT > m_commit
Represent route directions & corner angles in a 45-degree metric.
bool IsItemVisible(const PNS::ITEM *aItem) const override
int GetDrill() const
Function GetDrill returns the local drill setting for this VIA.
bool UseNetClassVia() const
Return true if netclass values should be used to obtain appropriate via size.
const VECTOR2I & GetP0() const
FOOTPRINTS & Footprints()
virtual int DpCoupledNet(int aNet) override
int GetCurrentDiffPairWidth() const
PNS::DEBUG_DECORATOR * GetDebugDecorator() override
bool GetDoNotAllowTracks() const
void ShowViaClearance(bool aEnabled)
const VECTOR2I & GetArcMid() const
const wxString & GetNetname() const
bool IsFlashedOnLayer(const PNS::ITEM *aItem, int aLayer) const override
Extend VIEW_ITEM by possibility of grouping items into a single object.
bool isCopper(const PNS::ITEM *aItem)
virtual std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer=UNDEFINED_LAYER) const override
Some pad shapes can be complex (rounded/chamfered rectangle), even without considering custom shapes.
KIGFX::VIEW_GROUP * m_previewItems
void UpdateItem(PNS::ITEM *aItem) override
void SetLayerPair(PCB_LAYER_ID aTopLayer, PCB_LAYER_ID aBottomLayer)
Function SetLayerPair For a via m_layer contains the top layer, the other layer is in m_bottomLayer.
ZONE handles a list of polygons defining a copper zone.
LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
An abstract shape on 2D plane.
void SyncWorld(PNS::NODE *aWorld) override
virtual void Add(VIEW_ITEM *aItem)
Add an item to the group.
bool IsOnCopperLayer() const override
void SetMid(const wxPoint &aMid)
Like smd, does not appear on the solder paste layer (default) note also has a special attribute in Ge...
virtual void SetLayer(int aLayer)
Set layer used to draw the group.
void AddItem(PNS::ITEM *aItem) override
const PCB_DISPLAY_OPTIONS * m_dispOptions
void SetBoard(BOARD *aBoard)
virtual void AddPoint(VECTOR2I aP, int aColor, int aSize, const std::string aName) override
void EraseView() override
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
virtual int Clearance(const PNS::ITEM *aA, const PNS::ITEM *aB) override
virtual bool IsDiffPair(const PNS::ITEM *aA, const PNS::ITEM *aB) override
bool GetHighContrast() const
const SHAPE * Shape() const override
Return the geometrical shape of the item.
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
std::vector< SHAPE * > MakeEffectiveShapes() const
Makes a set of SHAPE objects representing the PCB_SHAPE.
std::unique_ptr< PNS::ARC > syncArc(ARC *aArc)
int GetCurrentViaSize() const
Handle the data for a net.
virtual bool IsLocked() const
Board layer functions and definitions.
const MINOPTMAX< int > & GetValue() const
void SetHoleToHole(int aHoleToHole)
wxPoint GetPosition() const override
PAD_DRILL_SHAPE_T GetDrillShape() const
Information pertinent to a Pcbnew printed circuit board.
SHAPE * Clone() const override
Return a dynamically allocated copy of the shape.
void SetDiffPairGap(int aGap)
void RemoveItem(PNS::ITEM *aItem) override
~PNS_PCBNEW_DEBUG_DECORATOR()
virtual wxString NetName(int aNet) override
bool OfKind(int aKindMask) const
Return true if the item's type matches the mask aKindMask.
int GetBiggestClearanceValue() const
void AddItem(PNS::ITEM *aItem) override
void SetDrill(int aDrill)
Function SetDrill sets the drill value for vias.
void SetIsFree(bool aFree=true)
void SetView(KIGFX::VIEW *aView)
int matchDpSuffix(const wxString &aNetName, wxString &aComplementNet, wxString &aBaseDpName)
VIATYPE GetViaType() const
currently selected items overlay
virtual bool QueryConstraint(PNS::CONSTRAINT_TYPE aType, const PNS::ITEM *aItemA, const PNS::ITEM *aItemB, int aLayer, PNS::CONSTRAINT *aConstraint) override
int GetCurrentDiffPairViaGap() const
const std::shared_ptr< SHAPE_POLY_SET > & GetEffectivePolygon() const
PCB_LAYER_ID TopLayer() const
VECTOR2I::extended_type ecoord
const wxPoint & GetEnd() const
bool IsCopperLayer(LAYER_NUM aLayerId)
Tests whether a layer is a copper layer.
PnsKind Kind() const
Return the type (kind) of the item.
void ClearFlags(STATUS_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
void SetVisible(VIEW_ITEM *aItem, bool aIsVisible=true)
Set the item visibility.
void Clear()
Function Clear() Removes all points from the line chain.
void SetStart(const wxPoint &aStart)
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
virtual bool IsConnected() const
Returns information if the object is derived from BOARD_CONNECTED_ITEM.
void CacheTriangulation(bool aPartition=true)
class VIA, a via (like a track segment on a copper layer)
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1)
Add a VIEW_ITEM to the view.
const Vec & GetSize() const
PCB_LAYER_ID GetPrimaryHighContrastLayer() const
Return the board layer which is in high-contrast mode.
PCB_SHAPE_TYPE_T GetShape() const
PNS_PCBNEW_RULE_RESOLVER * m_ruleResolver
const Vec & GetOrigin() const
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
NODE * Owner() const
Return the owner of this item, or NULL if there's none.
wxString GetSelectMenuText(EDA_UNITS aUnits) const override
Return the text to display to be used in the selection clarification context menu when multiple items...
wxPoint GetPosition() const override
void SetViaDiameter(int aDiameter)
wxString GetZoneName() const
BOARD_ITEM_CONTAINER * GetParent() const
Push and Shove diff pair dimensions (gap) settings dialog.
bool ImportSizes(PNS::SIZES_SETTINGS &aSizes, PNS::ITEM *aStartItem, int aNet) override
void SetViaType(VIATYPE aViaType)
class PCB_SHAPE, a segment not on copper layers
int GetPadToDieLength() const
PCB_LAYER_ID BottomLayer() const
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
void SetDisplayOptions(const PCB_DISPLAY_OPTIONS *aDispOptions)
std::map< PAD *, OFFSET > m_fpOffsets
const TRIANGULATED_POLYGON * TriangulatedPolygon(int aIndex) const
bool Add(std::unique_ptr< SEGMENT > aSegment, bool aAllowRedundant=false)
Add an item to the current node.
void Append(int aX, int aY)
Function Append()
PCB_LAYER_ID ToLAYER_ID(int aLayer)
const VECTOR2I & GetP1() const
FP_ZONE is a specialization of ZONE for use in footprints.
std::shared_ptr< DRC_ENGINE > m_DRCEngine
std::unique_ptr< PNS::SEGMENT > syncTrack(TRACK *aTrack)
Represent a contiguous set of PCB layers.
const LAYER_RANGE & Layers() const
void SetWidth(int aWidth)
virtual double ViewGetLOD(int aLayer, VIEW *aView) const
Return the level of detail (LOD) of the item.
void AddLine(const SHAPE_LINE_CHAIN &aLine, int aType, int aWidth, const std::string aName="") override
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
void RemoveItem(PNS::ITEM *aItem) override
std::unique_ptr< PNS::SOLID > syncPad(PAD *aPad)
CONSTRAINT_TYPE
An abstract function object, returning a design rule (clearance, diff pair gap, etc) required between...
bool syncZone(PNS::NODE *aWorld, ZONE *aZone, SHAPE_POLY_SET *aBoardOutline)
KICAD_T Type() const
Returns the type of object.
void SetDiffPairWidth(int aWidth)
bool IsAnyLayerVisible(const LAYER_RANGE &aLayer) const override
Container for design settings for a BOARD object.
bool IsLayerVisible(int aLayer) const
Return information about visibility of a particular layer.