Commit 544ca4c9 authored by charras's avatar charras

solved a very subtle bug in polygon_test_point_inside.cpp. Sometimes a point...

solved a very subtle bug in polygon_test_point_inside.cpp. Sometimes a point outside a polygon was seen inside the polygon
parent 686cd2c5
...@@ -30,6 +30,7 @@ ZONE_CONTAINER::ZONE_CONTAINER( BOARD* parent ) : ...@@ -30,6 +30,7 @@ ZONE_CONTAINER::ZONE_CONTAINER( BOARD* parent ) :
utility2 = 0; // flags used in polygon calculations utility2 = 0; // flags used in polygon calculations
m_Poly = new CPolyLine(); // Outlines m_Poly = new CPolyLine(); // Outlines
m_ArcToSegmentsCount = 16; // Use 16 segment to convert a circle to a polygon m_ArcToSegmentsCount = 16; // Use 16 segment to convert a circle to a polygon
m_DrawOptions = 0;
} }
...@@ -137,8 +138,9 @@ bool ZONE_CONTAINER::Save( FILE* aFile ) const ...@@ -137,8 +138,9 @@ bool ZONE_CONTAINER::Save( FILE* aFile ) const
if( ret < 2 ) if( ret < 2 )
return false; return false;
ret = fprintf( aFile, "ZOptions %d %d\n", m_GridFillValue, m_ArcToSegmentsCount ); ret = fprintf( aFile, "ZOptions %d %d %c\n", m_GridFillValue, m_ArcToSegmentsCount,
if( ret < 2 ) m_DrawOptions ? 'S' : 'F' );
if( ret < 3 )
return false; return false;
...@@ -266,20 +268,26 @@ int ZONE_CONTAINER::ReadDescr( FILE* aFile, int* aLineNum ) ...@@ -266,20 +268,26 @@ int ZONE_CONTAINER::ReadDescr( FILE* aFile, int* aLineNum )
break; break;
} }
} }
/* Set hatch later, afer reading outlines corners data */ /* Set hatch mode later, after reading outlines corners data */
} }
if( strnicmp( Line, "ZOptions", 8 ) == 0 ) // Options info found if( strnicmp( Line, "ZOptions", 8 ) == 0 ) // Options info found
{ {
int gridsize = 50; int gridsize = 50;
int arcsegmentcount = 16; int arcsegmentcount = 16;
int drawopt = 'F';
text = Line + 8; text = Line + 8;
ret = sscanf( text, "%d %d", &gridsize, &arcsegmentcount ); ret = sscanf( text, "%d %d %c", &gridsize, &arcsegmentcount, &drawopt );
if( ret < 1 ) // Must find 1 or 2 args. if( ret < 1 ) // Must find 1 or more args.
return false; return false;
else else
m_GridFillValue = gridsize; m_GridFillValue = gridsize;
if ( arcsegmentcount >= 32 ) if ( arcsegmentcount >= 32 )
m_ArcToSegmentsCount = 32; m_ArcToSegmentsCount = 32;
if ( drawopt == 'S' ) // Sketch mode for filled areas in this zone selected
m_DrawOptions = 1;
} }
if( strnicmp( Line, "ZClearance", 10 ) == 0 ) // Clearence and pad options info found if( strnicmp( Line, "ZClearance", 10 ) == 0 ) // Clearence and pad options info found
{ {
...@@ -436,7 +444,7 @@ void ZONE_CONTAINER::DrawFilledArea( WinEDA_DrawPanel* panel, ...@@ -436,7 +444,7 @@ void ZONE_CONTAINER::DrawFilledArea( WinEDA_DrawPanel* panel,
{ {
static int* CornersBuffer = NULL; static int* CornersBuffer = NULL;
static unsigned CornersBufferSize = 0; static unsigned CornersBufferSize = 0;
bool sketch_mode = false; // true to show areas outlines only (test and debug purposes) bool sketch_mode = m_DrawOptions; // false to show filled polys, true to show polygons outlines only (test and debug purposes)
if( DC == NULL ) if( DC == NULL )
return; return;
......
...@@ -41,16 +41,19 @@ public: ...@@ -41,16 +41,19 @@ public:
* In less simple cases (when m_Poly has holes) m_FilledPolysList is a polygon equivalent to m_Poly, without holes * In less simple cases (when m_Poly has holes) m_FilledPolysList is a polygon equivalent to m_Poly, without holes
* In complex cases an ouline decribed by m_Poly can have many filled areas * In complex cases an ouline decribed by m_Poly can have many filled areas
*/ */
int m_DrawOptions; /* used to pass some draw options (draw filled areas in sketch mode for instance ...)
* currently useful when testing filling zones algos
*/
private: private:
int m_NetCode; // Net number for fast comparisons int m_NetCode; // Net number for fast comparisons
public: public:
ZONE_CONTAINER( BOARD* parent ); ZONE_CONTAINER( BOARD* parent );
~ZONE_CONTAINER(); ~ZONE_CONTAINER();
bool Save( FILE* aFile ) const; bool Save( FILE* aFile ) const;
int ReadDescr( FILE* aFile, int* aLineNum = NULL ); int ReadDescr( FILE* aFile, int* aLineNum = NULL );
wxPoint& GetPosition() wxPoint& GetPosition()
{ {
...@@ -69,9 +72,9 @@ public: ...@@ -69,9 +72,9 @@ public:
* copy usefull data from the source. * copy usefull data from the source.
* flags and linked list pointers are NOT copied * flags and linked list pointers are NOT copied
*/ */
void Copy( ZONE_CONTAINER* src ); void Copy( ZONE_CONTAINER* src );
void Display_Infos( WinEDA_DrawFrame* frame ); void Display_Infos( WinEDA_DrawFrame* frame );
/** /**
* Function Draw * Function Draw
...@@ -81,10 +84,10 @@ public: ...@@ -81,10 +84,10 @@ public:
* @param offset = Draw offset (usually wxPoint(0,0)) * @param offset = Draw offset (usually wxPoint(0,0))
* @param aDrawMode = GR_OR, GR_XOR, GR_COPY .. * @param aDrawMode = GR_OR, GR_XOR, GR_COPY ..
*/ */
void Draw( WinEDA_DrawPanel* panel, void Draw( WinEDA_DrawPanel* panel,
wxDC* DC, wxDC* DC,
int aDrawMode, int aDrawMode,
const wxPoint& offset = ZeroOffset ); const wxPoint& offset = ZeroOffset );
/** /**
* Function DrawDrawFilledArea * Function DrawDrawFilledArea
...@@ -94,19 +97,19 @@ public: ...@@ -94,19 +97,19 @@ public:
* @param offset = Draw offset (usually wxPoint(0,0)) * @param offset = Draw offset (usually wxPoint(0,0))
* @param aDrawMode = GR_OR, GR_XOR, GR_COPY .. * @param aDrawMode = GR_OR, GR_XOR, GR_COPY ..
*/ */
void DrawFilledArea( WinEDA_DrawPanel* panel, void DrawFilledArea( WinEDA_DrawPanel* panel,
wxDC* DC, wxDC* DC,
int aDrawMode, int aDrawMode,
const wxPoint& offset = ZeroOffset ); const wxPoint& offset = ZeroOffset );
EDA_Rect GetBoundingBox(); EDA_Rect GetBoundingBox();
/** /**
* Function Test_For_Copper_Island_And_Remove__Insulated_Islands * Function Test_For_Copper_Island_And_Remove__Insulated_Islands
* Remove insulated copper islands found in m_FilledPolysList. * Remove insulated copper islands found in m_FilledPolysList.
* @param aPcb = the board to analyse * @param aPcb = the board to analyse
*/ */
void Test_For_Copper_Island_And_Remove_Insulated_Islands( BOARD* aPcb ); void Test_For_Copper_Island_And_Remove_Insulated_Islands( BOARD* aPcb );
/** /**
* Function DrawWhileCreateOutline * Function DrawWhileCreateOutline
...@@ -117,7 +120,7 @@ public: ...@@ -117,7 +120,7 @@ public:
* @param DC = current Device Context * @param DC = current Device Context
* @param draw_mode = draw mode: OR, XOR .. * @param draw_mode = draw mode: OR, XOR ..
*/ */
void DrawWhileCreateOutline( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode = GR_OR ); void DrawWhileCreateOutline( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode = GR_OR );
/** /**
...@@ -136,7 +139,7 @@ public: ...@@ -136,7 +139,7 @@ public:
} }
void SetNet( int anet_code ); void SetNet( int anet_code );
/** /**
* Function HitTest * Function HitTest
...@@ -144,7 +147,7 @@ public: ...@@ -144,7 +147,7 @@ public:
* @param refPos A wxPoint to test * @param refPos A wxPoint to test
* @return bool - true if a hit, else false * @return bool - true if a hit, else false
*/ */
bool HitTest( const wxPoint& refPos ); bool HitTest( const wxPoint& refPos );
/** function BuildFilledPolysListData /** function BuildFilledPolysListData
* Build m_FilledPolysList data from real outlines (m_Poly) * Build m_FilledPolysList data from real outlines (m_Poly)
...@@ -155,7 +158,7 @@ public: ...@@ -155,7 +158,7 @@ public:
* This function does not add holes for pads and tracks but calls * This function does not add holes for pads and tracks but calls
* AddClearanceAreasPolygonsToPolysList() to do that for copper layers * AddClearanceAreasPolygonsToPolysList() to do that for copper layers
*/ */
int BuildFilledPolysListData( BOARD * aPcb ); int BuildFilledPolysListData( BOARD* aPcb );
/** function AddClearanceAreasPolygonsToPolysList /** function AddClearanceAreasPolygonsToPolysList
* Add non copper areas polygons (pads and tracks with clearence) * Add non copper areas polygons (pads and tracks with clearence)
...@@ -167,7 +170,7 @@ public: ...@@ -167,7 +170,7 @@ public:
* filled copper area polygon (without clearence areas * filled copper area polygon (without clearence areas
* @param aPcb: the current board * @param aPcb: the current board
*/ */
void AddClearanceAreasPolygonsToPolysList( BOARD * aPcb ); void AddClearanceAreasPolygonsToPolysList( BOARD* aPcb );
/** /**
* Function HitTestForCorner * Function HitTestForCorner
...@@ -175,7 +178,7 @@ public: ...@@ -175,7 +178,7 @@ public:
* @return -1 if none, corner index in .corner <vector> * @return -1 if none, corner index in .corner <vector>
* @param refPos : A wxPoint to test * @param refPos : A wxPoint to test
*/ */
int HitTestForCorner( const wxPoint& refPos ); int HitTestForCorner( const wxPoint& refPos );
/** /**
* Function HitTestForEdge * Function HitTestForEdge
...@@ -183,7 +186,7 @@ public: ...@@ -183,7 +186,7 @@ public:
* @return -1 if none, or index of the starting corner in .corner <vector> * @return -1 if none, or index of the starting corner in .corner <vector>
* @param refPos : A wxPoint to test * @param refPos : A wxPoint to test
*/ */
int HitTestForEdge( const wxPoint& refPos ); int HitTestForEdge( const wxPoint& refPos );
/** /**
* Function HitTest (overlayed) * Function HitTest (overlayed)
...@@ -191,7 +194,7 @@ public: ...@@ -191,7 +194,7 @@ public:
* @param refArea : the given EDA_Rect * @param refArea : the given EDA_Rect
* @return bool - true if a hit, else false * @return bool - true if a hit, else false
*/ */
bool HitTest( EDA_Rect& refArea ); bool HitTest( EDA_Rect& refArea );
/** /**
* Function Fill_Zone() * Function Fill_Zone()
...@@ -204,7 +207,7 @@ public: ...@@ -204,7 +207,7 @@ public:
* @param verbose = true to show error messages * @param verbose = true to show error messages
* @return error level (0 = no error) * @return error level (0 = no error)
*/ */
int Fill_Zone( WinEDA_PcbFrame* frame, wxDC* DC, bool verbose = TRUE ); int Fill_Zone( WinEDA_PcbFrame* frame, wxDC* DC, bool verbose = TRUE );
/* Geometric transformations: */ /* Geometric transformations: */
...@@ -213,14 +216,14 @@ public: ...@@ -213,14 +216,14 @@ public:
* Move the outlines * Move the outlines
* @param offset = moving vector * @param offset = moving vector
*/ */
void Move( const wxPoint& offset ); void Move( const wxPoint& offset );
/** /**
* Function MoveEdge * Function MoveEdge
* Move the outline Edge. m_CornerSelection is the start point of the outline edge * Move the outline Edge. m_CornerSelection is the start point of the outline edge
* @param offset = moving vector * @param offset = moving vector
*/ */
void MoveEdge( const wxPoint& offset ); void MoveEdge( const wxPoint& offset );
/** /**
* Function Rotate * Function Rotate
...@@ -228,7 +231,7 @@ public: ...@@ -228,7 +231,7 @@ public:
* @param centre = rot centre * @param centre = rot centre
* @param angle = in 0.1 degree * @param angle = in 0.1 degree
*/ */
void Rotate( const wxPoint& centre, int angle ); void Rotate( const wxPoint& centre, int angle );
/** /**
* Function Mirror * Function Mirror
...@@ -236,7 +239,7 @@ public: ...@@ -236,7 +239,7 @@ public:
* the layer is not changed * the layer is not changed
* @param mirror_ref = vertical axis position * @param mirror_ref = vertical axis position
*/ */
void Mirror( const wxPoint& mirror_ref ); void Mirror( const wxPoint& mirror_ref );
/** /**
* Function GetClass * Function GetClass
......
...@@ -81,7 +81,7 @@ void dialog_copper_zone::OnInitDialog( wxInitDialogEvent& event ) ...@@ -81,7 +81,7 @@ void dialog_copper_zone::OnInitDialog( wxInitDialogEvent& event )
int selection = 0; int selection = 0;
int grid_routing = g_GridRoutingSize; int grid_routing = g_GridRoutingSize;
if( m_Zone_Container ) if( m_Zone_Container )
grid_routing = m_Zone_Container->m_GridFillValue; grid_routing = m_Zone_Container->m_GridFillValue;
...@@ -120,6 +120,12 @@ void dialog_copper_zone::OnInitDialog( wxInitDialogEvent& event ) ...@@ -120,6 +120,12 @@ void dialog_copper_zone::OnInitDialog( wxInitDialogEvent& event )
} }
g_Zone_Hatching = m_Zone_Container->m_Poly->GetHatchStyle(); g_Zone_Hatching = m_Zone_Container->m_Poly->GetHatchStyle();
g_Zone_Arc_Approximation = m_Zone_Container->m_ArcToSegmentsCount; g_Zone_Arc_Approximation = m_Zone_Container->m_ArcToSegmentsCount;
g_FilledAreasShowMode = m_Zone_Container->m_DrawOptions;
if ( g_FilledAreasShowMode == 1)
m_ShowFilledAreasInSketchOpt->SetValue(true);
} }
else else
...@@ -242,19 +248,21 @@ void dialog_copper_zone::OnInitDialog( wxInitDialogEvent& event ) ...@@ -242,19 +248,21 @@ void dialog_copper_zone::OnInitDialog( wxInitDialogEvent& event )
} }
/*************************************************************/ /********************************************************************/
void dialog_copper_zone::OnButtonCancelClick( wxCommandEvent& event ) void dialog_copper_zone::OnButtonCancelClick( wxCommandEvent& event )
/*************************************************************/ /********************************************************************/
{ {
EndModal( ZONE_ABORT ); EndModal( ZONE_ABORT );
} }
/**********************************************************/ /********************************************************************************************/
bool dialog_copper_zone::AcceptOptions(bool aPromptForErrors) bool dialog_copper_zone::AcceptOptions(bool aPromptForErrors, bool aUseExportableSetupOnly)
/**********************************************************/ /********************************************************************************************/
/** Function dialog_copper_zone::AcceptOptions( /** Function dialog_copper_zone::AcceptOptions(
* @return false if incorrect options, true if Ok. * @return false if incorrect options, true if Ok.
* @param aPromptForErrors = true to prompt user on incorrectparams
* @param aUseExportableSetupOnly = true to use exportable parametres only (used to export this setup to other zones)
*/ */
{ {
switch( m_FillOpt->GetSelection() ) switch( m_FillOpt->GetSelection() )
...@@ -315,7 +323,7 @@ bool dialog_copper_zone::AcceptOptions(bool aPromptForErrors) ...@@ -315,7 +323,7 @@ bool dialog_copper_zone::AcceptOptions(bool aPromptForErrors)
case 4: case 4:
g_GridRoutingSize = 0; g_GridRoutingSize = 0;
wxMessageBox( wxT( DisplayInfo( this, wxT(
"You are using No grid for filling zones\nThis is currently in development and for tests only.\n Do not use for production")); "You are using No grid for filling zones\nThis is currently in development and for tests only.\n Do not use for production"));
break; break;
} }
...@@ -328,6 +336,12 @@ bool dialog_copper_zone::AcceptOptions(bool aPromptForErrors) ...@@ -328,6 +336,12 @@ bool dialog_copper_zone::AcceptOptions(bool aPromptForErrors)
else else
g_Zone_45_Only = TRUE; g_Zone_45_Only = TRUE;
g_FilledAreasShowMode = m_ShowFilledAreasInSketchOpt->IsChecked() ? 1 : 0;
// If we use only exportable to others zones parameters, exit here:
if ( aUseExportableSetupOnly )
return true;
/* Get the layer selection for this zone */ /* Get the layer selection for this zone */
int ii = m_LayerSelectionCtrl->GetSelection(); int ii = m_LayerSelectionCtrl->GetSelection();
if( ii < 0 && aPromptForErrors ) if( ii < 0 && aPromptForErrors )
...@@ -335,7 +349,10 @@ bool dialog_copper_zone::AcceptOptions(bool aPromptForErrors) ...@@ -335,7 +349,10 @@ bool dialog_copper_zone::AcceptOptions(bool aPromptForErrors)
DisplayError( this, _( "Error : you must choose a layer" ) ); DisplayError( this, _( "Error : you must choose a layer" ) );
return false; return false;
} }
g_CurrentZone_Layer = m_LayerId[ii]; g_CurrentZone_Layer = m_LayerId[ii];
/* Get the net name selection for this zone */ /* Get the net name selection for this zone */
ii = m_ListNetNameSelection->GetSelection(); ii = m_ListNetNameSelection->GetSelection();
...@@ -432,4 +449,25 @@ void dialog_copper_zone::OnRemoveFillZoneButtonClick( wxCommandEvent& event ) ...@@ -432,4 +449,25 @@ void dialog_copper_zone::OnRemoveFillZoneButtonClick( wxCommandEvent& event )
m_Parent->DrawPanel->Refresh(); m_Parent->DrawPanel->Refresh();
} }
/******************************************************************************/
void dialog_copper_zone::ExportSetupToOtherCopperZones( wxCommandEvent& event )
/******************************************************************************/
{
if ( !AcceptOptions(true, true) )
return;
// Export to others zones:
BOARD * pcb = m_Parent->m_Pcb;
for( int ii = 0; ii < pcb->GetAreaCount(); ii++ )
{
ZONE_CONTAINER* zone = pcb->GetArea(ii);
zone->m_Poly->SetHatch( g_Zone_Hatching );
zone->m_PadOption = g_Zone_Pad_Options;
zone->m_ZoneClearance = g_DesignSettings.m_ZoneClearence;
zone->m_GridFillValue = g_GridRoutingSize;
zone->m_ArcToSegmentsCount = g_Zone_Arc_Approximation;
zone->m_DrawOptions = g_FilledAreasShowMode;
m_Parent->GetScreen()->SetModify();;
}
}
...@@ -20,9 +20,10 @@ public: ...@@ -20,9 +20,10 @@ public:
void OnInitDialog( wxInitDialogEvent& event ); void OnInitDialog( wxInitDialogEvent& event );
void OnButtonOkClick( wxCommandEvent& event ); void OnButtonOkClick( wxCommandEvent& event );
void OnButtonCancelClick( wxCommandEvent& event ); void OnButtonCancelClick( wxCommandEvent& event );
bool AcceptOptions(bool aPromptForErrors); bool AcceptOptions(bool aPromptForErrors, bool aUseExportableSetupOnly = false);
void OnRemoveFillZoneButtonClick( wxCommandEvent& event ); void OnRemoveFillZoneButtonClick( wxCommandEvent& event );
void OnNetSortingOptionSelected( wxCommandEvent& event ); void OnNetSortingOptionSelected( wxCommandEvent& event );
void ExportSetupToOtherCopperZones( wxCommandEvent& event );
}; };
#endif // #ifndef DIALOG_COPPER_ZONES #endif // #ifndef DIALOG_COPPER_ZONES
...@@ -11,9 +11,10 @@ ...@@ -11,9 +11,10 @@
BEGIN_EVENT_TABLE( dialog_copper_zone_frame, wxDialog ) BEGIN_EVENT_TABLE( dialog_copper_zone_frame, wxDialog )
EVT_INIT_DIALOG( dialog_copper_zone_frame::_wxFB_OnInitDialog ) EVT_INIT_DIALOG( dialog_copper_zone_frame::_wxFB_OnInitDialog )
EVT_BUTTON( wxID_BUTTON_EXPORT, dialog_copper_zone_frame::_wxFB_ExportSetupToOtherCopperZones )
EVT_BUTTON( wxID_OK, dialog_copper_zone_frame::_wxFB_OnButtonOkClick ) EVT_BUTTON( wxID_OK, dialog_copper_zone_frame::_wxFB_OnButtonOkClick )
EVT_BUTTON( wxID_CANCEL, dialog_copper_zone_frame::_wxFB_OnButtonCancelClick ) EVT_BUTTON( wxID_CANCEL, dialog_copper_zone_frame::_wxFB_OnButtonCancelClick )
EVT_BUTTON( wxID_ANY, dialog_copper_zone_frame::_wxFB_OnRemoveFillZoneButtonClick ) EVT_BUTTON( wxID_BUTTON_UNFILL, dialog_copper_zone_frame::_wxFB_OnRemoveFillZoneButtonClick )
EVT_RADIOBOX( ID_NET_SORTING_OPTION, dialog_copper_zone_frame::_wxFB_OnNetSortingOptionSelected ) EVT_RADIOBOX( ID_NET_SORTING_OPTION, dialog_copper_zone_frame::_wxFB_OnNetSortingOptionSelected )
END_EVENT_TABLE() END_EVENT_TABLE()
...@@ -27,6 +28,9 @@ dialog_copper_zone_frame::dialog_copper_zone_frame( wxWindow* parent, wxWindowID ...@@ -27,6 +28,9 @@ dialog_copper_zone_frame::dialog_copper_zone_frame( wxWindow* parent, wxWindowID
wxBoxSizer* m_OptionsBoxSizer; wxBoxSizer* m_OptionsBoxSizer;
m_OptionsBoxSizer = new wxBoxSizer( wxHORIZONTAL ); m_OptionsBoxSizer = new wxBoxSizer( wxHORIZONTAL );
wxStaticBoxSizer* m_ExportableSetupSizer;
m_ExportableSetupSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Zone Setup:") ), wxHORIZONTAL );
wxBoxSizer* m_LeftBoxSizer; wxBoxSizer* m_LeftBoxSizer;
m_LeftBoxSizer = new wxBoxSizer( wxVERTICAL ); m_LeftBoxSizer = new wxBoxSizer( wxVERTICAL );
...@@ -36,8 +40,8 @@ dialog_copper_zone_frame::dialog_copper_zone_frame( wxWindow* parent, wxWindowID ...@@ -36,8 +40,8 @@ dialog_copper_zone_frame::dialog_copper_zone_frame( wxWindow* parent, wxWindowID
wxString m_GridCtrlChoices[] = { _("0.00000"), _("0.00000"), _("0.00000"), _("0.00000"), _("No Grid (For tests only!)") }; wxString m_GridCtrlChoices[] = { _("0.00000"), _("0.00000"), _("0.00000"), _("0.00000"), _("No Grid (For tests only!)") };
int m_GridCtrlNChoices = sizeof( m_GridCtrlChoices ) / sizeof( wxString ); int m_GridCtrlNChoices = sizeof( m_GridCtrlChoices ) / sizeof( wxString );
m_GridCtrl = new wxRadioBox( this, ID_RADIOBOX_GRID_SELECTION, _("Grid Size for Filling:"), wxDefaultPosition, wxDefaultSize, m_GridCtrlNChoices, m_GridCtrlChoices, 1, wxRA_SPECIFY_COLS ); m_GridCtrl = new wxRadioBox( this, ID_RADIOBOX_GRID_SELECTION, _("Grid Size for Filling:"), wxDefaultPosition, wxDefaultSize, m_GridCtrlNChoices, m_GridCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_GridCtrl->SetSelection( 1 ); m_GridCtrl->SetSelection( 0 );
m_FillOptionsBox->Add( m_GridCtrl, 0, wxALL, 5 ); m_FillOptionsBox->Add( m_GridCtrl, 0, wxALL|wxEXPAND, 5 );
m_ClearanceValueTitle = new wxStaticText( this, wxID_ANY, _("Zone clearance value (mm):"), wxDefaultPosition, wxDefaultSize, 0 ); m_ClearanceValueTitle = new wxStaticText( this, wxID_ANY, _("Zone clearance value (mm):"), wxDefaultPosition, wxDefaultSize, 0 );
m_ClearanceValueTitle->Wrap( -1 ); m_ClearanceValueTitle->Wrap( -1 );
...@@ -49,15 +53,24 @@ dialog_copper_zone_frame::dialog_copper_zone_frame( wxWindow* parent, wxWindowID ...@@ -49,15 +53,24 @@ dialog_copper_zone_frame::dialog_copper_zone_frame( wxWindow* parent, wxWindowID
wxString m_FillOptChoices[] = { _("Include Pads"), _("Thermal Relief"), _("Exclude Pads") }; wxString m_FillOptChoices[] = { _("Include Pads"), _("Thermal Relief"), _("Exclude Pads") };
int m_FillOptNChoices = sizeof( m_FillOptChoices ) / sizeof( wxString ); int m_FillOptNChoices = sizeof( m_FillOptChoices ) / sizeof( wxString );
m_FillOpt = new wxRadioBox( this, wxID_ANY, _("Pad in Zone:"), wxDefaultPosition, wxDefaultSize, m_FillOptNChoices, m_FillOptChoices, 1, wxRA_SPECIFY_COLS ); m_FillOpt = new wxRadioBox( this, wxID_ANY, _("Pad in Zone:"), wxDefaultPosition, wxDefaultSize, m_FillOptNChoices, m_FillOptChoices, 1, wxRA_SPECIFY_COLS );
m_FillOpt->SetSelection( 1 ); m_FillOpt->SetSelection( 2 );
m_FillOptionsBox->Add( m_FillOpt, 0, wxALL|wxEXPAND, 5 ); m_FillOptionsBox->Add( m_FillOpt, 0, wxALL|wxEXPAND, 5 );
m_ShowFilledAreasInSketchOpt = new wxCheckBox( this, wxID_ANY, _("Show filled areas in sketch mode"), wxDefaultPosition, wxDefaultSize, 0 );
m_ShowFilledAreasInSketchOpt->SetToolTip( _("If enabled, filled areas in is this zone will be displayed as non filled polygons.\nIf disabled, filled areas in is this zone will be displayed as \"solid\" areas (normal mode).") );
m_FillOptionsBox->Add( m_ShowFilledAreasInSketchOpt, 0, wxALL, 5 );
m_LeftBoxSizer->Add( m_FillOptionsBox, 1, wxEXPAND, 5 ); m_LeftBoxSizer->Add( m_FillOptionsBox, 1, wxEXPAND, 5 );
m_OptionsBoxSizer->Add( m_LeftBoxSizer, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); m_ExportableSetupSizer->Add( m_LeftBoxSizer, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_ExportableSetupSizer->Add( 5, 5, 0, wxEXPAND, 5 );
m_OptionsBoxSizer->Add( 5, 5, 0, wxEXPAND, 5 ); wxBoxSizer* m_MiddleBox;
m_MiddleBox = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* m_MiddleBoxSizer; wxBoxSizer* m_MiddleBoxSizer;
m_MiddleBoxSizer = new wxBoxSizer( wxVERTICAL ); m_MiddleBoxSizer = new wxBoxSizer( wxVERTICAL );
...@@ -92,7 +105,16 @@ dialog_copper_zone_frame::dialog_copper_zone_frame( wxWindow* parent, wxWindowID ...@@ -92,7 +105,16 @@ dialog_copper_zone_frame::dialog_copper_zone_frame( wxWindow* parent, wxWindowID
m_MiddleBoxSizer->Add( m_OutilinesBoxOpt, 1, wxEXPAND, 5 ); m_MiddleBoxSizer->Add( m_OutilinesBoxOpt, 1, wxEXPAND, 5 );
m_OptionsBoxSizer->Add( m_MiddleBoxSizer, 0, 0, 5 ); m_ExportSetupBuuton = new wxButton( this, wxID_BUTTON_EXPORT, _("Export to others zones"), wxDefaultPosition, wxDefaultSize, 0 );
m_ExportSetupBuuton->SetToolTip( _("Export this zone setup to all others copper zones") );
m_MiddleBoxSizer->Add( m_ExportSetupBuuton, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
m_MiddleBox->Add( m_MiddleBoxSizer, 0, 0, 5 );
m_ExportableSetupSizer->Add( m_MiddleBox, 1, wxEXPAND, 5 );
m_OptionsBoxSizer->Add( m_ExportableSetupSizer, 1, wxEXPAND, 5 );
m_OptionsBoxSizer->Add( 0, 0, 0, wxEXPAND, 5 ); m_OptionsBoxSizer->Add( 0, 0, 0, wxEXPAND, 5 );
...@@ -107,7 +129,7 @@ dialog_copper_zone_frame::dialog_copper_zone_frame( wxWindow* parent, wxWindowID ...@@ -107,7 +129,7 @@ dialog_copper_zone_frame::dialog_copper_zone_frame( wxWindow* parent, wxWindowID
m_ButtonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); m_ButtonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
m_RightBoxSizer->Add( m_ButtonCancel, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); m_RightBoxSizer->Add( m_ButtonCancel, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
m_UnFillZoneButton = new wxButton( this, wxID_ANY, _("UnFill Zone"), wxDefaultPosition, wxDefaultSize, 0 ); m_UnFillZoneButton = new wxButton( this, wxID_BUTTON_UNFILL, _("UnFill Zone"), wxDefaultPosition, wxDefaultSize, 0 );
m_RightBoxSizer->Add( m_UnFillZoneButton, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); m_RightBoxSizer->Add( m_UnFillZoneButton, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
......
...@@ -86,444 +86,573 @@ ...@@ -86,444 +86,573 @@
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL</property> <property name="flag">wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Zone Setup:</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_LeftBoxSizer</property> <property name="name">m_ExportableSetupSizer</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">1</property> <property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Zone Fill Options:</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_FillOptionsBox</property> <property name="name">m_LeftBoxSizer</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="bg"></property>
<property name="choices">&quot;0.00000&quot; &quot;0.00000&quot; &quot;0.00000&quot; &quot;0.00000&quot; &quot;No Grid (For tests only!)&quot;</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id"> ID_RADIOBOX_GRID_SELECTION</property>
<property name="label">Grid Size for Filling:</property>
<property name="majorDimension">1</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_GridCtrl</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="selection">1</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Zone clearance value (mm):</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_ClearanceValueTitle</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property> <property name="flag">wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">1</property>
<object class="wxTextCtrl" expanded="1"> <object class="wxStaticBoxSizer" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="maximum_size"></property> <property name="label">Zone Fill Options:</property>
<property name="maxlength">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_ZoneClearanceCtrl</property> <property name="name">m_FillOptionsBox</property>
<property name="permission">protected</property> <property name="orient">wxVERTICAL</property>
<property name="pos"></property> <property name="permission">none</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="bg"></property>
<property name="choices">&quot;Include Pads&quot; &quot;Thermal Relief&quot; &quot;Exclude Pads&quot;</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Pad in Zone:</property>
<property name="majorDimension">1</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_FillOpt</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="selection">1</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="bg"></property>
<property name="choices">&quot;0.00000&quot; &quot;0.00000&quot; &quot;0.00000&quot; &quot;0.00000&quot; &quot;No Grid (For tests only!)&quot;</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id"> ID_RADIOBOX_GRID_SELECTION</property>
<property name="label">Grid Size for Filling:</property>
<property name="majorDimension">1</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_GridCtrl</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="selection">0</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Zone clearance value (mm):</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_ClearanceValueTitle</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimum_size"></property>
<property name="name">m_ZoneClearanceCtrl</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="bg"></property>
<property name="choices">&quot;Include Pads&quot; &quot;Thermal Relief&quot; &quot;Exclude Pads&quot;</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Pad in Zone:</property>
<property name="majorDimension">1</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_FillOpt</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="selection">2</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="bg"></property>
<property name="checked">0</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Show filled areas in sketch mode</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_ShowFilledAreasInSketchOpt</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip">If enabled, filled areas in is this zone will be displayed as non filled polygons.&#x0A;If disabled, filled areas in is this zone will be displayed as &quot;solid&quot; areas (normal mode).</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object> </object>
</object> </object>
</object> </object>
</object> </object>
</object> <object class="sizeritem" expanded="1">
</object> <property name="border">5</property>
<object class="sizeritem" expanded="1"> <property name="flag">wxEXPAND</property>
<property name="border">5</property> <property name="proportion">0</property>
<property name="flag">wxEXPAND</property> <object class="spacer" expanded="1">
<property name="proportion">0</property> <property name="height">5</property>
<object class="spacer" expanded="1"> <property name="permission">protected</property>
<property name="height">5</property> <property name="width">5</property>
<property name="permission">protected</property> </object>
<property name="width">5</property> </object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag"></property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">m_MiddleBoxSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Outlines Options:</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_OutilinesBoxOpt</property> <property name="name">m_MiddleBox</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="bg"></property>
<property name="choices">&quot;Any&quot; &quot;H , V and 45 deg&quot;</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Zone edges orient:</property>
<property name="majorDimension">1</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_OrientEdgesOpt</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="selection">0</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag"></property> <property name="flag"></property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="spacer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="height">5</property>
<property name="permission">protected</property>
<property name="width">5</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="bg"></property>
<property name="choices">&quot;Line&quot; &quot;Hatched Outline&quot; &quot;Full Hatched&quot;</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">ID_RADIOBOX_OUTLINES_OPTION</property>
<property name="label">Outlines Appearance</property>
<property name="majorDimension">1</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_OutlineAppearanceCtrl</property> <property name="name">m_MiddleBoxSizer</property>
<property name="permission">protected</property> <property name="orient">wxVERTICAL</property>
<property name="pos"></property> <property name="permission">none</property>
<property name="selection">0</property> <object class="sizeritem" expanded="1">
<property name="size"></property> <property name="border">5</property>
<property name="style">wxRA_SPECIFY_COLS</property> <property name="flag">wxEXPAND</property>
<property name="subclass"></property> <property name="proportion">1</property>
<property name="tooltip">Choose how a zone outline is displayed&#x0A;- Single line&#x0A;- Short hatching&#x0A;- Full zone area hatched</property> <object class="wxStaticBoxSizer" expanded="1">
<property name="window_extra_style"></property> <property name="id">wxID_ANY</property>
<property name="window_name"></property> <property name="label">Outlines Options:</property>
<property name="window_style"></property> <property name="minimum_size"></property>
<event name="OnChar"></event> <property name="name">m_OutilinesBoxOpt</property>
<event name="OnEnterWindow"></event> <property name="orient">wxVERTICAL</property>
<event name="OnEraseBackground"></event> <property name="permission">none</property>
<event name="OnKeyDown"></event> <event name="OnUpdateUI"></event>
<event name="OnKeyUp"></event> <object class="sizeritem" expanded="1">
<event name="OnKillFocus"></event> <property name="border">5</property>
<event name="OnLeaveWindow"></event> <property name="flag">wxALL|wxEXPAND</property>
<event name="OnLeftDClick"></event> <property name="proportion">0</property>
<event name="OnLeftDown"></event> <object class="wxRadioBox" expanded="1">
<event name="OnLeftUp"></event> <property name="bg"></property>
<event name="OnMiddleDClick"></event> <property name="choices">&quot;Any&quot; &quot;H , V and 45 deg&quot;</property>
<event name="OnMiddleDown"></event> <property name="context_help"></property>
<event name="OnMiddleUp"></event> <property name="enabled">1</property>
<event name="OnMotion"></event> <property name="fg"></property>
<event name="OnMouseEvents"></event> <property name="font"></property>
<event name="OnMouseWheel"></event> <property name="hidden">0</property>
<event name="OnPaint"></event> <property name="id">wxID_ANY</property>
<event name="OnRadioBox"></event> <property name="label">Zone edges orient:</property>
<event name="OnRightDClick"></event> <property name="majorDimension">1</property>
<event name="OnRightDown"></event> <property name="maximum_size"></property>
<event name="OnRightUp"></event> <property name="minimum_size"></property>
<event name="OnSetFocus"></event> <property name="name">m_OrientEdgesOpt</property>
<event name="OnSize"></event> <property name="permission">protected</property>
<event name="OnUpdateUI"></event> <property name="pos"></property>
</object> <property name="selection">0</property>
</object> <property name="size"></property>
<object class="sizeritem" expanded="1"> <property name="style">wxRA_SPECIFY_COLS</property>
<property name="border">5</property> <property name="subclass"></property>
<property name="flag">wxALL|wxEXPAND</property> <property name="tooltip"></property>
<property name="proportion">0</property> <property name="window_extra_style"></property>
<object class="wxRadioBox" expanded="1"> <property name="window_name"></property>
<property name="bg"></property> <property name="window_style"></property>
<property name="choices">&quot;16 segments / 360 deg&quot; &quot;32 segments / 360 deg&quot;</property> <event name="OnChar"></event>
<property name="context_help"></property> <event name="OnEnterWindow"></event>
<property name="enabled">1</property> <event name="OnEraseBackground"></event>
<property name="fg"></property> <event name="OnKeyDown"></event>
<property name="font"></property> <event name="OnKeyUp"></event>
<property name="hidden">0</property> <event name="OnKillFocus"></event>
<property name="id">wxID_ARC_APPROX</property> <event name="OnLeaveWindow"></event>
<property name="label">Arcs Approximation:</property> <event name="OnLeftDClick"></event>
<property name="majorDimension">1</property> <event name="OnLeftDown"></event>
<property name="maximum_size"></property> <event name="OnLeftUp"></event>
<property name="minimum_size"></property> <event name="OnMiddleDClick"></event>
<property name="name">m_ArcApproximationOpt</property> <event name="OnMiddleDown"></event>
<property name="permission">protected</property> <event name="OnMiddleUp"></event>
<property name="pos"></property> <event name="OnMotion"></event>
<property name="selection">1</property> <event name="OnMouseEvents"></event>
<property name="size"></property> <event name="OnMouseWheel"></event>
<property name="style">wxRA_SPECIFY_COLS</property> <event name="OnPaint"></event>
<property name="subclass"></property> <event name="OnRadioBox"></event>
<property name="tooltip">Number of segments to approximate a circle in filling calculations.&#x0A;16 segment is faster to calculate and when redraw screen.&#x0A;32 segment give a better quality</property> <event name="OnRightDClick"></event>
<property name="window_extra_style"></property> <event name="OnRightDown"></event>
<property name="window_name"></property> <event name="OnRightUp"></event>
<property name="window_style"></property> <event name="OnSetFocus"></event>
<event name="OnChar"></event> <event name="OnSize"></event>
<event name="OnEnterWindow"></event> <event name="OnUpdateUI"></event>
<event name="OnEraseBackground"></event> </object>
<event name="OnKeyDown"></event> </object>
<event name="OnKeyUp"></event> <object class="sizeritem" expanded="1">
<event name="OnKillFocus"></event> <property name="border">5</property>
<event name="OnLeaveWindow"></event> <property name="flag"></property>
<event name="OnLeftDClick"></event> <property name="proportion">0</property>
<event name="OnLeftDown"></event> <object class="spacer" expanded="1">
<event name="OnLeftUp"></event> <property name="height">5</property>
<event name="OnMiddleDClick"></event> <property name="permission">protected</property>
<event name="OnMiddleDown"></event> <property name="width">5</property>
<event name="OnMiddleUp"></event> </object>
<event name="OnMotion"></event> </object>
<event name="OnMouseEvents"></event> <object class="sizeritem" expanded="1">
<event name="OnMouseWheel"></event> <property name="border">5</property>
<event name="OnPaint"></event> <property name="flag">wxALL|wxEXPAND</property>
<event name="OnRadioBox"></event> <property name="proportion">0</property>
<event name="OnRightDClick"></event> <object class="wxRadioBox" expanded="1">
<event name="OnRightDown"></event> <property name="bg"></property>
<event name="OnRightUp"></event> <property name="choices">&quot;Line&quot; &quot;Hatched Outline&quot; &quot;Full Hatched&quot;</property>
<event name="OnSetFocus"></event> <property name="context_help"></property>
<event name="OnSize"></event> <property name="enabled">1</property>
<event name="OnUpdateUI"></event> <property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">ID_RADIOBOX_OUTLINES_OPTION</property>
<property name="label">Outlines Appearance</property>
<property name="majorDimension">1</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_OutlineAppearanceCtrl</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="selection">0</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="tooltip">Choose how a zone outline is displayed&#x0A;- Single line&#x0A;- Short hatching&#x0A;- Full zone area hatched</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="bg"></property>
<property name="choices">&quot;16 segments / 360 deg&quot; &quot;32 segments / 360 deg&quot;</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ARC_APPROX</property>
<property name="label">Arcs Approximation:</property>
<property name="majorDimension">1</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_ArcApproximationOpt</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="selection">1</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="tooltip">Number of segments to approximate a circle in filling calculations.&#x0A;16 segment is faster to calculate and when redraw screen.&#x0A;32 segment give a better quality</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_BUTTON_EXPORT</property>
<property name="label">Export to others zones</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_ExportSetupBuuton</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip">Export this zone setup to all others copper zones</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">ExportSetupToOtherCopperZones</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object> </object>
</object> </object>
</object> </object>
...@@ -665,7 +794,7 @@ ...@@ -665,7 +794,7 @@
<property name="fg"></property> <property name="fg"></property>
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_BUTTON_UNFILL</property>
<property name="label">UnFill Zone</property> <property name="label">UnFill Zone</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <wx/settings.h> #include <wx/settings.h>
#include <wx/stattext.h> #include <wx/stattext.h>
#include <wx/textctrl.h> #include <wx/textctrl.h>
#include <wx/checkbox.h>
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/statbox.h> #include <wx/statbox.h>
#include <wx/button.h> #include <wx/button.h>
...@@ -36,6 +37,7 @@ class dialog_copper_zone_frame : public wxDialog ...@@ -36,6 +37,7 @@ class dialog_copper_zone_frame : public wxDialog
// Private event handlers // Private event handlers
void _wxFB_OnInitDialog( wxInitDialogEvent& event ){ OnInitDialog( event ); } void _wxFB_OnInitDialog( wxInitDialogEvent& event ){ OnInitDialog( event ); }
void _wxFB_ExportSetupToOtherCopperZones( wxCommandEvent& event ){ ExportSetupToOtherCopperZones( event ); }
void _wxFB_OnButtonOkClick( wxCommandEvent& event ){ OnButtonOkClick( event ); } void _wxFB_OnButtonOkClick( wxCommandEvent& event ){ OnButtonOkClick( event ); }
void _wxFB_OnButtonCancelClick( wxCommandEvent& event ){ OnButtonCancelClick( event ); } void _wxFB_OnButtonCancelClick( wxCommandEvent& event ){ OnButtonCancelClick( event ); }
void _wxFB_OnRemoveFillZoneButtonClick( wxCommandEvent& event ){ OnRemoveFillZoneButtonClick( event ); } void _wxFB_OnRemoveFillZoneButtonClick( wxCommandEvent& event ){ OnRemoveFillZoneButtonClick( event ); }
...@@ -48,6 +50,8 @@ class dialog_copper_zone_frame : public wxDialog ...@@ -48,6 +50,8 @@ class dialog_copper_zone_frame : public wxDialog
ID_RADIOBOX_GRID_SELECTION = 1000, ID_RADIOBOX_GRID_SELECTION = 1000,
ID_RADIOBOX_OUTLINES_OPTION, ID_RADIOBOX_OUTLINES_OPTION,
wxID_ARC_APPROX, wxID_ARC_APPROX,
wxID_BUTTON_EXPORT,
wxID_BUTTON_UNFILL,
ID_NET_SORTING_OPTION, ID_NET_SORTING_OPTION,
ID_TEXTCTRL_NETNAMES_FILTER, ID_TEXTCTRL_NETNAMES_FILTER,
ID_NETNAME_SELECTION, ID_NETNAME_SELECTION,
...@@ -58,11 +62,13 @@ class dialog_copper_zone_frame : public wxDialog ...@@ -58,11 +62,13 @@ class dialog_copper_zone_frame : public wxDialog
wxStaticText* m_ClearanceValueTitle; wxStaticText* m_ClearanceValueTitle;
wxTextCtrl* m_ZoneClearanceCtrl; wxTextCtrl* m_ZoneClearanceCtrl;
wxRadioBox* m_FillOpt; wxRadioBox* m_FillOpt;
wxCheckBox* m_ShowFilledAreasInSketchOpt;
wxRadioBox* m_OrientEdgesOpt; wxRadioBox* m_OrientEdgesOpt;
wxRadioBox* m_OutlineAppearanceCtrl; wxRadioBox* m_OutlineAppearanceCtrl;
wxRadioBox* m_ArcApproximationOpt; wxRadioBox* m_ArcApproximationOpt;
wxButton* m_ExportSetupBuuton;
wxButton* m_OkButton; wxButton* m_OkButton;
wxButton* m_ButtonCancel; wxButton* m_ButtonCancel;
...@@ -78,6 +84,7 @@ class dialog_copper_zone_frame : public wxDialog ...@@ -78,6 +84,7 @@ class dialog_copper_zone_frame : public wxDialog
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void OnInitDialog( wxInitDialogEvent& event ){ event.Skip(); } virtual void OnInitDialog( wxInitDialogEvent& event ){ event.Skip(); }
virtual void ExportSetupToOtherCopperZones( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonOkClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnButtonOkClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonCancelClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnButtonCancelClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnRemoveFillZoneButtonClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnRemoveFillZoneButtonClick( wxCommandEvent& event ){ event.Skip(); }
......
...@@ -36,6 +36,7 @@ eda_global int g_CurrentZone_Layer; // Layer used to create the ...@@ -36,6 +36,7 @@ eda_global int g_CurrentZone_Layer; // Layer used to create the
eda_global int g_Zone_Hatching; // Option to show the zone area (outlines only, short hatches or full hatches eda_global int g_Zone_Hatching; // Option to show the zone area (outlines only, short hatches or full hatches
eda_global int g_Zone_Arc_Approximation; // Option to select number of segments to approximate a circle eda_global int g_Zone_Arc_Approximation; // Option to select number of segments to approximate a circle
// 16 or 32 segments // 16 or 32 segments
eda_global int g_FilledAreasShowMode; // Used to select draw options for filled areas in a zone (currently normal =0, sketch = 1)
eda_global ZONE_CONTAINER::m_PadInZone g_Zone_Pad_Options eda_global ZONE_CONTAINER::m_PadInZone g_Zone_Pad_Options
#ifdef MAIN #ifdef MAIN
......
...@@ -794,6 +794,7 @@ void WinEDA_PcbFrame::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* zone_container ...@@ -794,6 +794,7 @@ void WinEDA_PcbFrame::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* zone_container
zone_container->m_ZoneClearance = g_DesignSettings.m_ZoneClearence; zone_container->m_ZoneClearance = g_DesignSettings.m_ZoneClearence;
zone_container->m_GridFillValue = g_GridRoutingSize; zone_container->m_GridFillValue = g_GridRoutingSize;
zone_container->m_ArcToSegmentsCount = g_Zone_Arc_Approximation; zone_container->m_ArcToSegmentsCount = g_Zone_Arc_Approximation;
zone_container->m_DrawOptions = g_FilledAreasShowMode;
// Combine zones if possible : // Combine zones if possible :
......
...@@ -317,11 +317,11 @@ bool TestPointInsidePolygon( std::vector <CPolyPt> aPolysList, ...@@ -317,11 +317,11 @@ bool TestPointInsidePolygon( std::vector <CPolyPt> aPolysList,
double intersectx1, intersecty1, intersectx2, intersecty2; double intersectx1, intersecty1, intersectx2, intersecty2;
int ok; int ok;
ok = FindLineSegmentIntersection( a, slope, ok = FindLineSegmentIntersection( a, slope,
aPolysList[ics].x, aPolysList[ics].y, aPolysList[ics].x, aPolysList[ics].y,
aPolysList[ice].x, aPolysList[ice].y, aPolysList[ice].x, aPolysList[ice].y,
CPolyLine::STRAIGHT, CPolyLine::STRAIGHT,
&intersectx1, &intersecty1, &intersectx1, &intersecty1,
&intersectx2, &intersecty2 ); &intersectx2, &intersecty2 );
/* FindLineSegmentIntersection() returns 0, 1 or 2 coordinates (ok = 0, 1, 2) /* FindLineSegmentIntersection() returns 0, 1 or 2 coordinates (ok = 0, 1, 2)
* for straight line segments, only 0 or 1 are possible * for straight line segments, only 0 or 1 are possible
...@@ -331,6 +331,13 @@ bool TestPointInsidePolygon( std::vector <CPolyPt> aPolysList, ...@@ -331,6 +331,13 @@ bool TestPointInsidePolygon( std::vector <CPolyPt> aPolysList,
{ {
xx = (int) intersectx1; xx = (int) intersectx1;
yy = (int) intersecty1; yy = (int) intersecty1;
/* if the intersection point is on the start point of the current segment,
* do not count it,
* because it was already counted, as ending point of the previous segment
*/
if( xx == aPolysList[ics].x && yy == aPolysList[ics].y )
continue;
#if OUTSIDE_IF_ON_SIDE #if OUTSIDE_IF_ON_SIDE
if( xx == refx && yy == refy ) if( xx == refx && yy == refy )
return false; // (x,y) is on a side, call it outside return false; // (x,y) is on a side, call it outside
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment