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
a989a214
Commit
a989a214
authored
Sep 11, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added test of trapezoidal pads parameters before draw them
parent
658ca2a2
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
155 additions
and
66 deletions
+155
-66
class_pad_draw_functions.cpp
pcbnew/class_pad_draw_functions.cpp
+78
-54
dialog_pad_properties.cpp
pcbnew/dialog_pad_properties.cpp
+9
-2
dialog_pad_properties_base.cpp
pcbnew/dialog_pad_properties_base.cpp
+11
-5
dialog_pad_properties_base.fbp
pcbnew/dialog_pad_properties_base.fbp
+56
-5
dialog_pad_properties_base.h
pcbnew/dialog_pad_properties_base.h
+1
-0
No files found.
pcbnew/class_pad_draw_functions.cpp
View file @
a989a214
This diff is collapsed.
Click to expand it.
pcbnew/dialog_pad_properties.cpp
View file @
a989a214
...
...
@@ -119,8 +119,14 @@ void DIALOG_PAD_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event )
dc
.
SetDeviceOrigin
(
dc_size
.
x
/
2
,
dc_size
.
y
/
2
);
// Calculate a suitable scale to fit the available draw area
double
scale
=
(
double
)
dc_size
.
x
/
(
m_dummyPad
->
m_Size
.
x
+
m_dummyPad
->
m_LocalClearance
);
double
altscale
=
(
double
)
dc_size
.
y
/
(
m_dummyPad
->
m_Size
.
y
+
m_dummyPad
->
m_LocalClearance
);
int
dim
=
m_dummyPad
->
m_Size
.
x
+
ABS
(
m_dummyPad
->
m_DeltaSize
.
y
);
if
(
m_dummyPad
->
m_LocalClearance
>
0
)
dim
+=
m_dummyPad
->
m_LocalClearance
*
2
;
double
scale
=
(
double
)
dc_size
.
x
/
dim
;
dim
=
m_dummyPad
->
m_Size
.
y
+
ABS
(
m_dummyPad
->
m_DeltaSize
.
x
);
if
(
m_dummyPad
->
m_LocalClearance
>
0
)
dim
+=
m_dummyPad
->
m_LocalClearance
*
2
;
double
altscale
=
(
double
)
dc_size
.
y
/
dim
;
scale
=
MIN
(
scale
,
altscale
);
// Give a margin
...
...
@@ -212,6 +218,7 @@ void DIALOG_PAD_PROPERTIES::initValues()
/* flip pads layers*/
m_dummyPad
->
m_Masque_Layer
=
ChangeSideMaskLayer
(
m_dummyPad
->
m_Masque_Layer
);
}
m_staticTextWarningPadFlipped
->
Show
(
m_isFlipped
);
m_PadNumCtrl
->
SetValue
(
m_dummyPad
->
ReturnStringPadName
()
);
m_PadNetNameCtrl
->
SetValue
(
m_dummyPad
->
GetNetname
()
);
...
...
pcbnew/dialog_pad_properties_base.cpp
View file @
a989a214
...
...
@@ -221,12 +221,12 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
m_panelShowPad
=
new
wxPanel
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxFULL_REPAINT_ON_RESIZE
|
wxSIMPLE_BORDER
|
wxTAB_TRAVERSAL
);
m_panelShowPad
->
SetBackgroundColour
(
wxColour
(
0
,
0
,
0
)
);
bMiddleUpperSizer
->
Add
(
m_panelShowPad
,
1
,
wxEXPAND
|
wxALL
,
5
);
bMiddleUpperSizer
->
Add
(
m_panelShowPad
,
1
,
wxEXPAND
,
5
);
bMiddleSizer
->
Add
(
bMiddleUpperSizer
,
1
,
wxEXPAND
,
5
);
wxStaticBoxSizer
*
sbSizeModuleInfo
;
sbSizeModuleInfo
=
new
wxStaticBoxSizer
(
new
wxStaticBox
(
this
,
wxID_ANY
,
_
(
"Footprint orientation"
)
),
wx
VERTIC
AL
);
sbSizeModuleInfo
=
new
wxStaticBoxSizer
(
new
wxStaticBox
(
this
,
wxID_ANY
,
_
(
"Footprint orientation"
)
),
wx
HORIZONT
AL
);
wxFlexGridSizer
*
fgSizer4
;
fgSizer4
=
new
wxFlexGridSizer
(
2
,
2
,
0
,
0
);
...
...
@@ -240,7 +240,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
m_staticModuleRotValue
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"0"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticModuleRotValue
->
Wrap
(
-
1
);
fgSizer4
->
Add
(
m_staticModuleRotValue
,
0
,
wxTOP
|
wxRIGHT
|
wxLEFT
,
5
);
fgSizer4
->
Add
(
m_staticModuleRotValue
,
0
,
wxTOP
|
wxRIGHT
|
wxLEFT
|
wxEXPAND
,
5
);
m_staticTitleModuleSide
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"Board side:"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticTitleModuleSide
->
Wrap
(
-
1
);
...
...
@@ -248,9 +248,15 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
m_staticModuleSideValue
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"Front side"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticModuleSideValue
->
Wrap
(
-
1
);
fgSizer4
->
Add
(
m_staticModuleSideValue
,
0
,
wxALL
,
5
);
fgSizer4
->
Add
(
m_staticModuleSideValue
,
0
,
wxALL
|
wxEXPAND
,
5
);
sbSizeModuleInfo
->
Add
(
fgSizer4
,
0
,
wxEXPAND
,
5
);
sbSizeModuleInfo
->
Add
(
fgSizer4
,
1
,
wxEXPAND
,
5
);
m_staticTextWarningPadFlipped
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"Warning:
\n
This pad is flipped on board.
\n
Back and front layers will be swapped."
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticTextWarningPadFlipped
->
Wrap
(
-
1
);
m_staticTextWarningPadFlipped
->
SetFont
(
wxFont
(
wxNORMAL_FONT
->
GetPointSize
(),
70
,
90
,
92
,
false
,
wxEmptyString
)
);
sbSizeModuleInfo
->
Add
(
m_staticTextWarningPadFlipped
,
0
,
wxALIGN_CENTER_VERTICAL
,
5
);
bMiddleSizer
->
Add
(
sbSizeModuleInfo
,
0
,
wxEXPAND
|
wxBOTTOM
|
wxRIGHT
|
wxLEFT
,
5
);
...
...
pcbnew/dialog_pad_properties_base.fbp
View file @
a989a214
...
...
@@ -2513,7 +2513,7 @@
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxEXPAND
| wxALL
</property>
<property
name=
"flag"
>
wxEXPAND
</property>
<property
name=
"proportion"
>
1
</property>
<object
class=
"wxPanel"
expanded=
"1"
>
<property
name=
"bg"
>
0,0,0
</property>
...
...
@@ -2570,13 +2570,13 @@
<property
name=
"label"
>
Footprint orientation
</property>
<property
name=
"minimum_size"
></property>
<property
name=
"name"
>
sbSizeModuleInfo
</property>
<property
name=
"orient"
>
wx
VERTIC
AL
</property>
<property
name=
"orient"
>
wx
HORIZONT
AL
</property>
<property
name=
"permission"
>
none
</property>
<event
name=
"OnUpdateUI"
></event>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxEXPAND
</property>
<property
name=
"proportion"
>
0
</property>
<property
name=
"proportion"
>
1
</property>
<object
class=
"wxFlexGridSizer"
expanded=
"1"
>
<property
name=
"cols"
>
2
</property>
<property
name=
"flexible_direction"
>
wxBOTH
</property>
...
...
@@ -2642,7 +2642,7 @@
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxTOP|wxRIGHT|wxLEFT
</property>
<property
name=
"flag"
>
wxTOP|wxRIGHT|wxLEFT
|wxEXPAND
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxStaticText"
expanded=
"1"
>
<property
name=
"bg"
></property>
...
...
@@ -2744,7 +2744,7 @@
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxALL
</property>
<property
name=
"flag"
>
wxALL
|wxEXPAND
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxStaticText"
expanded=
"1"
>
<property
name=
"bg"
></property>
...
...
@@ -2795,6 +2795,57 @@
</object>
</object>
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxALIGN_CENTER_VERTICAL
</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"
>
,90,92,-1,70,0
</property>
<property
name=
"hidden"
>
0
</property>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"label"
>
Warning:


This pad is flipped on board.


Back and front layers will be swapped.
</property>
<property
name=
"maximum_size"
></property>
<property
name=
"minimum_size"
></property>
<property
name=
"name"
>
m_staticTextWarningPadFlipped
</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>
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
...
...
pcbnew/dialog_pad_properties_base.h
View file @
a989a214
...
...
@@ -98,6 +98,7 @@ class DIALOG_PAD_PROPERTIES_BASE : public wxDialog
wxStaticText
*
m_staticModuleRotValue
;
wxStaticText
*
m_staticTitleModuleSide
;
wxStaticText
*
m_staticModuleSideValue
;
wxStaticText
*
m_staticTextWarningPadFlipped
;
wxStaticText
*
m_staticTextWarning
;
wxStaticText
*
m_staticTextNetClearance
;
wxTextCtrl
*
m_NetClearanceValueCtrl
;
...
...
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