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
0b545b63
Commit
0b545b63
authored
Sep 01, 2011
by
Marco Mattila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix freshly introduced footprint bounding box calculation bug.
parent
b8c2e4dd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
class_module.cpp
pcbnew/class_module.cpp
+2
-6
No files found.
pcbnew/class_module.cpp
View file @
0b545b63
...
@@ -639,7 +639,7 @@ EDA_RECT MODULE::GetFootPrintRect() const
...
@@ -639,7 +639,7 @@ EDA_RECT MODULE::GetFootPrintRect() const
area
.
Inflate
(
500
);
// Give a min size
area
.
Inflate
(
500
);
// Give a min size
for
(
EDGE_MODULE
*
edge
=
(
EDGE_MODULE
*
)
m_Drawings
.
GetFirst
();
edge
;
edge
=
edge
->
Next
()
)
for
(
EDGE_MODULE
*
edge
=
(
EDGE_MODULE
*
)
m_Drawings
.
GetFirst
();
edge
;
edge
=
edge
->
Next
()
)
if
(
edge
->
Type
()
==
TYPE_
TEXT
E_MODULE
)
if
(
edge
->
Type
()
==
TYPE_
EDG
E_MODULE
)
area
.
Merge
(
edge
->
GetBoundingBox
()
);
area
.
Merge
(
edge
->
GetBoundingBox
()
);
for
(
D_PAD
*
pad
=
m_Pads
;
pad
;
pad
=
pad
->
Next
()
)
for
(
D_PAD
*
pad
=
m_Pads
;
pad
;
pad
=
pad
->
Next
()
)
...
@@ -653,14 +653,10 @@ EDA_RECT MODULE::GetBoundingBox() const
...
@@ -653,14 +653,10 @@ EDA_RECT MODULE::GetBoundingBox() const
{
{
EDA_RECT
area
=
GetFootPrintRect
();
EDA_RECT
area
=
GetFootPrintRect
();
// Calculate extended area including text field
:
// Calculate extended area including text field
s
area
.
Merge
(
m_Reference
->
GetBoundingBox
()
);
area
.
Merge
(
m_Reference
->
GetBoundingBox
()
);
area
.
Merge
(
m_Value
->
GetBoundingBox
()
);
area
.
Merge
(
m_Value
->
GetBoundingBox
()
);
for
(
EDGE_MODULE
*
edge
=
(
EDGE_MODULE
*
)
m_Drawings
.
GetFirst
();
edge
;
edge
=
edge
->
Next
()
)
if
(
edge
->
Type
()
==
TYPE_TEXTE_MODULE
)
area
.
Merge
(
edge
->
GetBoundingBox
()
);
// Add the Clearance shape size: (shape around the pads when the
// Add the Clearance shape size: (shape around the pads when the
// clearance is shown. Not optimized, but the draw cost is small
// clearance is shown. Not optimized, but the draw cost is small
// (perhaps smaller than optimization).
// (perhaps smaller than optimization).
...
...
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