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
97be0050
Commit
97be0050
authored
Jan 05, 2008
by
CHARRAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added: Delete cutout outline in zone popup menu
parent
549e5f68
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
509 additions
and
503 deletions
+509
-503
change_log.txt
change_log.txt
+10
-1
id.h
include/id.h
+1
-1
wxPcbStruct.h
include/wxPcbStruct.h
+200
-195
kicad.mo
internat/fr/kicad.mo
+0
-0
kicad.po
internat/fr/kicad.po
+98
-109
class_board_item.cpp
pcbnew/class_board_item.cpp
+5
-0
class_zone.cpp
pcbnew/class_zone.cpp
+11
-0
edit.cpp
pcbnew/edit.cpp
+5
-9
onrightclick.cpp
pcbnew/onrightclick.cpp
+18
-13
zone_filling_algorithm.cpp
pcbnew/zone_filling_algorithm.cpp
+1
-1
zones_by_polygon.cpp
pcbnew/zones_by_polygon.cpp
+44
-13
zones_test_and_combine_areas.cpp
pcbnew/zones_test_and_combine_areas.cpp
+50
-56
PolyLine.cpp
polygon/PolyLine.cpp
+39
-36
PolyLine.h
polygon/PolyLine.h
+14
-18
PolyLine2Kicad.h
polygon/PolyLine2Kicad.h
+0
-25
cdisplaylist_stuff.cpp
polygon/cdisplaylist_stuff.cpp
+1
-19
php_polygon.cpp
polygon/php_polygon.cpp
+12
-7
No files found.
change_log.txt
View file @
97be0050
...
@@ -4,12 +4,21 @@ Started 2007-June-11
...
@@ -4,12 +4,21 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
Please add newer entries at the top, list the date and your name with
email address.
email address.
2008-jan-05 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+pcbnew:
Added: Delete cutout outline in zone popup menu
the GUI about zones is now working.
Some work is needed ( a zone in a zone of the same net is not merged )
Currently No DRC for outlines
2008-jan-04 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
2008-jan-04 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
================================================================================
+pcbnew:
+pcbnew:
More about zones:
More about zones:
Outlines can be edited. Outlines are merged if needeed.
Outlines can be edited. Outlines are merged if needeed.
Current No DRC for outlines
Current
ly
No DRC for outlines
2008-jan-01 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
2008-jan-01 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
...
...
include/id.h
View file @
97be0050
...
@@ -560,7 +560,7 @@ enum main_id {
...
@@ -560,7 +560,7 @@ enum main_id {
ID_POPUP_PCB_PLACE_ZONE_CORNER
,
ID_POPUP_PCB_PLACE_ZONE_CORNER
,
ID_POPUP_PCB_ZONE_ADD_SIMILAR_ZONE
,
ID_POPUP_PCB_ZONE_ADD_SIMILAR_ZONE
,
ID_POPUP_PCB_ZONE_ADD_CUTOUT_ZONE
,
ID_POPUP_PCB_ZONE_ADD_CUTOUT_ZONE
,
ID_POPUP_
ZONE_UNUSED1
,
ID_POPUP_
PCB_DELETE_ZONE_CUTOUT
,
ID_POPUP_ZONE_UNUSED2
,
ID_POPUP_ZONE_UNUSED2
,
ID_POPUP_ZONE_UNUSED3
,
ID_POPUP_ZONE_UNUSED3
,
ID_POPUP_ZONE_UNUSED4
,
ID_POPUP_ZONE_UNUSED4
,
...
...
include/wxPcbStruct.h
View file @
97be0050
/***********************************************************/
/***********************************************************/
/* wx
struct.h:
*/
/* wx
PcbStruct.h:
*/
/*
descriptions des principales classes derivees utilisees
*/
/*
Classes used in pcbnew, cvpcb and gerbview
*/
/***********************************************************/
/***********************************************************/
#ifndef WXPCB_STRUCT_H
#ifndef WXPCB_STRUCT_H
...
@@ -14,14 +14,6 @@
...
@@ -14,14 +14,6 @@
#define PCB_INTERNAL_UNIT 10000
#define PCB_INTERNAL_UNIT 10000
#endif
#endif
// Option for dialog boxes
// #define DIALOG_STYLE wxDEFAULT_DIALOG_STYLE|wxFRAME_FLOAT_ON_PARENT|wxSTAY_ON_TOP
#define DIALOG_STYLE wxDEFAULT_DIALOG_STYLE | wxFRAME_FLOAT_ON_PARENT | MAYBE_RESIZE_BORDER
#define KICAD_DEFAULT_DRAWFRAME_STYLE wxDEFAULT_FRAME_STYLE|wxWANTS_CHARS
#define EDA_DRAW_PANEL wxScrolledWindow
class
wxMyDialogModalData
;
/* Forward declarations of classes. */
/* Forward declarations of classes. */
class
WinEDA_DrawPanel
;
class
WinEDA_DrawPanel
;
...
@@ -29,25 +21,12 @@ class WinEDA_DrawFrame;
...
@@ -29,25 +21,12 @@ class WinEDA_DrawFrame;
#include "base_struct.h"
#include "base_struct.h"
class
WinEDA_App
;
class
WinEDA_MsgPanel
;
class
COMMAND
;
class
WinEDA_MainFrame
;
class
BASE_SCREEN
;
class
SCH_SCREEN
;
class
PCB_SCREEN
;
class
PCB_SCREEN
;
class
WinEDA_SchematicFrame
;
// Schematic main frame
class
WinEDA_LibeditFrame
;
// Component creation and edition main frame
class
WinEDA_ViewlibFrame
;
// Component viewer main frame
class
WinEDA_GerberFrame
;
// GERBER viewer main frame
class
WinEDA_GerberFrame
;
// GERBER viewer main frame
class
WinEDA_Toolbar
;
class
WinEDA_Toolbar
;
class
WinEDA_CvpcbFrame
;
class
WinEDA_CvpcbFrame
;
class
WinEDA_PcbFrame
;
class
WinEDA_PcbFrame
;
class
WinEDA_ModuleEditFrame
;
class
WinEDA_ModuleEditFrame
;
class
WinEDAChoiceBox
;
#define WinEDA_MenuBar wxMenuBar
#define WinEDA_Menu wxMenu
#define WinEDA_MenuItem wxMenuItem
// Used but not defined here:
// Used but not defined here:
class
BOARD
;
class
BOARD
;
...
@@ -193,7 +172,9 @@ public:
...
@@ -193,7 +172,9 @@ public:
void
InstallModuleOptionsFrame
(
MODULE
*
Module
,
void
InstallModuleOptionsFrame
(
MODULE
*
Module
,
wxDC
*
DC
,
const
wxPoint
&
pos
);
wxDC
*
DC
,
const
wxPoint
&
pos
);
MODULE
*
Copie_Module
(
MODULE
*
module
);
MODULE
*
Copie_Module
(
MODULE
*
module
);
MODULE
*
Exchange_Module
(
wxWindow
*
winaff
,
MODULE
*
old_module
,
MODULE
*
new_module
);
MODULE
*
Exchange_Module
(
wxWindow
*
winaff
,
MODULE
*
old_module
,
MODULE
*
new_module
);
int
Save_1_Module
(
const
wxString
&
LibName
,
MODULE
*
Module
,
int
Save_1_Module
(
const
wxString
&
LibName
,
MODULE
*
Module
,
bool
Overwrite
,
bool
DisplayDialog
);
bool
Overwrite
,
bool
DisplayDialog
);
void
Archive_Modules
(
const
wxString
&
LibName
,
bool
NewModulesOnly
);
void
Archive_Modules
(
const
wxString
&
LibName
,
bool
NewModulesOnly
);
...
@@ -203,7 +184,10 @@ public:
...
@@ -203,7 +184,10 @@ public:
// Modules (footprints)
// Modules (footprints)
MODULE
*
Create_1_Module
(
wxDC
*
DC
,
const
wxString
&
module_name
);
MODULE
*
Create_1_Module
(
wxDC
*
DC
,
const
wxString
&
module_name
);
void
Edit_Module
(
MODULE
*
module
,
wxDC
*
DC
);
void
Edit_Module
(
MODULE
*
module
,
wxDC
*
DC
);
void
Rotate_Module
(
wxDC
*
DC
,
MODULE
*
module
,
int
angle
,
bool
incremental
);
void
Rotate_Module
(
wxDC
*
DC
,
MODULE
*
module
,
int
angle
,
bool
incremental
);
void
Change_Side_Module
(
MODULE
*
Module
,
wxDC
*
DC
);
void
Change_Side_Module
(
MODULE
*
Module
,
wxDC
*
DC
);
void
Place_Module
(
MODULE
*
module
,
wxDC
*
DC
);
void
Place_Module
(
MODULE
*
module
,
wxDC
*
DC
);
void
InstallExchangeModuleFrame
(
MODULE
*
ExchangeModuleModule
,
void
InstallExchangeModuleFrame
(
MODULE
*
ExchangeModuleModule
,
...
@@ -232,8 +216,10 @@ public:
...
@@ -232,8 +216,10 @@ public:
// loading footprints
// loading footprints
MODULE
*
Get_Librairie_Module
(
wxWindow
*
winaff
,
const
wxString
&
library
,
MODULE
*
Get_Librairie_Module
(
wxWindow
*
winaff
,
const
wxString
&
ModuleName
,
bool
show_msg_err
);
const
wxString
&
library
,
const
wxString
&
ModuleName
,
bool
show_msg_err
);
wxString
Select_1_Module_From_List
(
wxString
Select_1_Module_From_List
(
WinEDA_DrawFrame
*
active_window
,
const
wxString
&
Library
,
WinEDA_DrawFrame
*
active_window
,
const
wxString
&
Library
,
...
@@ -252,7 +238,9 @@ public:
...
@@ -252,7 +238,9 @@ public:
void
trace_ratsnest_pad
(
wxDC
*
DC
);
void
trace_ratsnest_pad
(
wxDC
*
DC
);
void
recalcule_pad_net_code
();
/* compute and update the PAD net codes */
void
recalcule_pad_net_code
();
/* compute and update the PAD net codes */
void
build_liste_pads
();
void
build_liste_pads
();
int
*
build_ratsnest_pad
(
EDA_BaseStruct
*
ref
,
const
wxPoint
&
refpos
,
bool
init
);
int
*
build_ratsnest_pad
(
EDA_BaseStruct
*
ref
,
const
wxPoint
&
refpos
,
bool
init
);
void
Tst_Ratsnest
(
wxDC
*
DC
,
int
ref_netcode
);
void
Tst_Ratsnest
(
wxDC
*
DC
,
int
ref_netcode
);
void
test_connexions
(
wxDC
*
DC
);
void
test_connexions
(
wxDC
*
DC
);
...
@@ -483,16 +471,18 @@ public:
...
@@ -483,16 +471,18 @@ public:
bool
Genere_Pad_Connexion
(
wxDC
*
DC
,
int
layer
);
bool
Genere_Pad_Connexion
(
wxDC
*
DC
,
int
layer
);
// zone handling
// zone handling
/** Function Delete_Zone
* Remove the zone which include the segment aZone, or the zone which have the given time stamp.
/** Function Delete_Zone_Fill
* Remove the zone filling which include the segment aZone, or the zone which have the given time stamp.
* A zone is a group of segments which have the same TimeStamp
* A zone is a group of segments which have the same TimeStamp
* @param DC = current Device Context (can be NULL)
* @param DC = current Device Context (can be NULL)
* @param aZone = zone segment within the zone to delete. Can be NULL
* @param aZone = zone segment within the zone to delete. Can be NULL
* @param aTimestamp = Timestamp for the zone to delete, used if aZone == NULL
* @param aTimestamp = Timestamp for the zone to delete, used if aZone == NULL
*/
*/
void
Delete_Zone
(
wxDC
*
DC
,
SEGZONE
*
Track
,
long
aTimestamp
=
0
);
void
Delete_Zone
_Fill
(
wxDC
*
DC
,
SEGZONE
*
Track
,
long
aTimestamp
=
0
);
EDGE_ZONE
*
Del_SegmEdgeZone
(
wxDC
*
DC
,
EDGE_ZONE
*
edge_zone
);
EDGE_ZONE
*
Del_SegmEdgeZone
(
wxDC
*
DC
,
EDGE_ZONE
*
edge_zone
);
/**
/**
* Function Begin_Zone
* Function Begin_Zone
* initiates a zone edge creation process,
* initiates a zone edge creation process,
...
@@ -517,7 +507,7 @@ public:
...
@@ -517,7 +507,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
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
,
bool
verbose
=
TRUE
);
int
Fill_Zone
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
,
bool
verbose
=
TRUE
);
/** Function Fill_All_Zones()
/** Function Fill_All_Zones()
* Fill all zones on the board
* Fill all zones on the board
...
@@ -536,7 +526,7 @@ public:
...
@@ -536,7 +526,7 @@ public:
* @param DC = current Device Context
* @param DC = current Device Context
* @param zone_container = parent zone outline
* @param zone_container = parent zone outline
*/
*/
void
Add_Zone_Cutout
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
);
void
Add_Zone_Cutout
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
);
/**
/**
* Function Add_Similar_Zone
* Function Add_Similar_Zone
...
@@ -545,13 +535,13 @@ public:
...
@@ -545,13 +535,13 @@ public:
* @param DC = current Device Context
* @param DC = current Device Context
* @param zone_container = parent zone outline
* @param zone_container = parent zone outline
*/
*/
void
Add_Similar_Zone
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
);
void
Add_Similar_Zone
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
);
/**
/**
* Function Edit_Zone_Params
* Function Edit_Zone_Params
* Edit params (layer, clearance, ...) for a zone outline
* Edit params (layer, clearance, ...) for a zone outline
*/
*/
void
Edit_Zone_Params
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
);
void
Edit_Zone_Params
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
);
/**
/**
* Function Start_Move_Zone_Corner
* Function Start_Move_Zone_Corner
...
@@ -559,19 +549,34 @@ public:
...
@@ -559,19 +549,34 @@ public:
* called from a move corner command (IsNewCorner = false),
* called from a move corner command (IsNewCorner = false),
* or a create new cornet command (IsNewCorner = true )
* or a create new cornet command (IsNewCorner = true )
*/
*/
void
Start_Move_Zone_Corner
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
,
int
corner_id
,
bool
IsNewCorner
);
void
Start_Move_Zone_Corner
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
,
int
corner_id
,
bool
IsNewCorner
);
/**
/**
* Function End_Move_Zone_Corner
* Function End_Move_Zone_Corner
* Terminates a move corner in a zone outline
* Terminates a move corner in a zone outline
*/
*/
void
End_Move_Zone_Corner
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
);
void
End_Move_Zone_Corner
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
);
/**
/**
* Function End_Move_Zone_Corner
* Function End_Move_Zone_Corner
* Remove the currently selected corner in a zone outline
* Remove the currently selected corner in a zone outline
* the .m_CornerSelection is used as corner selection
* the .m_CornerSelection is used as corner selection
*/
*/
void
Remove_Zone_Corner
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
);
void
Remove_Zone_Corner
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
);
/** Function Delete_Zone
* Remove the zone which include the segment aZone, or the zone which have the given time stamp.
* A zone is a group of segments which have the same TimeStamp
* @param DC = current Device Context (can be NULL)
* @param zone_container = zone to modify
* the member .m_CornerSelection is used to find the outline to remove.
* if the outline is the main outline, all the zone is removed
* otherwise, the hole is deleted
*/
void
Delete_Zone_Contour
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
);
// Target handling
// Target handling
MIREPCB
*
Create_Mire
(
wxDC
*
DC
);
MIREPCB
*
Create_Mire
(
wxDC
*
DC
);
...
...
internat/fr/kicad.mo
View file @
97be0050
No preview for this file type
internat/fr/kicad.po
View file @
97be0050
...
@@ -2,7 +2,7 @@ msgid ""
...
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
msgstr ""
"Project-Id-Version: kicad\n"
"Project-Id-Version: kicad\n"
"POT-Creation-Date: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2008-01-0
1 17:55
+0100\n"
"PO-Revision-Date: 2008-01-0
5 14:17
+0100\n"
"Last-Translator: \n"
"Last-Translator: \n"
"Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n"
"Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n"
"MIME-Version: 1.0\n"
"MIME-Version: 1.0\n"
...
@@ -639,7 +639,7 @@ msgstr "Cuivre"
...
@@ -639,7 +639,7 @@ msgstr "Cuivre"
#: pcbnew/classpcb.cpp:210
#: pcbnew/classpcb.cpp:210
#: pcbnew/class_track.cpp:806
#: pcbnew/class_track.cpp:806
#: pcbnew/class_module.cpp:1217
#: pcbnew/class_module.cpp:1217
#: pcbnew/class_zone.cpp:4
07
#: pcbnew/class_zone.cpp:4
41
#: gerbview/affiche.cpp:109
#: gerbview/affiche.cpp:109
msgid "Layer"
msgid "Layer"
msgstr "Couche"
msgstr "Couche"
...
@@ -1357,7 +1357,7 @@ msgstr "Module"
...
@@ -1357,7 +1357,7 @@ msgstr "Module"
#: pcbnew/classpcb.cpp:194
#: pcbnew/classpcb.cpp:194
#: pcbnew/class_marker.cpp:112
#: pcbnew/class_marker.cpp:112
#: pcbnew/class_track.cpp:750
#: pcbnew/class_track.cpp:750
#: pcbnew/class_zone.cpp:
388
#: pcbnew/class_zone.cpp:
422
#: gerbview/affiche.cpp:93
#: gerbview/affiche.cpp:93
msgid "Type"
msgid "Type"
msgstr "Type"
msgstr "Type"
...
@@ -1629,11 +1629,11 @@ msgstr "Hauteur Texte Module"
...
@@ -1629,11 +1629,11 @@ msgstr "Hauteur Texte Module"
msgid "Text Module Size H"
msgid "Text Module Size H"
msgstr "Largeur Texte Module"
msgstr "Largeur Texte Module"
#: pcbnew/zone_filling_algorithm.cpp:15
6
#: pcbnew/zone_filling_algorithm.cpp:15
5
msgid "No pads or starting point found to fill this zone outline"
msgid "No pads or starting point found to fill this zone outline"
msgstr "Pas de pads ou de points de dpart pour remplir ce contour de zone"
msgstr "Pas de pads ou de points de dpart pour remplir ce contour de zone"
#: pcbnew/zone_filling_algorithm.cpp:19
4
#: pcbnew/zone_filling_algorithm.cpp:19
3
msgid "Ok"
msgid "Ok"
msgstr "Ok"
msgstr "Ok"
...
@@ -1911,8 +1911,8 @@ msgstr "Garder"
...
@@ -1911,8 +1911,8 @@ msgstr "Garder"
#: pcbnew/dialog_netlist.cpp:143
#: pcbnew/dialog_netlist.cpp:143
#: pcbnew/onrightclick.cpp:589
#: pcbnew/onrightclick.cpp:589
#: pcbnew/onrightclick.cpp:7
49
#: pcbnew/onrightclick.cpp:7
54
#: pcbnew/onrightclick.cpp:8
46
#: pcbnew/onrightclick.cpp:8
51
#: eeschema/edit_component_in_lib.cpp:239
#: eeschema/edit_component_in_lib.cpp:239
#: eeschema/edit_component_in_lib.cpp:320
#: eeschema/edit_component_in_lib.cpp:320
msgid "Delete"
msgid "Delete"
...
@@ -2086,7 +2086,7 @@ msgid "Add Drawing"
...
@@ -2086,7 +2086,7 @@ msgid "Add Drawing"
msgstr "Ajout d'lments graphiques"
msgstr "Ajout d'lments graphiques"
#: pcbnew/modedit.cpp:424
#: pcbnew/modedit.cpp:424
#: pcbnew/edit.cpp:5
36
#: pcbnew/edit.cpp:5
18
#: eeschema/schedit.cpp:455
#: eeschema/schedit.cpp:455
#: eeschema/libframe.cpp:579
#: eeschema/libframe.cpp:579
msgid "Delete item"
msgid "Delete item"
...
@@ -2144,8 +2144,8 @@ msgid "Delete Block (shift+ctrl + drag mouse)"
...
@@ -2144,8 +2144,8 @@ msgid "Delete Block (shift+ctrl + drag mouse)"
msgstr "Effacement Bloc (shift+ctrl + drag mouse)"
msgstr "Effacement Bloc (shift+ctrl + drag mouse)"
#: pcbnew/modedit_onclick.cpp:252
#: pcbnew/modedit_onclick.cpp:252
#: pcbnew/onrightclick.cpp:74
3
#: pcbnew/onrightclick.cpp:74
8
#: pcbnew/onrightclick.cpp:84
0
#: pcbnew/onrightclick.cpp:84
5
msgid "Rotate"
msgid "Rotate"
msgstr "Rotation"
msgstr "Rotation"
...
@@ -2170,17 +2170,17 @@ msgid "Move Pad"
...
@@ -2170,17 +2170,17 @@ msgid "Move Pad"
msgstr "Dplace Pad"
msgstr "Dplace Pad"
#: pcbnew/modedit_onclick.cpp:274
#: pcbnew/modedit_onclick.cpp:274
#: pcbnew/onrightclick.cpp:78
2
#: pcbnew/onrightclick.cpp:78
7
msgid "Edit Pad"
msgid "Edit Pad"
msgstr "Edit Pad"
msgstr "Edit Pad"
#: pcbnew/modedit_onclick.cpp:276
#: pcbnew/modedit_onclick.cpp:276
#: pcbnew/onrightclick.cpp:7
86
#: pcbnew/onrightclick.cpp:7
91
msgid "New Pad Settings"
msgid "New Pad Settings"
msgstr "Nouvelles Caract. Pads"
msgstr "Nouvelles Caract. Pads"
#: pcbnew/modedit_onclick.cpp:278
#: pcbnew/modedit_onclick.cpp:278
#: pcbnew/onrightclick.cpp:7
88
#: pcbnew/onrightclick.cpp:7
93
msgid "Export Pad Settings"
msgid "Export Pad Settings"
msgstr "Exporte Caract. Pads"
msgstr "Exporte Caract. Pads"
...
@@ -2189,7 +2189,7 @@ msgid "delete Pad"
...
@@ -2189,7 +2189,7 @@ msgid "delete Pad"
msgstr "Supprimer Pad"
msgstr "Supprimer Pad"
#: pcbnew/modedit_onclick.cpp:285
#: pcbnew/modedit_onclick.cpp:285
#: pcbnew/onrightclick.cpp:79
3
#: pcbnew/onrightclick.cpp:79
8
msgid "Global Pad Settings"
msgid "Global Pad Settings"
msgstr "Edition Globale des pads"
msgstr "Edition Globale des pads"
...
@@ -2222,9 +2222,9 @@ msgid "Place edge"
...
@@ -2222,9 +2222,9 @@ msgid "Place edge"
msgstr "Place contour"
msgstr "Place contour"
#: pcbnew/modedit_onclick.cpp:317
#: pcbnew/modedit_onclick.cpp:317
#: pcbnew/onrightclick.cpp:71
1
#: pcbnew/onrightclick.cpp:71
6
#: pcbnew/onrightclick.cpp:7
45
#: pcbnew/onrightclick.cpp:7
50
#: pcbnew/onrightclick.cpp:84
2
#: pcbnew/onrightclick.cpp:84
7
#: eeschema/onrightclick.cpp:313
#: eeschema/onrightclick.cpp:313
msgid "Edit"
msgid "Edit"
msgstr "Editer"
msgstr "Editer"
...
@@ -2565,7 +2565,7 @@ msgid "Footprint name:"
...
@@ -2565,7 +2565,7 @@ msgid "Footprint name:"
msgstr "Nom Module: "
msgstr "Nom Module: "
#: pcbnew/modules.cpp:281
#: pcbnew/modules.cpp:281
#: pcbnew/onrightclick.cpp:7
17
#: pcbnew/onrightclick.cpp:7
22
msgid "Delete Module"
msgid "Delete Module"
msgstr "Supprimer Module"
msgstr "Supprimer Module"
...
@@ -3212,7 +3212,6 @@ msgid "Add Similar Zone"
...
@@ -3212,7 +3212,6 @@ msgid "Add Similar Zone"
msgstr "Addition d'une Zone Semblable"
msgstr "Addition d'une Zone Semblable"
#: pcbnew/onrightclick.cpp:664
#: pcbnew/onrightclick.cpp:664
#, fuzzy
msgid "Add Cutout Area"
msgid "Add Cutout Area"
msgstr "Addition d'une Zone Interdite"
msgstr "Addition d'une Zone Interdite"
...
@@ -3224,44 +3223,48 @@ msgstr "Remplir Zone"
...
@@ -3224,44 +3223,48 @@ msgstr "Remplir Zone"
msgid "Edit Zone Params"
msgid "Edit Zone Params"
msgstr "Editer Paramtres de la Zone"
msgstr "Editer Paramtres de la Zone"
#: pcbnew/onrightclick.cpp:673
#: pcbnew/onrightclick.cpp:675
msgid "Delete Cutout"
msgstr "Supprimer Zone Interdite"
#: pcbnew/onrightclick.cpp:678
msgid "Delete Zone Outline"
msgid "Delete Zone Outline"
msgstr "Supprimer Contour de Zone"
msgstr "Supprimer Contour de Zone"
#: pcbnew/onrightclick.cpp:
695
#: pcbnew/onrightclick.cpp:
700
#: pcbnew/onrightclick.cpp:74
0
#: pcbnew/onrightclick.cpp:74
5
#: pcbnew/onrightclick.cpp:7
78
#: pcbnew/onrightclick.cpp:7
83
#: pcbnew/onrightclick.cpp:8
37
#: pcbnew/onrightclick.cpp:8
42
msgid "Move"
msgid "Move"
msgstr "Move"
msgstr "Move"
#: pcbnew/onrightclick.cpp:
698
#: pcbnew/onrightclick.cpp:
703
#: pcbnew/onrightclick.cpp:78
0
#: pcbnew/onrightclick.cpp:78
5
msgid "Drag"
msgid "Drag"
msgstr "Drag"
msgstr "Drag"
#: pcbnew/onrightclick.cpp:70
2
#: pcbnew/onrightclick.cpp:70
7
msgid "Rotate +"
msgid "Rotate +"
msgstr "Rotation +"
msgstr "Rotation +"
#: pcbnew/onrightclick.cpp:7
06
#: pcbnew/onrightclick.cpp:7
11
#: eeschema/onrightclick.cpp:301
#: eeschema/onrightclick.cpp:301
msgid "Rotate -"
msgid "Rotate -"
msgstr "Rotation -"
msgstr "Rotation -"
#: pcbnew/onrightclick.cpp:7
07
#: pcbnew/onrightclick.cpp:7
12
msgid "Flip"
msgid "Flip"
msgstr "Change ct"
msgstr "Change ct"
#: pcbnew/onrightclick.cpp:
797
#: pcbnew/onrightclick.cpp:
802
msgid "delete"
msgid "delete"
msgstr "Effacer"
msgstr "Effacer"
#: pcbnew/onrightclick.cpp:80
4
#: pcbnew/onrightclick.cpp:80
9
msgid "Autoroute Pad"
msgid "Autoroute Pad"
msgstr "Autoroute Pad"
msgstr "Autoroute Pad"
#: pcbnew/onrightclick.cpp:8
05
#: pcbnew/onrightclick.cpp:8
10
msgid "Autoroute Net"
msgid "Autoroute Net"
msgstr "Autoroute Net"
msgstr "Autoroute Net"
...
@@ -3612,11 +3615,11 @@ msgstr "Pcb Graphic"
...
@@ -3612,11 +3615,11 @@ msgstr "Pcb Graphic"
#: pcbnew/class_board_item.cpp:59
#: pcbnew/class_board_item.cpp:59
#: pcbnew/class_board_item.cpp:68
#: pcbnew/class_board_item.cpp:68
#: pcbnew/class_board_item.cpp:145
#: pcbnew/class_board_item.cpp:145
#: pcbnew/class_board_item.cpp:16
4
#: pcbnew/class_board_item.cpp:16
9
#: pcbnew/class_board_item.cpp:18
0
#: pcbnew/class_board_item.cpp:18
5
#: pcbnew/class_board_item.cpp:2
07
#: pcbnew/class_board_item.cpp:2
12
#: pcbnew/class_board_item.cpp:22
4
#: pcbnew/class_board_item.cpp:22
9
#: pcbnew/class_board_item.cpp:23
0
#: pcbnew/class_board_item.cpp:23
5
msgid " on "
msgid " on "
msgstr " sur "
msgstr " sur "
...
@@ -3659,46 +3662,51 @@ msgid "Length:"
...
@@ -3659,46 +3662,51 @@ msgid "Length:"
msgstr "Long.:"
msgstr "Long.:"
#: pcbnew/class_board_item.cpp:152
#: pcbnew/class_board_item.cpp:152
#: pcbnew/class_zone.cpp:
385
#: pcbnew/class_zone.cpp:
416
msgid "Zone Outline"
msgid "Zone Outline"
msgstr "Contour de Zone"
msgstr "Contour de Zone"
#: pcbnew/class_board_item.cpp:168
#: pcbnew/class_board_item.cpp:156
#: pcbnew/class_zone.cpp:419
msgid "(Cutout)"
msgstr "(Cutout)"
#: pcbnew/class_board_item.cpp:173
#: pcbnew/class_track.cpp:743
#: pcbnew/class_track.cpp:743
msgid "Zone"
msgid "Zone"
msgstr "Zone"
msgstr "Zone"
#: pcbnew/class_board_item.cpp:1
86
#: pcbnew/class_board_item.cpp:1
91
#: pcbnew/pcbframe.cpp:479
#: pcbnew/pcbframe.cpp:479
msgid "Via"
msgid "Via"
msgstr "Via"
msgstr "Via"
#: pcbnew/class_board_item.cpp:19
0
#: pcbnew/class_board_item.cpp:19
5
msgid "Blind"
msgid "Blind"
msgstr "Enterre"
msgstr "Enterre"
#: pcbnew/class_board_item.cpp:19
2
#: pcbnew/class_board_item.cpp:19
7
msgid "Buried"
msgid "Buried"
msgstr "Borgne"
msgstr "Borgne"
#: pcbnew/class_board_item.cpp:21
4
#: pcbnew/class_board_item.cpp:21
9
#: pcbnew/class_marker.cpp:112
#: pcbnew/class_marker.cpp:112
msgid "Marker"
msgid "Marker"
msgstr "Marqueur"
msgstr "Marqueur"
#: pcbnew/class_board_item.cpp:2
19
#: pcbnew/class_board_item.cpp:2
24
msgid "Dimension"
msgid "Dimension"
msgstr "Dimension"
msgstr "Dimension"
#: pcbnew/class_board_item.cpp:22
4
#: pcbnew/class_board_item.cpp:22
9
msgid "Target"
msgid "Target"
msgstr "Mire"
msgstr "Mire"
#: pcbnew/class_board_item.cpp:2
25
#: pcbnew/class_board_item.cpp:2
30
msgid "size"
msgid "size"
msgstr "dimension"
msgstr "dimension"
#: pcbnew/class_board_item.cpp:23
0
#: pcbnew/class_board_item.cpp:23
5
msgid "Edge Zone"
msgid "Edge Zone"
msgstr "Contour Zone"
msgstr "Contour Zone"
...
@@ -3874,13 +3882,13 @@ msgstr "Pads"
...
@@ -3874,13 +3882,13 @@ msgstr "Pads"
#: pcbnew/class_track.cpp:765
#: pcbnew/class_track.cpp:765
#: pcbnew/zones.cpp:873
#: pcbnew/zones.cpp:873
#: pcbnew/zones_by_polygon.cpp:
705
#: pcbnew/zones_by_polygon.cpp:
831
#: pcbnew/class_zone.cpp:
398
#: pcbnew/class_zone.cpp:
432
msgid "NetName"
msgid "NetName"
msgstr "NetName"
msgstr "NetName"
#: pcbnew/class_track.cpp:770
#: pcbnew/class_track.cpp:770
#: pcbnew/class_zone.cpp:4
03
#: pcbnew/class_zone.cpp:4
37
msgid "NetCode"
msgid "NetCode"
msgstr "NetCode"
msgstr "NetCode"
...
@@ -4433,73 +4441,30 @@ msgid "Delete Current Zone Edges"
...
@@ -4433,73 +4441,30 @@ msgid "Delete Current Zone Edges"
msgstr "Effacer contour zone courant"
msgstr "Effacer contour zone courant"
#: pcbnew/zones.cpp:871
#: pcbnew/zones.cpp:871
#: pcbnew/zones_by_polygon.cpp:
703
#: pcbnew/zones_by_polygon.cpp:
829
msgid "No Net"
msgid "No Net"
msgstr "No Net"
msgstr "No Net"
#: pcbnew/dsn.cpp:456
#: pcbnew/specctra.cpp:1015
msgid "Line length exceeded"
#: pcbnew/specctra.cpp:1022
msgstr "Longueur de ligne dpasse"
#: pcbnew/dsn.cpp:518
msgid "'quoted text delimiter'"
msgstr "'delimiteur de texte balis'"
#: pcbnew/dsn.cpp:524
msgid "'symbol'"
msgstr "'symbole'"
#: pcbnew/dsn.cpp:527
msgid "'number'"
msgstr "'nombre'"
#: pcbnew/dsn.cpp:536
msgid "\"quoted string\""
msgstr "\"chane entre quotes\""
#: pcbnew/dsn.cpp:539
msgid "'end of file'"
msgstr "fin de fichier'"
#: pcbnew/dsn.cpp:556
msgid "in file"
msgstr "dans le fichier"
#: pcbnew/dsn.cpp:557
msgid "on line"
msgstr "en ligne"
#: pcbnew/dsn.cpp:558
msgid "at offset"
msgstr "a l'offset"
#: pcbnew/dsn.cpp:597
msgid "String delimiter must be a single character of ', \", or $"
msgstr "Le caractre de dlimitation de ligne doit tre un seul caractre ', \", or $"
#: pcbnew/dsn.cpp:676
msgid "Un-terminated delimited string"
msgstr "Ligne dlimite non termine"
#: pcbnew/specctra.cpp:271
#: pcbnew/specctra.cpp:280
msgid "Expecting"
msgid "Expecting"
msgstr "Attendu"
msgstr "Attendu"
#: pcbnew/specctra.cpp:300
#: pcbnew/specctra.cpp:1031
#: pcbnew/specctra.cpp:1038
msgid "Unexpected"
msgstr "Inattendu"
#: pcbnew/specctra.cpp:1059
#: pcbnew/specctra.cpp:1817
#, c-format
#, c-format
msgid "Unable to open file \"%s\""
msgid "Unable to open file \"%s\""
msgstr "Ne peut pas ouvrirle fichier \"%s\""
msgstr "Ne peut pas ouvrirle fichier \"%s\""
#: pcbnew/specctra.cpp:401
#: pcbnew/specctra.cpp:1792
#: pcbnew/specctra.cpp:467
#, c-format
#: pcbnew/specctra.cpp:474
msgid "System file error writing to file \"%s\""
msgid "on or off"
msgstr "Erreur systme sur criture fichier \"%s\""
msgstr "on ou off"
#: pcbnew/specctra.cpp:452
msgid "testpoint, guides, or image_conductor"
msgstr "testpoint, guides, ou image_conductor"
#: pcbnew/move_or_drag_track.cpp:714
#: pcbnew/move_or_drag_track.cpp:714
msgid "Unable to drag this segment: too many segments connected"
msgid "Unable to drag this segment: too many segments connected"
...
@@ -4545,6 +4510,30 @@ msgstr "Erreur. Vous devez choisir une couche"
...
@@ -4545,6 +4510,30 @@ msgstr "Erreur. Vous devez choisir une couche"
msgid "Error : you must choose a net name"
msgid "Error : you must choose a net name"
msgstr "Erreur. Vous devez choisir une quipotentielle"
msgstr "Erreur. Vous devez choisir une quipotentielle"
#: pcbnew/dsn.cpp:467
msgid "Line length exceeded"
msgstr "Longueur de ligne dpasse"
#: pcbnew/dsn.cpp:577
msgid "in file"
msgstr "dans le fichier"
#: pcbnew/dsn.cpp:578
msgid "on line"
msgstr "en ligne"
#: pcbnew/dsn.cpp:579
msgid "at offset"
msgstr "a l'offset"
#: pcbnew/dsn.cpp:618
msgid "String delimiter must be a single character of ', \", or $"
msgstr "Le caractre de dlimitation de ligne doit tre un seul caractre ', \", or $"
#: pcbnew/dsn.cpp:697
msgid "Un-terminated delimited string"
msgstr "Ligne dlimite non termine"
#: pcbnew/initpcb.cpp:125
#: pcbnew/initpcb.cpp:125
msgid "Current Board will be lost ?"
msgid "Current Board will be lost ?"
msgstr "Le C.I. courant sera perdu ?"
msgstr "Le C.I. courant sera perdu ?"
...
@@ -4860,11 +4849,11 @@ msgstr "Fichier rapport termin
...
@@ -4860,11 +4849,11 @@ msgstr "Fichier rapport termin
msgid "DRC Report file"
msgid "DRC Report file"
msgstr "Fichier rapport de contrle DRC:"
msgstr "Fichier rapport de contrle DRC:"
#: pcbnew/class_zone.cpp:4
11
#: pcbnew/class_zone.cpp:4
45
msgid "Corners"
msgid "Corners"
msgstr "Sommets"
msgstr "Sommets"
#: pcbnew/class_zone.cpp:4
15
#: pcbnew/class_zone.cpp:4
49
msgid "Hatch lines"
msgid "Hatch lines"
msgstr "Lignes de Hachure"
msgstr "Lignes de Hachure"
...
...
pcbnew/class_board_item.cpp
View file @
97be0050
...
@@ -150,6 +150,11 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
...
@@ -150,6 +150,11 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
case
TYPEZONE_CONTAINER
:
case
TYPEZONE_CONTAINER
:
text
=
_
(
"Zone Outline"
);
text
=
_
(
"Zone Outline"
);
{
ZONE_CONTAINER
*
area
=
(
ZONE_CONTAINER
*
)
this
;
int
ncont
=
area
->
m_Poly
->
GetContour
(
area
->
m_CornerSelection
);
if
(
ncont
)
text
<<
wxT
(
" "
)
<<
_
(
"(Cutout)"
);
}
text
<<
wxT
(
" "
);
text
<<
wxT
(
" "
);
{
{
wxString
TimeStampText
;
wxString
TimeStampText
;
...
...
pcbnew/class_zone.cpp
View file @
97be0050
...
@@ -331,6 +331,7 @@ int ZONE_CONTAINER::HitTestForCorner( const wxPoint& refPos )
...
@@ -331,6 +331,7 @@ int ZONE_CONTAINER::HitTestForCorner( const wxPoint& refPos )
int
dist
;
int
dist
;
unsigned
item_pos
,
lim
;
unsigned
item_pos
,
lim
;
lim
=
m_Poly
->
corner
.
size
();
lim
=
m_Poly
->
corner
.
size
();
m_CornerSelection
=
-
1
;
// Min distance to hit = MIN_DIST_IN_PIXELS pixels :
// Min distance to hit = MIN_DIST_IN_PIXELS pixels :
WinEDA_BasePcbFrame
*
frame
=
((
BOARD
*
)
GetParent
())
->
m_PcbFrame
;
WinEDA_BasePcbFrame
*
frame
=
((
BOARD
*
)
GetParent
())
->
m_PcbFrame
;
...
@@ -340,8 +341,11 @@ int ZONE_CONTAINER::HitTestForCorner( const wxPoint& refPos )
...
@@ -340,8 +341,11 @@ int ZONE_CONTAINER::HitTestForCorner( const wxPoint& refPos )
{
{
dist
=
abs
(
m_Poly
->
corner
[
item_pos
].
x
-
refPos
.
x
)
+
abs
(
m_Poly
->
corner
[
item_pos
].
y
-
refPos
.
y
);
dist
=
abs
(
m_Poly
->
corner
[
item_pos
].
x
-
refPos
.
x
)
+
abs
(
m_Poly
->
corner
[
item_pos
].
y
-
refPos
.
y
);
if
(
dist
<=
min_dist
)
if
(
dist
<=
min_dist
)
{
m_CornerSelection
=
item_pos
;
return
item_pos
;
return
item_pos
;
}
}
}
return
-
1
;
return
-
1
;
}
}
...
@@ -366,6 +370,7 @@ int ZONE_CONTAINER::HitTestForEdge( const wxPoint& refPos )
...
@@ -366,6 +370,7 @@ int ZONE_CONTAINER::HitTestForEdge( const wxPoint& refPos )
/* Test for an entire segment */
/* Test for an entire segment */
unsigned
first_corner_pos
=
0
,
end_segm
;
unsigned
first_corner_pos
=
0
,
end_segm
;
m_CornerSelection
=
-
1
;
for
(
item_pos
=
0
;
item_pos
<
lim
;
item_pos
++
)
for
(
item_pos
=
0
;
item_pos
<
lim
;
item_pos
++
)
{
{
...
@@ -389,8 +394,11 @@ int ZONE_CONTAINER::HitTestForEdge( const wxPoint& refPos )
...
@@ -389,8 +394,11 @@ int ZONE_CONTAINER::HitTestForEdge( const wxPoint& refPos )
m_Poly
->
corner
[
end_segm
].
x
,
m_Poly
->
corner
[
end_segm
].
x
,
m_Poly
->
corner
[
end_segm
].
y
);
m_Poly
->
corner
[
end_segm
].
y
);
if
(
dist
<=
min_dist
)
if
(
dist
<=
min_dist
)
{
m_CornerSelection
=
item_pos
;
return
item_pos
;
return
item_pos
;
}
}
}
return
-
1
;
return
-
1
;
}
}
...
@@ -407,6 +415,9 @@ void ZONE_CONTAINER::Display_Infos( WinEDA_DrawFrame* frame )
...
@@ -407,6 +415,9 @@ void ZONE_CONTAINER::Display_Infos( WinEDA_DrawFrame* frame )
msg
=
_
(
"Zone Outline"
);
msg
=
_
(
"Zone Outline"
);
int
ncont
=
m_Poly
->
GetContour
(
m_CornerSelection
);
if
(
ncont
)
msg
<<
wxT
(
" "
)
<<
_
(
"(Cutout)"
);
text_pos
=
1
;
text_pos
=
1
;
Affiche_1_Parametre
(
frame
,
text_pos
,
_
(
"Type"
),
msg
,
DARKCYAN
);
Affiche_1_Parametre
(
frame
,
text_pos
,
_
(
"Type"
),
msg
,
DARKCYAN
);
...
...
pcbnew/edit.cpp
View file @
97be0050
...
@@ -441,7 +441,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -441,7 +441,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
DrawPanel
->
MouseToCursorSchema
();
DrawPanel
->
MouseToCursorSchema
();
if
(
GetCurItem
()
==
NULL
)
if
(
GetCurItem
()
==
NULL
)
break
;
break
;
Delete_Zone
(
&
dc
,
(
SEGZONE
*
)
GetCurItem
()
);
Delete_Zone
_Fill
(
&
dc
,
(
SEGZONE
*
)
GetCurItem
()
);
SetCurItem
(
NULL
);
SetCurItem
(
NULL
);
break
;
break
;
...
@@ -460,15 +460,11 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -460,15 +460,11 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
break
;
break
;
case
ID_POPUP_PCB_DELETE_ZONE_CONTAINER
:
case
ID_POPUP_PCB_DELETE_ZONE_CONTAINER
:
{
case
ID_POPUP_PCB_DELETE_ZONE_CUTOUT
:
DrawPanel
->
MouseToCursorSchema
();
DrawPanel
->
MouseToCursorSchema
();
ZONE_CONTAINER
*
zone_cont
=
(
ZONE_CONTAINER
*
)
GetCurItem
();
Delete_Zone_Contour
(
&
dc
,
(
ZONE_CONTAINER
*
)
GetCurItem
()
);
zone_cont
->
Draw
(
DrawPanel
,
&
dc
,
wxPoint
(
0
,
0
),
GR_XOR
);
Delete_Zone
(
&
dc
,
NULL
,
zone_cont
->
m_TimeStamp
);
m_Pcb
->
Delete
(
zone_cont
);
SetCurItem
(
NULL
);
SetCurItem
(
NULL
);
break
;
break
;
}
case
ID_POPUP_PCB_DELETE_ZONE_CORNER
:
case
ID_POPUP_PCB_DELETE_ZONE_CORNER
:
Remove_Zone_Corner
(
&
dc
,
(
ZONE_CONTAINER
*
)
GetCurItem
()
);
Remove_Zone_Corner
(
&
dc
,
(
ZONE_CONTAINER
*
)
GetCurItem
()
);
...
@@ -1010,7 +1006,7 @@ void WinEDA_PcbFrame::RemoveStruct( BOARD_ITEM* Item, wxDC* DC )
...
@@ -1010,7 +1006,7 @@ void WinEDA_PcbFrame::RemoveStruct( BOARD_ITEM* Item, wxDC* DC )
break
;
break
;
case
TYPEZONE
:
case
TYPEZONE
:
Delete_Zone
(
DC
,
(
SEGZONE
*
)
Item
);
Delete_Zone
_Fill
(
DC
,
(
SEGZONE
*
)
Item
);
break
;
break
;
case
TYPEMARKER
:
case
TYPEMARKER
:
...
...
pcbnew/onrightclick.cpp
View file @
97be0050
...
@@ -639,37 +639,42 @@ void WinEDA_PcbFrame::createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu
...
@@ -639,37 +639,42 @@ void WinEDA_PcbFrame::createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu
}
}
else
else
{
{
edge_zone
->
m_CornerSelection
=
-
1
;
wxMenu
*
zones_menu
=
new
wxMenu
();
ADD_MENUITEM_WITH_SUBMENU
(
aPopMenu
,
zones_menu
,
-
1
,
_
(
"Zones"
),
add_zone_xpm
);
int
index
;
int
index
;
if
(
(
index
=
edge_zone
->
HitTestForCorner
(
GetScreen
()
->
m_Curseur
)
)
>=
0
)
if
(
(
index
=
edge_zone
->
HitTestForCorner
(
GetScreen
()
->
m_Curseur
)
)
>=
0
)
{
{
edge_zone
->
m_CornerSelection
=
index
;
ADD_MENUITEM
(
zones_menu
,
ID_POPUP_PCB_MOVE_ZONE_CORNER
,
ADD_MENUITEM
(
aPopMenu
,
ID_POPUP_PCB_MOVE_ZONE_CORNER
,
_
(
"Move Corner"
),
move_xpm
);
_
(
"Move Corner"
),
move_xpm
);
ADD_MENUITEM
(
aPopM
enu
,
ID_POPUP_PCB_DELETE_ZONE_CORNER
,
ADD_MENUITEM
(
zones_m
enu
,
ID_POPUP_PCB_DELETE_ZONE_CORNER
,
_
(
"Delete Corner"
),
delete_xpm
);
_
(
"Delete Corner"
),
delete_xpm
);
}
}
else
if
(
(
index
=
edge_zone
->
HitTestForEdge
(
GetScreen
()
->
m_Curseur
)
)
>=
0
)
else
if
(
(
index
=
edge_zone
->
HitTestForEdge
(
GetScreen
()
->
m_Curseur
)
)
>=
0
)
{
{
edge_zone
->
m_CornerSelection
=
index
;
ADD_MENUITEM
(
zones_menu
,
ID_POPUP_PCB_ADD_ZONE_CORNER
,
ADD_MENUITEM
(
aPopMenu
,
ID_POPUP_PCB_ADD_ZONE_CORNER
,
_
(
"Create Corner"
),
Add_Corner_xpm
);
_
(
"Create Corner"
),
Add_Corner_xpm
);
}
}
aPopM
enu
->
AppendSeparator
();
zones_m
enu
->
AppendSeparator
();
ADD_MENUITEM
(
aPopM
enu
,
ID_POPUP_PCB_ZONE_ADD_SIMILAR_ZONE
,
ADD_MENUITEM
(
zones_m
enu
,
ID_POPUP_PCB_ZONE_ADD_SIMILAR_ZONE
,
_
(
"Add Similar Zone"
),
add_zone_xpm
);
_
(
"Add Similar Zone"
),
add_zone_xpm
);
ADD_MENUITEM
(
aPopM
enu
,
ID_POPUP_PCB_ZONE_ADD_CUTOUT_ZONE
,
ADD_MENUITEM
(
zones_m
enu
,
ID_POPUP_PCB_ZONE_ADD_CUTOUT_ZONE
,
_
(
"Add Cutout Area"
),
add_zone_cutout
);
_
(
"Add Cutout Area"
),
add_zone_cutout
);
aPopM
enu
->
AppendSeparator
();
zones_m
enu
->
AppendSeparator
();
ADD_MENUITEM
(
aPopM
enu
,
ID_POPUP_PCB_FILL_ZONE
,
ADD_MENUITEM
(
zones_m
enu
,
ID_POPUP_PCB_FILL_ZONE
,
_
(
"Fill Zone"
),
fill_zone_xpm
);
_
(
"Fill Zone"
),
fill_zone_xpm
);
ADD_MENUITEM
(
aPopM
enu
,
ID_POPUP_PCB_EDIT_ZONE_PARAMS
,
ADD_MENUITEM
(
zones_m
enu
,
ID_POPUP_PCB_EDIT_ZONE_PARAMS
,
_
(
"Edit Zone Params"
),
edit_xpm
);
_
(
"Edit Zone Params"
),
edit_xpm
);
ADD_MENUITEM
(
aPopMenu
,
ID_POPUP_PCB_DELETE_ZONE_CONTAINER
,
if
(
index
>=
0
&&
edge_zone
->
m_Poly
->
IsCutoutContour
(
edge_zone
->
m_CornerSelection
)
)
ADD_MENUITEM
(
zones_menu
,
ID_POPUP_PCB_DELETE_ZONE_CUTOUT
,
_
(
"Delete Cutout"
),
delete_xpm
);
ADD_MENUITEM
(
zones_menu
,
ID_POPUP_PCB_DELETE_ZONE_CONTAINER
,
_
(
"Delete Zone Outline"
),
delete_xpm
);
_
(
"Delete Zone Outline"
),
delete_xpm
);
}
}
}
}
...
...
pcbnew/zone_filling_algorithm.cpp
View file @
97be0050
...
@@ -48,7 +48,7 @@ int ZONE_CONTAINER::Fill_Zone( WinEDA_PcbFrame* frame, wxDC* DC, bool verbose )
...
@@ -48,7 +48,7 @@ int ZONE_CONTAINER::Fill_Zone( WinEDA_PcbFrame* frame, wxDC* DC, bool verbose )
s_TimeStamp
=
m_TimeStamp
;
s_TimeStamp
=
m_TimeStamp
;
// Delete the old filling, if any :
// Delete the old filling, if any :
frame
->
Delete_Zone
(
DC
,
NULL
,
m_TimeStamp
);
frame
->
Delete_Zone
_Fill
(
DC
,
NULL
,
m_TimeStamp
);
// calculate the fixed step of the routing matrix as 5 mils or more
// calculate the fixed step of the routing matrix as 5 mils or more
E_scale
=
g_GridRoutingSize
/
50
;
E_scale
=
g_GridRoutingSize
/
50
;
...
...
pcbnew/zones_by_polygon.cpp
View file @
97be0050
...
@@ -104,11 +104,11 @@ void WinEDA_PcbFrame::Add_Zone_Cutout( wxDC* DC, ZONE_CONTAINER* zone_container
...
@@ -104,11 +104,11 @@ void WinEDA_PcbFrame::Add_Zone_Cutout( wxDC* DC, ZONE_CONTAINER* zone_container
/*****************************************************************************/
/*****************************************************************************/
void
WinEDA_PcbFrame
::
Delete_Zone
(
wxDC
*
DC
,
SEGZONE
*
aZone
,
long
aTimestamp
)
void
WinEDA_PcbFrame
::
Delete_Zone
_Fill
(
wxDC
*
DC
,
SEGZONE
*
aZone
,
long
aTimestamp
)
/******************************************************************************/
/******************************************************************************/
/** Function Delete_Zone
/** Function Delete_Zone
_Fill
* Remove the zone which include the segment aZone, or the zone which have the given time stamp.
* Remove the zone
fillig
which include the segment aZone, or the zone which have the given time stamp.
* A zone is a group of segments which have the same TimeStamp
* A zone is a group of segments which have the same TimeStamp
* @param DC = current Device Context (can be NULL)
* @param DC = current Device Context (can be NULL)
* @param aZone = zone segment within the zone to delete. Can be NULL
* @param aZone = zone segment within the zone to delete. Can be NULL
...
@@ -257,13 +257,12 @@ void WinEDA_PcbFrame::Start_Move_Zone_Corner( wxDC* DC, ZONE_CONTAINER* zone_con
...
@@ -257,13 +257,12 @@ void WinEDA_PcbFrame::Start_Move_Zone_Corner( wxDC* DC, ZONE_CONTAINER* zone_con
*/
*/
{
{
/* Show the Net */
/* Show the Net */
if
(
(
g_HightLigth_NetCode
>
0
)
&&
(
g_HightLigth_NetCode
!=
s_NetcodeSelection
)
)
if
(
g_HightLigt_Status
)
{
{
Hight_Light
(
DC
);
// Remove old hightlight selection
Hight_Light
(
DC
);
// Remove old hightlight selection
}
}
g_HightLigth_NetCode
=
s_NetcodeSelection
;
g_HightLigth_NetCode
=
s_NetcodeSelection
=
zone_container
->
GetNet
();
if
(
!
g_HightLigt_Status
)
Hight_Light
(
DC
);
Hight_Light
(
DC
);
zone_container
->
m_Flags
=
IN_EDIT
;
zone_container
->
m_Flags
=
IN_EDIT
;
...
@@ -327,7 +326,7 @@ void WinEDA_PcbFrame::Remove_Zone_Corner( wxDC* DC, ZONE_CONTAINER * zone_contai
...
@@ -327,7 +326,7 @@ void WinEDA_PcbFrame::Remove_Zone_Corner( wxDC* DC, ZONE_CONTAINER * zone_contai
{
{
if
(
zone_container
->
m_Poly
->
GetNumCorners
()
<=
3
)
if
(
zone_container
->
m_Poly
->
GetNumCorners
()
<=
3
)
{
{
Delete_Zone
(
DC
,
NULL
,
zone_container
->
m_TimeStamp
);
Delete_Zone
_Fill
(
DC
,
NULL
,
zone_container
->
m_TimeStamp
);
m_Pcb
->
Delete
(
zone_container
);
m_Pcb
->
Delete
(
zone_container
);
return
;
return
;
}
}
...
@@ -466,7 +465,7 @@ EDGE_ZONE* WinEDA_PcbFrame::Begin_Zone( wxDC* DC )
...
@@ -466,7 +465,7 @@ EDGE_ZONE* WinEDA_PcbFrame::Begin_Zone( wxDC* DC )
s_Zone_Hatching
=
s_CurrentZone
->
m_Poly
->
GetHatchStyle
();
s_Zone_Hatching
=
s_CurrentZone
->
m_Poly
->
GetHatchStyle
();
}
}
/* Show the Net */
/* Show the Net */
if
(
(
g_HightLigth_NetCode
>
0
)
&&
(
g_HightLigth_NetCode
!=
s_NetcodeSelection
)
)
if
(
g_HightLigt_Status
&&
(
g_HightLigth_NetCode
!=
s_NetcodeSelection
)
)
{
{
Hight_Light
(
DC
);
// Remove old hightlight selection
Hight_Light
(
DC
);
// Remove old hightlight selection
}
}
...
@@ -474,7 +473,6 @@ EDGE_ZONE* WinEDA_PcbFrame::Begin_Zone( wxDC* DC )
...
@@ -474,7 +473,6 @@ EDGE_ZONE* WinEDA_PcbFrame::Begin_Zone( wxDC* DC )
if
(
s_CurrentZone
)
if
(
s_CurrentZone
)
s_NetcodeSelection
=
s_CurrentZone
->
GetNet
();
s_NetcodeSelection
=
s_CurrentZone
->
GetNet
();
g_HightLigth_NetCode
=
s_NetcodeSelection
;
g_HightLigth_NetCode
=
s_NetcodeSelection
;
if
(
!
g_HightLigt_Status
)
Hight_Light
(
DC
);
Hight_Light
(
DC
);
if
(
!
s_AddCutoutToCurrentZone
)
if
(
!
s_AddCutoutToCurrentZone
)
...
@@ -742,6 +740,39 @@ void WinEDA_PcbFrame::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* zone_container
...
@@ -742,6 +740,39 @@ void WinEDA_PcbFrame::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* zone_container
GetScreen
()
->
SetModify
();
GetScreen
()
->
SetModify
();
}
}
/************************************************************************************/
void
WinEDA_PcbFrame
::
Delete_Zone_Contour
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
)
/************************************************************************************/
/** Function Delete_Zone_Contour
* Remove the zone which include the segment aZone, or the zone which have the given time stamp.
* A zone is a group of segments which have the same TimeStamp
* @param DC = current Device Context (can be NULL)
* @param zone_container = zone to modify
* the member .m_CornerSelection is used to find the outline to remove.
* if the outline is the main outline, all the zone_container is removed (deleted)
* otherwise, the hole is deleted
*/
{
int
ncont
=
zone_container
->
m_Poly
->
GetContour
(
zone_container
->
m_CornerSelection
);
if
(
DC
)
zone_container
->
Draw
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
GR_XOR
);
Delete_Zone_Fill
(
DC
,
NULL
,
zone_container
->
m_TimeStamp
);
// Remove fill segments
if
(
ncont
==
0
)
// This is the main outline: remove all
m_Pcb
->
Delete
(
zone_container
);
else
{
zone_container
->
m_Poly
->
RemoveContour
(
ncont
);
if
(
DC
)
zone_container
->
Draw
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
GR_OR
);
}
GetScreen
()
->
SetModify
();
}
/***************************************************************************************/
/***************************************************************************************/
int
WinEDA_PcbFrame
::
Fill_Zone
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
,
bool
verbose
)
int
WinEDA_PcbFrame
::
Fill_Zone
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
,
bool
verbose
)
...
@@ -770,13 +801,13 @@ int WinEDA_PcbFrame::Fill_Zone( wxDC* DC, ZONE_CONTAINER* zone_container, bool v
...
@@ -770,13 +801,13 @@ int WinEDA_PcbFrame::Fill_Zone( wxDC* DC, ZONE_CONTAINER* zone_container, bool v
/* Show the Net */
/* Show the Net */
s_NetcodeSelection
=
zone_container
->
GetNet
();
s_NetcodeSelection
=
zone_container
->
GetNet
();
if
(
(
g_HightLigth_NetCode
>
0
)
&&
(
g_HightLigth_NetCode
!=
s_NetcodeSelection
)
&&
DC
)
if
(
g_HightLigt_Status
&&
(
g_HightLigth_NetCode
!=
s_NetcodeSelection
)
&&
DC
)
{
{
Hight_Light
(
DC
);
// Remove old hightlight selection
Hight_Light
(
DC
);
// Remove old hightlight selection
}
}
g_HightLigth_NetCode
=
s_NetcodeSelection
;
g_HightLigth_NetCode
=
s_NetcodeSelection
;
if
(
!
g_HightLigt_Status
&&
DC
)
if
(
DC
)
Hight_Light
(
DC
);
Hight_Light
(
DC
);
if
(
g_HightLigth_NetCode
>
0
)
if
(
g_HightLigth_NetCode
>
0
)
...
...
pcbnew/zones_test_and_combine_areas.cpp
View file @
97be0050
...
@@ -20,12 +20,6 @@ bool bDontShowIntersectionArcsWarning;
...
@@ -20,12 +20,6 @@ bool bDontShowIntersectionArcsWarning;
bool
bDontShowIntersectionWarning
;
bool
bDontShowIntersectionWarning
;
#define poly m_Poly
// carea: describes a copper area
#define carea ZONE_CONTAINER
/**
/**
* Function AddArea
* Function AddArea
* add empty copper area to net
* add empty copper area to net
...
@@ -69,7 +63,7 @@ ZONE_CONTAINER* BOARD::InsertArea( int netcode, int iarea, int layer, int x, int
...
@@ -69,7 +63,7 @@ ZONE_CONTAINER* BOARD::InsertArea( int netcode, int iarea, int layer, int x, int
else
else
m_ZoneDescriptorList
.
push_back
(
new_area
);
m_ZoneDescriptorList
.
push_back
(
new_area
);
new_area
->
p
oly
->
Start
(
layer
,
1
,
10
*
NM_PER_MIL
,
x
,
y
,
new_area
->
m_P
oly
->
Start
(
layer
,
1
,
10
*
NM_PER_MIL
,
x
,
y
,
hatch
);
hatch
);
return
new_area
;
return
new_area
;
}
}
...
@@ -85,9 +79,9 @@ ZONE_CONTAINER* BOARD::InsertArea( int netcode, int iarea, int layer, int x, int
...
@@ -85,9 +79,9 @@ ZONE_CONTAINER* BOARD::InsertArea( int netcode, int iarea, int layer, int x, int
*/
*/
int
BOARD
::
CompleteArea
(
ZONE_CONTAINER
*
area_to_complete
,
int
style
)
int
BOARD
::
CompleteArea
(
ZONE_CONTAINER
*
area_to_complete
,
int
style
)
{
{
if
(
area_to_complete
->
p
oly
->
GetNumCorners
()
>
2
)
if
(
area_to_complete
->
m_P
oly
->
GetNumCorners
()
>
2
)
{
{
area_to_complete
->
p
oly
->
Close
(
style
);
area_to_complete
->
m_P
oly
->
Close
(
style
);
return
1
;
return
1
;
}
}
else
else
...
@@ -111,7 +105,7 @@ int BOARD::CompleteArea( ZONE_CONTAINER* area_to_complete, int style )
...
@@ -111,7 +105,7 @@ int BOARD::CompleteArea( ZONE_CONTAINER* area_to_complete, int style )
*/
*/
int
BOARD
::
TestAreaPolygon
(
ZONE_CONTAINER
*
CurrArea
)
int
BOARD
::
TestAreaPolygon
(
ZONE_CONTAINER
*
CurrArea
)
{
{
CPolyLine
*
p
=
CurrArea
->
p
oly
;
CPolyLine
*
p
=
CurrArea
->
m_P
oly
;
// first, check for sides intersecting other sides, especially arcs
// first, check for sides intersecting other sides, especially arcs
bool
bInt
=
false
;
bool
bInt
=
false
;
...
@@ -234,7 +228,7 @@ int BOARD::TestAreaPolygon( ZONE_CONTAINER* CurrArea )
...
@@ -234,7 +228,7 @@ int BOARD::TestAreaPolygon( ZONE_CONTAINER* CurrArea )
int
BOARD
::
ClipAreaPolygon
(
ZONE_CONTAINER
*
CurrArea
,
int
BOARD
::
ClipAreaPolygon
(
ZONE_CONTAINER
*
CurrArea
,
bool
bMessageBoxArc
,
bool
bMessageBoxInt
,
bool
bRetainArcs
)
bool
bMessageBoxArc
,
bool
bMessageBoxInt
,
bool
bRetainArcs
)
{
{
CPolyLine
*
p
=
CurrArea
->
p
oly
;
CPolyLine
*
p
=
CurrArea
->
m_P
oly
;
int
test
=
TestAreaPolygon
(
CurrArea
);
// this sets utility2 flag
int
test
=
TestAreaPolygon
(
CurrArea
);
// this sets utility2 flag
if
(
test
==
-
1
&&
!
bRetainArcs
)
if
(
test
==
-
1
&&
!
bRetainArcs
)
...
@@ -284,7 +278,7 @@ int BOARD::ClipAreaPolygon( ZONE_CONTAINER* CurrArea,
...
@@ -284,7 +278,7 @@ int BOARD::ClipAreaPolygon( ZONE_CONTAINER* CurrArea,
{
{
std
::
vector
<
CPolyLine
*>
*
pa
=
new
std
::
vector
<
CPolyLine
*>
;
std
::
vector
<
CPolyLine
*>
*
pa
=
new
std
::
vector
<
CPolyLine
*>
;
p
->
Undraw
();
p
->
Undraw
();
int
n_poly
=
CurrArea
->
p
oly
->
NormalizeWithGpc
(
pa
,
bRetainArcs
);
int
n_poly
=
CurrArea
->
m_P
oly
->
NormalizeWithGpc
(
pa
,
bRetainArcs
);
if
(
n_poly
>
1
)
// i.e if clippinf has created some polygons, we must add these new copper areas
if
(
n_poly
>
1
)
// i.e if clippinf has created some polygons, we must add these new copper areas
{
{
for
(
int
ip
=
1
;
ip
<
n_poly
;
ip
++
)
for
(
int
ip
=
1
;
ip
<
n_poly
;
ip
++
)
...
@@ -295,9 +289,9 @@ int BOARD::ClipAreaPolygon( ZONE_CONTAINER* CurrArea,
...
@@ -295,9 +289,9 @@ int BOARD::ClipAreaPolygon( ZONE_CONTAINER* CurrArea,
// remove the poly that was automatically created for the new area
// remove the poly that was automatically created for the new area
// and replace it with a poly from NormalizeWithGpc
// and replace it with a poly from NormalizeWithGpc
delete
CurrArea
->
p
oly
;
delete
CurrArea
->
m_P
oly
;
CurrArea
->
p
oly
=
new_p
;
CurrArea
->
m_P
oly
=
new_p
;
CurrArea
->
p
oly
->
Draw
();
CurrArea
->
m_P
oly
->
Draw
();
CurrArea
->
utility
=
1
;
CurrArea
->
utility
=
1
;
}
}
}
}
...
@@ -368,15 +362,15 @@ int BOARD::CombineAllAreasInNet( int aNetCode, bool bMessageBox, bool bUseUtilit
...
@@ -368,15 +362,15 @@ int BOARD::CombineAllAreasInNet( int aNetCode, bool bMessageBox, bool bUseUtilit
continue
;
continue
;
// legal polygon
// legal polygon
CRect
b1
=
curr_area
->
p
oly
->
GetCornerBounds
();
CRect
b1
=
curr_area
->
m_P
oly
->
GetCornerBounds
();
bool
mod_ia1
=
false
;
bool
mod_ia1
=
false
;
for
(
unsigned
ia2
=
m_ZoneDescriptorList
.
size
()
-
1
;
ia2
>
ia1
;
ia2
--
)
for
(
unsigned
ia2
=
m_ZoneDescriptorList
.
size
()
-
1
;
ia2
>
ia1
;
ia2
--
)
{
{
ZONE_CONTAINER
*
area2
=
m_ZoneDescriptorList
[
ia2
];
ZONE_CONTAINER
*
area2
=
m_ZoneDescriptorList
[
ia2
];
if
(
curr_area
->
poly
->
GetLayer
()
==
area2
->
poly
->
GetLayer
()
if
(
curr_area
->
GetLayer
()
==
area2
->
GetLayer
()
&&
curr_area
->
utility2
!=
-
1
&&
area2
->
utility2
!=
-
1
)
&&
curr_area
->
utility2
!=
-
1
&&
area2
->
utility2
!=
-
1
)
{
{
CRect
b2
=
area2
->
p
oly
->
GetCornerBounds
();
CRect
b2
=
area2
->
m_P
oly
->
GetCornerBounds
();
if
(
!
(
b1
.
left
>
b2
.
right
||
b1
.
right
<
b2
.
left
if
(
!
(
b1
.
left
>
b2
.
right
||
b1
.
right
<
b2
.
left
||
b1
.
bottom
>
b2
.
top
||
b1
.
top
<
b2
.
bottom
)
)
||
b1
.
bottom
>
b2
.
top
||
b1
.
top
<
b2
.
bottom
)
)
{
{
...
@@ -443,7 +437,7 @@ int BOARD::CombineAllAreasInNet( int aNetCode, bool bMessageBox, bool bUseUtilit
...
@@ -443,7 +437,7 @@ int BOARD::CombineAllAreasInNet( int aNetCode, bool bMessageBox, bool bUseUtilit
*/
*/
bool
BOARD
::
TestAreaIntersections
(
ZONE_CONTAINER
*
area_to_test
)
bool
BOARD
::
TestAreaIntersections
(
ZONE_CONTAINER
*
area_to_test
)
{
{
CPolyLine
*
poly1
=
area_to_test
->
p
oly
;
CPolyLine
*
poly1
=
area_to_test
->
m_P
oly
;
for
(
unsigned
ia2
=
0
;
ia2
<
m_ZoneDescriptorList
.
size
();
ia2
++
)
for
(
unsigned
ia2
=
0
;
ia2
<
m_ZoneDescriptorList
.
size
();
ia2
++
)
{
{
...
@@ -456,7 +450,7 @@ bool BOARD::TestAreaIntersections( ZONE_CONTAINER* area_to_test )
...
@@ -456,7 +450,7 @@ bool BOARD::TestAreaIntersections( ZONE_CONTAINER* area_to_test )
if
(
area_to_test
->
GetLayer
()
!=
area2
->
GetLayer
()
)
if
(
area_to_test
->
GetLayer
()
!=
area2
->
GetLayer
()
)
continue
;
continue
;
CPolyLine
*
poly2
=
area2
->
p
oly
;
CPolyLine
*
poly2
=
area2
->
m_P
oly
;
// test bounding rects
// test bounding rects
CRect
b1
=
poly1
->
GetCornerBounds
();
CRect
b1
=
poly1
->
GetCornerBounds
();
...
@@ -488,7 +482,7 @@ bool BOARD::TestAreaIntersections( ZONE_CONTAINER* area_to_test )
...
@@ -488,7 +482,7 @@ bool BOARD::TestAreaIntersections( ZONE_CONTAINER* area_to_test )
yf1
=
poly1
->
GetY
(
is1
);
yf1
=
poly1
->
GetY
(
is1
);
}
}
style1
=
poly1
->
GetSideStyle
(
ic1
);
style1
=
poly1
->
GetSideStyle
(
ic1
);
for
(
int
icont2
=
0
;
icont2
<
poly2
->
GetNumContours
();
icont2
++
)
for
(
int
icont2
=
0
;
icont2
<
poly2
->
GetNumContours
();
icont2
++
)
{
{
int
is2
=
poly2
->
GetContourStart
(
icont2
);
int
is2
=
poly2
->
GetContourStart
(
icont2
);
int
ie2
=
poly2
->
GetContourEnd
(
icont2
);
int
ie2
=
poly2
->
GetContourEnd
(
icont2
);
...
@@ -539,8 +533,8 @@ int BOARD::TestAreaIntersection( ZONE_CONTAINER* area_ref, ZONE_CONTAINER* area_
...
@@ -539,8 +533,8 @@ int BOARD::TestAreaIntersection( ZONE_CONTAINER* area_ref, ZONE_CONTAINER* area_
if
(
area_ref
->
GetLayer
()
!=
area_to_test
->
GetLayer
()
)
if
(
area_ref
->
GetLayer
()
!=
area_to_test
->
GetLayer
()
)
return
0
;
return
0
;
CPolyLine
*
poly1
=
area_ref
->
p
oly
;
CPolyLine
*
poly1
=
area_ref
->
m_P
oly
;
CPolyLine
*
poly2
=
area_to_test
->
p
oly
;
CPolyLine
*
poly2
=
area_to_test
->
m_P
oly
;
// test bounding rects
// test bounding rects
CRect
b1
=
poly1
->
GetCornerBounds
();
CRect
b1
=
poly1
->
GetCornerBounds
();
...
@@ -647,8 +641,8 @@ int BOARD::CombineAreas( ZONE_CONTAINER* area_ref, ZONE_CONTAINER* area_to_combi
...
@@ -647,8 +641,8 @@ int BOARD::CombineAreas( ZONE_CONTAINER* area_ref, ZONE_CONTAINER* area_to_combi
#endif
#endif
// polygons intersect, combine them
// polygons intersect, combine them
CPolyLine
*
poly1
=
area_ref
->
p
oly
;
CPolyLine
*
poly1
=
area_ref
->
m_P
oly
;
CPolyLine
*
poly2
=
area_to_combine
->
p
oly
;
CPolyLine
*
poly2
=
area_to_combine
->
m_P
oly
;
std
::
vector
<
CArc
>
arc_array1
;
std
::
vector
<
CArc
>
arc_array1
;
std
::
vector
<
CArc
>
arc_array2
;
std
::
vector
<
CArc
>
arc_array2
;
poly1
->
MakeGpcPoly
(
-
1
,
&
arc_array1
);
poly1
->
MakeGpcPoly
(
-
1
,
&
arc_array1
);
...
@@ -747,7 +741,7 @@ void dra_areas( CDlgLog* log, int copper_layers,
...
@@ -747,7 +741,7 @@ void dra_areas( CDlgLog* log, int copper_layers,
// now iterate through all areas
// now iterate through all areas
for( int ia = 0; ia<net->nareas; ia++ )
for( int ia = 0; ia<net->nareas; ia++ )
{
{
carea
* a = &net->area[ia];
ZONE_CONTAINER
* a = &net->area[ia];
// iterate through all nets again
// iterate through all nets again
POSITION pos2 = pos;
POSITION pos2 = pos;
...
@@ -759,17 +753,17 @@ void dra_areas( CDlgLog* log, int copper_layers,
...
@@ -759,17 +753,17 @@ void dra_areas( CDlgLog* log, int copper_layers,
cnet* net2 = (cnet*) ptr2;
cnet* net2 = (cnet*) ptr2;
for( int ia2 = 0; ia2<net2->nareas; ia2++ )
for( int ia2 = 0; ia2<net2->nareas; ia2++ )
{
{
carea
* a2 = &net2->area[ia2];
ZONE_CONTAINER
* a2 = &net2->area[ia2];
// test for same layer
// test for same layer
if( a->
poly->GetLayer() == a2->p
oly->GetLayer() )
if( a->
m_Poly->GetLayer() == a2->m_P
oly->GetLayer() )
{
{
// test for points inside one another
// test for points inside one another
for( int ic = 0; ic<a->
p
oly->GetNumCorners(); ic++ )
for( int ic = 0; ic<a->
m_P
oly->GetNumCorners(); ic++ )
{
{
int x = a->
p
oly->GetX( ic );
int x = a->
m_P
oly->GetX( ic );
int y = a->
p
oly->GetY( ic );
int y = a->
m_P
oly->GetY( ic );
if( a2->
p
oly->TestPointInside( x, y ) )
if( a2->
m_P
oly->TestPointInside( x, y ) )
{
{
// COPPERAREA_COPPERAREA error
// COPPERAREA_COPPERAREA error
id id_a = net->id;
id id_a = net->id;
...
@@ -804,11 +798,11 @@ void dra_areas( CDlgLog* log, int copper_layers,
...
@@ -804,11 +798,11 @@ void dra_areas( CDlgLog* log, int copper_layers,
}
}
}
}
for( int ic2 = 0; ic2<a2->
p
oly->GetNumCorners(); ic2++ )
for( int ic2 = 0; ic2<a2->
m_P
oly->GetNumCorners(); ic2++ )
{
{
int x = a2->
p
oly->GetX( ic2 );
int x = a2->
m_P
oly->GetX( ic2 );
int y = a2->
p
oly->GetY( ic2 );
int y = a2->
m_P
oly->GetY( ic2 );
if( a->
p
oly->TestPointInside( x, y ) )
if( a->
m_P
oly->TestPointInside( x, y ) )
{
{
// COPPERAREA_COPPERAREA error
// COPPERAREA_COPPERAREA error
id id_a = net2->id;
id id_a = net2->id;
...
@@ -841,10 +835,10 @@ void dra_areas( CDlgLog* log, int copper_layers,
...
@@ -841,10 +835,10 @@ void dra_areas( CDlgLog* log, int copper_layers,
}
}
// now test spacing between areas
// now test spacing between areas
for( int icont = 0; icont<a->
p
oly->GetNumContours(); icont++ )
for( int icont = 0; icont<a->
m_P
oly->GetNumContours(); icont++ )
{
{
int ic_start = a->
p
oly->GetContourStart( icont );
int ic_start = a->
m_P
oly->GetContourStart( icont );
int ic_end = a->
p
oly->GetContourEnd( icont );
int ic_end = a->
m_P
oly->GetContourEnd( icont );
for( int ic = ic_start; ic<=ic_end; ic++ )
for( int ic = ic_start; ic<=ic_end; ic++ )
{
{
id id_a = net->id;
id id_a = net->id;
...
@@ -852,24 +846,24 @@ void dra_areas( CDlgLog* log, int copper_layers,
...
@@ -852,24 +846,24 @@ void dra_areas( CDlgLog* log, int copper_layers,
id_a.i = ia;
id_a.i = ia;
id_a.sst = ID_SIDE;
id_a.sst = ID_SIDE;
id_a.ii = ic;
id_a.ii = ic;
int ax1 = a->
p
oly->GetX( ic );
int ax1 = a->
m_P
oly->GetX( ic );
int ay1 = a->
p
oly->GetY( ic );
int ay1 = a->
m_P
oly->GetY( ic );
int ax2, ay2;
int ax2, ay2;
if( ic == ic_end )
if( ic == ic_end )
{
{
ax2 = a->
p
oly->GetX( ic_start );
ax2 = a->
m_P
oly->GetX( ic_start );
ay2 = a->
p
oly->GetY( ic_start );
ay2 = a->
m_P
oly->GetY( ic_start );
}
}
else
else
{
{
ax2 = a->
p
oly->GetX( ic + 1 );
ax2 = a->
m_P
oly->GetX( ic + 1 );
ay2 = a->
p
oly->GetY( ic + 1 );
ay2 = a->
m_P
oly->GetY( ic + 1 );
}
}
int astyle = a->
p
oly->GetSideStyle( ic );
int astyle = a->
m_P
oly->GetSideStyle( ic );
for( int icont2 = 0; icont2<a2->
p
oly->GetNumContours(); icont2++ )
for( int icont2 = 0; icont2<a2->
m_P
oly->GetNumContours(); icont2++ )
{
{
int ic_start2 = a2->
p
oly->GetContourStart( icont2 );
int ic_start2 = a2->
m_P
oly->GetContourStart( icont2 );
int ic_end2 = a2->
p
oly->GetContourEnd( icont2 );
int ic_end2 = a2->
m_P
oly->GetContourEnd( icont2 );
for( int ic2 = ic_start2; ic2<=ic_end2; ic2++ )
for( int ic2 = ic_start2; ic2<=ic_end2; ic2++ )
{
{
id id_b = net2->id;
id id_b = net2->id;
...
@@ -877,20 +871,20 @@ void dra_areas( CDlgLog* log, int copper_layers,
...
@@ -877,20 +871,20 @@ void dra_areas( CDlgLog* log, int copper_layers,
id_b.i = ia2;
id_b.i = ia2;
id_b.sst = ID_SIDE;
id_b.sst = ID_SIDE;
id_b.ii = ic2;
id_b.ii = ic2;
int bx1 = a2->
p
oly->GetX( ic2 );
int bx1 = a2->
m_P
oly->GetX( ic2 );
int by1 = a2->
p
oly->GetY( ic2 );
int by1 = a2->
m_P
oly->GetY( ic2 );
int bx2, by2;
int bx2, by2;
if( ic2 == ic_end2 )
if( ic2 == ic_end2 )
{
{
bx2 = a2->
p
oly->GetX( ic_start2 );
bx2 = a2->
m_P
oly->GetX( ic_start2 );
by2 = a2->
p
oly->GetY( ic_start2 );
by2 = a2->
m_P
oly->GetY( ic_start2 );
}
}
else
else
{
{
bx2 = a2->
p
oly->GetX( ic2 + 1 );
bx2 = a2->
m_P
oly->GetX( ic2 + 1 );
by2 = a2->
p
oly->GetY( ic2 + 1 );
by2 = a2->
m_P
oly->GetY( ic2 + 1 );
}
}
int bstyle = a2->
p
oly->GetSideStyle( ic2 );
int bstyle = a2->
m_P
oly->GetSideStyle( ic2 );
int x, y;
int x, y;
int d = ::GetClearanceBetweenSegments( bx1,
int d = ::GetClearanceBetweenSegments( bx1,
by1,
by1,
...
...
polygon/PolyLine.cpp
View file @
97be0050
...
@@ -59,7 +59,7 @@ CPolyLine::~CPolyLine()
...
@@ -59,7 +59,7 @@ CPolyLine::~CPolyLine()
// If bRetainArcs == TRUE, try to retain arcs in polys
// If bRetainArcs == TRUE, try to retain arcs in polys
// Returns number of external contours, or -1 if error
// Returns number of external contours, or -1 if error
//
//
int
CPolyLine
::
NormalizeWithGpc
(
std
::
vector
<
CPolyLine
*>
*
pa
,
BOOL
bRetainArcs
)
int
CPolyLine
::
NormalizeWithGpc
(
std
::
vector
<
CPolyLine
*>
*
pa
,
bool
bRetainArcs
)
{
{
std
::
vector
<
CArc
>
arc_array
;
std
::
vector
<
CArc
>
arc_array
;
...
@@ -495,7 +495,7 @@ int CPolyLine::RestoreArcs( std::vector<CArc> * arc_array, std::vector<CPolyLine
...
@@ -495,7 +495,7 @@ int CPolyLine::RestoreArcs( std::vector<CArc> * arc_array, std::vector<CPolyLine
}
}
// find arcs and replace them
// find arcs and replace them
BOOL
bFound
;
bool
bFound
;
int
arc_start
;
int
arc_start
;
int
arc_end
;
int
arc_end
;
for
(
unsigned
iarc
=
0
;
iarc
<
arc_array
->
size
();
iarc
++
)
for
(
unsigned
iarc
=
0
;
iarc
<
arc_array
->
size
();
iarc
++
)
...
@@ -637,7 +637,7 @@ void CPolyLine::Start( int layer, int w, int sel_box, int x, int y,
...
@@ -637,7 +637,7 @@ void CPolyLine::Start( int layer, int w, int sel_box, int x, int y,
// add a corner to unclosed polyline
// add a corner to unclosed polyline
//
//
void
CPolyLine
::
AppendCorner
(
int
x
,
int
y
,
int
style
,
BOOL
bDraw
)
void
CPolyLine
::
AppendCorner
(
int
x
,
int
y
,
int
style
,
bool
bDraw
)
{
{
Undraw
();
Undraw
();
CPolyPt
poly_pt
(
x
,
y
);
CPolyPt
poly_pt
(
x
,
y
);
...
@@ -663,7 +663,7 @@ void CPolyLine::AppendCorner( int x, int y, int style, BOOL bDraw )
...
@@ -663,7 +663,7 @@ void CPolyLine::AppendCorner( int x, int y, int style, BOOL bDraw )
// close last polyline contour
// close last polyline contour
//
//
void
CPolyLine
::
Close
(
int
style
,
BOOL
bDraw
)
void
CPolyLine
::
Close
(
int
style
,
bool
bDraw
)
{
{
if
(
GetClosed
()
)
if
(
GetClosed
()
)
ASSERT
(
0
);
ASSERT
(
0
);
...
@@ -686,13 +686,13 @@ void CPolyLine::MoveCorner( int ic, int x, int y )
...
@@ -686,13 +686,13 @@ void CPolyLine::MoveCorner( int ic, int x, int y )
// delete corner and adjust arrays
// delete corner and adjust arrays
//
//
void
CPolyLine
::
DeleteCorner
(
int
ic
,
BOOL
bDraw
)
void
CPolyLine
::
DeleteCorner
(
int
ic
,
bool
bDraw
)
{
{
Undraw
();
Undraw
();
int
icont
=
GetContour
(
ic
);
int
icont
=
GetContour
(
ic
);
int
istart
=
GetContourStart
(
icont
);
int
istart
=
GetContourStart
(
icont
);
int
iend
=
GetContourEnd
(
icont
);
int
iend
=
GetContourEnd
(
icont
);
BOOL
bClosed
=
icont
<
GetNumContours
()
-
1
||
GetClosed
();
bool
bClosed
=
icont
<
GetNumContours
()
-
1
||
GetClosed
();
if
(
!
bClosed
)
if
(
!
bClosed
)
{
{
...
@@ -719,7 +719,14 @@ void CPolyLine::DeleteCorner( int ic, BOOL bDraw )
...
@@ -719,7 +719,14 @@ void CPolyLine::DeleteCorner( int ic, BOOL bDraw )
Draw
();
Draw
();
}
}
/******************************************/
void
CPolyLine
::
RemoveContour
(
int
icont
)
void
CPolyLine
::
RemoveContour
(
int
icont
)
/******************************************/
/**
* Function RemoveContour
* @param icont = contour number to remove
* remove a contour only if there is more than 1 contour
*/
{
{
Undraw
();
Undraw
();
int
istart
=
GetContourStart
(
icont
);
int
istart
=
GetContourStart
(
icont
);
...
@@ -733,8 +740,8 @@ void CPolyLine::RemoveContour( int icont )
...
@@ -733,8 +740,8 @@ void CPolyLine::RemoveContour( int icont )
else
if
(
icont
==
GetNumContours
()
-
1
)
else
if
(
icont
==
GetNumContours
()
-
1
)
{
{
// remove last contour
// remove last contour
corner
.
erase
(
corner
.
begin
()
+
i
con
t
,
corner
.
end
()
);
corner
.
erase
(
corner
.
begin
()
+
i
star
t
,
corner
.
end
()
);
side_style
.
erase
(
side_style
.
begin
()
+
i
con
t
,
side_style
.
end
()
);
side_style
.
erase
(
side_style
.
begin
()
+
i
star
t
,
side_style
.
end
()
);
}
}
else
else
{
{
...
@@ -749,7 +756,9 @@ void CPolyLine::RemoveContour( int icont )
...
@@ -749,7 +756,9 @@ void CPolyLine::RemoveContour( int icont )
}
}
/******************************************/
void
CPolyLine
::
RemoveAllContours
(
void
)
void
CPolyLine
::
RemoveAllContours
(
void
)
/******************************************/
/**
/**
* function RemoveAllContours
* function RemoveAllContours
* removes all corners from the lists.
* removes all corners from the lists.
...
@@ -1162,11 +1171,6 @@ int CPolyLine::GetW()
...
@@ -1162,11 +1171,6 @@ int CPolyLine::GetW()
return
m_Width
;
return
m_Width
;
}
}
int
CPolyLine
::
GetSelBoxSize
()
{
return
m_sel_box
;
}
int
CPolyLine
::
GetNumContours
()
int
CPolyLine
::
GetNumContours
()
{
{
int
ncont
=
0
;
int
ncont
=
0
;
...
@@ -1462,7 +1466,7 @@ void CPolyLine::Hatch()
...
@@ -1462,7 +1466,7 @@ void CPolyLine::Hatch()
// test to see if a point is inside polyline
// test to see if a point is inside polyline
//
//
BOOL
CPolyLine
::
TestPointInside
(
int
x
,
int
y
)
bool
CPolyLine
::
TestPointInside
(
int
x
,
int
y
)
{
{
enum
{
MAXPTS
=
100
};
enum
{
MAXPTS
=
100
};
if
(
!
GetClosed
()
)
if
(
!
GetClosed
()
)
...
@@ -1538,7 +1542,7 @@ BOOL CPolyLine::TestPointInside( int x, int y )
...
@@ -1538,7 +1542,7 @@ BOOL CPolyLine::TestPointInside( int x, int y )
// test to see if a point is inside polyline contour
// test to see if a point is inside polyline contour
//
//
BOOL
CPolyLine
::
TestPointInsideContour
(
int
icont
,
int
x
,
int
y
)
bool
CPolyLine
::
TestPointInsideContour
(
int
icont
,
int
x
,
int
y
)
{
{
if
(
icont
>=
GetNumContours
()
)
if
(
icont
>=
GetNumContours
()
)
return
FALSE
;
return
FALSE
;
...
@@ -1662,25 +1666,6 @@ int CPolyLine::TestIntersection( CPolyLine * poly )
...
@@ -1662,25 +1666,6 @@ int CPolyLine::TestIntersection( CPolyLine * poly )
return
0
;
return
0
;
}
}
// set selection box size
//
void
CPolyLine
::
SetSelBoxSize
(
int
sel_box
)
{
// Undraw();
m_sel_box
=
sel_box
;
// Draw();
}
// set pointer to display list, and draw into display list
//
void
CPolyLine
::
SetDisplayList
(
CDisplayList
*
dl
)
{
if
(
m_dlist
)
Undraw
();
m_dlist
=
dl
;
if
(
m_dlist
)
Draw
();
}
// copy data from another poly, but don't draw it
// copy data from another poly, but don't draw it
//
//
...
@@ -1701,6 +1686,20 @@ void CPolyLine::Copy( CPolyLine * src )
...
@@ -1701,6 +1686,20 @@ void CPolyLine::Copy( CPolyLine * src )
FreeGpcPoly
();
FreeGpcPoly
();
}
}
/*******************************************/
bool
CPolyLine
::
IsCutoutContour
(
int
icont
)
/*******************************************/
/*
* return true if the corner icont is inside the outline (i.e it is a hole)
*/
{
int
ncont
=
GetContour
(
icont
);
if
(
ncont
==
0
)
// the first contour is the main outline, not an hole
return
false
;
return
true
;
}
void
CPolyLine
::
MoveOrigin
(
int
x_off
,
int
y_off
)
void
CPolyLine
::
MoveOrigin
(
int
x_off
,
int
y_off
)
{
{
Undraw
();
Undraw
();
...
@@ -1719,7 +1718,11 @@ void CPolyLine::MoveOrigin( int x_off, int y_off )
...
@@ -1719,7 +1718,11 @@ void CPolyLine::MoveOrigin( int x_off, int y_off )
//
//
void
CPolyLine
::
SetX
(
int
ic
,
int
x
)
{
corner
[
ic
].
x
=
x
;
}
void
CPolyLine
::
SetX
(
int
ic
,
int
x
)
{
corner
[
ic
].
x
=
x
;
}
void
CPolyLine
::
SetY
(
int
ic
,
int
y
)
{
corner
[
ic
].
y
=
y
;
}
void
CPolyLine
::
SetY
(
int
ic
,
int
y
)
{
corner
[
ic
].
y
=
y
;
}
void
CPolyLine
::
SetEndContour
(
int
ic
,
BOOL
end_contour
)
{
corner
[
ic
].
end_contour
=
end_contour
;
}
void
CPolyLine
::
SetEndContour
(
int
ic
,
bool
end_contour
)
{
corner
[
ic
].
end_contour
=
end_contour
;
}
// Create CPolyLine for a pad
// Create CPolyLine for a pad
//
//
...
@@ -1750,7 +1753,7 @@ CPolyLine * CPolyLine::MakePolylineForPad( int type, int x, int y, int w, int l,
...
@@ -1750,7 +1753,7 @@ CPolyLine * CPolyLine::MakePolylineForPad( int type, int x, int y, int w, int l,
//
//
void
CPolyLine
::
AddContourForPadClearance
(
int
type
,
int
x
,
int
y
,
int
w
,
void
CPolyLine
::
AddContourForPadClearance
(
int
type
,
int
x
,
int
y
,
int
w
,
int
l
,
int
r
,
int
angle
,
int
fill_clearance
,
int
l
,
int
r
,
int
angle
,
int
fill_clearance
,
int
hole_w
,
int
hole_clearance
,
BOOL
bThermal
,
int
spoke_w
)
int
hole_w
,
int
hole_clearance
,
bool
bThermal
,
int
spoke_w
)
{
{
int
dx
=
l
/
2
;
int
dx
=
l
/
2
;
int
dy
=
w
/
2
;
int
dy
=
w
/
2
;
...
...
polygon/PolyLine.h
View file @
97be0050
...
@@ -46,17 +46,17 @@ public:
...
@@ -46,17 +46,17 @@ public:
int
style
;
int
style
;
int
xi
,
yi
,
xf
,
yf
;
int
xi
,
yi
,
xf
,
yf
;
int
n_steps
;
// number of straight-line segments in gpc_poly
int
n_steps
;
// number of straight-line segments in gpc_poly
BOOL
bFound
;
bool
bFound
;
};
};
class
CPolyPt
class
CPolyPt
{
{
public
:
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
;
};
{
x
=
qx
;
y
=
qy
;
end_contour
=
qf
;
utility
=
0
;
};
int
x
;
int
x
;
int
y
;
int
y
;
BOOL
end_contour
;
bool
end_contour
;
int
utility
;
int
utility
;
};
};
...
@@ -75,11 +75,11 @@ public:
...
@@ -75,11 +75,11 @@ public:
// functions for modifying polyline
// functions for modifying polyline
void
Start
(
int
layer
,
int
w
,
int
sel_box
,
int
x
,
int
y
,
void
Start
(
int
layer
,
int
w
,
int
sel_box
,
int
x
,
int
y
,
int
hatch
);
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
=
TRUE
);
void
InsertCorner
(
int
ic
,
int
x
,
int
y
);
void
InsertCorner
(
int
ic
,
int
x
,
int
y
);
void
DeleteCorner
(
int
ic
,
BOOL
bDraw
=
TRUE
);
void
DeleteCorner
(
int
ic
,
bool
bDraw
=
TRUE
);
void
MoveCorner
(
int
ic
,
int
x
,
int
y
);
void
MoveCorner
(
int
ic
,
int
x
,
int
y
);
void
Close
(
int
style
=
STRAIGHT
,
BOOL
bDraw
=
TRUE
);
void
Close
(
int
style
=
STRAIGHT
,
bool
bDraw
=
TRUE
);
void
RemoveContour
(
int
icont
);
void
RemoveContour
(
int
icont
);
void
RemoveAllContours
(
void
);
void
RemoveAllContours
(
void
);
...
@@ -93,7 +93,7 @@ public:
...
@@ -93,7 +93,7 @@ public:
void
Undraw
();
void
Undraw
();
void
Draw
(
CDisplayList
*
dl
=
NULL
);
void
Draw
(
CDisplayList
*
dl
=
NULL
);
void
Hatch
();
void
Hatch
();
void
MakeVisible
(
BOOL
visible
=
TRUE
);
void
MakeVisible
(
bool
visible
=
TRUE
);
void
MoveOrigin
(
int
x_off
,
int
y_off
);
void
MoveOrigin
(
int
x_off
,
int
y_off
);
// misc. functions
// misc. functions
...
@@ -101,8 +101,9 @@ public:
...
@@ -101,8 +101,9 @@ public:
CRect
GetCornerBounds
();
CRect
GetCornerBounds
();
CRect
GetCornerBounds
(
int
icont
);
CRect
GetCornerBounds
(
int
icont
);
void
Copy
(
CPolyLine
*
src
);
void
Copy
(
CPolyLine
*
src
);
BOOL
TestPointInside
(
int
x
,
int
y
);
bool
TestPointInside
(
int
x
,
int
y
);
BOOL
TestPointInsideContour
(
int
icont
,
int
x
,
int
y
);
bool
TestPointInsideContour
(
int
icont
,
int
x
,
int
y
);
bool
IsCutoutContour
(
int
icont
);
int
TestIntersection
(
CPolyLine
*
poly
);
int
TestIntersection
(
CPolyLine
*
poly
);
void
AppendArc
(
int
xi
,
int
yi
,
int
xf
,
int
yf
,
int
xc
,
int
yc
,
int
num
);
void
AppendArc
(
int
xi
,
int
yi
,
int
xf
,
int
yf
,
int
xc
,
int
yc
,
int
num
);
...
@@ -124,30 +125,25 @@ public:
...
@@ -124,30 +125,25 @@ public:
void
SetUtility
(
int
ic
,
int
utility
){
corner
[
ic
].
utility
=
utility
;
};
void
SetUtility
(
int
ic
,
int
utility
){
corner
[
ic
].
utility
=
utility
;
};
int
GetW
();
int
GetW
();
int
GetSideStyle
(
int
is
);
int
GetSideStyle
(
int
is
);
id
GetId
();
int
GetSelBoxSize
();
CDisplayList
*
GetDisplayList
(){
return
m_dlist
;
};
int
GetHatchStyle
(){
return
m_HatchStyle
;
}
int
GetHatchStyle
(){
return
m_HatchStyle
;
}
void
SetHatch
(
int
hatch
){
Undraw
();
m_HatchStyle
=
hatch
;
Draw
();
};
void
SetHatch
(
int
hatch
){
Undraw
();
m_HatchStyle
=
hatch
;
Draw
();
};
void
SetX
(
int
ic
,
int
x
);
void
SetX
(
int
ic
,
int
x
);
void
SetY
(
int
ic
,
int
y
);
void
SetY
(
int
ic
,
int
y
);
void
SetEndContour
(
int
ic
,
BOOL
end_contour
);
void
SetEndContour
(
int
ic
,
bool
end_contour
);
// void SetLayer( int layer );
// void SetLayer( int layer );
void
SetW
(
int
w
);
void
SetW
(
int
w
);
void
SetSideStyle
(
int
is
,
int
style
);
void
SetSideStyle
(
int
is
,
int
style
);
void
SetSelBoxSize
(
int
sel_box
);
void
SetDisplayList
(
CDisplayList
*
dl
);
// GPC functions
// GPC functions
int
MakeGpcPoly
(
int
icontour
=
0
,
std
::
vector
<
CArc
>
*
arc_array
=
NULL
);
int
MakeGpcPoly
(
int
icontour
=
0
,
std
::
vector
<
CArc
>
*
arc_array
=
NULL
);
int
FreeGpcPoly
();
int
FreeGpcPoly
();
gpc_polygon
*
GetGpcPoly
(){
return
m_gpc_poly
;
};
gpc_polygon
*
GetGpcPoly
(){
return
m_gpc_poly
;
};
int
NormalizeWithGpc
(
std
::
vector
<
CPolyLine
*>
*
pa
=
NULL
,
BOOL
bRetainArcs
=
FALSE
);
int
NormalizeWithGpc
(
std
::
vector
<
CPolyLine
*>
*
pa
=
NULL
,
bool
bRetainArcs
=
FALSE
);
int
RestoreArcs
(
std
::
vector
<
CArc
>
*
arc_array
,
std
::
vector
<
CPolyLine
*>
*
pa
=
NULL
);
int
RestoreArcs
(
std
::
vector
<
CArc
>
*
arc_array
,
std
::
vector
<
CPolyLine
*>
*
pa
=
NULL
);
CPolyLine
*
MakePolylineForPad
(
int
type
,
int
x
,
int
y
,
int
w
,
int
l
,
int
r
,
int
angle
);
CPolyLine
*
MakePolylineForPad
(
int
type
,
int
x
,
int
y
,
int
w
,
int
l
,
int
r
,
int
angle
);
void
AddContourForPadClearance
(
int
type
,
int
x
,
int
y
,
int
w
,
void
AddContourForPadClearance
(
int
type
,
int
x
,
int
y
,
int
w
,
int
l
,
int
r
,
int
angle
,
int
fill_clearance
,
int
l
,
int
r
,
int
angle
,
int
fill_clearance
,
int
hole_w
,
int
hole_clearance
,
BOOL
bThermal
=
FALSE
,
int
spoke_w
=
0
);
int
hole_w
,
int
hole_clearance
,
bool
bThermal
=
FALSE
,
int
spoke_w
=
0
);
void
ClipGpcPolygon
(
gpc_op
op
,
CPolyLine
*
poly
);
void
ClipGpcPolygon
(
gpc_op
op
,
CPolyLine
*
poly
);
// PHP functions
// PHP functions
...
@@ -174,7 +170,7 @@ public:
...
@@ -174,7 +170,7 @@ public:
private
:
private
:
gpc_polygon
*
m_gpc_poly
;
// polygon in gpc format
gpc_polygon
*
m_gpc_poly
;
// polygon in gpc format
polygon
*
m_php_poly
;
polygon
*
m_php_poly
;
BOOL
bDrawn
;
bool
bDrawn
;
};
};
#endif // #ifndef POLYLINE_H
#endif // #ifndef POLYLINE_H
polygon/PolyLine2Kicad.h
View file @
97be0050
...
@@ -31,31 +31,6 @@ enum
...
@@ -31,31 +31,6 @@ enum
PAD_OCTAGON
PAD_OCTAGON
};
};
/*
enum
{
// visible layers
LAY_SELECTION = 0,
LAY_BACKGND,
LAY_VISIBLE_GRID,
LAY_HILITE,
LAY_DRC_ERROR,
LAY_BOARD_OUTLINE,
LAY_RAT_LINE,
LAY_SILK_TOP,
LAY_SILK_BOTTOM,
LAY_SM_TOP,
LAY_SM_BOTTOM,
LAY_PAD_THRU,
LAY_TOP_COPPER,
LAY_BOTTOM_COPPER,
// invisible layers
LAY_MASK_TOP = -100,
LAY_MASK_BOTTOM = -101,
LAY_PASTE_TOP = -102,
LAY_PASTE_BOTTOM = -103
};
*/
#define LAY_SELECTION 0
#define LAY_SELECTION 0
#define LAY_TOP_COPPER 0
#define LAY_TOP_COPPER 0
...
...
polygon/cdisplaylist_stuff.cpp
View file @
97be0050
...
@@ -2,25 +2,10 @@
...
@@ -2,25 +2,10 @@
#include "PolyLine.h"
#include "PolyLine.h"
dl_element
*
CDisplayList
::
Add
(
id
id
,
void
*
ptr
,
int
glayer
,
int
gtype
,
int
visible
,
int
w
,
int
holew
,
int
x
,
int
y
,
int
xf
,
int
yf
,
int
xo
,
int
yo
,
int
radius
,
int
orig_layer
)
{
return
NULL
;
}
dl_element
*
CDisplayList
::
AddSelector
(
id
id
,
void
*
ptr
,
int
glayer
,
int
gtype
,
int
visible
,
int
w
,
int
holew
,
int
x
,
int
y
,
int
xf
,
int
yf
,
int
xo
,
int
yo
,
int
radius
)
{
return
NULL
;
}
void
CDisplayList
::
Set_visible
(
dl_element
*
el
,
int
visible
)
void
CDisplayList
::
Set_visible
(
dl_element
*
el
,
int
visible
)
{
{
}
}
int
CDisplayList
::
StopDragging
()
int
CDisplayList
::
StopDragging
()
{
{
return
0
;
return
0
;
...
@@ -31,10 +16,6 @@ int CDisplayList::CancelHighLight()
...
@@ -31,10 +16,6 @@ int CDisplayList::CancelHighLight()
return
0
;
return
0
;
}
}
void
CDisplayList
::
Set_id
(
dl_element
*
el
,
id
*
id
)
{
}
id
CDisplayList
::
Remove
(
dl_element
*
element
)
id
CDisplayList
::
Remove
(
dl_element
*
element
)
{
{
return
0
;
return
0
;
...
@@ -83,3 +64,4 @@ int CDisplayList::StartDraggingArc( CDC * pDC, int style, int x, int y, int xi,
...
@@ -83,3 +64,4 @@ int CDisplayList::StartDraggingArc( CDC * pDC, int style, int x, int y, int xi,
{
{
return
0
;
return
0
;
}
}
polygon/php_polygon.cpp
View file @
97be0050
...
@@ -656,10 +656,15 @@ BOOL polygon::isInside( vertex * v )
...
@@ -656,10 +656,15 @@ BOOL polygon::isInside( vertex * v )
int
winding_number3
=
0
;
int
winding_number3
=
0
;
int
winding_number4
=
0
;
int
winding_number4
=
0
;
//** vertex * point_at_infinity = new vertex(-10000000,v->Y()); // Create point at infinity
//** vertex * point_at_infinity = new vertex(-10000000,v->Y()); // Create point at infinity
vertex
*
point_at_infinity
=
new
vertex
(
-
1000000000
,
-
50000000
);
// Create point at infinity
/*
vertex * point_at_infinity = new vertex(-1000000000,-50000000); // Create point at infinity
vertex * point_at_infinity2 = new vertex(1000000000,+50000000); // Create point at infinity
vertex * point_at_infinity2 = new vertex(1000000000,+50000000); // Create point at infinity
vertex * point_at_infinity3 = new vertex(500000000,1000000000); // Create point at infinity
vertex * point_at_infinity3 = new vertex(500000000,1000000000); // Create point at infinity
vertex * point_at_infinity4 = new vertex(-500000000,1000000000); // Create point at infinity
vertex * point_at_infinity4 = new vertex(-500000000,1000000000); // Create point at infinity
*/
vertex
point_at_infinity
(
-
1000000000
,
-
50000000
);
// Create point at infinity
vertex
point_at_infinity2
(
1000000000
,
+
50000000
);
// Create point at infinity
vertex
point_at_infinity3
(
500000000
,
1000000000
);
// Create point at infinity
vertex
point_at_infinity4
(
-
500000000
,
1000000000
);
// Create point at infinity
vertex
*
q
=
m_first
;
// End vertex of a line segment in polygon
vertex
*
q
=
m_first
;
// End vertex of a line segment in polygon
do
do
{
{
...
@@ -667,20 +672,20 @@ BOOL polygon::isInside( vertex * v )
...
@@ -667,20 +672,20 @@ BOOL polygon::isInside( vertex * v )
{
{
int
n
;
int
n
;
double
x
[
2
],
y
[
2
],
aP
[
2
],
aQ
[
2
];
double
x
[
2
],
y
[
2
],
aP
[
2
],
aQ
[
2
];
if
(
ints
(
point_at_infinity
,
v
,
q
,
nxt
(
q
->
Next
()),
&
n
,
x
,
y
,
aP
,
aQ
)
)
if
(
ints
(
&
point_at_infinity
,
v
,
q
,
nxt
(
q
->
Next
()),
&
n
,
x
,
y
,
aP
,
aQ
)
)
winding_number
+=
n
;
// Add number of intersections found
winding_number
+=
n
;
// Add number of intersections found
if
(
ints
(
point_at_infinity2
,
v
,
q
,
nxt
(
q
->
Next
()),
&
n
,
x
,
y
,
aP
,
aQ
)
)
if
(
ints
(
&
point_at_infinity2
,
v
,
q
,
nxt
(
q
->
Next
()),
&
n
,
x
,
y
,
aP
,
aQ
)
)
winding_number2
+=
n
;
// Add number of intersections found
winding_number2
+=
n
;
// Add number of intersections found
if
(
ints
(
point_at_infinity3
,
v
,
q
,
nxt
(
q
->
Next
()),
&
n
,
x
,
y
,
aP
,
aQ
)
)
if
(
ints
(
&
point_at_infinity3
,
v
,
q
,
nxt
(
q
->
Next
()),
&
n
,
x
,
y
,
aP
,
aQ
)
)
winding_number3
+=
n
;
// Add number of intersections found
winding_number3
+=
n
;
// Add number of intersections found
if
(
ints
(
point_at_infinity4
,
v
,
q
,
nxt
(
q
->
Next
()),
&
n
,
x
,
y
,
aP
,
aQ
)
)
if
(
ints
(
&
point_at_infinity4
,
v
,
q
,
nxt
(
q
->
Next
()),
&
n
,
x
,
y
,
aP
,
aQ
)
)
winding_number4
+=
n
;
// Add number of intersections found
winding_number4
+=
n
;
// Add number of intersections found
}
}
q
=
q
->
Next
();
q
=
q
->
Next
();
}
}
while
(
q
->
id
()
!=
m_first
->
id
()
);
while
(
q
->
id
()
!=
m_first
->
id
()
);
delete
point_at_infinity
;
//
delete point_at_infinity;
delete
point_at_infinity2
;
//
delete point_at_infinity2;
if
(
winding_number
%
2
!=
winding_number2
%
2
if
(
winding_number
%
2
!=
winding_number2
%
2
||
winding_number3
%
2
!=
winding_number4
%
2
||
winding_number3
%
2
!=
winding_number4
%
2
||
winding_number
%
2
!=
winding_number3
%
2
)
||
winding_number
%
2
!=
winding_number3
%
2
)
...
...
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