71 if( dialogResult == wxID_CANCEL )
84 commit.
Stage( pickedList );
85 commit.
Push(
_(
"Modify zone properties" ) );
109 std::vector<ZONE*> zones_to_refill;
111 for(
unsigned i = 0; i < pickedList.
GetCount(); ++i )
115 if( zone ==
nullptr )
117 wxASSERT_MSG(
false,
"Expected a zone after zone properties edit" );
122 if( zone->
IsFilled() || zone == aZone )
123 zones_to_refill.push_back( zone );
126 commit.
Stage( pickedList );
128 std::lock_guard<KISPINLOCK> lock(
GetBoard()->GetConnectivity()->GetLock() );
130 if( zones_to_refill.size() )
133 wxString title =
wxString::Format(
_(
"Refill %d Zones" ), (
int) zones_to_refill.size() );
136 if( !filler.
Fill( zones_to_refill ) )
143 commit.
Push(
_(
"Modify zone properties" ) );
159 if( zone->GetNumCorners() < 3 )
162 aModifiedZonesList->
PushItem( picker );
191 SEG firstSegment = *segIterator1;
196 SEG secondSegment = *segIterator2;
199 if( firstSegment.
Collide( secondSegment, 0 ) )
NETINFO_ITEM * FindNet(int aNetcode) const
Search for a net with the given netcode.
void OnModify() override
Must be called after a board change to set the modified flag.
SEGMENT_ITERATOR IterateSegmentsWithHoles()
Return an iterator object, for the aOutline-th outline in the set (with holes).
bool GetIsRuleArea() const
Accessors to parameters used in Rule Area zones:
This file is part of the common library.
void UpdateCopyOfZonesList(PICKED_ITEMS_LIST &aPickList, PICKED_ITEMS_LIST &aAuxiliaryList, BOARD *aPcb)
Function UpdateCopyOfZonesList Check a pick list to remove zones identical to their copies and set th...
int InvokeNonCopperZonesEditor(PCB_BASE_FRAME *aParent, ZONE_SETTINGS *aSettings)
Function InvokeNonCopperZonesEditor invokes up a modal dialog window for non-copper zone editing.
SHAPE_POLY_SET * Outline()
virtual void Revert() override
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
bool Collide(const SEG &aSeg, int aClearance, int *aActual=nullptr) const
bool SetNetCode(int aNetCode, bool aNoAssert)
Set net using a net code.
static LIB_PART * dummy()
Used to draw a dummy shape when a LIB_PART is not found in library.
void PushItem(const ITEM_PICKER &aItem)
Push aItem to the top of the list.
bool Contains(const VECTOR2I &aP, int aSubpolyIndex=-1, int aAccuracy=0, bool aUseBBoxCaches=false) const
Return true if a given subpolygon contains the point aP.
#define ZONE_EXPORT_VALUES
bool TestZoneIntersection(ZONE *aZone1, ZONE *aZone2)
Test for intersection of 2 copper areas.
unsigned GetCount() const
void InstallNewProgressReporter(wxWindow *aParent, const wxString &aTitle, int aNumPhases)
int SaveCopyOfZones(PICKED_ITEMS_LIST &aPickList, BOARD *aPcb, int aNetCode, LAYER_NUM aLayer)
Function SaveCopyOfZones creates a copy of zones having a given netcode on a given layer,...
bool Intersects(const BOX2< Vec > &aRect) const
Function Intersects.
bool Fill(std::vector< ZONE * > &aZones, bool aCheck=false, wxWindow *aParent=nullptr)
Fills the given list of zones.
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const override
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
bool NormalizeAreaPolygon(PICKED_ITEMS_LIST *aNewZonesList, ZONE *aCurrArea)
Process an area that has been modified, by normalizing its polygon against itself.
void ExportSetting(ZONE &aTarget, bool aFullExport=true) const
Function ExportSetting copy settings to a given zone.
bool OnAreaPolygonModified(PICKED_ITEMS_LIST *aModifiedZonesList, ZONE *modified_area)
Process an area that has been modified, by normalizing its polygon and merging the intersecting polyg...
ITERATOR IterateWithHoles(int aOutline)
Represent a set of closed polygons.
virtual PCB_LAYER_ID GetLayer() const override
Return the primary layer this item is on.
const ZONE_SETTINGS & GetZoneSettings() const
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Return a list of missing connections between components/tracks.
EDA_ITEM * GetPickedItem(unsigned int aIdx) const
ZONE handles a list of polygons defining a copper zone.
#define STRUCT_DELETED
flag indication structures to be erased
A holder to handle information on schematic or board items.
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
int InvokeRuleAreaEditor(PCB_BASE_FRAME *aCaller, ZONE_SETTINGS *aSettings)
Function InvokeRuleAreaEditor invokes up a modal dialog window for copper zone editing.
ZONE_SETTINGS handles zones parameters.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
void Edit_Zone_Params(ZONE *zone_container)
Edit params (layer, clearance, ...) for a zone outline.
Handle the data for a net.
void ClearItemsList()
Delete only the list of pickers NOT the picked data itself.
virtual void Push(const wxString &aMessage=wxT("A commit"), bool aCreateUndoEntry=true, bool aSetDirtyBit=true) override
Revert the commit by restoring the modified items state.
bool IsCopperLayer(LAYER_NUM aLayerId)
Tests whether a layer is a copper layer.
int InvokeCopperZonesEditor(PCB_BASE_FRAME *aCaller, ZONE_SETTINGS *aSettings)
Function InvokeCopperZonesEditor invokes up a modal dialog window for copper zone editing.
void SetZoneSettings(const ZONE_SETTINGS &aSettings)
const BOX2I BBox(int aClearance=0) const override
Compute a bounding box of the shape, with a margin of aClearance a collision.
void ClearListAndDeleteItems()
Delete the list of pickers AND the data pointed by #m_PickedItem or #m_PickedItemLink according to th...
COMMIT & Stage(EDA_ITEM *aItem, CHANGE_TYPE aChangeType) override