45    return wxT( 
"SCH_RULE_AREA" );
 
 
   51    return _( 
"Rule Area" );
 
 
   69    std::vector<SHAPE*> effectiveShapes;
 
   90                for( 
int jj = 0; jj < segCount; jj++ )
 
  101    return effectiveShapes;
 
 
  106                          int aUnit, 
int aBodyStyle, 
const VECTOR2I& aOffset, 
bool aDimmed )
 
  115        SCH_SHAPE::Plot( aPlotter, aBackground, aPlotOpts, aUnit, aBodyStyle, aOffset, aDimmed );
 
  117    static std::vector<VECTOR2I> ptList;
 
  121    const std::vector<VECTOR2I>& polyPoints = 
m_poly.Outline( 0 ).CPoints();
 
  123    for( 
const VECTOR2I& pt : polyPoints )
 
  125        ptList.push_back( pt );
 
  128    ptList.push_back( polyPoints[0] );
 
  187    aPlotter->
SetDash( pen_size, lineStyle );
 
  189    aPlotter->
PlotPoly( ptList, fill, pen_size, 
nullptr );
 
 
  197    return _( 
"Schematic rule area" );
 
 
  222    std::unordered_set<SCH_DIRECTIVE_LABEL*> attachedDirectives;
 
  225    for( 
SCH_ITEM* candidateDirective : candidateDirectives )
 
  229        assert( labelConnectionPoints.size() == 1 );
 
  231        if( 
GetPolyShape().CollideEdge( labelConnectionPoints[0], 
nullptr, 5 ) )
 
  238    for( 
SCH_ITEM* areaItem : ruleAreaItems )
 
  240        if( areaItem->IsType( { SCH_ITEM_LOCATE_WIRE_T, SCH_ITEM_LOCATE_BUS_T } ) )
 
  249        else if( areaItem->IsType(
 
  250                         { SCH_PIN_T, SCH_LABEL_T, SCH_GLOBAL_LABEL_T, SCH_HIER_LABEL_T } ) )
 
  252            std::vector<VECTOR2I> connectionPoints = areaItem->GetConnectionPoints();
 
  253            assert( connectionPoints.size() == 1 );
 
  258        else if( areaItem->IsType( { SCH_SYMBOL_T } ) )
 
 
  280std::vector<std::pair<SCH_RULE_AREA*, SCH_SCREEN*>>
 
  284    std::vector<std::pair<SCH_RULE_AREA*, SCH_SCREEN*>> forceUpdateRuleAreas;
 
  290        for( 
SCH_ITEM* item : screen->Items() )
 
  298            item->ClearRuleAreasCache();
 
  309                forceUpdateRuleAreas.push_back( { ruleArea, screen } );
 
  313    return forceUpdateRuleAreas;
 
 
  337    std::vector<std::pair<wxString, SCH_ITEM*>> resolvedNetclasses;
 
  341        directive->RunOnChildren(
 
  350                            wxString netclass = field->
GetText();
 
  352                            if( netclass != wxEmptyString )
 
  353                                resolvedNetclasses.push_back( { netclass, directive } );
 
  362    return resolvedNetclasses;
 
 
  368    aList.emplace_back( 
_( 
"Rule Area" ), wxEmptyString );
 
  371    msg.Printf( wxS( 
"%d" ), 
GetPolyShape().Outline( 0 ).PointCount() );
 
  372    aList.emplace_back( 
_( 
"Points" ), msg );
 
  374    m_stroke.GetMsgPanelInfo( aFrame, aList );
 
  376    const std::vector<std::pair<wxString, SCH_ITEM*>> netclasses =
 
  378    wxString resolvedNetclass = 
_( 
"<None>" );
 
  380    if( netclasses.size() > 0 )
 
  381        resolvedNetclass = netclasses[0].first;
 
  383    aList.emplace_back( 
_( 
"Resolved netclass" ), resolvedNetclass );
 
 
static const COLOR4D WHITE
 
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
 
The base class for create windows for drawing purpose.
 
KICAD_T Type() const
Returns the type of object.
 
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType, bool isSCH_ITEM=false, bool isBOARD_ITEM=false)
 
SHAPE_POLY_SET & GetPolyShape()
 
COLOR4D GetFillColor() const
 
virtual const wxString & GetText() const
Return the string associated with the text object.
 
Implement an R-tree for fast spatial and type indexing of schematic items.
 
EE_TYPE Overlapping(const BOX2I &aRect) const
 
A color representation with 4 components: red, green, blue, alpha.
 
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
 
void Update(const KIGFX::VIEW_ITEM *aItem, int aUpdateFlags) const override
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
 
Base plotter engine class.
 
virtual void SetDash(int aLineWidth, LINE_STYLE aLineStyle)=0
 
bool GetColorMode() const
 
virtual void SetCurrentLineWidth(int width, void *aData=nullptr)=0
Set the line width for the next drawing.
 
virtual void PlotPoly(const std::vector< VECTOR2I > &aCornerList, FILL_T aFill, int aWidth, void *aData)=0
Draw a polygon ( filled or not ).
 
virtual void SetColor(const COLOR4D &color)=0
 
Provide class metadata.Helper macro to map type hashes to names.
 
void InheritsAfter(TYPE_ID aDerived, TYPE_ID aBase)
Declare an inheritance relationship between types.
 
static PROPERTY_MANAGER & Instance()
 
void AddTypeCast(TYPE_CAST_BASE *aCast)
Register a type converter.
 
void AddConnectedRuleArea(SCH_RULE_AREA *aRuleArea)
Adds an entry to the connected rule area cache.
 
wxString GetCanonicalName() const
Get a non-language-specific name for a field which can be used for storage, variable look-up,...
 
Base class for any item which can be embedded within the SCHEMATIC container class,...
 
SCH_RENDER_SETTINGS * getRenderSettings(PLOTTER *aPlotter) const
 
void AddRuleAreaToCache(SCH_RULE_AREA *aRuleArea)
Add a rule area to the item's cache.
 
SCH_ITEM(EDA_ITEM *aParent, KICAD_T aType, int aUnit=0, int aBodyStyle=0)
 
int GetEffectivePenWidth(const SCH_RENDER_SETTINGS *aSettings) const
 
std::vector< VECTOR2I > GetConnectionPoints() const override
Add all the connection points for this item to aPoints.
 
Segment description base class to describe items which have 2 end points (track, wire,...
 
VECTOR2I GetEndPoint() const
 
VECTOR2I GetStartPoint() const
 
const KIGFX::COLOR4D & GetBackgroundColor() const override
Return current background color settings.
 
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
 
std::unordered_set< KIID > m_directiveIDs
 
virtual std::vector< SHAPE * > MakeEffectiveShapes(bool aEdgeOnly=false) const override
Make a set of SHAPE objects representing the EDA_SHAPE.
 
const std::unordered_set< SCH_ITEM * > & GetContainedItems() const
Return a set of all items contained within the rule area.
 
void addContainedItem(SCH_ITEM *item)
Add an item to the list of items which this rule area affects.
 
std::unordered_set< KIID > m_prev_items
All SCH_ITEM objectss contained or intersecting the rule area in the previous update.
 
std::unordered_set< KIID > m_prev_directives
All SCH_DIRECTIVE_LABEL objects attached to the rule area border in the previous update.
 
void RefreshContainedItemsAndDirectives(SCH_SCREEN *screen)
Refresh the list of items which this rule area affects.
 
void resetCaches()
Reset all item and directive caches, saving the current state first.
 
const std::unordered_set< SCH_DIRECTIVE_LABEL * > & GetDirectives() const
Return the set of all directive labels attached to the rule area border.
 
void addDirective(SCH_DIRECTIVE_LABEL *label)
Add a directive label which applies to items within ths rule area.
 
std::vector< int > ViewGetLayers() const override
Return the layers the item is drawn on (which may be more than its "home" layer)
 
wxString GetFriendlyName() const override
 
virtual void Plot(PLOTTER *aPlotter, bool aBackground, const SCH_PLOT_OPTS &aPlotOpts, int aUnit, int aBodyStyle, const VECTOR2I &aOffset, bool aDimmed) override
Plot the item to aPlotter.
 
std::unordered_set< SCH_DIRECTIVE_LABEL * > m_directives
All SCH_DIRECTIVE_LABEL objects attached to the rule area border. No ownership.
 
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
 
static std::vector< std::pair< SCH_RULE_AREA *, SCH_SCREEN * > > UpdateRuleAreasInScreens(std::unordered_set< SCH_SCREEN * > &screens, KIGFX::SCH_VIEW *view)
Update all rule area connectvity / caches in the given sheet paths.
 
std::unordered_set< SCH_ITEM * > m_items
All SCH_ITEM objects currently contained or intersecting the rule area. No ownership.
 
const std::vector< std::pair< wxString, SCH_ITEM * > > GetResolvedNetclasses() const
Resolve the netclass of this rule area from connected directive labels.
 
const std::unordered_set< KIID > & GetPastContainedItems() const
 
std::unordered_set< KIID > m_itemIDs
 
wxString GetClass() const override
Return the class name.
 
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Get the message panel info for the rule area.
 
EE_RTREE & Items()
Get the full RTree, usually for iterating.
 
std::vector< SHAPE * > MakeEffectiveShapes(bool aEdgeOnly=false) const override
Make a set of SHAPE objects representing the SCH_SHAPE.
 
void Plot(PLOTTER *aPlotter, bool aBackground, const SCH_PLOT_OPTS &aPlotOpts, int aUnit, int aBodyStyle, const VECTOR2I &aOffset, bool aDimmed) override
Plot the item to aPlotter.
 
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
 
STROKE_PARAMS GetStroke() const override
 
int GetEffectiveWidth() const override
 
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
 
std::vector< SCH_PIN * > GetPins(const SCH_SHEET_PATH *aSheet) const
Retrieve a list of the SCH_PINs for the given sheet path.
 
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
 
int SegmentCount() const
Return the number of segments in this line chain.
 
const SEG CSegment(int aIndex) const
Return a constant copy of the aIndex segment in the line chain.
 
int OutlineCount() const
Return the number of outlines in the set.
 
const SHAPE_LINE_CHAIN & COutline(int aIndex) const
 
Represent a simple polygon consisting of a zero-thickness closed chain of connected line segments.
 
LINE_STYLE GetLineStyle() const
 
KIGFX::COLOR4D GetColor() const
 
@ FILLED_WITH_BG_BODYCOLOR
 
@ FILLED_SHAPE
Fill with object color.
 
@ LAYER_DEVICE_BACKGROUND
 
@ LAYER_SELECTION_SHADOWS
 
@ REPAINT
Item needs to be redrawn.
 
static struct SCH_RULE_AREA_DESC _SCH_RULE_AREA_DESC
 
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
 
static bool Collide(const SHAPE_CIRCLE &aA, const SHAPE_CIRCLE &aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV)
 
BOX2I boundingBox(T aObject, int aLayer)
Used by SHAPE_INDEX to get the bounding box of a generic T object.
 
LINE_STYLE
Dashed line types.
 
The EE_TYPE struct provides a type-specific auto-range iterator to the RTree.
 
VECTOR2< int32_t > VECTOR2I