76 bool aUseClearanceEpsilon =
true )
override;
78 bool aUseClearanceEpsilon =
true )
override;
80 bool aUseClearanceEpsilon =
true )
override;
90 virtual wxString
NetName(
int aNet )
override;
108 int matchDpSuffix(
const wxString& aNetName, wxString& aComplementNet );
128 m_routerIface( aRouterIface ),
130 m_dummyTracks{ { aBoard }, { aBoard } },
131 m_dummyArcs{ { aBoard }, { aBoard } },
132 m_dummyVias{ { aBoard }, { aBoard } }
137 m_clearanceEpsilon = 0;
150 const PAD*
pad = dynamic_cast<const PAD*>( aItem->
Parent() );
153 return pad->GetDrillSize().x / 2;
160 return via->GetDrillValue() / 2;
174 if( aA->
Net() == net_p && aB->
Net() == net_n )
177 if( aB->
Net() == net_p && aA->
Net() == net_n )
190 PAD*
pad = static_cast<PAD*>( parent );
233 default:
return false;
241 if( aItemA && !parentA )
243 switch( aItemA->
Kind() )
255 static_cast<BOARD_CONNECTED_ITEM*>( parentA )->SetNetCode( aItemA->
Net(), true );
259 if( aItemB && !parentB )
261 switch( aItemB->
Kind() )
273 static_cast<BOARD_CONNECTED_ITEM*>( parentB )->SetNetCode( aItemB->
Net(), true );
278 hostConstraint = drcEngine->EvalRules( hostType, parentA, parentB, (
PCB_LAYER_ID) aLayer );
280 if( hostConstraint.
IsNull() )
295 aConstraint->
m_Type = aType;
312 bool aUseClearanceEpsilon )
332 rv = constraint.m_Value.Min();
339 if( constraint.m_Value.Min() > rv )
340 rv = constraint.m_Value.Min();
344 if( aUseClearanceEpsilon )
353 bool aUseClearanceEpsilon )
371 rv = constraint.m_Value.Min();
373 if( aUseClearanceEpsilon )
382 bool aUseClearanceEpsilon )
400 rv = constraint.m_Value.Min();
402 if( aUseClearanceEpsilon )
414 assert( aItem->
Owner() != nullptr );
416 auto tryGetTrackWidth =
419 switch( aPnsItem->Kind() )
427 int itemTrackWidth = tryGetTrackWidth( aItem );
429 if( itemTrackWidth > 0 )
431 *aInheritedWidth = itemTrackWidth;
435 switch( aItem->
Kind() )
438 p = static_cast<PNS::VIA*>( aItem )->Pos();
442 p = static_cast<PNS::SOLID*>( aItem )->Pos();
449 PNS::JOINT* jt = static_cast<PNS::NODE*>( aItem->
Owner() )->FindJoint( p, aItem );
451 assert( jt !=
nullptr );
460 int w = tryGetTrackWidth( item );
462 mval = std::min( w, mval );
465 if( mval == INT_MAX )
468 *aInheritedWidth = mval;
500 trackWidth = std::max( trackWidth, constraint.
m_Value.
Opt() );
533 viaDiameter = std::max( viaDiameter, constraint.
m_Value.
Opt() );
539 viaDrill = std::max( viaDrill, constraint.
m_Value.
Opt() );
567 diffPairWidth = std::max( diffPairWidth, constraint.
m_Value.
Opt() );
573 diffPairGap = std::max( diffPairGap, constraint.
m_Value.
Opt() );
574 diffPairViaGap = std::max( diffPairViaGap, constraint.
m_Value.
Opt() );
619 for(
auto it = aNetName.rbegin(); it != aNetName.rend() && rv == 0; ++it, ++count )
623 if( ( ch >=
'0' && ch <=
'9' ) || ch ==
'_' )
629 aComplementNet = wxT(
"-" );
634 aComplementNet = wxT(
"+" );
639 aComplementNet = wxT(
"P" );
642 else if ( ch ==
'P' )
644 aComplementNet = wxT(
"N" );
653 if( rv != 0 && count >= 1 )
655 aComplementNet = aNetName.Left( aNetName.length() - count ) + aComplementNet
656 + aNetName.Right( count - 1 );
666 wxString coupledNetName;
709 wxString netNameN, netNameCoupled;
719 netNameN = netNameCoupled;
724 netNameP = netNameCoupled;
730 if( !netInfoP || !netInfoN )
773 const std::string& aName,
781 AddLine( l, aColor, 10000, aName );
787 AddLine( l, aColor, 10000, aName );
804 AddLine( l, aColor, 10000, aName, aSrcLoc );
815 AddLine( l, aColor, 10000, aName, aSrcLoc );
820 int aWidth,
const std::string& aName,
829 pitem->
Line( aLine, aWidth );
912 bool is_copper =
false;
934 wxLogTrace( wxT(
"PNS" ), wxT(
"unsupported pad type 0x%x" ), aPad->
GetAttribute() );
938 std::unique_ptr<PNS::SOLID> solid = std::make_unique<PNS::SOLID>();
941 solid->SetRoutable(
false );
943 solid->SetLayers( layers );
945 solid->SetParent( aPad );
956 solid->SetPos(
VECTOR2I( c.
x - offset.x, c.
y - offset.y ) );
957 solid->SetOffset(
VECTOR2I( offset.x, offset.y ) );
969 solid->SetHole( slot );
974 if( shape->HasIndexableSubshapes() && shape->GetIndexableSubshapeCount() == 1 )
976 std::vector<SHAPE*> subshapes;
977 shape->GetIndexableSubshapes( subshapes );
979 solid->SetShape( subshapes[0]->
Clone() );
983 solid->SetShape( shape->Clone() );
992 auto segment = std::make_unique<PNS::SEGMENT>(
SEG( aTrack->
GetStart(), aTrack->
GetEnd() ),
995 segment->SetWidth( aTrack->
GetWidth() );
997 segment->SetParent( aTrack );
1008 auto arc = std::make_unique<PNS::ARC>(
1013 arc->SetParent( aArc );
1034 via->SetParent( aVia );
1072 dlg.ShowDetailedText(
wxString::Format(
_(
"This zone cannot be handled by the router.\n" 1073 "Please verify it is not a self-intersecting " 1081 for(
int layer =
F_Cu; layer <=
B_Cu; layer++ )
1083 if( !layers[ layer ] )
1086 for(
int outline = 0; outline < poly->
OutlineCount(); outline++ )
1100 std::unique_ptr<PNS::SOLID> solid = std::make_unique<PNS::SOLID>();
1102 solid->SetLayer( layer );
1103 solid->SetNet( -1 );
1104 solid->SetParent( aZone );
1105 solid->SetShape( triShape );
1106 solid->SetIsCompoundShapePrimitive();
1107 solid->SetRoutable(
false );
1109 aWorld->
Add( std::move( solid ) );
1126 if( textShape.size() < 2 )
1129 for(
size_t jj = 0; jj < textShape.size(); jj += 2 )
1133 std::unique_ptr<PNS::SOLID> solid = std::make_unique<PNS::SOLID>();
1135 solid->SetLayer( aLayer );
1136 solid->SetNet( -1 );
1137 solid->SetParent( dynamic_cast<BOARD_ITEM*>( aText ) );
1138 solid->SetShape(
new SHAPE_SEGMENT( start, end, textWidth ) );
1139 solid->SetIsCompoundShapePrimitive();
1140 solid->SetRoutable(
false );
1142 aWorld->
Add( std::move( solid ) );
1181 for(
SHAPE* shape : shapes )
1183 std::unique_ptr<PNS::SOLID> solid = std::make_unique<PNS::SOLID>();
1188 solid->SetLayer( aItem->
GetLayer() );
1192 switch( shape->Type() )
1194 case SH_SEGMENT: static_cast<SHAPE_SEGMENT*>( shape )->SetWidth( 0 );
break;
1195 case SH_ARC: static_cast<SHAPE_ARC*>( shape )->SetWidth( 0 );
break;
1196 case SH_LINE_CHAIN: static_cast<SHAPE_LINE_CHAIN*>( shape )->SetWidth( 0 );
break;
1201 solid->SetNet( -1 );
1202 solid->SetParent( aItem );
1203 solid->SetShape( shape );
1205 if( shapes.size() > 1 )
1206 solid->SetIsCompoundShapePrimitive();
1208 solid->SetRoutable(
false );
1210 aWorld->
Add( std::move( solid ) );
1223 wxLogTrace( wxT(
"PNS" ), wxT(
"m_board = %p" ),
m_board );
1232 for(
int i = aLayer.
Start(); i <= aLayer.
End(); i++ )
1256 return via->FlashLayer( static_cast<PCB_LAYER_ID>( aLayer ) );
1261 const PAD*
pad = static_cast<const PAD*>( aItem->
Parent() );
1263 return pad->FlashLayer( static_cast<PCB_LAYER_ID>( aLayer ) );
1283 bool isOnVisibleLayer =
true;
1307 wxLogTrace( wxT(
"PNS" ), wxT(
"No board attached, aborting sync." ) );
1323 syncTextItem( aWorld, static_cast<PCB_TEXT*>( gitem ), gitem->GetLayer() );
1331 boardOutline = &buffer;
1335 syncZone( aWorld, zone, boardOutline );
1340 for(
PAD*
pad : footprint->Pads() )
1342 if( std::unique_ptr<PNS::SOLID> solid =
syncPad(
pad ) )
1343 aWorld->
Add( std::move( solid ) );
1345 worstClearance = std::max( worstClearance,
pad->GetLocalClearance() );
1348 syncTextItem( aWorld, &footprint->Reference(), footprint->Reference().GetLayer() );
1349 syncTextItem( aWorld, &footprint->Value(), footprint->Value().GetLayer() );
1351 for(
FP_ZONE* zone : footprint->Zones() )
1352 syncZone( aWorld, zone, boardOutline );
1354 if( footprint->IsNetTie() )
1357 for(
BOARD_ITEM* mgitem : footprint->GraphicalItems() )
1365 syncTextItem( aWorld, static_cast<FP_TEXT*>( mgitem ), mgitem->GetLayer() );
1377 aWorld->
Add( std::move( segment ) );
1381 if(
auto arc =
syncArc( static_cast<PCB_ARC*>( t ) ) )
1382 aWorld->
Add( std::move( arc ) );
1386 if(
auto via =
syncVia( static_cast<PCB_VIA*>( t ) ) )
1387 aWorld->
Add( std::move(
via ) );
1436 if( aClearance >= 0 )
1469 pitem->
Line( aRatline, 10000, aColor );
1501 PAD*
pad = static_cast<PAD*>( parent );
1502 VECTOR2I pos = static_cast<PNS::SOLID*>( aItem )->Pos();
1526 switch( aItem->
Kind() )
1530 PNS::ARC* arc = static_cast<PNS::ARC*>( aItem );
1531 PCB_ARC* arc_board = static_cast<PCB_ARC*>( board_item );
1532 const SHAPE_ARC* arc_shape = static_cast<const SHAPE_ARC*>( arc->
Shape() );
1534 arc_board->
SetEnd( wxPoint( arc_shape->
GetP1() ) );
1542 PNS::SEGMENT* seg = static_cast<PNS::SEGMENT*>( aItem );
1543 PCB_TRACK* track = static_cast<PCB_TRACK*>( board_item );
1544 const SEG& s = seg->
Seg();
1553 PCB_VIA* via_board = static_cast<PCB_VIA*>( board_item );
1569 VECTOR2I pos = static_cast<PNS::SOLID*>( aItem )->Pos();
1592 switch( aItem->
Kind() )
1596 PNS::ARC* arc = static_cast<PNS::ARC*>( aItem );
1607 PNS::SEGMENT* seg = static_cast<PNS::SEGMENT*>( aItem );
1609 const SEG& s = seg->
Seg();
1638 VECTOR2I pos = static_cast<PNS::SOLID*>( aItem )->Pos();
1661 std::set<FOOTPRINT*> processedFootprints;
1667 VECTOR2I offset = fpOffset.second.p_new - fpOffset.second.p_old;
1673 if( processedFootprints.find( footprint ) != processedFootprints.end() )
1676 processedFootprints.insert( footprint );
1683 m_commit->Push(
_(
"Interactive Router" ) );
1690 wxLogTrace( wxT(
"PNS" ), wxT(
"SetView %p" ), aView );
1719 wxLogTrace( wxT(
"PNS" ), wxT(
"Update-net %d" ), aNetCode );
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)
Base class for PNS router board items.
void DisplayRatline(const SHAPE_LINE_CHAIN &aRatline, int aColor=-1) 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.
bool UseNetClassTrack() const
Return true if netclass values should be used to obtain appropriate track width.
int holeRadius(const PNS::ITEM *aItem) const
std::map< CLEARANCE_CACHE_KEY, int > m_holeClearanceCache
currently selected items overlay
Represent a simple polygon consisting of a zero-thickness closed chain of connected line segments.
void SetView(KIGFX::VIEW *aView)
void DoNotShowCheckbox(wxString file, int line)
Checks the 'do not show again' setting for the dialog.
void ShowClearance(bool aEnabled)
virtual int Layer() const
int OutlineCount() const
Return the number of vertices in a given outline/hole.
std::unique_ptr< PNS::SEGMENT > syncTrack(PCB_TRACK *aTrack)
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
wxPoint GetPosition() const override
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.
const wxPoint & GetEnd() const
Manage layers needed to make a physical board.
bool GetIsRuleArea() const
Accessors to parameters used in Rule Area zones:
virtual void AddPoint(const VECTOR2I &aP, const COLOR4D &aColor, int aSize, const std::string &aName, const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO()) override
std::tuple< const PNS::ITEM *, const PNS::ITEM *, bool > CLEARANCE_CACHE_KEY
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
This file is part of the common library.
void SetTrackWidthIsExplicit(bool aIsExplicit)
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
void SetWidthSource(const wxString &aSource)
void SetDrill(int aDrill)
Function SetDrill sets the drill value for vias.
void GetTriangle(int index, VECTOR2I &a, VECTOR2I &b, VECTOR2I &c) const
bool IsMultilayer() const
void SetEnd(const wxPoint &aEnd)
NETINFO_ITEM * GetNet() const
Return #NET_INFO object for a given item.
int GetCurrentDiffPairGap() const
VIATYPE GetViaType() 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.
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.
int Width() const override
SHAPE_POLY_SET * Outline()
void UpdateNet(int aNetCode) override
virtual void AddSegment(const SEG &aS, const COLOR4D &aColor, const std::string &aName, const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO()) override
Like smd, does not appear on the solder paste layer (default)
ITEM_SET & FilterKinds(int aKindMask, bool aInvert=false)
int GetLayerDistance(PCB_LAYER_ID aFirstLayer, PCB_LAYER_ID aSecondLayer) const
Calculate the distance (height) between the two given copper layers.
Smd pad, appears on the solder paste layer (default)
void SetParent(BOARD_ITEM *aParent)
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
std::vector< SHAPE * > MakeEffectiveShapes() const
Make a set of SHAPE objects representing the EDA_SHAPE.
void SetClearance(int aClearance)
class PCB_TEXT, text on a layer
bool SetNetCode(int aNetCode, bool aNoAssert)
Set net using a net code.
class PCB_ARC, an arc track segment on a copper layer
bool Overlaps(const LAYER_RANGE &aOther) const
const SHAPE_SEGMENT * GetEffectiveHoleShape() const
Return a SHAPE object representing the pad's hole.
void SetPosition(const wxPoint &aPoint) override
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.
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)
void SetRuleResolver(RULE_RESOLVER *aFunc)
void HideItem(PNS::ITEM *aItem) override
PCB_LAYER_ID BottomLayer() const
virtual bool IsLocked() const
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
void SetDebugEnabled(bool aEnabled)
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
virtual int HoleClearance(const PNS::ITEM *aA, const PNS::ITEM *aB, bool aUseClearanceEpsilon=true) override
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.
void ClearCacheForItem(const PNS::ITEM *aItem) override
std::unordered_set< BOARD_ITEM * > m_hiddenItems
class PCB_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)
Append a new point at the end of the line chain.
KIGFX::VIEW_GROUP * m_items
TRACE_CLEARANCE_DISPLAY_MODE_T m_ShowTrackClearanceMode
How trace clearances are displayed.
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
virtual std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer=UNDEFINED_LAYER, FLASHING aFlash=FLASHING::DEFAULT) const override
Some pad shapes can be complex (rounded/chamfered rectangle), even without considering custom shapes.
A 2D point on a given set of layers and belonging to a certain net, that links together a number of b...
const wxSize & GetDrillSize() const
like PAD_PTH, but not plated
BOARD_STACKUP & GetStackupDescriptor()
Container for display options like enable/disable some optional drawings.
void SetDiffPairViaGap(int aGap)
void FreeItems()
Free all the items that were added to the group.
PCB_LAYER_ID TopLayer() const
LSET is a set of PCB_LAYER_IDs.
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)...
std::unique_ptr< PNS::VIA > syncVia(PCB_VIA *aVia)
bool isEdge(const PNS::ITEM *aItem)
bool IsVisible(const VIEW_ITEM *aItem) const
Return information if the item is visible (or not).
void SetMinClearance(int aClearance)
Represent a set of closed polygons.
size_t GetTriangleCount() const
std::unique_ptr< BOARD_COMMIT > m_commit
void SetMid(const wxPoint &aMid)
int ClearanceEpsilon() const
bool IsItemVisible(const PNS::ITEM *aItem) const override
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
void Line(const SHAPE_LINE_CHAIN &aLine, int aWidth=0, int aStyle=-1)
int GetCurrentDiffPairWidth() const
PNS::DEBUG_DECORATOR * GetDebugDecorator() override
bool GetDoNotAllowTracks() const
const VECTOR2I & GetArcMid() const
const wxString & GetNetname() const
bool IsFlashedOnLayer(const PNS::ITEM *aItem, int aLayer) const override
std::unique_ptr< PNS::ARC > syncArc(PCB_ARC *aArc)
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...
Extend VIEW_ITEM by possibility of grouping items into a single object.
void SetStart(const wxPoint &aStart)
int matchDpSuffix(const wxString &aNetName, wxString &aComplementNet)
Checks for netnamed differential pairs.
PNS_PCBNEW_DEBUG_DECORATOR(KIGFX::VIEW *aView=nullptr)
void ClearFlags(EDA_ITEM_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
bool isCopper(const PNS::ITEM *aItem)
KIGFX::VIEW_GROUP * m_previewItems
void UpdateItem(PNS::ITEM *aItem) override
Handle 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
void SetViaType(VIATYPE aViaType)
std::map< CLEARANCE_CACHE_KEY, int > m_holeToHoleClearanceCache
std::map< CLEARANCE_CACHE_KEY, int > m_clearanceCache
virtual void Add(VIEW_ITEM *aItem)
Add an item to the group.
int StackupHeight(int aFirstLayer, int aSecondLayer) const override
bool m_TempOverrideTrackWidth
void SetColor(const KIGFX::COLOR4D &aColor)
PCB_TRACK m_dummyTracks[2]
virtual void SetLayer(int aLayer)
Set layer used to draw the group.
void AddItem(PNS::ITEM *aItem) override
const PCB_DISPLAY_OPTIONS * m_dispOptions
bool IsCopperLayer(LAYER_NUM aLayerId)
Tests whether a layer is a copper layer.
void SetBoard(BOARD *aBoard)
virtual int HoleToHoleClearance(const PNS::ITEM *aA, const PNS::ITEM *aB, bool aUseClearanceEpsilon=true) 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 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.
void SetWidth(int aWidth)
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
int GetCurrentViaSize() const
Handle the data for a net.
bool m_UseHeightForLengthCalcs
Enable inclusion of stackup height in track length measurements and length tuning.
void SetIsFree(bool aFree=true)
int GetDRCEpsilon() const
const MINOPTMAX< int > & GetValue() const
void SetHoleToHole(int aHoleToHole)
bool GetIsFree() const
Checks if the via is a free via (as opposed to one created on a track by the router).
std::unique_ptr< typename std::remove_const< T >::type > Clone(const T &aItem)
Information pertinent to a Pcbnew printed circuit board.
SHAPE * Clone() const override
Return a dynamically allocated copy of the shape.
void SetDiffPairGap(int aGap)
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
void RemoveItem(PNS::ITEM *aItem) override
~PNS_PCBNEW_DEBUG_DECORATOR()
PCB_LAYER_ID
A quick note on layer IDs:
PAD_ATTRIB GetAttribute() const
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 SetView(KIGFX::VIEW *aView)
virtual bool QueryConstraint(PNS::CONSTRAINT_TYPE aType, const PNS::ITEM *aItemA, const PNS::ITEM *aItemB, int aLayer, PNS::CONSTRAINT *aConstraint) override
int GetCurrentDiffPairViaGap() const
VECTOR2I::extended_type ecoord
PnsKind Kind() const
Return the type (kind) of the item.
void SetVisible(VIEW_ITEM *aItem, bool aIsVisible=true)
Set the item visibility.
void Clear()
Remove all points from the line chain.
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.
int GetDrillValue() const
Function GetDrillValue "calculates" the drill value for vias (m-Drill if > 0, or default drill value ...
void CacheTriangulation(bool aPartition=true)
Build a polygon triangulation, needed to draw a polygon on OpenGL and in some other calculations.
class PCB_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.
PNS_PCBNEW_RULE_RESOLVER * m_ruleResolver
virtual int Clearance(const PNS::ITEM *aA, const PNS::ITEM *aB, bool aUseClearanceEpsilon=true) override
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...
void SetViaDiameter(int aDiameter)
virtual void AddLine(const SHAPE_LINE_CHAIN &aLine, const COLOR4D &aColor, int aWidth, const std::string &aName, const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO()) override
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
class PCB_SHAPE, a segment not on copper layers
int GetPadToDieLength() 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
const wxPoint & GetMid() const
bool Add(std::unique_ptr< SEGMENT > aSegment, bool aAllowRedundant=false)
Add an item to the current node.
void Append(int aX, int aY)
Append a new point at the end of the polygon.
PCB_LAYER_ID ToLAYER_ID(int aLayer)
const VECTOR2I & GetP1() const
A specialization of ZONE for use in footprints.
virtual void AddBox(const BOX2I &aB, const COLOR4D &aColor, const std::string &aName, const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO()) override
std::shared_ptr< DRC_ENGINE > m_DRCEngine
Represent a contiguous set of PCB layers.
const LAYER_RANGE & Layers() const
void SetWidth(int aWidth)
const wxPoint & GetStart() const
virtual double ViewGetLOD(int aLayer, VIEW *aView) const
Return the level of detail (LOD) of the item.
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.
A color representation with 4 components: red, green, blue, alpha.