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
7c5feb61
Commit
7c5feb61
authored
Oct 11, 2008
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcbnew: insulated islands in copper pour removed
parent
2ffa0897
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
66 additions
and
17 deletions
+66
-17
change_log.txt
change_log.txt
+12
-0
id.h
include/id.h
+1
-1
CMakeLists.txt
pcbnew/CMakeLists.txt
+1
-0
class_zone.h
pcbnew/class_zone.h
+7
-1
edit.cpp
pcbnew/edit.cpp
+17
-0
makefile.include
pcbnew/makefile.include
+2
-1
onrightclick.cpp
pcbnew/onrightclick.cpp
+3
-0
zones_by_polygon.cpp
pcbnew/zones_by_polygon.cpp
+0
-4
zones_convert_brd_items_to_polygons.cpp
pcbnew/zones_convert_brd_items_to_polygons.cpp
+9
-2
CMakeLists.txt
polygon/CMakeLists.txt
+3
-1
PolyLine.h
polygon/PolyLine.h
+8
-6
makefile.include
polygon/makefile.include
+3
-1
No files found.
change_log.txt
View file @
7c5feb61
...
...
@@ -5,6 +5,18 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2008-oct-11 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+pcbnew:
More about copper zones filled without grid (by polygons)
Currently for tests only (work in progress).
now working
thermal reliefs.
texts on copper zones.
Removing insulated copper islands.
currently : not implemented:
trapezoidal pads
2008-oct-07 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+pcbnew:
...
...
include/id.h
View file @
7c5feb61
...
...
@@ -570,7 +570,7 @@ enum main_id {
ID_POPUP_PCB_PLACE_ZONE_OUTLINES
,
ID_POPUP_PCB_DRAG_ZONE_OUTLINE_SEGMENT
,
ID_POPUP_PCB_PLACE_DRAGGED_ZONE_OUTLINE_SEGMENT
,
ID_POPUP_
ZONE_UNUSED3
,
ID_POPUP_
PCB_REMOVE_FILLED_AREAS
,
ID_POPUP_ZONE_UNUSED4
,
ID_POPUP_PCB_DELETE_MARKER
,
...
...
pcbnew/CMakeLists.txt
View file @
7c5feb61
...
...
@@ -143,6 +143,7 @@ set(PCBNEW_SRCS
zones_by_polygon.cpp
zones_convert_brd_items_to_polygons.cpp
zone_filling_algorithm.cpp
zones_polygons_insulated_copper_islands.cpp
zones_test_and_combine_areas.cpp
)
...
...
pcbnew/class_zone.h
View file @
7c5feb61
...
...
@@ -101,6 +101,12 @@ public:
EDA_Rect
GetBoundingBox
();
/**
* Function Test_For_Copper_Island_And_Remove__Insulated_Islands
* Remove insulated copper islands found in m_FilledPolysList.
* @param aPcb = the board to analyse
*/
void
Test_For_Copper_Island_And_Remove_Insulated_Islands
(
BOARD
*
aPcb
);
/**
* Function DrawWhileCreateOutline
...
...
@@ -157,7 +163,7 @@ public:
* used in BuildFilledPolysListData when calculating filled areas in a zone
* Non copper areas are pads and track and their clearance area
* The filled copper area must be computed before
* BuildFilledPolysListData() call this function just after creating the
* BuildFilledPolysListData() call this function just after creating the
* filled copper area polygon (without clearence areas
* @param aPcb: the current board
*/
...
...
pcbnew/edit.cpp
View file @
7c5feb61
...
...
@@ -68,6 +68,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_POPUP_PCB_STOP_CURRENT_EDGE_ZONE
:
case
ID_POPUP_PCB_DELETE_ZONE_LAST_CREATED_CORNER
:
case
ID_POPUP_PCB_FILL_ALL_ZONES
:
case
ID_POPUP_PCB_REMOVE_FILLED_AREAS
:
case
ID_POPUP_PCB_PLACE_ZONE_CORNER
:
case
ID_POPUP_PCB_PLACE_ZONE_OUTLINES
:
case
ID_POPUP_PCB_EDIT_ZONE_PARAMS
:
...
...
@@ -542,6 +543,22 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
DrawPanel
->
MouseToCursorSchema
();
Fill_All_Zones
(
&
dc
);
break
;
case
ID_POPUP_PCB_REMOVE_FILLED_AREAS
:
// Remove all zones :
if
(
m_Pcb
->
m_Zone
)
{
m_Pcb
->
m_Zone
->
DeleteStructList
();
m_Pcb
->
m_Zone
=
NULL
;
m_Pcb
->
m_NbSegmZone
=
0
;
}
for
(
int
ii
=
0
;
ii
<
m_Pcb
->
GetAreaCount
();
ii
++
)
{
ZONE_CONTAINER
*
zone_container
=
m_Pcb
->
GetArea
(
ii
);
zone_container
->
m_FilledPolysList
.
clear
();;
}
GetScreen
()
->
SetModify
();
DrawPanel
->
Refresh
();
break
;
case
ID_POPUP_PCB_FILL_ZONE
:
DrawPanel
->
MouseToCursorSchema
();
...
...
pcbnew/makefile.include
View file @
7c5feb61
...
...
@@ -13,7 +13,8 @@ LIBVIEWER3D = ../3d-viewer/3d-viewer.a
ZONE_FILES
=
zones_by_polygon.o zones_test_and_combine_areas.o
\
zone_filling_algorithm.o
\
zones_convert_brd_items_to_polygons.o
zones_convert_brd_items_to_polygons.o
\
zones_polygons_insulated_copper_islands.o
SPECCTRA_TOOLS
=
specctra.o specctra_export.o dsn.o specctra_import.o
...
...
pcbnew/onrightclick.cpp
View file @
7c5feb61
...
...
@@ -338,8 +338,11 @@ bool WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
case
ID_PCB_ZONES_BUTT
:
if
(
m_Pcb
->
m_ZoneDescriptorList
.
size
()
>
0
)
{
aPopMenu
->
AppendSeparator
();
ADD_MENUITEM
(
aPopMenu
,
ID_POPUP_PCB_FILL_ALL_ZONES
,
_
(
"Fill or Refill All Zones"
),
fill_zone_xpm
);
ADD_MENUITEM
(
aPopMenu
,
ID_POPUP_PCB_REMOVE_FILLED_AREAS
,
_
(
"Remove Filled Areas"
),
fill_zone_xpm
);
aPopMenu
->
AppendSeparator
();
}
...
...
pcbnew/zones_by_polygon.cpp
View file @
7c5feb61
...
...
@@ -4,10 +4,6 @@
// Licence: GPL License
/////////////////////////////////////////////////////////////////////////////
#if defined (__GNUG__) && !defined (NO_GCC_PRAGMA)
#pragma implementation "dialog_zones_by_polygon.h"
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
...
...
pcbnew/zones_convert_brd_items_to_polygons.cpp
View file @
7c5feb61
...
...
@@ -13,6 +13,9 @@ using namespace std;
#include "PolyLine.h"
extern
void
Test_For_Copper_Island_And_Remove
(
BOARD
*
aPcb
,
ZONE_CONTAINER
*
aZone_container
);
// Local Functions:
void
AddTrackWithClearancePolygon
(
Bool_Engine
*
aBooleng
,
TRACK
&
aTrack
,
int
aClearanceValue
);
...
...
@@ -181,6 +184,10 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb )
}
delete
booleng
;
// Remove insulated islands:
if
(
GetNet
()
>
0
)
Test_For_Copper_Island_And_Remove_Insulated_Islands
(
aPcb
);
}
...
...
@@ -310,12 +317,12 @@ void AddThermalReliefPadPolygon( Bool_Engine* aBooleng,
}
corners_buffer
.
push_back
(
corner_end
.
x
);
corners_buffer
.
push_back
(
corner_end
.
y
);
/* add the radius lines */
corner
.
x
=
corner
.
y
=
aThermalGap
/
2
;
corners_buffer
.
push_back
(
corner
.
x
);
corners_buffer
.
push_back
(
corner
.
y
);
// Now, add the 4 holes ( each is the pattern, rotated by 0, 90, 180 and 270 deg
angle
=
450
;
// TODO: problems with kbool if angle = 0 (bad filled polygon on some pads, but not alls)
...
...
polygon/CMakeLists.txt
View file @
7c5feb61
set
(
POLYGON_SRCS
math_for_graphics.cpp
PolyLine.cpp
)
PolyLine.cpp
polygon_test_point_inside.cpp
)
add_library
(
polygon
${
POLYGON_SRCS
}
)
polygon/PolyLine.h
View file @
7c5feb61
...
...
@@ -96,7 +96,7 @@ public:
class
CPolyPt
{
public
:
CPolyPt
(
int
qx
=
0
,
int
qy
=
0
,
bool
qf
=
FALSE
)
CPolyPt
(
int
qx
=
0
,
int
qy
=
0
,
bool
qf
=
false
)
{
x
=
qx
;
y
=
qy
;
end_contour
=
qf
;
utility
=
0
;
};
int
x
;
int
y
;
...
...
@@ -104,6 +104,8 @@ public:
int
utility
;
};
#include "polygon_test_point_inside.h"
class
CPolyLine
{
public
:
...
...
@@ -116,11 +118,11 @@ public:
// functions for modifying polyline
void
Start
(
int
layer
,
int
x
,
int
y
,
int
hatch
);
void
AppendCorner
(
int
x
,
int
y
,
int
style
=
STRAIGHT
,
bool
bDraw
=
TRUE
);
void
AppendCorner
(
int
x
,
int
y
,
int
style
=
STRAIGHT
,
bool
bDraw
=
false
);
void
InsertCorner
(
int
ic
,
int
x
,
int
y
);
void
DeleteCorner
(
int
ic
,
bool
bDraw
=
TRUE
);
void
DeleteCorner
(
int
ic
,
bool
bDraw
=
false
);
void
MoveCorner
(
int
ic
,
int
x
,
int
y
);
void
Close
(
int
style
=
STRAIGHT
,
bool
bDraw
=
TRUE
);
void
Close
(
int
style
=
STRAIGHT
,
bool
bDraw
=
false
);
void
RemoveContour
(
int
icont
);
void
RemoveAllContours
(
void
);
...
...
@@ -170,7 +172,7 @@ public:
int
RestoreArcs
(
std
::
vector
<
CArc
>
*
arc_array
,
std
::
vector
<
CPolyLine
*>
*
pa
=
NULL
);
int
NormalizeAreaOutlines
(
std
::
vector
<
CPolyLine
*>
*
pa
=
NULL
,
bool
bRetainArcs
=
FALSE
);
bool
bRetainArcs
=
false
);
// KBOOL functions
...
...
@@ -214,7 +216,7 @@ public:
* because copper areas have only one outside contour
* Therefore, if this results in new CPolyLines, return them as std::vector pa
* @param aExtraPolys: pointer on a std::vector<CPolyLine*> to store extra CPolyLines
* @param bRetainArcs ==
TRUE
, try to retain arcs in polys
* @param bRetainArcs ==
false
, try to retain arcs in polys
* @return number of external contours, or -1 if error
*/
int
NormalizeWithKbool
(
std
::
vector
<
CPolyLine
*>
*
aExtraPolyList
,
bool
bRetainArcs
);
...
...
polygon/makefile.include
View file @
7c5feb61
...
...
@@ -6,7 +6,9 @@ COMMON =
OBJECTS
=
\
PolyLine.o
\
math_for_graphics.o
math_for_graphics.o
\
polygon_test_point_inside.o
PolyLine.o
:
PolyLine.cpp PolyLine.h
...
...
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