Commit ab66f9ec authored by charras's avatar charras

rework on zones:try to fix a filling problem with kbool

parent 9b2c6f04
No preview for this file type
......@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: kicad\n"
"Report-Msgid-Bugs-To: \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"
"Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n"
"MIME-Version: 1.0\n"
......@@ -286,7 +286,7 @@ msgstr "Inclure Modules"
#: pcbnew/block.cpp:128
msgid "Include tracks"
msgstr "Inclure Pistes"
msgstr "Inclure pistes"
#: pcbnew/block.cpp:133
msgid "Include zones"
......@@ -3183,6 +3183,8 @@ msgid ""
"Set these values to 0\n"
"to use Parent footprint or global values"
msgstr ""
"Mettre ces valeurs à 0\n"
"pour utiliser les valeurs du module parent ou les valeurs globales"
#: pcbnew/dialog_pad_properties_base.cpp:237
msgid "Net pad clearance"
......@@ -3936,7 +3938,7 @@ msgstr "NETCLASS: '%s' a une isolation:%s qui est moins que la valeur globale:%s
#: pcbnew/drc.cpp:340
#, c-format
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
#, c-format
......@@ -4791,9 +4793,8 @@ msgid "Pads Mask Clearance"
msgstr "Marge Masque des Pads"
#: pcbnew/menubarpcb.cpp:232
#, fuzzy
msgid "Adjust the global clearance between pads and the solder resist mask"
msgstr "Ceci est l'espace entre pads et le masque"
msgstr "Ajuster la marge globale entre pads et le masque de vernis épargne"
#: pcbnew/menubarpcb.cpp:242
msgid "Texts and Drawings"
......@@ -4990,7 +4991,7 @@ msgstr "<<<"
#: pcbnew/dialog_design_rules_base.cpp:114
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
msgid ">>>"
......@@ -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_BoardEditor_base.cpp:145
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_BoardEditor_base.cpp:156
......@@ -8183,9 +8184,8 @@ msgid "Library browser"
msgstr "Visualisateur des librairies"
#: eeschema/tool_sch.cpp:58
#, fuzzy
msgid "Navigate schematic hierarchy"
msgstr "Sauver le Projet schématique"
msgstr "Navigateur de hiérarchie"
#: eeschema/tool_sch.cpp:84
msgid "Print schematic"
......@@ -8212,9 +8212,8 @@ msgid "Schematic Electric Rules Check"
msgstr "Contrôle des règles électriques"
#: eeschema/tool_sch.cpp:129
#, fuzzy
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
msgid "Backannotate footprint"
......@@ -8261,9 +8260,8 @@ msgid "Place hierarchical sheet"
msgstr "Placer feuille hiérarchique"
#: eeschema/tool_sch.cpp:215
#, fuzzy
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 du label hiérarchique correspondant dans la feuille."
#: eeschema/tool_sch.cpp:220
msgid "Place hierarchical pin to sheet"
......@@ -10417,9 +10415,8 @@ msgid "&Configuration"
msgstr "&Configuration"
#: cvpcb/menucfg.cpp:49
#, fuzzy
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
msgid "Keep Open On Save"
......
......@@ -11,10 +11,11 @@ set(PCBNEW_SRCS
automove.cpp
autoplac.cpp
autorout.cpp
block.cpp
block_module_editor.cpp
board.cpp
board_items_to_polygon_shape_transform.cpp
board_undo_redo.cpp
block.cpp
block_module_editor.cpp
build_BOM_from_board.cpp
clean.cpp
# cleaningoptions_dialog.cpp
......
This diff is collapsed.
......@@ -141,6 +141,19 @@ public:
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
......
......@@ -148,6 +148,21 @@ public:
/* divers */
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
* Set the drill value for vias
......
......@@ -4,6 +4,7 @@
#include "fctsys.h"
#include "common.h"
#include "kicad_string.h"
#include "pcbnew.h"
#include "wxPcbStruct.h"
#include "zones.h"
......@@ -11,14 +12,22 @@
#include "debug_kbool_key_file_fct.h"
#ifdef CREATE_KBOOL_KEY_FILES
#if defined (CREATE_KBOOL_KEY_FILES) || (CREATE_KBOOL_KEY_FILES_FIRST_PASS)
static FILE* kdebugFile;
static const char * sDate_Time = "2009-09-07 15:59:24";
static char sDate_Time[256];
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" );
if( kdebugFile )
{
......@@ -55,7 +64,7 @@ void CloseKeyFile()
const char* sCurrEntityName = NULL;
static int s_count;
void OpenEntity( const char* aName )
void OpenKeyFileEntity( const char* aName )
{
if( kdebugFile )
{
......@@ -69,21 +78,21 @@ void OpenEntity( const char* aName )
}
void CloseEntity()
void CloseKeyFileEntity()
{
if( kdebugFile )
fprintf( kdebugFile, "\nENDSTR %s;\n", sCurrEntityName );
}
void StartPolygon(int aCornersCount, int aLayer)
void StartKeyFilePolygon(int aCornersCount, int aLayer)
{
fprintf( kdebugFile, "\nBOUNDARY; LAYER %d; DATATYPE 0;\n", aLayer );
fprintf( kdebugFile, " XY %d;\n", aCornersCount );
s_count = 0;
}
void EndElement()
void EndKeyFileElement()
{
if ( s_count == 1 )
fprintf( kdebugFile, "\n");
......@@ -114,14 +123,14 @@ void CopyPolygonsFromFilledPolysListToKeyFile( ZONE_CONTAINER* aZone, int aLayer
}
// write corners:
StartPolygon( count+1, aLayer );
StartKeyFilePolygon( count+1, aLayer );
corner = &aZone->m_FilledPolysList[ic];
int startpointX = corner->x;
int startpointY = corner->y;
for( ; ic < corners_count; ic++ )
{
corner = &aZone->m_FilledPolysList[ic];
AddPointXY( corner->x, corner->y );
AddKeyFilePointXY( corner->x, corner->y );
if( corner->end_contour )
{
ic++;
......@@ -129,21 +138,19 @@ void CopyPolygonsFromFilledPolysListToKeyFile( ZONE_CONTAINER* aZone, int aLayer
}
}
// Close polygon:
AddPointXY( startpointX, startpointY );
EndElement();
AddKeyFilePointXY( startpointX, startpointY );
EndKeyFileElement();
}
}
void AddPointXY( int aXcoord, int aYcoord)
void AddKeyFilePointXY( int aXcoord, int aYcoord)
{
if ( s_count >= 2 )
{
s_count = 0;
fprintf( kdebugFile, "\n");
}
SetLocaleTo_C_standard();
fprintf( kdebugFile, " X %d; Y %d;", aXcoord, aYcoord );
SetLocaleTo_Default( );
s_count ++;
}
......
......@@ -4,17 +4,18 @@
#ifndef _DEBUG_KBOOL_KEY_FILE_FCT_H_
#define _DEBUG_KBOOL_KEY_FILE_FCT_H_
/* This line must be uncommented only if you wan to produce a file
* to debug kbool
/* These line must be uncommented only if you want to produce a file
* 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
#ifdef 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 KEYFILE_FILENAME "dbgfile.key"
#define KEYFILE_FILENAME "pcbnew_dbgfile.key"
/** function CreateKeyFile
* open KEYFILE_FILENAME file
......@@ -29,17 +30,17 @@ void CloseKeyFile();
/* create header to start an entity description
*/
void OpenEntity(const char * aName);
void OpenKeyFileEntity(const char * aName);
/* close the entity description
*/
void CloseEntity();
void CloseKeyFileEntity();
/* polygon creations:
*/
void CopyPolygonsFromFilledPolysListToKeyFile( ZONE_CONTAINER* aZone, int aLayer);
void StartPolygon(int aCornersCount, int aLayer);
void AddPointXY( int aXcoord, int aYcoord);
void EndElement();
void StartKeyFilePolygon(int aCornersCount, int aLayer);
void AddKeyFilePointXY( int aXcoord, int aYcoord);
void EndKeyFileElement();
#endif // CREATE_KBOOL_KEY_FILES
......
......@@ -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
even smaller numbers.
*/
int GRID = 10000; // initial value = 10000 in kbool example
int GRID = 1000; // initial value = 10000 in kbool example
aBooleng->SetMarge( MARGE );
aBooleng->SetGrid( GRID );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment