From 1293d04a7a29df680365c5eae70d2797cdf9d917 Mon Sep 17 00:00:00 2001 From: Jon Neal Date: Sun, 10 Jul 2016 23:09:18 -0400 Subject: [PATCH] Fix a bunch of misspellings of length. --- .../3d_render_ogl_legacy/ogl_legacy_utils.cpp | 20 ++++++++--------- .../shapes2D/croundsegment2d.h | 2 +- 3d-viewer/3d_rendering/ccamera.cpp | 2 +- include/base_units.h | 2 +- pcbnew/autorouter/auto_place_footprints.cpp | 4 ++-- pcbnew/class_netinfo.h | 2 +- pcbnew/class_netinfo_item.cpp | 6 ++--- pcbnew/drc_clearance_test_functions.cpp | 4 ++-- pcbnew/exporters/gen_modules_placefile.cpp | 2 +- pcbnew/muonde.cpp | 22 +++++++++---------- pcbnew/ratsnest.cpp | 12 +++++----- polygon/PolyLine.cpp | 2 +- 12 files changed, 40 insertions(+), 40 deletions(-) diff --git a/3d-viewer/3d_rendering/3d_render_ogl_legacy/ogl_legacy_utils.cpp b/3d-viewer/3d_rendering/3d_render_ogl_legacy/ogl_legacy_utils.cpp index db748bc2a1..6c53f3765b 100644 --- a/3d-viewer/3d_rendering/3d_render_ogl_legacy/ogl_legacy_utils.cpp +++ b/3d-viewer/3d_rendering/3d_render_ogl_legacy/ogl_legacy_utils.cpp @@ -209,7 +209,7 @@ void OGL_Draw_segment( const CROUNDSEGMENT2D &aSegment, unsigned int aNrSidesPer const SFVEC2F end_minus_start = aSegment.GetEnd_minus_Start(); const float radius = aSegment.GetRadius(); const float width = aSegment.GetWidth(); - const float lenght = aSegment.GetLenght(); + const float length = aSegment.GetLength(); glTranslatef( start.x, start.y, 0.0f ); @@ -219,41 +219,41 @@ void OGL_Draw_segment( const CROUNDSEGMENT2D &aSegment, unsigned int aNrSidesPer } glPushMatrix(); - glTranslatef( lenght, 0.0, 0.0f ); + glTranslatef( length, 0.0, 0.0f ); glScalef( width, width, 1.0f ); OGL_draw_half_open_cylinder( aNrSidesPerCircle ); glPopMatrix (); glBegin( GL_QUADS ); glNormal3f( 0.0,-1.0, 0.0 ); - glVertex3f( lenght,-radius, 1.0 ); + glVertex3f( length,-radius, 1.0 ); glVertex3f( 0.0, -radius, 1.0 ); glVertex3f( 0.0, -radius, 0.0 ); - glVertex3f( lenght,-radius, 0.0 ); + glVertex3f( length,-radius, 0.0 ); glEnd(); glBegin( GL_QUADS ); glNormal3f( 0.0, 1.0, 0.0 ); - glVertex3f( lenght, radius, 0.0 ); + glVertex3f( length, radius, 0.0 ); glVertex3f( 0.0, radius, 0.0 ); glVertex3f( 0.0, radius, 1.0 ); - glVertex3f( lenght, radius, 1.0 ); + glVertex3f( length, radius, 1.0 ); glEnd(); glBegin( GL_QUADS ); glNormal3f( 0.0, 0.0, 1.0 ); - glVertex3f( lenght, radius, 1.0 ); + glVertex3f( length, radius, 1.0 ); glVertex3f( 0.0, radius, 1.0 ); glVertex3f( 0.0, -radius, 1.0 ); - glVertex3f( lenght,-radius, 1.0 ); + glVertex3f( length,-radius, 1.0 ); glEnd(); glBegin( GL_QUADS ); glNormal3f( 0.0, 0.0,-1.0 ); - glVertex3f( lenght,-radius, 0.0 ); + glVertex3f( length,-radius, 0.0 ); glVertex3f( 0.0, -radius, 0.0 ); glVertex3f( 0.0, radius, 0.0 ); - glVertex3f( lenght, radius, 0.0 ); + glVertex3f( length, radius, 0.0 ); glEnd(); glScalef( width, width, 1.0f ); diff --git a/3d-viewer/3d_rendering/3d_render_raytracing/shapes2D/croundsegment2d.h b/3d-viewer/3d_rendering/3d_render_raytracing/shapes2D/croundsegment2d.h index 7431b00cbc..0b4f54ae3b 100644 --- a/3d-viewer/3d_rendering/3d_render_raytracing/shapes2D/croundsegment2d.h +++ b/3d-viewer/3d_rendering/3d_render_raytracing/shapes2D/croundsegment2d.h @@ -61,7 +61,7 @@ public: float GetRadius() const { return m_radius; } float GetRadiusSquared() const { return m_radius_squared; } float GetWidth() const { return m_width; } - float GetLenght() const { return m_segment.m_Length; } + float GetLength() const { return m_segment.m_Length; } const SFVEC2F &GetStart() const { return m_segment.m_Start; } const SFVEC2F &GetEnd() const { return m_segment.m_End; } diff --git a/3d-viewer/3d_rendering/ccamera.cpp b/3d-viewer/3d_rendering/ccamera.cpp index f551e80727..a7737ba887 100644 --- a/3d-viewer/3d_rendering/ccamera.cpp +++ b/3d-viewer/3d_rendering/ccamera.cpp @@ -83,7 +83,7 @@ void CCAMERA::rebuildProjection() { m_frustum.ratio = (float) m_windowSize.x / m_windowSize.y; m_frustum.nearD = 0.01f; - m_frustum.farD = glm::length( m_camera_pos_init ) * 2.0f; // Consider that we can render double the lenght, review if that is OK... + m_frustum.farD = glm::length( m_camera_pos_init ) * 2.0f; // Consider that we can render double the length, review if that is OK... switch( m_projectionType ) { diff --git a/include/base_units.h b/include/base_units.h index c4092b1dd9..6d37d99f93 100644 --- a/include/base_units.h +++ b/include/base_units.h @@ -91,7 +91,7 @@ wxString CoordinateToString( int aValue, bool aConvertToMils = false ); wxString AngleToStringDegrees( double aAngle ); /** - * Function LenghtDoubleToString + * Function LengthDoubleToString * is a helper to convert the \a double length \a aValue to a string in inches, * millimeters, or unscaled units according to the current user units setting. * diff --git a/pcbnew/autorouter/auto_place_footprints.cpp b/pcbnew/autorouter/auto_place_footprints.cpp index 0a3626d890..4493d754e2 100644 --- a/pcbnew/autorouter/auto_place_footprints.cpp +++ b/pcbnew/autorouter/auto_place_footprints.cpp @@ -938,8 +938,8 @@ double compute_Ratsnest_PlaceModule( BOARD* aBrd ) if( dx < dy ) std::swap( dx, dy ); - // Cost of the connection = lenght + penalty due to the slope - // dx is the biggest lenght relative to the X or Y axis + // Cost of the connection = length + penalty due to the slope + // dx is the biggest length relative to the X or Y axis // the penalty is max for 45 degrees ratsnests, // and 0 for horizontal or vertical ratsnests. // For Horizontal and Vertical ratsnests, dy = 0; diff --git a/pcbnew/class_netinfo.h b/pcbnew/class_netinfo.h index 82ac8d7dd3..b4d76a0cb4 100644 --- a/pcbnew/class_netinfo.h +++ b/pcbnew/class_netinfo.h @@ -76,7 +76,7 @@ public: int m_Status; // State: see previous defines (CH_ ...) D_PAD* m_PadStart; // pointer to the starting pad D_PAD* m_PadEnd; // pointer to ending pad - int m_Lenght; // length of the line (used in some calculations) + int m_Length; // length of the line (used in some calculations) RATSNEST_ITEM(); diff --git a/pcbnew/class_netinfo_item.cpp b/pcbnew/class_netinfo_item.cpp index 46c60fe046..c52e9731e1 100644 --- a/pcbnew/class_netinfo_item.cpp +++ b/pcbnew/class_netinfo_item.cpp @@ -82,8 +82,8 @@ void NETINFO_ITEM::Draw( EDA_DRAW_PANEL* panel, void NETINFO_ITEM::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) { wxString txt; - double lengthnet = 0.0; // This is the lenght of tracks on pcb - double lengthPadToDie = 0.0; // this is the lenght of internal ICs connections + double lengthnet = 0.0; // This is the length of tracks on pcb + double lengthPadToDie = 0.0; // this is the length of internal ICs connections aList.push_back( MSG_PANEL_ITEM( _( "Net Name" ), GetNetname(), RED ) ); @@ -158,7 +158,7 @@ RATSNEST_ITEM::RATSNEST_ITEM() m_Status = 0; // state m_PadStart = NULL; // pointer to the starting pad m_PadEnd = NULL; // pointer to ending pad - m_Lenght = 0; // length of the line (temporary used in some + m_Length = 0; // length of the line (temporary used in some // calculations) } diff --git a/pcbnew/drc_clearance_test_functions.cpp b/pcbnew/drc_clearance_test_functions.cpp index e2dd487571..ce34c80a11 100644 --- a/pcbnew/drc_clearance_test_functions.cpp +++ b/pcbnew/drc_clearance_test_functions.cpp @@ -137,7 +137,7 @@ bool convex2pointDRC( wxPoint* aTref, int aTrefCount, wxPoint aPcompare, int aDi bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) { TRACK* track; - wxPoint delta; // lenght on X and Y axis of segments + wxPoint delta; // length on X and Y axis of segments LSET layerMask; int net_code_ref; wxPoint shape_pos; @@ -530,7 +530,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) // Compute the segment orientation (angle) en 0,1 degre double angle = ArcTangente( delta.y, delta.x ); - // Compute the segment lenght: delta.x = lenght after rotation + // Compute the segment length: delta.x = length after rotation RotatePoint( &delta, angle ); /* Comute the reference segment coordinates relatives to a diff --git a/pcbnew/exporters/gen_modules_placefile.cpp b/pcbnew/exporters/gen_modules_placefile.cpp index 8bc79ab942..bb66f8df11 100644 --- a/pcbnew/exporters/gen_modules_placefile.cpp +++ b/pcbnew/exporters/gen_modules_placefile.cpp @@ -420,7 +420,7 @@ int PCB_EDIT_FRAME::DoGenFootprintsPositionFile( const wxString& aFullFileName, { MODULE* footprint; - // Minimal text lenghts: + // Minimal text lengths: int lenRefText = 8; int lenValText = 8; int lenPkgText = 16; diff --git a/pcbnew/muonde.cpp b/pcbnew/muonde.cpp index aec5d69740..8fd6ed3523 100644 --- a/pcbnew/muonde.cpp +++ b/pcbnew/muonde.cpp @@ -84,7 +84,7 @@ public: wxPoint m_Start; wxPoint m_End; wxSize m_Size; - int m_lenght; // full length trace. + int m_length; // full length trace. int m_Width; // Trace width. // A flag set to true when mu-wave inductor is being created bool m_Flag; @@ -101,7 +101,7 @@ static void ShowBoundingBoxMicroWaveInductor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition, bool aErase ) { /* Calculate the orientation and size of the box containing the inductor: - * the box is a rectangle with height = lenght/2 + * the box is a rectangle with height = length/2 * the shape is defined by a rectangle, nor necessary horizontal or vertical */ GRSetDrawMode( aDC, GR_XOR ); @@ -246,20 +246,20 @@ MODULE* CreateMicrowaveInductor( PCB_EDIT_FRAME* aPcbFrame, wxString& aErrorMess wxPoint pt = s_inductor_pattern.m_End - s_inductor_pattern.m_Start; int min_len = KiROUND( EuclideanNorm( pt ) ); - s_inductor_pattern.m_lenght = min_len; + s_inductor_pattern.m_length = min_len; // Enter the desired length. - msg = StringFromValue( g_UserUnit, s_inductor_pattern.m_lenght ); + msg = StringFromValue( g_UserUnit, s_inductor_pattern.m_length ); wxTextEntryDialog dlg( NULL, wxEmptyString, _( "Length of Trace:" ), msg ); if( dlg.ShowModal() != wxID_OK ) return NULL; // canceled by user msg = dlg.GetValue(); - s_inductor_pattern.m_lenght = ValueFromString( g_UserUnit, msg ); + s_inductor_pattern.m_length = ValueFromString( g_UserUnit, msg ); // Control values (ii = minimum length) - if( s_inductor_pattern.m_lenght < min_len ) + if( s_inductor_pattern.m_length < min_len ) { aErrorMessage = _( "Requested length < minimum length" ); return NULL; @@ -268,7 +268,7 @@ MODULE* CreateMicrowaveInductor( PCB_EDIT_FRAME* aPcbFrame, wxString& aErrorMess // Calculate the elements. std::vector buffer; ll = BuildCornersList_S_Shape( buffer, s_inductor_pattern.m_Start, - s_inductor_pattern.m_End, s_inductor_pattern.m_lenght, + s_inductor_pattern.m_End, s_inductor_pattern.m_length, s_inductor_pattern.m_Width ); if( !ll ) @@ -396,7 +396,7 @@ static void gen_arc( std::vector & aBuffer, * @param aBuffer = a buffer where to store points (ends of segments) * @param aStartPoint = starting point of the path * @param aEndPoint = ending point of the path - * @param aLength = full lenght of the path + * @param aLength = full length of the path * @param aWidth = segment width */ int BuildCornersList_S_Shape( std::vector & aBuffer, @@ -413,7 +413,7 @@ int BuildCornersList_S_Shape( std::vector & aBuffer, * The equations are (assuming the area size of the entire shape is Size: * Size.x = 2 * radius + segm_len * Size.y = (segm_count + 2 ) * 2 * radius + 2 * stubs_len - * s_inductor_pattern.m_lenght = 2 * delta // connections to the coil + * s_inductor_pattern.m_length = 2 * delta // connections to the coil * + (segm_count-2) * segm_len // length of the strands except 1st and last * + (segm_count) * (PI * radius) // length of rounded * segm_len + / 2 - radius * 2) // length of 1st and last bit @@ -448,7 +448,7 @@ int BuildCornersList_S_Shape( std::vector & aBuffer, double angle = -ArcTangente( pt.y, pt.x ); int min_len = KiROUND( EuclideanNorm( pt ) ); int segm_len = 0; // length of segments - int full_len; // full len of shape (sum of lenght of all segments + arcs) + int full_len; // full len of shape (sum of length of all segments + arcs) /* Note: calculations are made for a vertical coil (more easy calculations) @@ -467,7 +467,7 @@ int BuildCornersList_S_Shape( std::vector & aBuffer, int segm_count; // number of full len segments // the half size segments (first and last segment) are not counted here - int stubs_len = 0; // lenght of first or last segment (half size of others segments) + int stubs_len = 0; // length of first or last segment (half size of others segments) for( segm_count = 0; ; segm_count++ ) { diff --git a/pcbnew/ratsnest.cpp b/pcbnew/ratsnest.cpp index b3880859f9..6735e4de83 100644 --- a/pcbnew/ratsnest.cpp +++ b/pcbnew/ratsnest.cpp @@ -112,7 +112,7 @@ void MIN_SPAN_TREE_PADS::AddTreeToRatsnest( std::vector* aRatsnes net.SetNet( netcode ); net.m_Status = CH_ACTIF | CH_VISIBLE; - net.m_Lenght = GetDist(ii); + net.m_Length = GetDist(ii); net.m_PadStart = padsBuffer[ii]; net.m_PadEnd = padsBuffer[ GetWhoTo(ii) ]; @@ -359,7 +359,7 @@ static int tst_links_between_blocks( NETINFO_ITEM* aNetinfo, // than the previous candidate: if( best_link == NULL ) // no candidate best_link = link; - else if( best_link->m_Lenght > link->m_Lenght ) // It is a better candidate. + else if( best_link->m_Length > link->m_Length ) // It is a better candidate. best_link = link; } @@ -681,7 +681,7 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) */ RATSNEST_ITEM local_rats; - local_rats.m_Lenght = INT_MAX; + local_rats.m_Length = INT_MAX; local_rats.m_Status = 0; bool addRats = false; @@ -706,7 +706,7 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) addRats = false; current_net_code = pad_ref->GetNetCode(); - local_rats.m_Lenght = INT_MAX; + local_rats.m_Length = INT_MAX; } pad_pos = pad_ref->GetPosition() - g_Offset_Module; @@ -726,12 +726,12 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) distance = abs( pad_externe->GetPosition().x - pad_pos.x ) + abs( pad_externe->GetPosition().y - pad_pos.y ); - if( distance < local_rats.m_Lenght ) + if( distance < local_rats.m_Length ) { local_rats.m_PadStart = pad_ref; local_rats.m_PadEnd = pad_externe; local_rats.SetNet( pad_ref->GetNetCode() ); - local_rats.m_Lenght = distance; + local_rats.m_Length = distance; local_rats.m_Status = 0; addRats = true; diff --git a/polygon/PolyLine.cpp b/polygon/PolyLine.cpp index 17b14f6326..61267c8aa5 100644 --- a/polygon/PolyLine.cpp +++ b/polygon/PolyLine.cpp @@ -750,7 +750,7 @@ void CPolyLine::Hatch() else spacing = m_hatchPitch * 2; - // set the "length" of hatch lines (the lenght on horizontal axis) + // set the "length" of hatch lines (the length on horizontal axis) double hatch_line_len = m_hatchPitch; // To have a better look, give a slope depending on the layer