Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
a731a6b7
Commit
a731a6b7
authored
Mar 08, 2012
by
Marco Mattila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more pad local copper zone settings in pcbnew. Tune the pad properties dialog a little.
parent
e90cc8ad
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
9072 additions
and
8337 deletions
+9072
-8337
class_module.cpp
pcbnew/class_module.cpp
+6
-0
class_module.h
pcbnew/class_module.h
+7
-0
class_pad.cpp
pcbnew/class_pad.cpp
+26
-0
class_pad.h
pcbnew/class_pad.h
+7
-0
class_zone.cpp
pcbnew/class_zone.cpp
+18
-1
class_zone.h
pcbnew/class_zone.h
+2
-2
dialog_pad_properties.cpp
pcbnew/dialogs/dialog_pad_properties.cpp
+51
-20
dialog_pad_properties_base.cpp
pcbnew/dialogs/dialog_pad_properties_base.cpp
+354
-292
dialog_pad_properties_base.fbp
pcbnew/dialogs/dialog_pad_properties_base.fbp
+8479
-7956
dialog_pad_properties_base.h
pcbnew/dialogs/dialog_pad_properties_base.h
+61
-61
item_io.cpp
pcbnew/item_io.cpp
+20
-1
kicad_plugin.cpp
pcbnew/kicad_plugin.cpp
+36
-0
zones_convert_brd_items_to_polygons_with_Boost.cpp
pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp
+4
-3
zones_convert_to_polygons_aux_functions.cpp
pcbnew/zones_convert_to_polygons_aux_functions.cpp
+1
-1
No files found.
pcbnew/class_module.cpp
View file @
a731a6b7
...
...
@@ -69,6 +69,8 @@ MODULE::MODULE( BOARD* parent ) :
m_LocalSolderPasteMargin
=
0
;
m_LocalSolderPasteMarginRatio
=
0.0
;
m_ZoneConnection
=
UNDEFINED_CONNECTION
;
// Use zone setting by default
m_ThermalWidth
=
0
;
// Use zone setting by default
m_ThermalGap
=
0
;
// Use zone setting by default
m_Reference
=
new
TEXTE_MODULE
(
this
,
TEXT_is_REFERENCE
);
...
...
@@ -103,6 +105,8 @@ MODULE::MODULE( const MODULE& aModule ) :
m_LocalSolderPasteMargin
=
aModule
.
m_LocalSolderPasteMargin
;
m_LocalSolderPasteMarginRatio
=
aModule
.
m_LocalSolderPasteMarginRatio
;
m_ZoneConnection
=
aModule
.
m_ZoneConnection
;
m_ThermalWidth
=
aModule
.
m_ThermalWidth
;
m_ThermalGap
=
aModule
.
m_ThermalGap
;
// Copy reference and value.
m_Reference
=
new
TEXTE_MODULE
(
*
aModule
.
m_Reference
);
...
...
@@ -219,6 +223,8 @@ void MODULE::Copy( MODULE* aModule )
m_LocalSolderPasteMargin
=
aModule
->
m_LocalSolderPasteMargin
;
m_LocalSolderPasteMarginRatio
=
aModule
->
m_LocalSolderPasteMarginRatio
;
m_ZoneConnection
=
aModule
->
m_ZoneConnection
;
m_ThermalWidth
=
aModule
->
m_ThermalWidth
;
m_ThermalGap
=
aModule
->
m_ThermalGap
;
// Copy reference and value.
m_Reference
->
Copy
(
aModule
->
m_Reference
);
...
...
pcbnew/class_module.h
View file @
a731a6b7
...
...
@@ -122,6 +122,7 @@ public:
// The final margin is the sum of these 2 values
ZoneConnection
m_ZoneConnection
;
int
m_ThermalWidth
,
m_ThermalGap
;
public
:
MODULE
(
BOARD
*
parent
);
...
...
@@ -198,6 +199,12 @@ public:
void
SetZoneConnection
(
ZoneConnection
aType
)
{
m_ZoneConnection
=
aType
;
}
ZoneConnection
GetZoneConnection
()
const
{
return
m_ZoneConnection
;
}
void
SetThermalWidth
(
int
aWidth
)
{
m_ThermalWidth
=
aWidth
;
}
int
GetThermalWidth
()
const
{
return
m_ThermalWidth
;
}
void
SetThermalGap
(
int
aGap
)
{
m_ThermalGap
=
aGap
;
}
int
GetThermalGap
()
const
{
return
m_ThermalGap
;
}
int
GetAttributes
()
const
{
return
m_Attributs
;
}
void
SetAttributes
(
int
aAttributes
)
{
m_Attributs
=
aAttributes
;
}
...
...
pcbnew/class_pad.cpp
View file @
a731a6b7
...
...
@@ -71,6 +71,8 @@ D_PAD::D_PAD( MODULE* parent ) :
m_LocalSolderPasteMargin
=
0
;
m_LocalSolderPasteMarginRatio
=
0.0
;
m_ZoneConnection
=
UNDEFINED_CONNECTION
;
// Use parent setting by default
m_ThermalWidth
=
0
;
// Use parent setting by default
m_ThermalGap
=
0
;
// Use parent setting by default
// set layers mask to default for a standard pad
m_layerMask
=
PAD_STANDARD_DEFAULT_LAYERS
;
...
...
@@ -305,6 +307,8 @@ void D_PAD::Copy( D_PAD* source )
m_LocalSolderPasteMargin
=
source
->
m_LocalSolderPasteMargin
;
m_LocalSolderPasteMarginRatio
=
source
->
m_LocalSolderPasteMarginRatio
;
m_ZoneConnection
=
source
->
m_ZoneConnection
;
m_ThermalWidth
=
source
->
m_ThermalWidth
;
m_ThermalGap
=
source
->
m_ThermalGap
;
SetSubRatsnest
(
0
);
SetSubNet
(
0
);
...
...
@@ -453,6 +457,28 @@ ZoneConnection D_PAD::GetZoneConnection() const
}
int
D_PAD
::
GetThermalWidth
()
const
{
MODULE
*
module
=
(
MODULE
*
)
GetParent
();
if
(
m_ThermalWidth
==
0
&&
module
)
return
module
->
GetThermalWidth
();
else
return
m_ThermalWidth
;
}
int
D_PAD
::
GetThermalGap
()
const
{
MODULE
*
module
=
(
MODULE
*
)
GetParent
();
if
(
m_ThermalGap
==
0
&&
module
)
return
module
->
GetThermalGap
();
else
return
m_ThermalGap
;
}
void
D_PAD
::
DisplayInfo
(
EDA_DRAW_FRAME
*
frame
)
{
MODULE
*
module
;
...
...
pcbnew/class_pad.h
View file @
a731a6b7
...
...
@@ -269,6 +269,12 @@ public:
void
SetZoneConnection
(
ZoneConnection
aType
)
{
m_ZoneConnection
=
aType
;
}
ZoneConnection
GetZoneConnection
()
const
;
void
SetThermalWidth
(
int
aWidth
)
{
m_ThermalWidth
=
aWidth
;
}
int
GetThermalWidth
()
const
;
void
SetThermalGap
(
int
aGap
)
{
m_ThermalGap
=
aGap
;
}
int
GetThermalGap
()
const
;
/* Reading and writing data on files */
int
ReadDescr
(
LINE_READER
*
aReader
);
...
...
@@ -534,6 +540,7 @@ private:
double
m_LocalSolderPasteMarginRatio
;
///< Local solder mask margin ratio value of pad size
///< The final margin is the sum of these 2 values
ZoneConnection
m_ZoneConnection
;
int
m_ThermalWidth
,
m_ThermalGap
;
};
#endif // PAD_H_
pcbnew/class_zone.cpp
View file @
a731a6b7
...
...
@@ -450,6 +450,24 @@ void ZONE_CONTAINER::DrawWhileCreateOutline( EDA_DRAW_PANEL* panel, wxDC* DC, in
}
int
ZONE_CONTAINER
::
GetThermalReliefGap
(
D_PAD
*
aPad
)
const
{
if
(
aPad
==
NULL
||
aPad
->
GetThermalGap
()
==
0
)
return
m_ThermalReliefGap
;
else
return
aPad
->
GetThermalGap
();
}
int
ZONE_CONTAINER
::
GetThermalReliefCopperBridge
(
D_PAD
*
aPad
)
const
{
if
(
aPad
==
NULL
||
aPad
->
GetThermalWidth
()
==
0
)
return
m_ThermalReliefCopperBridge
;
else
return
aPad
->
GetThermalWidth
();
}
bool
ZONE_CONTAINER
::
HitTest
(
const
wxPoint
&
refPos
)
{
if
(
HitTestForCorner
(
refPos
)
)
...
...
@@ -888,7 +906,6 @@ ZoneConnection ZONE_CONTAINER::GetPadConnection( D_PAD* aPad ) const
return
m_PadConnection
;
else
return
aPad
->
GetZoneConnection
();
}
...
...
pcbnew/class_zone.h
View file @
a731a6b7
...
...
@@ -274,13 +274,13 @@ public:
int
GetFillMode
()
const
{
return
m_FillMode
;
}
void
SetThermalReliefGap
(
int
aThermalReliefGap
)
{
m_ThermalReliefGap
=
aThermalReliefGap
;
}
int
GetThermalReliefGap
(
)
const
{
return
m_ThermalReliefGap
;
}
int
GetThermalReliefGap
(
D_PAD
*
aPad
=
NULL
)
const
;
void
SetThermalReliefCopperBridge
(
int
aThermalReliefCopperBridge
)
{
m_ThermalReliefCopperBridge
=
aThermalReliefCopperBridge
;
}
int
GetThermalReliefCopperBridge
(
)
const
{
return
m_ThermalReliefCopperBridge
;
}
int
GetThermalReliefCopperBridge
(
D_PAD
*
aPad
=
NULL
)
const
;
void
SetArcSegCount
(
int
aArcSegCount
)
{
m_ArcToSegmentsCount
=
aArcSegCount
;
}
int
GetArcSegCount
()
const
{
return
m_ArcToSegmentsCount
;
}
...
...
pcbnew/dialogs/dialog_pad_properties.cpp
View file @
a731a6b7
...
...
@@ -80,6 +80,9 @@ private:
bool
m_canUpdate
;
static
wxPoint
prevPosition
;
static
wxSize
prevSize
;
void
initValues
();
void
OnPadShapeSelection
(
wxCommandEvent
&
event
);
void
OnDrillShapeSelected
(
wxCommandEvent
&
event
);
...
...
@@ -95,6 +98,10 @@ private:
};
wxPoint
DIALOG_PAD_PROPERTIES
::
prevPosition
(
-
1
,
-
1
);
wxSize
DIALOG_PAD_PROPERTIES
::
prevSize
;
DIALOG_PAD_PROPERTIES
::
DIALOG_PAD_PROPERTIES
(
PCB_BASE_FRAME
*
aParent
,
D_PAD
*
aPad
)
:
DIALOG_PAD_PROPERTIES_BASE
(
aParent
),
m_Pad_Master
(
aParent
->
GetBoard
()
->
GetDesignSettings
().
m_Pad_Master
)
...
...
@@ -114,7 +121,14 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP
m_sdbSizer1OK
->
SetDefault
();
GetSizer
()
->
SetSizeHints
(
this
);
Center
();
if
(
prevPosition
.
x
!=
-
1
)
SetSize
(
prevPosition
.
x
,
prevPosition
.
y
,
prevSize
.
x
,
prevSize
.
y
);
else
Center
();
m_PadNumCtrl
->
SetFocus
();
m_canUpdate
=
true
;
}
...
...
@@ -241,12 +255,13 @@ void DIALOG_PAD_PROPERTIES::initValues()
m_PadShapeOffsetY_Unit
->
SetLabel
(
GetUnitsLabel
(
g_UserUnit
)
);
m_PadShapeDelta_Unit
->
SetLabel
(
GetUnitsLabel
(
g_UserUnit
)
);
m_PadLengthDie_Unit
->
SetLabel
(
GetUnitsLabel
(
g_UserUnit
)
);
m_NetClearanceUnits
->
SetLabel
(
GetUnitsLabel
(
g_UserUnit
)
);
// Display current pad masks clearances units
m_NetClearanceUnits
->
SetLabel
(
GetUnitsLabel
(
g_UserUnit
)
);
m_SolderMaskMarginUnits
->
SetLabel
(
GetUnitsLabel
(
g_UserUnit
)
);
m_SolderPasteMarginUnits
->
SetLabel
(
GetUnitsLabel
(
g_UserUnit
)
);
m_ThermalWidthUnits
->
SetLabel
(
GetUnitsLabel
(
g_UserUnit
)
);
m_ThermalGapUnits
->
SetLabel
(
GetUnitsLabel
(
g_UserUnit
)
);
// Display current pad parameters units:
PutValueInLocalUnits
(
*
m_PadPosition_X_Ctrl
,
m_dummyPad
->
GetPosition
().
x
,
internalUnits
);
...
...
@@ -264,12 +279,12 @@ void DIALOG_PAD_PROPERTIES::initValues()
if
(
m_dummyPad
->
GetDelta
().
x
)
{
PutValueInLocalUnits
(
*
m_ShapeDelta_Ctrl
,
m_dummyPad
->
GetDelta
().
x
,
internalUnits
);
m_
radioBtnDeltaXdir
->
SetValue
(
true
);
m_
trapDeltaDirChoice
->
SetSelection
(
0
);
}
else
{
PutValueInLocalUnits
(
*
m_ShapeDelta_Ctrl
,
m_dummyPad
->
GetDelta
().
y
,
internalUnits
);
m_
radioBtnDeltaYdir
->
SetValue
(
true
);
m_
trapDeltaDirChoice
->
SetSelection
(
1
);
}
PutValueInLocalUnits
(
*
m_LengthDieCtrl
,
m_dummyPad
->
GetDieLength
(),
internalUnits
);
...
...
@@ -278,6 +293,8 @@ void DIALOG_PAD_PROPERTIES::initValues()
PutValueInLocalUnits
(
*
m_SolderMaskMarginCtrl
,
m_dummyPad
->
GetLocalSolderMaskMargin
(),
internalUnits
);
PutValueInLocalUnits
(
*
m_ThermalWidthCtrl
,
m_dummyPad
->
GetThermalWidth
(),
internalUnits
);
PutValueInLocalUnits
(
*
m_ThermalGapCtrl
,
m_dummyPad
->
GetThermalGap
(),
internalUnits
);
// These 2 parameters are usually < 0, so prepare entering a negative value, if current is 0
PutValueInLocalUnits
(
*
m_SolderPasteMarginCtrl
,
...
...
@@ -345,7 +362,7 @@ void DIALOG_PAD_PROPERTIES::initValues()
m_PadOrient
->
SetSelection
(
1
);
break
;
case
-
900
:
case
-
900
:
m_PadOrient
->
SetSelection
(
2
);
break
;
...
...
@@ -437,30 +454,34 @@ void DIALOG_PAD_PROPERTIES::OnPadShapeSelection( wxCommandEvent& event )
{
case
0
:
//CIRCLE:
m_ShapeDelta_Ctrl
->
Enable
(
false
);
m_radioBtnDeltaXdir
->
Enable
(
false
);
m_radioBtnDeltaYdir
->
Enable
(
false
);
m_trapDeltaDirChoice
->
Enable
(
false
);
m_ShapeSize_Y_Ctrl
->
Enable
(
false
);
m_ShapeOffset_X_Ctrl
->
Enable
(
false
);
m_ShapeOffset_Y_Ctrl
->
Enable
(
false
);
break
;
case
1
:
//OVALE:
m_ShapeDelta_Ctrl
->
Enable
(
false
);
m_radioBtnDeltaXdir
->
Enable
(
false
);
m_radioBtnDeltaYdir
->
Enable
(
false
);
m_trapDeltaDirChoice
->
Enable
(
false
);
m_ShapeSize_Y_Ctrl
->
Enable
(
true
);
m_ShapeOffset_X_Ctrl
->
Enable
(
true
);
m_ShapeOffset_Y_Ctrl
->
Enable
(
true
);
break
;
case
2
:
// PAD_RECT:
m_ShapeDelta_Ctrl
->
Enable
(
false
);
m_radioBtnDeltaXdir
->
Enable
(
false
);
m_radioBtnDeltaYdir
->
Enable
(
false
);
m_trapDeltaDirChoice
->
Enable
(
false
);
m_ShapeSize_Y_Ctrl
->
Enable
(
true
);
m_ShapeOffset_X_Ctrl
->
Enable
(
true
);
m_ShapeOffset_Y_Ctrl
->
Enable
(
true
);
break
;
case
3
:
//TRAPEZE:
m_ShapeDelta_Ctrl
->
Enable
(
true
);
m_radioBtnDeltaXdir
->
Enable
(
true
);
m_radioBtnDeltaYdir
->
Enable
(
true
);
m_trapDeltaDirChoice
->
Enable
(
true
);
m_ShapeSize_Y_Ctrl
->
Enable
(
true
);
m_ShapeOffset_X_Ctrl
->
Enable
(
true
);
m_ShapeOffset_Y_Ctrl
->
Enable
(
true
);
break
;
}
...
...
@@ -532,9 +553,6 @@ void DIALOG_PAD_PROPERTIES::PadOrientEvent( wxCommandEvent& event )
void
DIALOG_PAD_PROPERTIES
::
PadTypeSelected
(
wxCommandEvent
&
event
)
/* Adjust the better mask layer according to the selected pad type
*/
{
long
layer_mask
;
int
ii
;
...
...
@@ -549,6 +567,10 @@ void DIALOG_PAD_PROPERTIES::PadTypeSelected( wxCommandEvent& event )
// Enable/disable drill dialog items:
event
.
SetId
(
m_DrillShapeCtrl
->
GetSelection
()
);
OnDrillShapeSelected
(
event
);
if
(
ii
==
0
||
ii
==
NBTYPES
-
1
)
m_DrillShapeCtrl
->
Enable
(
true
);
else
m_DrillShapeCtrl
->
Enable
(
false
);
// Enable/disable Pad name,and pad length die
// (disable for NPTH pads (mechanical pads)
...
...
@@ -610,6 +632,9 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
bool
rastnestIsChanged
=
false
;
int
isign
=
m_isFlipped
?
-
1
:
1
;
prevPosition
=
GetPosition
();
prevSize
=
GetSize
();
bool
success
=
TransfertDataToPad
(
m_dummyPad
,
true
);
if
(
!
success
)
// An error on parameters has occured
return
;
...
...
@@ -649,7 +674,7 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
m_CurrentPad
->
SetOrientation
(
m_Pad_Master
.
GetOrientation
()
*
isign
+
module
->
GetOrientation
()
);
m_CurrentPad
->
SetSize
(
m_Pad_Master
.
GetSize
()
);
m_CurrentPad
->
SetSize
(
m_Pad_Master
.
GetSize
()
);
size
=
m_Pad_Master
.
GetDelta
();
size
.
y
*=
isign
;
...
...
@@ -702,6 +727,8 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
m_CurrentPad
->
SetLocalSolderPasteMargin
(
m_Pad_Master
.
GetLocalSolderPasteMargin
()
);
m_CurrentPad
->
SetLocalSolderPasteMarginRatio
(
m_Pad_Master
.
GetLocalSolderPasteMarginRatio
()
);
m_CurrentPad
->
SetZoneConnection
(
m_Pad_Master
.
GetZoneConnection
()
);
m_CurrentPad
->
SetThermalWidth
(
m_Pad_Master
.
GetThermalWidth
()
);
m_CurrentPad
->
SetThermalGap
(
m_Pad_Master
.
GetThermalGap
()
);
module
->
CalculateBoundingBox
();
m_CurrentPad
->
DisplayInfo
(
m_Parent
);
...
...
@@ -737,6 +764,10 @@ bool DIALOG_PAD_PROPERTIES::TransfertDataToPad( D_PAD* aPad, bool aPromptOnError
internalUnits
)
);
aPad
->
SetLocalSolderPasteMargin
(
ReturnValueFromTextCtrl
(
*
m_SolderPasteMarginCtrl
,
internalUnits
)
);
aPad
->
SetThermalWidth
(
ReturnValueFromTextCtrl
(
*
m_ThermalWidthCtrl
,
internalUnits
)
);
aPad
->
SetThermalGap
(
ReturnValueFromTextCtrl
(
*
m_ThermalGapCtrl
,
internalUnits
)
);
double
dtmp
=
0.0
;
msg
=
m_SolderPasteMarginRatioCtrl
->
GetValue
();
msg
.
ToDouble
(
&
dtmp
);
...
...
@@ -805,7 +836,7 @@ bool DIALOG_PAD_PROPERTIES::TransfertDataToPad( D_PAD* aPad, bool aPromptOnError
// m_DeltaSize.x or m_DeltaSize.y must be NULL. for a trapezoid.
wxSize
delta
;
if
(
m_
radioBtnDeltaXdir
->
GetValue
()
)
if
(
m_
trapDeltaDirChoice
->
GetSelection
()
==
0
)
delta
.
x
=
ReturnValueFromTextCtrl
(
*
m_ShapeDelta_Ctrl
,
internalUnits
);
else
delta
.
y
=
ReturnValueFromTextCtrl
(
*
m_ShapeDelta_Ctrl
,
internalUnits
);
...
...
@@ -1005,9 +1036,9 @@ void DIALOG_PAD_PROPERTIES::OnValuesChanged( wxCommandEvent& event )
}
/*********************************************************************/
void
DIALOG_PAD_PROPERTIES
::
OnCancelButtonClick
(
wxCommandEvent
&
event
)
/*********************************************************************/
{
prevPosition
=
GetPosition
();
prevSize
=
GetSize
();
EndModal
(
wxID_CANCEL
);
}
pcbnew/dialogs/dialog_pad_properties_base.cpp
View file @
a731a6b7
This diff is collapsed.
Click to expand it.
pcbnew/dialogs/dialog_pad_properties_base.fbp
View file @
a731a6b7
This diff is collapsed.
Click to expand it.
pcbnew/dialogs/dialog_pad_properties_base.h
View file @
a731a6b7
...
...
@@ -18,14 +18,15 @@
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/textctrl.h>
#include <wx/statline.h>
#include <wx/radiobut.h>
#include <wx/choice.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/radiobox.h>
#include <wx/panel.h>
#include <wx/choice.h>
#include <wx/checkbox.h>
#include <wx/panel.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/notebook.h>
#include <wx/button.h>
#include <wx/dialog.h>
...
...
@@ -44,82 +45,84 @@ class DIALOG_PAD_PROPERTIES_BASE : public wxDialog
wxID_DIALOG_EDIT_PAD
=
1000
,
wxID_PADNUMCTRL
,
wxID_PADNETNAMECTRL
,
wxID_DDIRX
,
wxID_DDIRY
,
ID_LISTBOX_SHAPE_PAD
,
ID_RADIOBOX_DRILL_SHAPE
,
ID_LISTBOX_ORIENT_PAD
,
ID_LISTBOX_TYPE_PAD
,
};
wxNotebook
*
m_notebook1
;
wxPanel
*
m_panel2
;
wxStaticText
*
m_PadNumText
;
wxTextCtrl
*
m_PadNumCtrl
;
wxStaticText
*
m_PadNameText
;
wxTextCtrl
*
m_PadNetNameCtrl
;
wxStaticText
*
m_staticText44
;
wxChoice
*
m_PadType
;
wxStaticText
*
m_staticText45
;
wxChoice
*
m_PadShape
;
wxStaticText
*
m_staticText46
;
wxStaticText
*
m_staticText4
;
wxTextCtrl
*
m_PadPosition_X_Ctrl
;
wxStaticText
*
m_PadPosX_Unit
;
wxStaticText
*
m_staticText41
;
wxTextCtrl
*
m_PadPosition_Y_Ctrl
;
wxStaticText
*
m_PadPosY_Unit
;
wxStaticLine
*
m_staticline7
;
wxStaticLine
*
m_staticline8
;
wxStaticLine
*
m_staticline9
;
wxStaticText
*
m_textPadDrillX
;
wxTextCtrl
*
m_PadDrill_X_Ctrl
;
wxStaticText
*
m_PadDrill_X_Unit
;
wxStaticText
*
m_textPadDrillY
;
wxTextCtrl
*
m_PadDrill_Y_Ctrl
;
wxStaticText
*
m_PadDrill_Y_Unit
;
wxStaticLine
*
m_staticline4
;
wxStaticLine
*
m_staticline5
;
wxStaticLine
*
m_staticline6
;
wxStaticText
*
m_staticText12
;
wxTextCtrl
*
m_ShapeSize_X_Ctrl
;
wxStaticText
*
m_PadShapeSizeX_Unit
;
wxStaticText
*
m_staticText15
;
wxTextCtrl
*
m_ShapeSize_Y_Ctrl
;
wxStaticText
*
m_PadShapeSizeY_Unit
;
wxStaticText
*
m_staticText48
;
wxChoice
*
m_PadOrient
;
wxStaticText
*
m_staticText491
;
wxStaticText
*
m_PadOrientText
;
wxTextCtrl
*
m_PadOrientCtrl
;
wxStaticText
*
m_customOrientUnits
;
wxStaticText
*
m_staticText17
;
wxTextCtrl
*
m_ShapeOffset_X_Ctrl
;
wxStaticText
*
m_PadShapeOffsetX_Unit
;
wxStaticText
*
m_staticText19
;
wxTextCtrl
*
m_ShapeOffset_Y_Ctrl
;
wxStaticText
*
m_PadShapeOffsetY_Unit
;
wxStaticText
*
m_staticText38
;
wxTextCtrl
*
m_LengthDieCtrl
;
wxStaticText
*
m_PadLengthDie_Unit
;
wxStaticText
*
m_staticText21
;
wxTextCtrl
*
m_ShapeDelta_Ctrl
;
wxStaticText
*
m_PadShapeDelta_Unit
;
wxStaticText
*
m_staticText23
;
wxRadioButton
*
m_radioBtnDeltaXdir
;
wxRadioButton
*
m_radioBtnDeltaYdir
;
wxStaticText
*
m_staticTextDDirInfo
;
wxStaticLine
*
m_staticline10
;
wxStaticLine
*
m_staticline101
;
wxStaticLine
*
m_staticline1011
;
wxStaticText
*
m_staticText38
;
wxTextCtrl
*
m_LengthDieCtrl
;
wxStaticText
*
m_PadLengthDie_Unit
;
wxChoice
*
m_trapDeltaDirChoice
;
wxBoxSizer
*
m_DrillShapeBoxSizer
;
wxRadioBox
*
m_PadShape
;
wxRadioBox
*
m_DrillShapeCtrl
;
wxRadioBox
*
m_PadOrient
;
wxStaticText
*
m_PadOrientText
;
wxTextCtrl
*
m_PadOrientCtrl
;
wxPanel
*
m_panelShowPad
;
wxStaticText
*
m_staticTitleModuleRot
;
wxStaticText
*
m_staticModuleRotValue
;
wxStaticText
*
m_staticTitleModuleSide
;
wxStaticText
*
m_staticModuleSideValue
;
wxStaticText
*
m_staticTextWarningPadFlipped
;
wxStaticText
*
m_staticText40
;
wxChoice
*
m_ZoneConnectionChoice
;
wxStaticText
*
m_staticTextWarning
;
wxStaticText
*
m_staticText47
;
wxChoice
*
m_DrillShapeCtrl
;
wxStaticText
*
m_staticText51
;
wxStaticText
*
m_textPadDrillX
;
wxTextCtrl
*
m_PadDrill_X_Ctrl
;
wxStaticText
*
m_PadDrill_X_Unit
;
wxStaticText
*
m_textPadDrillY
;
wxTextCtrl
*
m_PadDrill_Y_Ctrl
;
wxStaticText
*
m_PadDrill_Y_Unit
;
wxStaticText
*
m_staticText511
;
wxChoice
*
m_rbCopperLayersSel
;
wxCheckBox
*
m_PadLayerAdhCmp
;
wxCheckBox
*
m_PadLayerAdhCu
;
wxCheckBox
*
m_PadLayerPateCmp
;
wxCheckBox
*
m_PadLayerPateCu
;
wxCheckBox
*
m_PadLayerSilkCmp
;
wxCheckBox
*
m_PadLayerSilkCu
;
wxCheckBox
*
m_PadLayerMaskCmp
;
wxCheckBox
*
m_PadLayerMaskCu
;
wxCheckBox
*
m_PadLayerDraft
;
wxCheckBox
*
m_PadLayerECO1
;
wxCheckBox
*
m_PadLayerECO2
;
wxPanel
*
m_panelShowPad
;
wxPanel
*
m_localSettingsPanel
;
wxStaticText
*
m_staticTextNetClearance
;
wxTextCtrl
*
m_NetClearanceValueCtrl
;
wxStaticText
*
m_NetClearanceUnits
;
wxStaticLine
*
m_staticline1
;
wxStaticLine
*
m_staticline2
;
wxStaticLine
*
m_staticline3
;
wxStaticText
*
m_MaskClearanceTitle
;
wxTextCtrl
*
m_SolderMaskMarginCtrl
;
wxStaticText
*
m_SolderMaskMarginUnits
;
...
...
@@ -129,38 +132,35 @@ class DIALOG_PAD_PROPERTIES_BASE : public wxDialog
wxStaticText
*
m_staticTextRatio
;
wxTextCtrl
*
m_SolderPasteMarginRatioCtrl
;
wxStaticText
*
m_SolderPasteRatioMarginUnits
;
wxRadioBox
*
m_PadType
;
wxRadioBox
*
m_rbCopperLayersSel
;
wxCheckBox
*
m_PadLayerAdhCmp
;
wxCheckBox
*
m_PadLayerAdhCu
;
wxCheckBox
*
m_PadLayerPateCmp
;
wxCheckBox
*
m_PadLayerPateCu
;
wxCheckBox
*
m_PadLayerSilkCmp
;
wxCheckBox
*
m_PadLayerSilkCu
;
wxCheckBox
*
m_PadLayerMaskCmp
;
wxCheckBox
*
m_PadLayerMaskCu
;
wxCheckBox
*
m_PadLayerDraft
;
wxCheckBox
*
m_PadLayerECO1
;
wxCheckBox
*
m_PadLayerECO2
;
wxStaticText
*
m_staticText40
;
wxChoice
*
m_ZoneConnectionChoice
;
wxStaticText
*
m_staticText43
;
wxStaticText
*
m_staticText49
;
wxTextCtrl
*
m_ThermalWidthCtrl
;
wxStaticText
*
m_ThermalWidthUnits
;
wxStaticText
*
m_staticText52
;
wxTextCtrl
*
m_ThermalGapCtrl
;
wxStaticText
*
m_ThermalGapUnits
;
wxStaticText
*
m_staticTextWarning
;
wxStdDialogButtonSizer
*
m_sdbSizer1
;
wxButton
*
m_sdbSizer1OK
;
wxButton
*
m_sdbSizer1Cancel
;
// Virtual event handlers, overide them in your derived class
virtual
void
OnValuesChanged
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
PadTypeSelected
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnPadShapeSelection
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnDrillShapeSelected
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
PadOrientEvent
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnPaintShowPanel
(
wxPaintEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
PadTypeSelected
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnSetLayers
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnDrillShapeSelected
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnPaintShowPanel
(
wxPaintEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnCancelButtonClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
PadPropertiesAccept
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
public
:
DIALOG_PAD_PROPERTIES_BASE
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_DIALOG_EDIT_PAD
,
const
wxString
&
title
=
_
(
"Pad Properties"
),
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wxSize
(
900
,
80
0
),
long
style
=
wxDEFAULT_DIALOG_STYLE
|
wxRESIZE_BORDER
|
wxSUNKEN_BORDER
);
DIALOG_PAD_PROPERTIES_BASE
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_DIALOG_EDIT_PAD
,
const
wxString
&
title
=
_
(
"Pad Properties"
),
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wxSize
(
1000
,
75
0
),
long
style
=
wxDEFAULT_DIALOG_STYLE
|
wxRESIZE_BORDER
|
wxSUNKEN_BORDER
);
~
DIALOG_PAD_PROPERTIES_BASE
();
};
...
...
pcbnew/item_io.cpp
View file @
a731a6b7
...
...
@@ -722,6 +722,12 @@ bool D_PAD::Save( FILE* aFile ) const
if
(
m_ZoneConnection
!=
UNDEFINED_CONNECTION
)
fprintf
(
aFile
,
".ZoneConnection %d
\n
"
,
m_ZoneConnection
);
if
(
m_ThermalWidth
!=
0
)
fprintf
(
aFile
,
".ThermalWidth %d
\n
"
,
m_ThermalWidth
);
if
(
m_ThermalGap
!=
0
)
fprintf
(
aFile
,
".ThermalGap %d
\n
"
,
m_ThermalGap
);
if
(
fprintf
(
aFile
,
"$EndPAD
\n
"
)
!=
sizeof
(
"$EndPAD
\n
"
)
-
1
)
return
false
;
...
...
@@ -785,6 +791,12 @@ bool MODULE::Save( FILE* aFile ) const
if
(
m_ZoneConnection
!=
UNDEFINED_CONNECTION
)
fprintf
(
aFile
,
".ZoneConnection %d
\n
"
,
m_ZoneConnection
);
if
(
m_ThermalWidth
!=
0
)
fprintf
(
aFile
,
".ThermalWidth %d
\n
"
,
m_ThermalWidth
);
if
(
m_ThermalGap
!=
0
)
fprintf
(
aFile
,
".ThermalGap %d
\n
"
,
m_ThermalGap
);
// attributes
if
(
m_Attributs
!=
MOD_DEFAULT
)
{
...
...
@@ -1034,6 +1046,10 @@ int D_PAD::ReadDescr( LINE_READER* aReader )
SetLocalClearance
(
atoi
(
Line
+
16
)
);
else
if
(
strnicmp
(
Line
,
".ZoneConnection "
,
16
)
==
0
)
m_ZoneConnection
=
(
ZoneConnection
)
atoi
(
Line
+
16
);
else
if
(
strnicmp
(
Line
,
".ThermalWidth "
,
14
)
==
0
)
m_ThermalWidth
=
atoi
(
Line
+
14
);
else
if
(
strnicmp
(
Line
,
".ThermalGap "
,
12
)
==
0
)
m_ThermalGap
=
atoi
(
Line
+
12
);
break
;
default
:
...
...
@@ -1281,7 +1297,10 @@ int MODULE::ReadDescr( LINE_READER* aReader )
SetLocalClearance
(
atoi
(
Line
+
16
)
);
else
if
(
strnicmp
(
Line
,
".ZoneConnection "
,
16
)
==
0
)
m_ZoneConnection
=
(
ZoneConnection
)
atoi
(
Line
+
16
);
else
if
(
strnicmp
(
Line
,
".ThermalWidth "
,
14
)
==
0
)
m_ThermalWidth
=
atoi
(
Line
+
14
);
else
if
(
strnicmp
(
Line
,
".ThermalGap "
,
12
)
==
0
)
m_ThermalGap
=
atoi
(
Line
+
12
);
break
;
default
:
...
...
pcbnew/kicad_plugin.cpp
View file @
a731a6b7
...
...
@@ -1024,6 +1024,18 @@ void KICAD_PLUGIN::loadMODULE()
module
->
SetZoneConnection
(
(
ZoneConnection
)
tmp
);
}
else
if
(
TESTLINE
(
".ThermalWidth"
)
)
{
BIU
tmp
=
biuParse
(
line
+
SZ
(
".ThermalWidth"
)
);
module
->
SetThermalWidth
(
tmp
);
}
else
if
(
TESTLINE
(
".ThermalGap"
)
)
{
BIU
tmp
=
biuParse
(
line
+
SZ
(
".ThermalGap"
)
);
module
->
SetThermalGap
(
tmp
);
}
else
if
(
TESTLINE
(
"$EndMODULE"
)
)
{
module
->
CalculateBoundingBox
();
...
...
@@ -1232,6 +1244,18 @@ void KICAD_PLUGIN::loadPAD( MODULE* aModule )
pad
->
SetZoneConnection
(
(
ZoneConnection
)
tmp
);
}
else
if
(
TESTLINE
(
".ThermalWidth"
)
)
{
BIU
tmp
=
biuParse
(
line
+
SZ
(
".ThermalWidth"
)
);
pad
->
SetThermalWidth
(
tmp
);
}
else
if
(
TESTLINE
(
".ThermalGap"
)
)
{
BIU
tmp
=
biuParse
(
line
+
SZ
(
".ThermalGap"
)
);
pad
->
SetThermalGap
(
tmp
);
}
else
if
(
TESTLINE
(
"$EndPAD"
)
)
{
wxPoint
padpos
=
pad
->
GetPosition
();
...
...
@@ -3192,6 +3216,12 @@ void KICAD_PLUGIN::savePAD( const D_PAD* me ) const
if
(
me
->
GetZoneConnection
()
!=
UNDEFINED_CONNECTION
)
fprintf
(
m_fp
,
".ZoneConnection %d
\n
"
,
me
->
GetZoneConnection
()
);
if
(
me
->
GetThermalWidth
()
!=
0
)
fprintf
(
m_fp
,
".ThermalWidth %d
\n
"
,
me
->
GetThermalWidth
()
);
if
(
me
->
GetThermalGap
()
!=
0
)
fprintf
(
m_fp
,
".ThermalGap %d
\n
"
,
me
->
GetThermalGap
()
);
fprintf
(
m_fp
,
"$EndPAD
\n
"
);
CHECK_WRITE_ERROR
();
...
...
@@ -3248,6 +3278,12 @@ void KICAD_PLUGIN::saveMODULE( const MODULE* me ) const
if
(
me
->
GetZoneConnection
()
!=
UNDEFINED_CONNECTION
)
fprintf
(
m_fp
,
".ZoneConnection %d
\n
"
,
me
->
GetZoneConnection
()
);
if
(
me
->
GetThermalWidth
()
!=
0
)
fprintf
(
m_fp
,
".ThermalWidth %d
\n
"
,
me
->
GetThermalWidth
()
);
if
(
me
->
GetThermalGap
()
!=
0
)
fprintf
(
m_fp
,
".ThermalGap %d
\n
"
,
me
->
GetThermalGap
()
);
// attributes
if
(
me
->
GetAttributes
()
!=
MOD_DEFAULT
)
{
...
...
pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp
View file @
a731a6b7
...
...
@@ -371,13 +371,14 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb )
if
(
pad
->
GetNet
()
!=
GetNet
()
)
continue
;
item_boundingbox
=
pad
->
GetBoundingBox
();
item_boundingbox
.
Inflate
(
m_ThermalReliefGap
,
m_ThermalReliefGap
);
int
thermalGap
=
GetThermalReliefGap
(
pad
);
item_boundingbox
.
Inflate
(
thermalGap
,
thermalGap
);
if
(
item_boundingbox
.
Intersects
(
zone_boundingbox
)
)
{
CreateThermalReliefPadPolygon
(
cornerBufferPolysToSubstract
,
*
pad
,
m_ThermalRelief
Gap
,
m_ThermalReliefCopperBridge
,
*
pad
,
thermal
Gap
,
GetThermalReliefCopperBridge
(
pad
)
,
m_ZoneMinThickness
,
s_CircleToSegmentsCount
,
s_Correction
,
s_thermalRot
);
...
...
pcbnew/zones_convert_to_polygons_aux_functions.cpp
View file @
a731a6b7
...
...
@@ -75,7 +75,7 @@ void BuildUnconnectedThermalStubsPolygonList( std::vector<CPolyPt>& aCornerBuffe
endpoint
.
x
=
(
pad
->
GetSize
().
x
/
2
)
+
aZone
->
m_ThermalReliefGap
;
endpoint
.
y
=
(
pad
->
GetSize
().
y
/
2
)
+
aZone
->
m_ThermalReliefGap
;
int
copperThickness
=
aZone
->
m_ThermalReliefCopperBridge
-
aZone
->
m_ZoneMinThickness
;
int
copperThickness
=
aZone
->
GetThermalReliefCopperBridge
(
pad
)
-
aZone
->
m_ZoneMinThickness
;
if
(
copperThickness
<
0
)
copperThickness
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment