Skip to content

Commit

Permalink
Fix misc. typos (#4857)
Browse files Browse the repository at this point in the history
* Fix misc. typos

Found via `codespell -q 3 -S *.po,./t,./xs/t,./xs/xsp -L ot,uin`

* Follow-up typo fixes
  • Loading branch information
luzpaz authored Jun 8, 2020
1 parent 361633b commit 1bd2299
Show file tree
Hide file tree
Showing 53 changed files with 72 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ When possible, please include the following information when [reporting an issue
* STL, OBJ or AMF input file (please make sure the input file is not broken, e.g. non-manifold, before reporting a bug)
* a screenshot of the G-code layer with the issue (e.g. using [Pronterface](https://github.com/kliment/Printrun) or preferably the internal preview tab in Slic3r).
* If the issue is a request for a new feature, be ready to explain why you think it's needed.
* Doing more prepatory work on your end makes it more likely it'll get done. This includes the "how" it can be done in addition to the "what".
* Doing more preparatory work on your end makes it more likely it'll get done. This includes the "how" it can be done in addition to the "what".
* Define the "What" as strictly as you can. Consider what might happen with different infills than simple rectilinear.

Please make sure only to include one issue per report. If you encounter multiple, unrelated issues, please report them as such.
Expand Down
2 changes: 1 addition & 1 deletion lib/Slic3r/GCode/MotionPlanner.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use Slic3r::Geometry::Clipper qw(offset offset_ex diff_ex intersection_pl);
has '_inner_margin' => (is => 'ro', default => sub { scale 1 });
has '_outer_margin' => (is => 'ro', default => sub { scale 2 });

# this factor weigths the crossing of a perimeter
# this factor weighs the crossing of a perimeter
# vs. the alternative path. a value of 5 means that
# a perimeter will be crossed if the alternative path
# is >= 5x the length of the straight line we could
Expand Down
2 changes: 1 addition & 1 deletion lib/Slic3r/GCode/PressureRegulator.pm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ sub process {
# This is a print move.
my $F = $args->{F} // $reader->F;
if ($F != $self->_last_print_F || ($F == $self->_last_print_F && $self->_advance == 0)) {
# We are setting a (potentially) new speed or a discharge event happend since the last speed change, so we calculate the new advance amount.
# We are setting a (potentially) new speed or a discharge event happened since the last speed change, so we calculate the new advance amount.

# First calculate relative flow rate (mm of filament over mm of travel)
my $rel_flow_rate = $info->{dist_E} / $info->{dist_XY};
Expand Down
4 changes: 2 additions & 2 deletions lib/Slic3r/GUI/3DScene.pm
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ sub new {
# wxWidgets expect the attrib list to be ended by zero.
push(@$attrib, 0);

# we request a depth buffer explicitely because it looks like it's not created by
# we request a depth buffer explicitly because it looks like it's not created by
# default on Linux, causing transparency issues
my $self = $class->SUPER::new($parent, -1, Wx::wxDefaultPosition, Wx::wxDefaultSize, 0, "", $attrib);

if (Wx::wxVERSION >= 3.000003) {
# Wx 3.0.3 contains an ugly hack to support some advanced OpenGL attributes through the attribute list.
# The attribute list is transferred between the wxGLCanvas and wxGLContext constructors using a single static array s_wglContextAttribs.
# Immediatelly force creation of the OpenGL context to consume the static variable s_wglContextAttribs.
# Immediately force creation of the OpenGL context to consume the static variable s_wglContextAttribs.
$self->GetContext();
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Slic3r/GUI/BedShapeDialog.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The bed shape dialog.
# The dialog opens from Print Settins tab -> Bed Shape: Set...
# The dialog opens from Print Settings tab -> Bed Shape: Set...

package Slic3r::GUI::BedShapeDialog;
use strict;
Expand Down
6 changes: 3 additions & 3 deletions lib/Slic3r/GUI/ColorScheme.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ our $DEFAULT_COLORSCHEME = 1;
our $SOLID_BACKGROUNDCOLOR = 0;
our @SELECTED_COLOR = (0, 1, 0);
our @HOVER_COLOR = (0.4, 0.9, 0); # Hover over Model
our @TOP_COLOR = (10/255,98/255,144/255); # TOP Backgroud color
our @BOTTOM_COLOR = (0,0,0); # BOTTOM Backgroud color
our @TOP_COLOR = (10/255,98/255,144/255); # TOP Background color
our @BOTTOM_COLOR = (0,0,0); # BOTTOM Background color
our @BACKGROUND_COLOR = @TOP_COLOR; # SOLID background color
our @GRID_COLOR = (0.2, 0.2, 0.2, 0.4); # Grid color
our @GROUND_COLOR = (0.8, 0.6, 0.5, 0.4); # Ground or Plate color
Expand Down Expand Up @@ -130,7 +130,7 @@ sub getSolarized { # add this name to Preferences.pm
@BED_SKIRT = map { ceil($_ * 255) } @COLOR_BASE01; # Brim/Skirt
@BED_CLEARANCE = map { ceil($_ * 255) } @COLOR_BLUE; # not sure what that does
@BED_DARK = map { ceil($_ * 255) } @COLOR_BASE01; # not sure what that does
@BACKGROUND255 = map { ceil($_ * 255) } @BACKGROUND_COLOR; # Backgroud color, this time RGB
@BACKGROUND255 = map { ceil($_ * 255) } @BACKGROUND_COLOR; # Background color, this time RGB

# 2DToolpaths.pm colors : LAYERS Tab
@TOOL_DARK = @COLOR_BASE01; # Brim/Skirt
Expand Down
6 changes: 3 additions & 3 deletions lib/Slic3r/GUI/Plater.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,7 @@ sub reset {
my $current_model = $self->{model}->clone;

if (!defined $dont_push) {
# Get the identifiers of the curent model objects.
# Get the identifiers of the current model objects.
my $objects_identifiers = [];
for (my $i = 0; $i <= $#{$self->{objects}}; $i++){
push @{$objects_identifiers}, $self->{objects}->[$i]->identifier;
Expand Down Expand Up @@ -1929,7 +1929,7 @@ sub split_object {

$self->pause_background_process;

# Save the curent model object for undo/redo operataions.
# Save the current model object for undo/redo operataions.
my $org_object_model = Slic3r::Model->new;
$org_object_model->add_object($current_model_object);

Expand All @@ -1955,7 +1955,7 @@ sub split_object {
# remove the original object before spawning the object_loaded event, otherwise
# we'll pass the wrong $obj_idx to it (which won't be recognized after the
# thumbnail thread returns)
$self->remove($obj_idx, 'true'); # Don't push to the undo stack it's considered a split opeation not a remove one.
$self->remove($obj_idx, 'true'); # Don't push to the undo stack it's considered a split operation not a remove one.
$current_object = $obj_idx = undef;

# Save the object identifiers used in undo/redo operations.
Expand Down
4 changes: 2 additions & 2 deletions lib/Slic3r/GUI/Plater/2DToolpaths.pm
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ sub new {
$class->SUPER::new($parent, -1, Wx::wxDefaultPosition, Wx::wxDefaultSize, 0, "",
[WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 24, 0]) :
$class->SUPER::new($parent);
# Immediatelly force creation of the OpenGL context to consume the static variable s_wglContextAttribs.
# Immediately force creation of the OpenGL context to consume the static variable s_wglContextAttribs.
$self->GetContext();
$self->print($print);
$self->_zoom(1);
Expand Down Expand Up @@ -356,7 +356,7 @@ sub Render {

my $tess;
if (!(&Wx::wxMSW && $OpenGL::VERSION < 0.6704)) {
# We can't use the GLU tesselator on MSW with older OpenGL versions
# We can't use the GLU tessellator on MSW with older OpenGL versions
# because of an upstream bug:
# http://sourceforge.net/p/pogl/bugs/16/
$tess = gluNewTess();
Expand Down
2 changes: 1 addition & 1 deletion package/linux/make_archive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fi
rm -rf $WD/_tmp
mkdir -p $WD/_tmp

# Set the application folder infomation.
# Set the application folder information.
appfolder="$WD/${appname}"
archivefolder=$appfolder
resourcefolder=$appfolder
Expand Down
4 changes: 2 additions & 2 deletions src/GUI/ColorScheme/Default.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class DefaultColor : public ColorScheme {
const bool SOLID_BACKGROUNDCOLOR() const { return false; };
const wxColour SELECTED_COLOR() const { return wxColour(0, 255, 0); };
const wxColour HOVER_COLOR() const { return wxColour(255*0.4, 255*0.9, 0); }; //<Hover over Model
const wxColour TOP_COLOR() const { return wxColour(10,98,144); }; //<TOP Backgroud color
const wxColour BOTTOM_COLOR() const { return wxColour(0,0,0); }; //<BOTTOM Backgroud color
const wxColour TOP_COLOR() const { return wxColour(10,98,144); }; //<TOP Background color
const wxColour BOTTOM_COLOR() const { return wxColour(0,0,0); }; //<BOTTOM Background color
const wxColour BACKGROUND_COLOR() const {return TOP_COLOR();} //< SOLID background color
const wxColour GRID_COLOR() const { return wxColour(255*0.2, 255*0.2, 255*0.2, 255*0.4); }; //<Grid color
const wxColour GROUND_COLOR() const { return wxColour(255*0.8, 255*0.6, 255*0.5, 255*0.4); }; //<Ground or Plate color
Expand Down
2 changes: 1 addition & 1 deletion src/GUI/MainFrame.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class MainFrame: public wxFrame
private:
wxDECLARE_EVENT_TABLE();

void init_menubar(); //< Routine to intialize all top-level menu items.
void init_menubar(); //< Routine to initialize all top-level menu items.
void init_tabpanel(); //< Routine to initialize all of the tabs.

bool loaded; //< Main frame itself has finished loading.
Expand Down
2 changes: 1 addition & 1 deletion src/GUI/Plater/Plate2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ void Plate2D::mouse_up(wxMouseEvent& e) {
try {
if (this->drag_object.obj != -1 && this->drag_object.inst != -1) this->on_instances_moved();
} catch (std::bad_function_call &ex) {
Slic3r::Log::error(LogChannel, L"On_instances_moved was not intialized to a function.");
Slic3r::Log::error(LogChannel, L"On_instances_moved was not initialized to a function.");
}
this->drag_start_pos = wxPoint(-1, -1);
this->drag_object = {-1, -1};
Expand Down
2 changes: 1 addition & 1 deletion src/GUI/Plater/Plate3D.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Plate3D : public Scene3D {
void selection_changed(){Refresh();}
protected:
// Render each volume as a different color and check what color is beneath
// the mouse to detemine the hovered volume
// the mouse to determine the hovered volume
void before_render();

// Mouse events are needed to handle selecting and moving objects
Expand Down
2 changes: 1 addition & 1 deletion src/GUI/Plater/Preview3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void Preview3D::load_print() {
std::sort(layers_z.begin(),layers_z.end());
slider->SetRange(0, layers_z.size()-1);
z_idx = slider->GetValue();
// If invalide z_idx, move the slider to the top
// If invalid z_idx, move the slider to the top
if (z_idx >= layers_z.size() || slider->GetValue() == 0) {
slider->SetValue(layers_z.size()-1);
//$z_idx = @{$self->{layer_z}} ? -1 : undef;
Expand Down
2 changes: 1 addition & 1 deletion src/GUI/Preset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class Preset {
private:

/// store to keep config options for this preset
/// This is intented to be a "pristine" copy from the underlying
/// This is intended to be a "pristine" copy from the underlying
/// file store.
config_ptr _config { nullptr };

Expand Down
2 changes: 1 addition & 1 deletion src/test/libslic3r/test_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ SCENARIO("Config accessor functions perform as expected.") {
}
}
WHEN("A numeric option is set to a non-numeric value.") {
THEN("A BadOptionTypeException exception is thown.") {
THEN("A BadOptionTypeException exception is thrown.") {
REQUIRE_THROWS_AS(config->set("perimeter_speed", "zzzz"), BadOptionTypeException);
}
THEN("The value does not change.") {
Expand Down
2 changes: 1 addition & 1 deletion src/test/libslic3r/test_geometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ TEST_CASE("Bounding boxes are scaled appropriately"){
}


TEST_CASE("Offseting a line generates a polygon correctly"){
TEST_CASE("Offsetting a line generates a polygon correctly"){
auto line = Line(Point(10,10), Point(20,10));
Polyline tmp(line);
Polygon area = offset(tmp,5).at(0);
Expand Down
2 changes: 1 addition & 1 deletion src/test/test_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ enum class TestMesh {
two_hollow_squares
};

// Neccessary for <c++17
// Necessary for <c++17
struct TestMeshHash {
std::size_t operator()(TestMesh tm) const {
return static_cast<std::size_t>(tm);
Expand Down
2 changes: 1 addition & 1 deletion utils/zsh/functions/_slic3r
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ _arguments -S \
\
'--retract-length[specify filament retraction length when pausing extrusion]:filament retraction length in mm' \
'--retract-speed[specify filament retraction speed]:filament retraction speed in mm/s' \
'--retract-restart-extra[specify filament length to extrude for compensating retraction]: filament lenght in mm' \
'--retract-restart-extra[specify filament length to extrude for compensating retraction]: filament length in mm' \
'--retract-before-travel[specify minimum travel length for activating retraction]:minimum travel length for activating retraction in mm' \
'--retract-lift[specify Z-axis lift for use when retracting]:Z-axis lift in mm' \
\
Expand Down
2 changes: 1 addition & 1 deletion xs/src/BSpline/BSpline.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ template <class T> struct BSplineBaseP;
* own instantiation.
*
* The algorithm is based on the cubic spline described by Katsuyuki Ooyama
* in Montly Weather Review, Vol 115, October 1987. This implementation
* in Monthly Weather Review, Vol 115, October 1987. This implementation
* has benefited from comparisons with a previous FORTRAN implementation by
* James L. Franklin, NOAA/Hurricane Research Division. In particular, the
* algorithm in the Setup() method is based mostly on his implementation
Expand Down
2 changes: 1 addition & 1 deletion xs/src/admesh/normals.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ stl_fix_normal_directions(stl_file *stl) {
/* Get next facet to fix from top of list. */
if(head->next != tail) {
facet_num = head->next->facet_num;
if(norm_sw[facet_num] != 1) { /* If facet is in list mutiple times */
if(norm_sw[facet_num] != 1) { /* If facet is in list multiple times */
norm_sw[facet_num] = 1; /* Record this one as being fixed. */
checked++;
}
Expand Down
2 changes: 1 addition & 1 deletion xs/src/admesh/stlinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ stl_open_merge(stl_file *stl, ADMESH_CHAR *file_to_merge) {
/* Record the file pointer too: */
origFp=stl->fp;

/* Initialize the sturucture with zero stats, header info and sizes: */
/* Initialize the structure with zero stats, header info and sizes: */
stl_initialize(&stl_to_merge);
stl_count_facets(&stl_to_merge, file_to_merge);

Expand Down
4 changes: 2 additions & 2 deletions xs/src/boost/nowide/args.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace nowide {
public:

///
/// Fix command line agruments
/// Fix command line arguments
///
args(int &argc,char **&argv) :
old_argc_(argc),
Expand All @@ -56,7 +56,7 @@ namespace nowide {
fix_args(argc,argv);
}
///
/// Fix command line agruments and environment
/// Fix command line arguments and environment
///
args(int &argc,char **&argv,char **&en) :
old_argc_(argc),
Expand Down
4 changes: 2 additions & 2 deletions xs/src/boost/nowide/cenv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace nowide {
///
/// \brief UTF-8 aware setenv, \a key - the variable name, \a value is a new UTF-8 value,
///
/// if override is not 0, that the old value is always overridded, otherwise,
/// if override is not 0, that the old value is always overridden, otherwise,
/// if the variable exists it remains unchanged
///
inline int setenv(char const *key,char const *value,int override)
Expand All @@ -83,7 +83,7 @@ namespace nowide {
return -1;
}
///
/// \brief Remove enviroment variable \a key
/// \brief Remove environment variable \a key
///
inline int unsetenv(char const *key)
{
Expand Down
2 changes: 1 addition & 1 deletion xs/src/boost/nowide/filebuf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ namespace nowide {
};

///
/// \brief Convinience typedef
/// \brief Convenience typedef
///
typedef basic_filebuf<char> filebuf;

Expand Down
2 changes: 1 addition & 1 deletion xs/src/boost/nowide/fstream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace boost {
///
/// \brief This namespace includes implementation of the standard library functios
/// \brief This namespace includes implementation of the standard library functions
/// such that they accept UTF-8 strings on Windows. On other platforms it is just an alias
/// of std namespace (i.e. not on Windows)
///
Expand Down
2 changes: 1 addition & 1 deletion xs/src/boost/nowide/integration/filesystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace boost {
namespace nowide {
///
/// Instal utf8_codecvt facet into boost::filesystem::path such all char strings are interpreted as utf-8 strings
/// Install utf8_codecvt facet into boost::filesystem::path such all char strings are interpreted as utf-8 strings
///
inline void nowide_filesystem()
{
Expand Down
8 changes: 4 additions & 4 deletions xs/src/boost/nowide/stackstring.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,19 +129,19 @@ class basic_stackstring {
}; //basic_stackstring

///
/// Convinience typedef
/// Convenience typedef
///
typedef basic_stackstring<wchar_t,char,256> wstackstring;
///
/// Convinience typedef
/// Convenience typedef
///
typedef basic_stackstring<char,wchar_t,256> stackstring;
///
/// Convinience typedef
/// Convenience typedef
///
typedef basic_stackstring<wchar_t,char,16> wshort_stackstring;
///
/// Convinience typedef
/// Convenience typedef
///
typedef basic_stackstring<char,wchar_t,16> short_stackstring;

Expand Down
4 changes: 2 additions & 2 deletions xs/src/boost/nowide/utf8_codecvt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ class utf8_codecvt<CharType,2> : public std::codecvt<CharType,char,std::mbstate_
r=std::codecvt_base::partial;
break;
}
// Normal codepoints go direcly to stream
// Normal codepoints go directly to stream
if(ch <= 0xFFFF) {
*to++=ch;
}
else {
// for other codepoints we do following
//
// 1. We can't consume our input as we may find ourselfs
// 1. We can't consume our input as we may find ourselves
// in state where all input consumed but not all output written,i.e. only
// 1st pair is written
// 2. We only write first pair and mark this in the state, we also revert back
Expand Down
2 changes: 1 addition & 1 deletion xs/src/clipper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
//improve performance but coordinate values are limited to the range +/- 46340
//#define use_int32

//use_xyz: adds a Z member to IntPoint. Adds a minor cost to perfomance.
//use_xyz: adds a Z member to IntPoint. Adds a minor cost to performance.
//#define use_xyz

//use_lines: Enables line clipping. Adds a very minor cost to performance.
Expand Down
2 changes: 1 addition & 1 deletion xs/src/expat/expat.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ XML_ParserCreate_MM(const XML_Char *encoding,
const XML_Char *namespaceSeparator);

/* Prepare a parser object to be re-used. This is particularly
valuable when memory allocation overhead is disproportionatly high,
valuable when memory allocation overhead is disproportionately high,
such as when a large number of small documnents need to be parsed.
All handlers are cleared from the parser, except for the
unknownEncodingHandler. The parser's external state is re-initialized
Expand Down
4 changes: 2 additions & 2 deletions xs/src/exprtk/exprtk.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10994,7 +10994,7 @@ namespace exprtk
{
public:

// Function of N paramters.
// Function of N parameters.
typedef expression_node<T>* expression_ptr;
typedef std::pair<expression_ptr,bool> branch_t;
typedef IFunction ifunction;
Expand Down Expand Up @@ -20106,7 +20106,7 @@ namespace exprtk
if (index < error_list_.size())
return error_list_[index];
else
throw std::invalid_argument("parser::get_error() - Invalid error index specificed");
throw std::invalid_argument("parser::get_error() - Invalid error index specified");
}

inline std::string error() const
Expand Down
Loading

0 comments on commit 1bd2299

Please sign in to comment.