← Back to team overview

kicad-developers team mailing list archive

PATCH: fix Tickness typo

 

Hey,

This patch doesn't fix any bug nor add any feature.
I noticed a recurrent typo on the python functions used in the footprint
wizards. this patch fixes the Tickness > Thickness typo over the entire
codebase.
There are very few files involved and should be safe to merge if it's a
typo and not a conscious choice to call it Tickness.

Regards,
Mikael Arguedas
=== modified file '3d-viewer/3d_draw_helper_functions.cpp'
--- 3d-viewer/3d_draw_helper_functions.cpp	2015-08-23 19:40:33 +0000
+++ 3d-viewer/3d_draw_helper_functions.cpp	2016-02-09 17:26:31 +0000
@@ -419,7 +419,7 @@
 {
     LAYER_ID    top_layer, bottom_layer;
     int         thickness       = GetPrm3DVisu().GetCopperThicknessBIU();
-    int         inner_radius    = (int)((float)aVia->GetDrillValue() * 1.01f) / 2.0f;      // This add a bit more in order to correct a draw artifact while using tickness
+    int         inner_radius    = (int)((float)aVia->GetDrillValue() * 1.01f) / 2.0f;      // This add a bit more in order to correct a draw artifact while using thickness
 
     aVia->LayerPair( &top_layer, &bottom_layer );
 

=== modified file 'pcbnew/class_text_mod.cpp'
--- pcbnew/class_text_mod.cpp	2015-08-07 16:17:51 +0000
+++ pcbnew/class_text_mod.cpp	2016-02-09 17:26:43 +0000
@@ -56,7 +56,7 @@
 
     m_Type = text_type;
     m_NoShow = false;
-    // Set text tickness to a default value
+    // Set text thickness to a default value
     m_Thickness = Millimeter2iu( 0.15 );
     SetLayer( F_SilkS );
 

=== modified file 'pcbnew/dialogs/dialog_global_modules_fields_edition.cpp'
--- pcbnew/dialogs/dialog_global_modules_fields_edition.cpp	2015-09-01 16:06:11 +0000
+++ pcbnew/dialogs/dialog_global_modules_fields_edition.cpp	2016-02-09 17:26:52 +0000
@@ -95,12 +95,12 @@
     m_ModuleFilter->SetValue(m_filterString);
     m_SizeXunit->SetLabel( GetAbbreviatedUnitsLabel() );
     m_SizeYunit->SetLabel( GetAbbreviatedUnitsLabel() );
-    m_Ticknessunit->SetLabel( GetAbbreviatedUnitsLabel() );
+    m_ThicknessUnit->SetLabel( GetAbbreviatedUnitsLabel() );
     m_SizeX_Value->SetValue(
         StringFromValue( g_UserUnit, m_brdSettings->m_ModuleTextSize.x ) );
     m_SizeY_Value->SetValue(
         StringFromValue( g_UserUnit, m_brdSettings->m_ModuleTextSize.y ) );
-    m_TicknessValue->SetValue(
+    m_ThicknessValue->SetValue(
         StringFromValue( g_UserUnit, m_brdSettings->m_ModuleTextWidth) );
 
     Layout();
@@ -118,7 +118,7 @@
 
     m_brdSettings->m_ModuleTextSize.x = ValueFromTextCtrl( *m_SizeX_Value );
     m_brdSettings->m_ModuleTextSize.y = ValueFromTextCtrl( *m_SizeY_Value );
-    m_brdSettings->m_ModuleTextWidth = ValueFromTextCtrl( *m_TicknessValue );
+    m_brdSettings->m_ModuleTextWidth = ValueFromTextCtrl( *m_ThicknessValue );
 
     // clip m_ModuleTextWidth to the 1/4 of min size, to keep it always readable
     int minsize = std::min( m_brdSettings->m_ModuleTextSize.x,

=== modified file 'pcbnew/dialogs/dialog_global_modules_fields_edition_base.cpp'
--- pcbnew/dialogs/dialog_global_modules_fields_edition_base.cpp	2015-06-15 13:54:58 +0000
+++ pcbnew/dialogs/dialog_global_modules_fields_edition_base.cpp	2016-02-09 17:27:08 +0000
@@ -90,13 +90,13 @@
 	m_staticText9->Wrap( -1 );
 	fgSizerCurrSettings->Add( m_staticText9, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
 	
-	m_TicknessValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-	m_TicknessValue->SetMaxLength( 0 ); 
-	fgSizerCurrSettings->Add( m_TicknessValue, 0, wxALL|wxEXPAND, 5 );
+	m_ThicknessValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+	m_ThicknessValue->SetMaxLength( 0 ); 
+	fgSizerCurrSettings->Add( m_ThicknessValue, 0, wxALL|wxEXPAND, 5 );
 	
-	m_Ticknessunit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
-	m_Ticknessunit->Wrap( -1 );
-	fgSizerCurrSettings->Add( m_Ticknessunit, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+	m_ThicknessUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_ThicknessUnit->Wrap( -1 );
+	fgSizerCurrSettings->Add( m_ThicknessUnit, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
 	
 	
 	sbSizerSettings->Add( fgSizerCurrSettings, 1, wxEXPAND, 5 );

=== modified file 'pcbnew/dialogs/dialog_global_modules_fields_edition_base.fbp'
--- pcbnew/dialogs/dialog_global_modules_fields_edition_base.fbp	2015-06-15 13:54:58 +0000
+++ pcbnew/dialogs/dialog_global_modules_fields_edition_base.fbp	2016-02-09 17:27:20 +0000
@@ -1239,7 +1239,7 @@
                                                         <property name="minimize_button">0</property>
                                                         <property name="minimum_size"></property>
                                                         <property name="moveable">1</property>
-                                                        <property name="name">m_TicknessValue</property>
+                                                        <property name="name">m_ThicknessValue</property>
                                                         <property name="pane_border">1</property>
                                                         <property name="pane_position"></property>
                                                         <property name="pane_size"></property>
@@ -1330,7 +1330,7 @@
                                                         <property name="minimize_button">0</property>
                                                         <property name="minimum_size"></property>
                                                         <property name="moveable">1</property>
-                                                        <property name="name">m_Ticknessunit</property>
+                                                        <property name="name">m_ThicknessUnit</property>
                                                         <property name="pane_border">1</property>
                                                         <property name="pane_position"></property>
                                                         <property name="pane_size"></property>

=== modified file 'pcbnew/scripting/plugins/FPC_(SMD_type)_footprintwizard.py'
--- pcbnew/scripting/plugins/FPC_(SMD_type)_footprintwizard.py	2015-10-31 11:54:48 +0000
+++ pcbnew/scripting/plugins/FPC_(SMD_type)_footprintwizard.py	2016-02-09 17:27:58 +0000
@@ -102,7 +102,7 @@
         self.module.Add(pad_s1)
 
         # add footprint outline
-        linewidth = self.draw.GetLineTickness()
+        linewidth = self.draw.GetLineThickness()
         margin = linewidth
 
         # upper line

=== modified file 'pcbnew/scripting/plugins/FootprintWizardDrawingAids.py'
--- pcbnew/scripting/plugins/FootprintWizardDrawingAids.py	2015-10-31 11:54:48 +0000
+++ pcbnew/scripting/plugins/FootprintWizardDrawingAids.py	2016-02-09 17:28:06 +0000
@@ -26,7 +26,7 @@
     footprint wizards
 
     A "drawing context" is provided which can be used to set and retain
-    settings such as line tickness and layer
+    settings such as line thickness and layer
     """
 
     # directions (in degrees, compass-like)
@@ -240,16 +240,16 @@
         return pcbnew.wxPoint(x * mat[0] + y * mat[1] + mat[2],
                               x * mat[3] + y * mat[4] + mat[5])
 
-    def SetLineTickness(self, lineThickness):
+    def SetLineThickness(self, lineThickness):
         """
         Set the current pen lineThickness used for subsequent drawing
         operations
         """
         self.dc['lineThickness'] = lineThickness
 
-    def GetLineTickness(self):
+    def GetLineThickness(self):
         """
-        Get the current drawing context line tickness
+        Get the current drawing context line thickness
         """
         return self.dc['lineThickness']
 
@@ -271,7 +271,7 @@
         Draw a line from (x1, y1) to (x2, y2)
         """
         outline = pcbnew.EDGE_MODULE(self.module)
-        outline.SetWidth(self.GetLineTickness())
+        outline.SetWidth(self.GetLineThickness())
         outline.SetLayer(self.GetLayer())
         outline.SetShape(pcbnew.S_SEGMENT)
         start = self.TransformPoint(x1, y1)

=== modified file 'pcbnew/scripting/plugins/bga_wizard.py'
--- pcbnew/scripting/plugins/bga_wizard.py	2016-02-09 09:10:17 +0000
+++ pcbnew/scripting/plugins/bga_wizard.py	2016-02-09 17:28:15 +0000
@@ -82,15 +82,15 @@
                                           pads["outline x margin"])
 
         # Courtyard
-        cmargin = self.draw.GetLineTickness()
+        cmargin = self.draw.GetLineThickness()
         self.draw.SetLayer(pcbnew.F_CrtYd)
         sizex = (ssx + cmargin) * 2
         sizey = (ssy + cmargin) * 2
         # set courtyard line thickness to the one defined in KLC
-        self.draw.SetLineTickness(pcbnew.FromMM(0.05))
+        self.draw.SetLineThickness(pcbnew.FromMM(0.05))
         self.draw.Box(0, 0, sizex, sizey)
         # restore line thickness to previous value
-        self.draw.SetLineTickness(pcbnew.FromMM(cmargin))
+        self.draw.SetLineThickness(pcbnew.FromMM(cmargin))
 
         #reference and value
         text_size = self.GetTextSize()  # IPC nominal

=== modified file 'pcbnew/scripting/plugins/circular_pad_array_wizard.py'
--- pcbnew/scripting/plugins/circular_pad_array_wizard.py	2015-10-31 11:54:48 +0000
+++ pcbnew/scripting/plugins/circular_pad_array_wizard.py	2016-02-09 17:28:46 +0000
@@ -69,12 +69,12 @@
 
         array.AddPadsToModule(self.draw)
 
-        body_radius = (prm['circle diameter'] + prm['pad width'])/2 + self.draw.GetLineTickness()
+        body_radius = (prm['circle diameter'] + prm['pad width'])/2 + self.draw.GetLineThickness()
         self.draw.Circle(0, 0, body_radius)
 
         text_size = self.GetTextSize()  # IPC nominal
         thickness = self.GetTextThickness()
-        textposy = body_radius + self.draw.GetLineTickness()/2 + self.GetTextSize()/2 + thickness
+        textposy = body_radius + self.draw.GetLineThickness()/2 + self.GetTextSize()/2 + thickness
         self.draw.Value( 0, textposy, text_size )
         self.draw.Reference( 0, -textposy, text_size )
 

=== modified file 'pcbnew/scripting/plugins/qfp_wizard.py'
--- pcbnew/scripting/plugins/qfp_wizard.py	2016-02-09 09:10:17 +0000
+++ pcbnew/scripting/plugins/qfp_wizard.py	2016-02-09 17:28:55 +0000
@@ -114,11 +114,11 @@
         sizex = (lim_x + cmargin) * 2 + pad_length
         sizey = (lim_y + cmargin) * 2 + pad_length
         # set courtyard line thickness to the one defined in KLC
-        thick = self.draw.GetLineTickness()
-        self.draw.SetLineTickness(pcbnew.FromMM(0.05))
+        thick = self.draw.GetLineThickness()
+        self.draw.SetLineThickness(pcbnew.FromMM(0.05))
         self.draw.Box(0, 0, sizex, sizey)
         # restore line thickness to previous value
-        self.draw.SetLineTickness(pcbnew.FromMM(thick))
+        self.draw.SetLineThickness(pcbnew.FromMM(thick))
 
         #reference and value
         text_size = self.GetTextSize()  # IPC nominal

=== modified file 'pcbnew/scripting/plugins/sdip_wizard.py'
--- pcbnew/scripting/plugins/sdip_wizard.py	2016-02-09 09:10:17 +0000
+++ pcbnew/scripting/plugins/sdip_wizard.py	2016-02-09 17:29:06 +0000
@@ -105,15 +105,15 @@
         self.DrawBox(ssx, ssy)
 
         # Courtyard
-        cmargin = self.draw.GetLineTickness()
+        cmargin = self.draw.GetLineThickness()
         self.draw.SetLayer(pcbnew.F_CrtYd)
         sizex = (ssx + cmargin) * 2
         sizey = (ssy + cmargin) * 2
         # set courtyard line thickness to the one defined in KLC
-        self.draw.SetLineTickness(pcbnew.FromMM(0.05))
+        self.draw.SetLineThickness(pcbnew.FromMM(0.05))
         self.draw.Box(0, 0, sizex, sizey)
         # restore line thickness to previous value
-        self.draw.SetLineTickness(pcbnew.FromMM(cmargin))
+        self.draw.SetLineThickness(pcbnew.FromMM(cmargin))
         
         #reference and value
         text_size = self.GetTextSize()  # IPC nominal
@@ -187,7 +187,7 @@
 
             # draw the notch
             notchWidth = ssy/1.5
-            notchHeight = self.draw.GetLineTickness()*3
+            notchHeight = self.draw.GetLineThickness()*3
 
             # NotchedBox draws the notch on top. Rotate the box 90 degrees
             # to have it on the left

=== modified file 'pcbnew/scripting/plugins/touch_slider_wizard.py'
--- pcbnew/scripting/plugins/touch_slider_wizard.py	2015-10-29 17:35:52 +0000
+++ pcbnew/scripting/plugins/touch_slider_wizard.py	2016-02-09 17:29:14 +0000
@@ -187,7 +187,7 @@
         step_length = float(touch_length) / float(steps)
 
         t_size = self.GetTextSize()
-        w_text = self.draw.GetLineTickness()
+        w_text = self.draw.GetLineThickness()
         ypos = touch_width/(bands*2) + t_size/2 + w_text
         self.draw.Value(0, -ypos, t_size)
         ypos += t_size + w_text*2

=== modified file 'pcbnew/scripting/plugins/uss39_barcode.py'
--- pcbnew/scripting/plugins/uss39_barcode.py	2015-10-29 17:35:52 +0000
+++ pcbnew/scripting/plugins/uss39_barcode.py	2016-02-09 17:29:34 +0000
@@ -97,7 +97,7 @@
 
     def __drawSpace__(self, bit, x):
         self.draw.SetLayer(B.F_SilkS)
-        self.draw.SetLineTickness(self.X)
+        self.draw.SetLineThickness(self.X)
         self.draw.Line(x, 0, x, self.H)
         if (bit == 1):
             self.draw.Line(x + self.X, 0, x + self.X, self.H)
@@ -122,7 +122,7 @@
 
     def drawQuietZone(self, x0, y0, width, height):
         self.draw.SetLayer(B.F_SilkS)
-        self.draw.SetLineTickness(self.X)
+        self.draw.SetLineThickness(self.X)
 
         for offset in range(0, int(self.Q), int(self.X/2)):
             xoffset = offset + self.X
@@ -139,7 +139,7 @@
         self.drawQuietZone(0, 0, x, self.H)
         # Draw courtyard origin
         self.draw.SetLayer(B.F_CrtYd)
-        self.draw.SetLineTickness(self.CourtyardLineWidth)
+        self.draw.SetLineThickness(self.CourtyardLineWidth)
         ch_lim = B.FromMM(0.35)
         self.draw.Line(-ch_lim, 0, ch_lim, 0)
         self.draw.Line(0, -ch_lim, 0, ch_lim)

=== modified file 'pcbnew/scripting/plugins/zip_wizard.py'
--- pcbnew/scripting/plugins/zip_wizard.py	2016-02-09 09:10:17 +0000
+++ pcbnew/scripting/plugins/zip_wizard.py	2016-02-09 17:29:43 +0000
@@ -90,7 +90,7 @@
 
         # body inside pads is possible only for 2 rows.
         # for other values, there is no room
-        linew = self.draw.GetLineTickness()
+        linew = self.draw.GetLineThickness()
         if body['*'+self.silkscreen_inside_key] and line_count == 2:
             cornery = pin1posY - ssy_offset
             if cornery < linew:
@@ -103,13 +103,13 @@
         cmarginy = body[self.courtyard_y_margin_key]
         self.draw.SetLayer(pcbnew.F_CrtYd)
         # set courtyard line thickness to the one defined in KLC
-        thick = self.draw.GetLineTickness()
+        thick = self.draw.GetLineThickness()
         sizex = (pin1posX + cmarginx) * 2 + pad_Hsize + thick
         sizey = (pin1posY + cmarginy) * 2 + pad_Vsize + thick
-        self.draw.SetLineTickness(pcbnew.FromMM(0.05))
+        self.draw.SetLineThickness(pcbnew.FromMM(0.05))
         self.draw.Box(0, 0, sizex, sizey)
         # restore line thickness to previous value
-        self.draw.SetLineTickness(pcbnew.FromMM(thick))
+        self.draw.SetLineThickness(pcbnew.FromMM(thick))
 
         #reference and value
         text_size = self.GetTextSize()  # IPC nominal


Follow ups