28#include <wx/statline.h> 
   29#include <wx/checkbox.h> 
   31#include <wx/radiobut.h> 
   67                             bool aShowCopyLineWidthOption, 
bool aShowCenterlineOption,
 
   68                             bool aShowBoundingHullOption ) :
 
   69            DIALOG_SHIM( aParent, wxID_ANY, 
_( 
"Conversion Settings" ), wxDefaultPosition,
 
   70                         wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ),
 
   76                                                aShowCopyLineWidthOption,
 
   77                                                aShowCenterlineOption,
 
   78                                                aShowBoundingHullOption ) );
 
   80        wxBoxSizer* mainSizer = 
new wxBoxSizer( wxVERTICAL );
 
   81        wxBoxSizer* topSizer = 
new wxBoxSizer( wxVERTICAL );
 
   82        SetSizer( mainSizer );
 
   84        m_rbMimicLineWidth = 
new wxRadioButton( 
this, wxID_ANY, 
_( 
"Copy line width of first object" ) );
 
   86        if( aShowCopyLineWidthOption )
 
   91        m_rbCenterline = 
new wxRadioButton( 
this, wxID_ANY, 
_( 
"Use centerlines" ) );
 
   93        if( aShowCenterlineOption )
 
   95            topSizer->AddSpacer( 6 );
 
  103        m_rbBoundingHull = 
new wxRadioButton( 
this, wxID_ANY, 
_( 
"Create bounding hull" ) );
 
  105        m_gapLabel = 
new wxStaticText( 
this, wxID_ANY, 
_( 
"Gap:" ) );
 
  106        m_gapCtrl = 
new wxTextCtrl( 
this, wxID_ANY );
 
  107        m_gapUnits = 
new wxStaticText( 
this, wxID_ANY, 
_( 
"mm" ) );
 
  110        m_widthLabel = 
new wxStaticText( 
this, wxID_ANY, 
_( 
"Line width:" ) );
 
  112        m_widthUnits = 
new wxStaticText( 
this, wxID_ANY, 
_( 
"mm" ) );
 
  115        if( aShowBoundingHullOption )
 
  117            topSizer->AddSpacer( 6 );
 
  120            wxBoxSizer* hullParamsSizer = 
new wxBoxSizer( wxHORIZONTAL );
 
  121            hullParamsSizer->Add( 
m_gapLabel, 0, wxALIGN_CENTRE_VERTICAL, 5 );
 
  122            hullParamsSizer->Add( 
m_gapCtrl, 1, wxALIGN_CENTRE_VERTICAL|wxLEFT|wxRIGHT, 3 );
 
  123            hullParamsSizer->Add( 
m_gapUnits, 0, wxALIGN_CENTRE_VERTICAL, 5 );
 
  124            hullParamsSizer->AddSpacer( 18 );
 
  125            hullParamsSizer->Add( 
m_widthLabel, 0, wxALIGN_CENTRE_VERTICAL, 5 );
 
  126            hullParamsSizer->Add( 
m_widthCtrl, 1, wxALIGN_CENTRE_VERTICAL|wxLEFT|wxRIGHT, 3 );
 
  127            hullParamsSizer->Add( 
m_widthUnits, 0, wxALIGN_CENTRE_VERTICAL, 5 );
 
  129            topSizer->AddSpacer( 2 );
 
  130            topSizer->Add( hullParamsSizer, 0, wxLEFT, 26 );
 
  132            topSizer->AddSpacer( 15 );
 
  137            m_gap->Show( 
false, 
true );
 
  141        m_cbDeleteOriginals = 
new wxCheckBox( 
this, wxID_ANY, 
_( 
"Delete source objects after conversion" ) );
 
  144        mainSizer->Add( topSizer, 1, wxALL|wxEXPAND, 10 );
 
  146        wxBoxSizer* buttonsSizer = 
new wxBoxSizer( wxHORIZONTAL );
 
  147        buttonsSizer->AddStretchSpacer();
 
  149        wxStdDialogButtonSizer* sdbSizer = 
new wxStdDialogButtonSizer();
 
  150        wxButton* sdbSizerOK = 
new wxButton( 
this, wxID_OK );
 
  151        sdbSizer->AddButton( sdbSizerOK );
 
  152        wxButton* sdbSizerCancel = 
new wxButton( 
this, wxID_CANCEL );
 
  153        sdbSizer->AddButton( sdbSizerCancel );
 
  156        buttonsSizer->Add( sdbSizer, 1, 0, 5 );
 
  157        mainSizer->Add( buttonsSizer, 0, wxALL|wxEXPAND, 5 );
 
 
 
  267    m_menu->SetUntranslatedTitle( 
_HKI( 
"Create from Selection" ) );
 
  270    static const std::vector<KICAD_T> toArcTypes =   { 
PCB_ARC_T,
 
  286    static const std::vector<KICAD_T> polyTypes =   { 
PCB_ZONE_T,
 
  299    auto canCreatePoly   = shapes || anyPolys || anyTracks;
 
  304        canCreatePoly = shapes || anyPolys || anyTracks || anyPads;
 
  306    auto canCreateLines    = anyPolys;
 
  307    auto canCreateTracks   = anyPolys || graphicToTrack;
 
  308    auto canCreate         = canCreatePoly
 
 
  354    std::vector<SHAPE_POLY_SET> polys;
 
  372                    item->ClearTempFlags();
 
  401                    for( 
int jj = 0; jj < polySet.
HoleCount( ii ); ++jj )
 
  402                        polys.back().AddHole( polySet.
Hole( ii, jj ) );
 
  412    if( !getPolys( preflightSettings ) )
 
  423        bool showCopyLineWidth = 
true;
 
  431            showCopyLineWidth = 
false;
 
  451            if( resolvedSettings.
m_Gap > 0 )
 
  455        if( !getPolys( resolvedSettings ) )
 
  460                msg = 
_( 
"Resulting polygon would be empty" );
 
  462                msg = 
_( 
"Objects must form a closed shape" );
 
  481                    if( !item->IsBOARD_ITEM() )
 
  495                            topLeftItem = candidate;
 
  509            commit.
Add( graphic );
 
  545        if( ret == wxID_CANCEL )
 
  569        for( 
EDA_ITEM* item : selectionCopy )
 
  579            commit.
Push( 
_( 
"Convert to Polygon" ) );
 
  581            commit.
Push( 
_( 
"Create Polygon" ) );
 
  586            commit.
Push( 
_( 
"Convert to Zone" ) );
 
  588            commit.
Push( 
_( 
"Create Zone" ) );
 
 
  605    int chainingEpsilon = 100; 
 
  610    std::map<VECTOR2I, std::vector<std::pair<int, EDA_ITEM*>>> connections;
 
  611    std::deque<EDA_ITEM*> toCheck;
 
  616                return ( aLeft - aRight ).SquaredEuclideanNorm() <= 
SEG::Square( aLimit );
 
  619    auto findInsertionPoint =
 
  622                if( connections.count( aPoint ) )
 
  625                for( 
const auto& candidatePair : connections )
 
  627                    if( closeEnough( aPoint, candidatePair.first, chainingEpsilon ) )
 
  628                        return candidatePair.first;
 
  638            toCheck.push_back( item );
 
  639            connections[findInsertionPoint( seg->A )].emplace_back( std::make_pair( 0, item ) );
 
  640            connections[findInsertionPoint( seg->B )].emplace_back( std::make_pair( 1, item ) );
 
  644    while( !toCheck.empty() )
 
  646        std::vector<BOARD_ITEM*> insertedItems;
 
  648        EDA_ITEM* candidate = toCheck.front();
 
  659                    if( aItem->
IsType( { PCB_ARC_T, PCB_SHAPE_LOCATE_ARC_T } ) )
 
  680                        insertedItems.push_back( 
static_cast<BOARD_ITEM*
>( aItem ) );
 
  682                    else if( aItem->
IsType( { PCB_SHAPE_LOCATE_BEZIER_T } ) )
 
  686                        if( aAnchor == graphic->
GetStart() )
 
  708                        insertedItems.push_back( 
static_cast<BOARD_ITEM*
>( aItem ) );
 
  712                        VECTOR2I& point = ( aAnchor == nextSeg->A ) ? nextSeg->B : nextSeg->A;
 
  717                            outline.
Insert( 0, point );
 
  719                        insertedItems.push_back( 
static_cast<BOARD_ITEM*
>( aItem ) );
 
  733                    insert( aItem, aAnchor, aDirection );
 
  738                    VECTOR2I nextAnchor = ( aAnchor == anchors->A ) ? anchors->B : anchors->A;
 
  740                    for( std::pair<int, EDA_ITEM*> pair : connections[nextAnchor] )
 
  742                        if( pair.second == aItem )
 
  745                        process( pair.second, nextAnchor, aDirection );
 
  755        if( !candidate->
IsType( { PCB_ARC_T, PCB_SHAPE_LOCATE_ARC_T } ) )
 
  756            insert( candidate, anchors->A, 
true );
 
  758        process( candidate, anchors->B, 
true );
 
  763        for( std::pair<int, EDA_ITEM*> possibleLeft : connections[anchors->A] )
 
  765            if( possibleLeft.second != candidate )
 
  767                left = possibleLeft.second;
 
  776                || !closeEnough( outline.
GetPoint( 0 ), outline.
GetPoint( -1 ), chainingEpsilon ) )
 
  778            for( 
EDA_ITEM* item : insertedItems )
 
  794        insertedItems.clear();
 
 
  810        switch( item->Type() )
 
 
  856        switch( item->Type() )
 
  892            poly.
Append( *
static_cast<ZONE*
>( item )->Outline() );
 
  922            pad->Padstack().ForEachUniqueLayer(
 
  926                        pad->TransformShapeToPolygon( layerPoly, aLayer, 0, 
pad->GetMaxError(), 
ERROR_INSIDE );
 
 
  949                for( 
int i = aCollector.
GetCount() - 1; i >= 0; --i )
 
  953                    switch( item->
Type() )
 
  956                        switch( 
static_cast<PCB_SHAPE*
>( item )->GetShape() )
 
  965                            aCollector.
Remove( item );
 
  974                        aCollector.
Remove( item );
 
  992    auto handleGraphicSeg =
 
 1008                    commit.
Add( track );
 
 1029    auto addGraphicChain =
 
 1048                    if( aWidth && *aWidth > 0 )
 
 1051                    commit.
Add( graphic );
 
 1054                for( 
size_t ai = 0; ai < aChain.
ArcCount(); ++ai )
 
 1067                    if( aWidth && *aWidth > 0 )
 
 1070                    commit.
Add( graphic );
 
 1074    auto addTrackChain =
 
 1093                    if( aWidth && *aWidth > 0 )
 
 1096                    commit.
Add( track );
 
 1099                for( 
size_t ai = 0; ai < aChain.
ArcCount(); ++ai )
 
 1113                    if( aWidth && *aWidth > 0 )
 
 1116                    commit.
Add( trackArc );
 
 1128                    addGraphicChain( aChain, aWidth );
 
 1132                    addGraphicChain( aChain, aWidth );
 
 1136                    addTrackChain( aChain, aWidth );
 
 1140    auto processPolySet =
 
 1145                    processChain( aPoly.
COutline( oi ), aWidth );
 
 1147                    for( 
int hi = 0; hi < aPoly.
HoleCount( oi ); ++hi )
 
 1148                        processChain( aPoly.
CHole( oi, hi ), aWidth );
 
 1172        if( !item->IsBOARD_ITEM() )
 
 1175        if( handleGraphicSeg( item ) )
 
 1194                processPolySet( poly, itemWidth );
 
 1203                wxFAIL_MSG( wxT( 
"Unhandled graphic shape type in PolyToLines" ) );
 
 1209            ZONE* zone = 
static_cast<ZONE*
>( item );
 
 1210            processPolySet( *zone->
Outline(), itemWidth );
 
 1214            wxFAIL_MSG( wxT( 
"Unhandled type in PolyToLines" ) );
 
 1223        for( 
EDA_ITEM* item : selectionCopy )
 
 1227    commit.
Push( 
_( 
"Create Lines" ) );
 
 
 1238                for( 
int i = aCollector.
GetCount() - 1; i >= 0; --i )
 
 1242                    if( !item->
IsType( { PCB_SHAPE_T, PCB_TRACE_T, PCB_ARC_T } ) )
 
 1243                        aCollector.
Remove( item );
 
 1254    const double offsetRatio = 0.1;
 
 1261        VECTOR2I normal = ( seg->B - seg->A ).Perpendicular().Resize( offsetRatio * seg->Length() );
 
 1262        mid = seg->Center() + 
normal;
 
 1330    commit.
Push( 
_( 
"Create Arc" ) );
 
 
 1338    switch( aItem->
Type() )
 
 1351                return std::nullopt;
 
 1356            return std::nullopt;
 
 1373        return std::nullopt;
 
 
 1385                for( 
int i = aCollector.
GetCount() - 1; i >= 0; --i )
 
 1391                    if( !item->
IsType( { PCB_PAD_T, PCB_SHAPE_T } ) )
 
 1392                        aCollector.
Remove( item );
 
 1405    std::vector<BOARD_ITEM*> items_to_select_on_success;
 
 1410    auto item_modification_handler =
 
 1415    bool any_items_created = 
false;
 
 1417    auto item_creation_handler =
 
 1418            [&]( std::unique_ptr<BOARD_ITEM> aItem )
 
 1420                any_items_created = 
true;
 
 1421                items_to_select_on_success.push_back( aItem.get() );
 
 1422                commit.
Add( aItem.release() );
 
 1425    auto item_removal_handler =
 
 1430                if( !aItem.GetParentFootprint() )
 
 1438                                                                      item_modification_handler,
 
 1439                                                                      item_removal_handler );
 
 1466                                                                    : outset_params_pcb_edit;
 
 1479        if( !item->IsBOARD_ITEM() )
 
 1490    for( 
BOARD_ITEM* item : items_to_select_on_success )
 
 1493    if( any_items_created )
 
 1501    if( 
const std::optional<wxString> msg = outset_routine.
GetStatusMessage() )
 
 1502        frame.ShowInfoBarMsg( *msg );
 
 
constexpr EDA_IU_SCALE pcbIUScale
 
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
 
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.
 
Container for design settings for a BOARD object.
 
int GetLayerClass(PCB_LAYER_ID aLayer) const
 
int m_LineThickness[LAYER_CLASS_COUNT]
 
ZONE_SETTINGS & GetDefaultZoneSettings()
 
Abstract interface for BOARD_ITEMs capable of storing other items inside.
 
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
 
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
 
virtual void TransformShapeToPolySet(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aError, ERROR_LOC aErrorLoc) const
Convert the item shape to a polyset.
 
virtual STROKE_PARAMS GetStroke() const
 
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
 
FOOTPRINT * GetParentFootprint() const
 
virtual bool HasLineStroke() const
Check if this item has line stoke properties.
 
FOOTPRINT * GetFirstFootprint() const
Get the first footprint on the board or nullptr.
 
int GetCount() const
Return the number of objects in the list.
 
void Remove(int aIndex)
Remove the item at aIndex (first position is 0).
 
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
 
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.
 
CONVERT_SETTINGS * m_settings
 
bool TransferDataToWindow() override
 
wxRadioButton * m_rbBoundingHull
 
wxStaticText * m_gapLabel
 
wxRadioButton * m_rbMimicLineWidth
 
wxRadioButton * m_rbCenterline
 
void onRadioButton(wxCommandEvent &aEvent)
 
wxStaticText * m_gapUnits
 
bool TransferDataFromWindow() override
 
wxCheckBox * m_cbDeleteOriginals
 
CONVERT_SETTINGS_DIALOG(EDA_DRAW_FRAME *aParent, CONVERT_SETTINGS *aSettings, bool aShowCopyLineWidthOption, bool aShowCenterlineOption, bool aShowBoundingHullOption)
 
wxStaticText * m_widthLabel
 
~CONVERT_SETTINGS_DIALOG()
 
wxStaticText * m_widthUnits
 
DIALOG_OUTSET_ITEMS, derived from DIALOG_OUTSET_ITEMS_BASE, created by wxFormBuilder.
 
void SetupStandardButtons(std::map< int, wxString > aLabels={})
 
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
 
DIALOG_SHIM(wxWindow *aParent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER, const wxString &name=wxDialogNameStr)
 
The base class for create windows for drawing purpose.
 
A base class for most all the KiCad significant classes used in schematics and boards.
 
virtual VECTOR2I GetPosition() const
 
void SetFlags(EDA_ITEM_FLAGS aMask)
 
KICAD_T Type() const
Returns the type of object.
 
virtual bool IsType(const std::vector< KICAD_T > &aScanTypes) const
Check whether the item is one of the listed types.
 
EDA_ITEM_FLAGS GetFlags() const
 
void SetCenter(const VECTOR2I &aCenter)
 
FILL_T GetFillMode() const
 
SHAPE_POLY_SET & GetPolyShape()
 
void SetPolyShape(const SHAPE_POLY_SET &aShape)
 
virtual void SetFilled(bool aFlag)
 
const VECTOR2I & GetEnd() const
Return the ending point of the graphic.
 
void SetStart(const VECTOR2I &aStart)
 
const VECTOR2I & GetStart() const
Return the starting point of the graphic.
 
void SetShape(SHAPE_T aShape)
 
const std::vector< VECTOR2I > & GetBezierPoints() const
 
void SetEnd(const VECTOR2I &aEnd)
 
void SetArcGeometry(const VECTOR2I &aStart, const VECTOR2I &aMid, const VECTOR2I &aEnd)
Set the three controlling points for an arc.
 
void SetWidth(int aWidth)
 
int GetCornerRadius() const
 
void SetFillMode(FILL_T aFill)
 
VECTOR2I GetArcMid() const
 
static const TOOL_EVENT SelectedEvent
 
static const TOOL_EVENT SelectedItemsModified
Selected items were moved, this can be very high frequency on the canvas, use with care.
 
Used when the right click button is pressed, or when the select tool is in effect.
 
A handler that is based on a set of callbacks provided by the user of the ITEM_MODIFICATION_ROUTINE.
 
static LSET AllNonCuMask()
Return a mask holding all layer minus CU layers.
 
void ProcessItem(BOARD_ITEM &aItem)
 
wxString GetCommitDescription() const override
 
std::optional< wxString > GetStatusMessage() const
 
static TOOL_ACTION convertToKeepout
 
static TOOL_ACTION convertToTracks
 
static TOOL_ACTION convertToLines
 
static TOOL_ACTION convertToZone
 
static TOOL_ACTION convertToPoly
 
static TOOL_ACTION outsetItems
Create outset items from selection.
 
static TOOL_ACTION convertToArc
 
static TOOL_ACTION createArray
Tool for creating an array of objects.
 
void SetMid(const VECTOR2I &aMid)
 
const VECTOR2I & GetMid() const
 
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.
 
void GetBoundingHull(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aMaxError, ERROR_LOC aErrorLoc=ERROR_INSIDE) const
 
Common, abstract interface for edit frames.
 
static SELECTION_CONDITION SameLayer()
Creates a functor that tests if selection contains items that belong exclusively to the same layer.
 
VECTOR2I GetCenter() const override
This defaults to the center of the bounding box if not overridden.
 
int GetWidth() const override
 
void SetLayer(PCB_LAYER_ID aLayer) override
Set the layer this item is on.
 
void TransformShapeToPolygon(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aError, ERROR_LOC aErrorLoc, bool ignoreLineWidth=false) const override
Convert the shape to a closed polygon.
 
STROKE_PARAMS GetStroke() const override
 
void SetStroke(const STROKE_PARAMS &aStroke) override
 
void SetEnd(const VECTOR2I &aEnd)
 
void SetStart(const VECTOR2I &aStart)
 
void TransformShapeToPolygon(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aError, ERROR_LOC aErrorLoc, bool ignoreLineWidth=false) const override
Convert the track shape to a closed polygon.
 
const VECTOR2I & GetStart() const
 
const VECTOR2I & GetEnd() const
 
virtual void SetWidth(int aWidth)
 
virtual int GetWidth() const
 
A round rectangle shape, based on a rectangle and a radius.
 
void TransformToPolygon(SHAPE_POLY_SET &aBuffer, int aMaxError) const
Get the polygonal representation of the roundrect.
 
int Length() const
Return the length (this).
 
static SEG::ecoord Square(int a)
 
Class that groups generic conditions for selected items.
 
static SELECTION_CONDITION MoreThan(int aNumber)
Create a functor that tests if the number of selected items is greater than the value given as parame...
 
static SELECTION_CONDITION Count(int aNumber)
Create a functor that tests if the number of selected items is equal to the value given as parameter.
 
static SELECTION_CONDITION OnlyTypes(std::vector< KICAD_T > aTypes)
Create a functor that tests if the selected items are only of given types.
 
const VECTOR2I & GetArcMid() const
 
SHAPE_ARC Reversed() const
 
const VECTOR2I & GetP1() const
 
const VECTOR2I & GetP0() const
 
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
 
const SHAPE_ARC & Arc(size_t aArc) const
 
virtual const VECTOR2I GetPoint(int aIndex) const override
 
void SetClosed(bool aClosed)
Mark the line chain as closed (i.e.
 
int PointCount() const
Return the number of points (vertices) in this line chain.
 
void Append(int aX, int aY, bool aAllowDuplication=false)
Append a new point at the end of the line chain.
 
virtual const SEG GetSegment(int aIndex) const override
 
virtual size_t GetSegmentCount() const override
 
bool IsArcSegment(size_t aSegment) const
 
void Insert(size_t aVertex, const VECTOR2I &aP)
 
Represent a set of closed polygons.
 
void BooleanAdd(const SHAPE_POLY_SET &b)
Perform boolean polyset union.
 
void ClearArcs()
Removes all arc references from all the outlines and holes in the polyset.
 
int AddOutline(const SHAPE_LINE_CHAIN &aOutline)
Adds a new outline to the set and returns its index.
 
bool IsEmpty() const
Return true if the set is empty (no polygons at all)
 
void Inflate(int aAmount, CORNER_STRATEGY aCornerStrategy, int aMaxError, bool aSimplify=false)
Perform outline inflation/deflation.
 
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)
 
void Simplify()
Simplify the polyset (merges overlapping polys, eliminates degeneracy/self-intersections)
 
SHAPE_LINE_CHAIN & Hole(int aOutline, int aHole)
Return the reference to aHole-th hole in the aIndex-th outline.
 
int NewOutline()
Creates a new empty polygon in the set and returns its index.
 
const SHAPE_LINE_CHAIN & CHole(int aOutline, int aHole) const
 
int OutlineCount() const
Return the number of outlines in the set.
 
const SHAPE_LINE_CHAIN & COutline(int aIndex) const
 
Simple container to manage line stroke parameters.
 
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.
 
Handle a list of polygons defining a copper zone.
 
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 DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
 
This file is part of the common library.
 
@ ROUND_ALL_CORNERS
All angles are rounded.
 
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.
 
#define STRUCT_DELETED
flag indication structures to be erased
 
#define SKIP_STRUCT
flag indicating that the structure should be ignored
 
@ RECTANGLE
Use RECTANGLE instead of RECT to avoid collision in a Windows header.
 
bool IsNonCopperLayer(int aLayerId)
Test whether a layer is a non copper layer.
 
bool IsCopperLayer(int aLayerId)
Test whether a layer is a copper layer.
 
PCB_LAYER_ID
A quick note on layer IDs:
 
This file contains miscellaneous commonly used macros and functions.
 
BARCODE class definition.
 
static PGM_BASE * process
 
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.
 
CONVERT_STRATEGY m_Strategy
 
const VECTOR2I CalcArcCenter(const VECTOR2I &aStart, const VECTOR2I &aMid, const VECTOR2I &aEnd)
Determine the center of an arc or circle given three points on its circumference.
 
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
 
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
 
@ PCB_ZONE_T
class ZONE, a copper pour area
 
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
 
@ PCB_FIELD_T
class PCB_FIELD, text associated with a footprint property
 
@ PCB_BARCODE_T
class PCB_BARCODE, a barcode (graphic item)
 
@ PCB_SHAPE_LOCATE_CIRCLE_T
 
@ PCB_SHAPE_LOCATE_SEGMENT_T
 
@ PCB_SHAPE_LOCATE_RECT_T
 
@ PCB_SHAPE_LOCATE_BEZIER_T
 
@ PCB_PAD_T
class PAD, a pad in a footprint
 
@ PCB_SHAPE_LOCATE_POLY_T
 
@ PCB_ARC_T
class PCB_ARC, an arc track segment on a copper layer
 
@ PCB_TRACE_T
class PCB_TRACK, a track segment (segment on a copper layer)
 
VECTOR2< int32_t > VECTOR2I