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
ab66f9ec
Commit
ab66f9ec
authored
Nov 14, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rework on zones:try to fix a filling problem with kbool
parent
9b2c6f04
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
535 additions
and
474 deletions
+535
-474
kicad.mo
internat/fr/kicad.mo
+0
-0
kicad.po
internat/fr/kicad.po
+12
-15
CMakeLists.txt
pcbnew/CMakeLists.txt
+3
-2
board_items_to_polygon_shape_transform.cpp
pcbnew/board_items_to_polygon_shape_transform.cpp
+318
-0
class_pad.h
pcbnew/class_pad.h
+13
-0
class_track.h
pcbnew/class_track.h
+15
-0
debug_kbool_key_file_fct.cpp
pcbnew/debug_kbool_key_file_fct.cpp
+20
-13
debug_kbool_key_file_fct.h
pcbnew/debug_kbool_key_file_fct.h
+12
-11
zones_convert_brd_items_to_polygons.cpp
pcbnew/zones_convert_brd_items_to_polygons.cpp
+141
-432
PolyLine.cpp
polygon/PolyLine.cpp
+1
-1
No files found.
internat/fr/kicad.mo
View file @
ab66f9ec
No preview for this file type
internat/fr/kicad.po
View file @
ab66f9ec
...
@@ -3,7 +3,7 @@ msgstr ""
...
@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: kicad\n"
"Project-Id-Version: kicad\n"
"Report-Msgid-Bugs-To: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-11-13 17:41+0100\n"
"POT-Creation-Date: 2009-11-13 17:41+0100\n"
"PO-Revision-Date: 2009-11-13
17:47
+0100\n"
"PO-Revision-Date: 2009-11-13
20:06
+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"
...
@@ -286,7 +286,7 @@ msgstr "Inclure Modules"
...
@@ -286,7 +286,7 @@ msgstr "Inclure Modules"
#: pcbnew/block.cpp:128
#: pcbnew/block.cpp:128
msgid "Include tracks"
msgid "Include tracks"
msgstr "Inclure
P
istes"
msgstr "Inclure
p
istes"
#: pcbnew/block.cpp:133
#: pcbnew/block.cpp:133
msgid "Include zones"
msgid "Include zones"
...
@@ -3183,6 +3183,8 @@ msgid ""
...
@@ -3183,6 +3183,8 @@ msgid ""
"Set these values to 0\n"
"Set these values to 0\n"
"to use Parent footprint or global values"
"to use Parent footprint or global values"
msgstr ""
msgstr ""
"Mettre ces valeurs à 0\n"
"pour utiliser les valeurs du module parent ou les valeurs globales"
#: pcbnew/dialog_pad_properties_base.cpp:237
#: pcbnew/dialog_pad_properties_base.cpp:237
msgid "Net pad clearance"
msgid "Net pad clearance"
...
@@ -3936,7 +3938,7 @@ msgstr "NETCLASS: '%s' a une isolation:%s qui est moins que la valeur globale:%s
...
@@ -3936,7 +3938,7 @@ msgstr "NETCLASS: '%s' a une isolation:%s qui est moins que la valeur globale:%s
#: pcbnew/drc.cpp:340
#: pcbnew/drc.cpp:340
#, c-format
#, c-format
msgid "NETCLASS: '%s' has TrackWidth:%s which is less than global:%s"
msgid "NETCLASS: '%s' has TrackWidth:%s which is less than global:%s"
msgstr ""
msgstr "
NETCLASS: '%s' a une largeur de piste: %s plust petite que la valeur globale:%s
"
#: pcbnew/drc.cpp:354
#: pcbnew/drc.cpp:354
#, c-format
#, c-format
...
@@ -4791,9 +4793,8 @@ msgid "Pads Mask Clearance"
...
@@ -4791,9 +4793,8 @@ msgid "Pads Mask Clearance"
msgstr "Marge Masque des Pads"
msgstr "Marge Masque des Pads"
#: pcbnew/menubarpcb.cpp:232
#: pcbnew/menubarpcb.cpp:232
#, fuzzy
msgid "Adjust the global clearance between pads and the solder resist mask"
msgid "Adjust the global clearance between pads and the solder resist mask"
msgstr "
Ceci est l'espace entre pads et le masqu
e"
msgstr "
Ajuster la marge globale entre pads et le masque de vernis épargn
e"
#: pcbnew/menubarpcb.cpp:242
#: pcbnew/menubarpcb.cpp:242
msgid "Texts and Drawings"
msgid "Texts and Drawings"
...
@@ -4990,7 +4991,7 @@ msgstr "<<<"
...
@@ -4990,7 +4991,7 @@ msgstr "<<<"
#: pcbnew/dialog_design_rules_base.cpp:114
#: pcbnew/dialog_design_rules_base.cpp:114
msgid "Move the selected nets in the right list to the left list"
msgid "Move the selected nets in the right list to the left list"
msgstr ""
msgstr "
Déplacer les nets sélectionnés de la liste droite vers la liste gauche
"
#: pcbnew/dialog_design_rules_base.cpp:118
#: pcbnew/dialog_design_rules_base.cpp:118
msgid ">>>"
msgid ">>>"
...
@@ -5356,7 +5357,7 @@ msgstr "Valeurs locales pour marges sur masques:"
...
@@ -5356,7 +5357,7 @@ msgstr "Valeurs locales pour marges sur masques:"
#: pcbnew/dialog_edit_module_for_Modedit_base.cpp:116
#: pcbnew/dialog_edit_module_for_Modedit_base.cpp:116
#: pcbnew/dialog_edit_module_for_BoardEditor_base.cpp:145
#: pcbnew/dialog_edit_module_for_BoardEditor_base.cpp:145
msgid "Set these values to 0 to use global values"
msgid "Set these values to 0 to use global values"
msgstr ""
msgstr "
Mettre ces valeurs à 0 pour utiliser les valeurs globales
"
#: pcbnew/dialog_edit_module_for_Modedit_base.cpp:127
#: pcbnew/dialog_edit_module_for_Modedit_base.cpp:127
#: pcbnew/dialog_edit_module_for_BoardEditor_base.cpp:156
#: pcbnew/dialog_edit_module_for_BoardEditor_base.cpp:156
...
@@ -8183,9 +8184,8 @@ msgid "Library browser"
...
@@ -8183,9 +8184,8 @@ msgid "Library browser"
msgstr "Visualisateur des librairies"
msgstr "Visualisateur des librairies"
#: eeschema/tool_sch.cpp:58
#: eeschema/tool_sch.cpp:58
#, fuzzy
msgid "Navigate schematic hierarchy"
msgid "Navigate schematic hierarchy"
msgstr "
Sauver le Projet schématiqu
e"
msgstr "
Navigateur de hiérarchi
e"
#: eeschema/tool_sch.cpp:84
#: eeschema/tool_sch.cpp:84
msgid "Print schematic"
msgid "Print schematic"
...
@@ -8212,9 +8212,8 @@ msgid "Schematic Electric Rules Check"
...
@@ -8212,9 +8212,8 @@ msgid "Schematic Electric Rules Check"
msgstr "Contrôle des règles électriques"
msgstr "Contrôle des règles électriques"
#: eeschema/tool_sch.cpp:129
#: eeschema/tool_sch.cpp:129
#, fuzzy
msgid "Bill of material and/or Cross references"
msgid "Bill of material and/or Cross references"
msgstr "Liste des composants et références croisées"
msgstr "Liste des composants
ou/
et références croisées"
#: eeschema/tool_sch.cpp:133
#: eeschema/tool_sch.cpp:133
msgid "Backannotate footprint"
msgid "Backannotate footprint"
...
@@ -8261,9 +8260,8 @@ msgid "Place hierarchical sheet"
...
@@ -8261,9 +8260,8 @@ msgid "Place hierarchical sheet"
msgstr "Placer feuille hiérarchique"
msgstr "Placer feuille hiérarchique"
#: eeschema/tool_sch.cpp:215
#: eeschema/tool_sch.cpp:215
#, fuzzy
msgid "Place a pin sheet, imported from the corresponding hierarchical label in sheet"
msgid "Place a pin sheet, imported from the corresponding hierarchical label in sheet"
msgstr "Placer une pin hiérarchique, importée d
'un un label hiérarchique
dans la feuille."
msgstr "Placer une pin hiérarchique, importée d
u label hiérarchique correspondant
dans la feuille."
#: eeschema/tool_sch.cpp:220
#: eeschema/tool_sch.cpp:220
msgid "Place hierarchical pin to sheet"
msgid "Place hierarchical pin to sheet"
...
@@ -10417,9 +10415,8 @@ msgid "&Configuration"
...
@@ -10417,9 +10415,8 @@ msgid "&Configuration"
msgstr "&Configuration"
msgstr "&Configuration"
#: cvpcb/menucfg.cpp:49
#: cvpcb/menucfg.cpp:49
#, fuzzy
msgid "Set libraries and library search paths"
msgid "Set libraries and library search paths"
msgstr "
Librairie modules PCB %s non trouvée dans les chemins de recherche
"
msgstr "
Sélectionner les librairie et les chemins de recherche des librairies
"
#: cvpcb/menucfg.cpp:56
#: cvpcb/menucfg.cpp:56
msgid "Keep Open On Save"
msgid "Keep Open On Save"
...
...
pcbnew/CMakeLists.txt
View file @
ab66f9ec
...
@@ -11,10 +11,11 @@ set(PCBNEW_SRCS
...
@@ -11,10 +11,11 @@ set(PCBNEW_SRCS
automove.cpp
automove.cpp
autoplac.cpp
autoplac.cpp
autorout.cpp
autorout.cpp
block.cpp
block_module_editor.cpp
board.cpp
board.cpp
board_items_to_polygon_shape_transform.cpp
board_undo_redo.cpp
board_undo_redo.cpp
block.cpp
block_module_editor.cpp
build_BOM_from_board.cpp
build_BOM_from_board.cpp
clean.cpp
clean.cpp
# cleaningoptions_dialog.cpp
# cleaningoptions_dialog.cpp
...
...
pcbnew/board_items_to_polygon_shape_transform.cpp
0 → 100644
View file @
ab66f9ec
This diff is collapsed.
Click to expand it.
pcbnew/class_pad.h
View file @
ab66f9ec
...
@@ -141,6 +141,19 @@ public:
...
@@ -141,6 +141,19 @@ public:
m_Pos
=
aPos
;
m_Pos
=
aPos
;
}
}
/** function TransformPadWithClearanceToPolygon
* Convert the pad shape to a closed polygon
* Used in filling zones calculations
* Circles and arcs are approximated by segments
* @param aCornerBuffer = a buffer to store the polygon
* @param aClearanceValue = the clearance around the pad
* @param aCircleToSegmentsCount = the number of segments to approximate a circle
* @param aCorrectionFactor = the correction to apply to circles radius to keep
* clearance when the circle is approxiamted by segment bigger or equal
* to the real clearance value (usually near from 1.0)
*/
void
TransformPadWithClearanceToPolygon
(
std
::
vector
<
wxPoint
>&
aCornerBuffer
,
int
aClearanceValue
,
int
aCircleToSegmentsCount
,
double
aCorrectionFactor
);
/**
/**
* Function GetClearance
* Function GetClearance
...
...
pcbnew/class_track.h
View file @
ab66f9ec
...
@@ -148,6 +148,21 @@ public:
...
@@ -148,6 +148,21 @@ public:
/* divers */
/* divers */
int
Shape
()
const
{
return
m_Shape
&
0xFF
;
}
int
Shape
()
const
{
return
m_Shape
&
0xFF
;
}
/** Function TransformTrackWithClearanceToPolygon
* Convert the track shape to a closed polygon
* Used in filling zones calculations
* Circles (vias) and arcs (ends of tracks) are approximated by segments
* @param aCornerBuffer = a buffer to store the polygon
* @param aClearanceValue = the clearance around the pad
* @param aCircleToSegmentsCount = the number of segments to approximate a circle
* @param aCorrectionFactor = the correction to apply to circles radius to keep
* clearance when the circle is approxiamted by segment bigger or equal
* to the real clearance value (usually near from 1.0)
*/
void
TransformTrackWithClearanceToPolygon
(
std
::
vector
<
wxPoint
>&
aCornerBuffer
,
int
aClearanceValue
,
int
aCircleToSegmentsCount
,
double
aCorrectionFactor
);
/**
/**
* Function SetDrillValue
* Function SetDrillValue
* Set the drill value for vias
* Set the drill value for vias
...
...
pcbnew/debug_kbool_key_file_fct.cpp
View file @
ab66f9ec
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
#include "fctsys.h"
#include "fctsys.h"
#include "common.h"
#include "common.h"
#include "kicad_string.h"
#include "pcbnew.h"
#include "pcbnew.h"
#include "wxPcbStruct.h"
#include "wxPcbStruct.h"
#include "zones.h"
#include "zones.h"
...
@@ -11,14 +12,22 @@
...
@@ -11,14 +12,22 @@
#include "debug_kbool_key_file_fct.h"
#include "debug_kbool_key_file_fct.h"
#if
def CREATE_KBOOL_KEY_FILES
#if
defined (CREATE_KBOOL_KEY_FILES) || (CREATE_KBOOL_KEY_FILES_FIRST_PASS)
static
FILE
*
kdebugFile
;
static
FILE
*
kdebugFile
;
static
c
onst
char
*
sDate_Time
=
"2009-09-07 15:59:24"
;
static
c
har
sDate_Time
[
256
]
;
void
CreateKeyFile
()
void
CreateKeyFile
()
{
{
wxString
datetimestr
;
wxDateTime
datetime
=
wxDateTime
::
Now
();
datetime
.
SetCountry
(
wxDateTime
::
Country_Default
);
datetimestr
=
datetime
.
FormatISODate
(
)
+
wxT
(
" "
)
+
datetime
.
FormatISOTime
(
);
strcpy
(
sDate_Time
,
CONV_TO_UTF8
(
datetimestr
)
);
kdebugFile
=
fopen
(
KEYFILE_FILENAME
,
"wt"
);
kdebugFile
=
fopen
(
KEYFILE_FILENAME
,
"wt"
);
if
(
kdebugFile
)
if
(
kdebugFile
)
{
{
...
@@ -55,7 +64,7 @@ void CloseKeyFile()
...
@@ -55,7 +64,7 @@ void CloseKeyFile()
const
char
*
sCurrEntityName
=
NULL
;
const
char
*
sCurrEntityName
=
NULL
;
static
int
s_count
;
static
int
s_count
;
void
OpenEntity
(
const
char
*
aName
)
void
Open
KeyFile
Entity
(
const
char
*
aName
)
{
{
if
(
kdebugFile
)
if
(
kdebugFile
)
{
{
...
@@ -69,21 +78,21 @@ void OpenEntity( const char* aName )
...
@@ -69,21 +78,21 @@ void OpenEntity( const char* aName )
}
}
void
CloseEntity
()
void
Close
KeyFile
Entity
()
{
{
if
(
kdebugFile
)
if
(
kdebugFile
)
fprintf
(
kdebugFile
,
"
\n
ENDSTR %s;
\n
"
,
sCurrEntityName
);
fprintf
(
kdebugFile
,
"
\n
ENDSTR %s;
\n
"
,
sCurrEntityName
);
}
}
void
StartPolygon
(
int
aCornersCount
,
int
aLayer
)
void
Start
KeyFile
Polygon
(
int
aCornersCount
,
int
aLayer
)
{
{
fprintf
(
kdebugFile
,
"
\n
BOUNDARY; LAYER %d; DATATYPE 0;
\n
"
,
aLayer
);
fprintf
(
kdebugFile
,
"
\n
BOUNDARY; LAYER %d; DATATYPE 0;
\n
"
,
aLayer
);
fprintf
(
kdebugFile
,
" XY %d;
\n
"
,
aCornersCount
);
fprintf
(
kdebugFile
,
" XY %d;
\n
"
,
aCornersCount
);
s_count
=
0
;
s_count
=
0
;
}
}
void
EndElement
()
void
End
KeyFile
Element
()
{
{
if
(
s_count
==
1
)
if
(
s_count
==
1
)
fprintf
(
kdebugFile
,
"
\n
"
);
fprintf
(
kdebugFile
,
"
\n
"
);
...
@@ -114,14 +123,14 @@ void CopyPolygonsFromFilledPolysListToKeyFile( ZONE_CONTAINER* aZone, int aLayer
...
@@ -114,14 +123,14 @@ void CopyPolygonsFromFilledPolysListToKeyFile( ZONE_CONTAINER* aZone, int aLayer
}
}
// write corners:
// write corners:
StartPolygon
(
count
+
1
,
aLayer
);
Start
KeyFile
Polygon
(
count
+
1
,
aLayer
);
corner
=
&
aZone
->
m_FilledPolysList
[
ic
];
corner
=
&
aZone
->
m_FilledPolysList
[
ic
];
int
startpointX
=
corner
->
x
;
int
startpointX
=
corner
->
x
;
int
startpointY
=
corner
->
y
;
int
startpointY
=
corner
->
y
;
for
(
;
ic
<
corners_count
;
ic
++
)
for
(
;
ic
<
corners_count
;
ic
++
)
{
{
corner
=
&
aZone
->
m_FilledPolysList
[
ic
];
corner
=
&
aZone
->
m_FilledPolysList
[
ic
];
AddPointXY
(
corner
->
x
,
corner
->
y
);
Add
KeyFile
PointXY
(
corner
->
x
,
corner
->
y
);
if
(
corner
->
end_contour
)
if
(
corner
->
end_contour
)
{
{
ic
++
;
ic
++
;
...
@@ -129,21 +138,19 @@ void CopyPolygonsFromFilledPolysListToKeyFile( ZONE_CONTAINER* aZone, int aLayer
...
@@ -129,21 +138,19 @@ void CopyPolygonsFromFilledPolysListToKeyFile( ZONE_CONTAINER* aZone, int aLayer
}
}
}
}
// Close polygon:
// Close polygon:
AddPointXY
(
startpointX
,
startpointY
);
Add
KeyFile
PointXY
(
startpointX
,
startpointY
);
EndElement
();
End
KeyFile
Element
();
}
}
}
}
void
AddPointXY
(
int
aXcoord
,
int
aYcoord
)
void
Add
KeyFile
PointXY
(
int
aXcoord
,
int
aYcoord
)
{
{
if
(
s_count
>=
2
)
if
(
s_count
>=
2
)
{
{
s_count
=
0
;
s_count
=
0
;
fprintf
(
kdebugFile
,
"
\n
"
);
fprintf
(
kdebugFile
,
"
\n
"
);
}
}
SetLocaleTo_C_standard
();
fprintf
(
kdebugFile
,
" X %d; Y %d;"
,
aXcoord
,
aYcoord
);
fprintf
(
kdebugFile
,
" X %d; Y %d;"
,
aXcoord
,
aYcoord
);
SetLocaleTo_Default
(
);
s_count
++
;
s_count
++
;
}
}
...
...
pcbnew/debug_kbool_key_file_fct.h
View file @
ab66f9ec
...
@@ -4,17 +4,18 @@
...
@@ -4,17 +4,18 @@
#ifndef _DEBUG_KBOOL_KEY_FILE_FCT_H_
#ifndef _DEBUG_KBOOL_KEY_FILE_FCT_H_
#define _DEBUG_KBOOL_KEY_FILE_FCT_H_
#define _DEBUG_KBOOL_KEY_FILE_FCT_H_
/* Th
is line must be uncommented only if you wan
to produce a file
/* Th
ese line must be uncommented only if you want
to produce a file
* to debug kbool
* to debug kbool
in zone filling algorithms
*/
*/
//#define CREATE_KBOOL_KEY_FILES
//#define CREATE_KBOOL_KEY_FILES_FIRST_PASS 1
//#define CREATE_KBOOL_KEY_FILES 1
#if
def CREATE_KBOOL_KEY_FILES
#if
defined (CREATE_KBOOL_KEY_FILES) || (CREATE_KBOOL_KEY_FILES_FIRST_PASS)
// Allows or not) 0 degree orientation thermal shapes, for kbool tests
// Allows
(
or not) 0 degree orientation thermal shapes, for kbool tests
//#define CREATE_KBOOL_KEY_FILES_WITH_0_DEG
//#define CREATE_KBOOL_KEY_FILES_WITH_0_DEG
#define KEYFILE_FILENAME "dbgfile.key"
#define KEYFILE_FILENAME "
pcbnew_
dbgfile.key"
/** function CreateKeyFile
/** function CreateKeyFile
* open KEYFILE_FILENAME file
* open KEYFILE_FILENAME file
...
@@ -29,17 +30,17 @@ void CloseKeyFile();
...
@@ -29,17 +30,17 @@ void CloseKeyFile();
/* create header to start an entity description
/* create header to start an entity description
*/
*/
void
OpenEntity
(
const
char
*
aName
);
void
Open
KeyFile
Entity
(
const
char
*
aName
);
/* close the entity description
/* close the entity description
*/
*/
void
CloseEntity
();
void
Close
KeyFile
Entity
();
/* polygon creations:
/* polygon creations:
*/
*/
void
CopyPolygonsFromFilledPolysListToKeyFile
(
ZONE_CONTAINER
*
aZone
,
int
aLayer
);
void
CopyPolygonsFromFilledPolysListToKeyFile
(
ZONE_CONTAINER
*
aZone
,
int
aLayer
);
void
StartPolygon
(
int
aCornersCount
,
int
aLayer
);
void
Start
KeyFile
Polygon
(
int
aCornersCount
,
int
aLayer
);
void
AddPointXY
(
int
aXcoord
,
int
aYcoord
);
void
Add
KeyFile
PointXY
(
int
aXcoord
,
int
aYcoord
);
void
EndElement
();
void
End
KeyFile
Element
();
#endif // CREATE_KBOOL_KEY_FILES
#endif // CREATE_KBOOL_KEY_FILES
...
...
pcbnew/zones_convert_brd_items_to_polygons.cpp
View file @
ab66f9ec
This diff is collapsed.
Click to expand it.
polygon/PolyLine.cpp
View file @
ab66f9ec
...
@@ -569,7 +569,7 @@ void ArmBoolEng( Bool_Engine* aBooleng, bool aConvertHoles )
...
@@ -569,7 +569,7 @@ void ArmBoolEng( Bool_Engine* aBooleng, bool aConvertHoles )
Another scaling with Grid is applied on top of it to create space in the integer number for
Another scaling with Grid is applied on top of it to create space in the integer number for
even smaller numbers.
even smaller numbers.
*/
*/
int
GRID
=
1000
0
;
// initial value = 10000 in kbool example
int
GRID
=
1000
;
// initial value = 10000 in kbool example
aBooleng
->
SetMarge
(
MARGE
);
aBooleng
->
SetMarge
(
MARGE
);
aBooleng
->
SetGrid
(
GRID
);
aBooleng
->
SetGrid
(
GRID
);
...
...
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