61    std::set<unsigned> priorities;
 
   63    for( 
ZONE* zone : board->Zones() )
 
   67                && !zone->GetIsRuleArea() )
 
   69            priorities.insert( zone->GetAssignedPriority() );
 
   73    unsigned priority = 0;
 
   75    for( 
unsigned exist_priority : priorities )
 
   77        if( priority != exist_priority )
 
 
   93    std::set<int>         highlightedNets = board->GetHighLightNetCodes();
 
   96    ZONE_SETTINGS         zoneInfo = board->GetDesignSettings().GetDefaultZoneSettings();
 
   99    zoneInfo.
m_Netcode = highlightedNets.empty() ? -1 : *highlightedNets.begin();
 
  131        if( dialogResult == wxID_CANCEL )
 
  140    std::unique_ptr<ZONE> newZone = std::make_unique<ZONE>( parent );
 
 
  153    std::unique_ptr<ZONE> newZone = std::make_unique<ZONE>( board );
 
  156    zoneSettings << aSrcZone;
 
 
  167    std::vector<ZONE*> newZones;
 
  179    for( 
int outline = 0; outline < originalOutline.
OutlineCount(); outline++ )
 
  185        for (
int hole = 0; hole < originalOutline.
HoleCount( outline ) ; hole++ )
 
  186            newZoneOutline->
AddHole( originalOutline.
CHole( outline, hole ) );
 
  193        newZones.push_back( newZone );
 
  194        commit.
Add( newZone );
 
  198    commit.
Push( 
_( 
"Add Zone Cutout" ) );
 
  201    if( newZones.empty() )
 
  207        m_params.m_sourceZone = newZones[0];
 
 
  227            aZone->HatchBorder();
 
  229            commit.
Add( aZone.get() );
 
  230            commit.
Push( 
_( 
"Draw Zone" ) );
 
  252            commit.
Push( 
_( 
"Draw Polygon" ) );
 
 
  324        m_zone->Outline()->NewOutline();
 
  327        for( 
int i = 0; i < finalPoints.
PointCount(); ++i )
 
  336            for( 
int i = 1; i < leaderPts.
PointCount(); i++ )
 
  341            for( 
int i = 1; i < loopPts.
PointCount() - 1; i++ )
 
  347        chain.SetClosed( 
true );
 
  348        chain.Simplify( 
true );
 
  352        if( 
chain.PointCount() >= 3 )
 
 
static TOOL_ACTION selectItem
Select an item (specified as the event parameter).
 
static TOOL_ACTION selectionClear
Clear the current selection.
 
BASE_SET & reset(size_t pos)
 
BASE_SET & set(size_t pos)
 
virtual void Push(const wxString &aMessage=wxEmptyString, int aCommitFlags=0) override
Execute the changes.
 
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
 
int GetLineThickness(PCB_LAYER_ID aLayer) const
Return the default graphic segment thickness from the layer class for the given layer.
 
Abstract interface for BOARD_ITEMs capable of storing other items inside.
 
Information pertinent to a Pcbnew printed circuit board.
 
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
 
static const COLOR4D WHITE
 
COMMIT & Remove(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Remove a new item from the model.
 
COMMIT & Add(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Add a new item to the model.
 
A base class for most all the KiCad significant classes used in schematics and boards.
 
KICAD_T Type() const
Returns the type of object.
 
void SetPolyShape(const SHAPE_POLY_SET &aShape)
 
virtual void SetFilled(bool aFlag)
 
void SetShape(SHAPE_T aShape)
 
A color representation with 4 components: red, green, blue, alpha.
 
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
 
virtual COLOR4D GetColor(const VIEW_ITEM *aItem, int aLayer) const =0
Returns the color that should be used to draw the specific VIEW_ITEM on the specific layer using curr...
 
An interface for classes handling user events controlling the view behavior such as zooming,...
 
virtual void WarpMouseCursor(const VECTOR2D &aPosition, bool aWorldCoordinates=false, bool aWarpView=false)=0
If enabled (.
 
VECTOR2D GetCursorPosition() const
Return the current cursor position in world coordinates.
 
static LSET AllCuMask(int aCuLayerCount)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
 
Common, abstract interface for edit frames.
 
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
 
void SetLayer(PCB_LAYER_ID aLayer) override
Set the layer this item is on.
 
void SetStroke(const STROKE_PARAMS &aStroke) override
 
Class that handles the drawing of a polygon, including management of last corner deletion and drawing...
 
const SHAPE_LINE_CHAIN & GetLockedInPoints() const
Get the "locked-in" points that describe the polygon itself.
 
LEADER_MODE GetLeaderMode() const
 
void SetLeaderMode(LEADER_MODE aMode)
Set the leader mode to use when calculating the leader/returner lines.
 
bool IsPolygonInProgress() const
 
const SHAPE_LINE_CHAIN & GetLoopLinePoints() const
Get the points from the current cursor position to the polygon start point.
 
const SHAPE_LINE_CHAIN & GetLeaderLinePoints() const
Get the points comprising the leader line (the line from the last locked-in point to the current curs...
 
int LineDistance(const VECTOR2I &aP, bool aDetermineSide=false) const
Return the closest Euclidean distance between point aP and the line defined by the ends of segment (t...
 
const std::deque< EDA_ITEM * > GetItems() const
 
bool Empty() const
Checks if there is anything selected.
 
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
 
int PointCount() const
Return the number of points (vertices) in this line chain.
 
const VECTOR2I & CPoint(int aIndex) const
Return a reference to a given point in the line chain.
 
Represent a set of closed polygons.
 
int AddOutline(const SHAPE_LINE_CHAIN &aOutline)
Adds a new outline to the set and returns its index.
 
int HoleCount(int aOutline) const
Returns the number of holes in a given outline.
 
int Append(int x, int y, int aOutline=-1, int aHole=-1, bool aAllowDuplication=false)
Appends a vertex at the end of the given outline/hole (default: the last outline)
 
int AddHole(const SHAPE_LINE_CHAIN &aHole, int aOutline=-1)
Adds a new hole to the given outline (default: last) and returns its index.
 
SHAPE_LINE_CHAIN & Outline(int aIndex)
Return the reference to aIndex-th outline in the set.
 
const SHAPE_LINE_CHAIN & CHole(int aOutline, int aHole) const
 
int OutlineCount() const
Return the number of outlines in the set.
 
void BooleanSubtract(const SHAPE_POLY_SET &b)
Perform boolean polyset difference.
 
Simple container to manage line stroke parameters.
 
void commitZone(std::unique_ptr< ZONE > aZone)
Commit the current zone-in-progress to the BOARD.
 
PARAMS & m_params
The preview item to display.
 
bool OnFirstPoint(POLYGON_GEOM_MANAGER &aMgr) override
Called before the first point is added - clients can do initialization here, and can veto the start o...
 
ZONE_CREATE_HELPER(DRAWING_TOOL &aTool, PARAMS &aParams)
 
std::unique_ptr< ZONE > createNewZone(bool aKeepout)
Prompt the user for new zone settings, and create a new zone with those settings.
 
void performZoneCutout(ZONE &aZone, const ZONE &aCutout)
Cut one zone out of another one (i.e.
 
virtual ~ZONE_CREATE_HELPER()
 
void setUniquePriority(ZONE_SETTINGS &aZoneInfo)
Choose a new priority for @aZoneInfo.
 
void OnGeometryChange(const POLYGON_GEOM_MANAGER &aMgr) override
Called when the polygon is complete.
 
std::unique_ptr< ZONE > m_zone
 
std::unique_ptr< ZONE > createZoneFromExisting(const ZONE &aSrcZone)
Create a new zone with the settings from an existing zone.
 
KIGFX::PREVIEW::POLYGON_ITEM m_previewItem
view that show the preview item
 
void OnComplete(const POLYGON_GEOM_MANAGER &aMgr) override
 
KIGFX::VIEW & m_parentView
The zone-in-progress.
 
DRAWING_TOOL & m_tool
Parameters of the zone to be drawn.
 
ZONE_SETTINGS handles zones parameters.
 
void SetIsRuleArea(bool aEnable)
 
void ExportSetting(ZONE &aTarget, bool aFullExport=true) const
Function ExportSetting copy settings to a given zone.
 
std::map< PCB_LAYER_ID, ZONE_LAYER_PROPERTIES > m_LayerProperties
 
Handle a list of polygons defining a copper zone.
 
bool UnFill()
Removes the zone filling.
 
void SetLocalFlags(int aFlags)
 
void HatchBorder()
Compute the hatch lines depending on the hatch parameters and stores it in the zone's attribute m_bor...
 
SHAPE_POLY_SET * Outline()
 
void SetOutline(SHAPE_POLY_SET *aOutline)
 
int InvokeCopperZonesEditor(PCB_BASE_FRAME *aCaller, ZONE_SETTINGS *aSettings, CONVERT_SETTINGS *aConvertSettings)
Function InvokeCopperZonesEditor invokes up a modal dialog window for copper zone editing.
 
int InvokeNonCopperZonesEditor(PCB_BASE_FRAME *aParent, ZONE_SETTINGS *aSettings, CONVERT_SETTINGS *aConvertSettings)
Function InvokeNonCopperZonesEditor invokes up a modal dialog window for non-copper zone editing.
 
int InvokeRuleAreaEditor(PCB_BASE_FRAME *aCaller, ZONE_SETTINGS *aZoneSettings, BOARD *aBoard, CONVERT_SETTINGS *aConvertSettings)
Function InvokeRuleAreaEditor invokes up a modal dialog window for copper zone editing.
 
LEADER_MODE
The kind of the leader line.
 
PCB_LAYER_ID
A quick note on layer IDs:
 
@ GEOMETRY
Position or shape has changed.
 
@ SIMILAR
Add a new zone with the same settings as an existing one.
 
@ CUTOUT
Make a cutout to an existing zone.
 
@ ADD
Add a new zone/keepout with fresh settings.
 
Parameters used to fully describe a zone creation process.
 
const SHAPE_LINE_CHAIN chain
 
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint