From 0238906d38a2257b54ad3fc4e7dc719a1538070d Mon Sep 17 00:00:00 2001 From: "luz.paz" Date: Mon, 29 Apr 2019 14:17:26 -0400 Subject: [PATCH] Misc. typo and whitespace fixes Found via `codespell` --- CMakeLists.txt | 4 +- src/App/Application.cpp | 2 +- src/Mod/Arch/ArchRebar.py | 2 +- src/Mod/Arch/ArchSite.py | 24 ++++----- src/Mod/Fem/femmesh/meshtools.py | 2 +- src/Mod/PartDesign/Gui/ViewProviderBody.cpp | 54 +++++++++---------- src/Mod/Path/App/Area.cpp | 18 +++---- src/Mod/Path/Gui/Resources/panels/PathEdit.ui | 6 +-- src/Mod/Sketcher/Gui/ViewProviderSketch.cpp | 4 +- 9 files changed, 58 insertions(+), 58 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 874b4a9bb8..d7da73f070 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1360,7 +1360,7 @@ ELSE(NOT BUILD_QT5) IF(DEFINED PySide_FOUND) MESSAGE(STATUS "PySide: ${PySide_VERSION} [${PYSIDE_INCLUDE_DIR}]") IF(NOT PYSIDE_INCLUDE_DIR) - MESSAGE(STATUS " IncludeDir: Unable to find, python version missmatch?") + MESSAGE(STATUS " IncludeDir: Unable to find, python version mismatch?") ENDIF(NOT PYSIDE_INCLUDE_DIR) ELSE(DEFINED PySide_FOUND) MESSAGE(STATUS "PySide: not found (only searched if MACPORTS_PREFIX is defined)") @@ -1375,7 +1375,7 @@ ELSE(NOT BUILD_QT5) IF(DEFINED PySide2_FOUND) MESSAGE(STATUS "PySide2: ${PySide2_VERSION} [${PYSIDE_INCLUDE_DIR}]") IF(NOT PYSIDE_INCLUDE_DIR) - MESSAGE(STATUS " IncludeDir: Unable to find, python version missmatch?") + MESSAGE(STATUS " IncludeDir: Unable to find, python version mismatch?") ENDIF(NOT PYSIDE_INCLUDE_DIR) ELSE(DEFINED PySide2_FOUND) MESSAGE(STATUS "PySide2: not found") diff --git a/src/App/Application.cpp b/src/App/Application.cpp index 2128388510..2353c2bff8 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -2064,7 +2064,7 @@ void Application::ParseOptions(int ac, char ** av) #endif ; - // Ignored options, will be safely ignored. Mostly used by underlaying libs. + // Ignored options, will be safely ignored. Mostly used by underlying libs. //boost::program_options::options_description x11("X11 options"); //x11.add_options() // ("display", boost::program_options::value< string >(), "set the X-Server") diff --git a/src/Mod/Arch/ArchRebar.py b/src/Mod/Arch/ArchRebar.py index 74561891f8..e9bd0dcfc6 100644 --- a/src/Mod/Arch/ArchRebar.py +++ b/src/Mod/Arch/ArchRebar.py @@ -77,7 +77,7 @@ def makeRebar(baseobj=None,sketch=None,diameter=None,amount=1,offset=None,name=" sketch.ViewObject.hide() obj.Host = baseobj elif sketch and not baseobj: - # a rebar could be based on a wire without the existance of a Structure + # a rebar could be based on a wire without the existence of a Structure obj.Base = sketch if FreeCAD.GuiUp: sketch.ViewObject.hide() diff --git a/src/Mod/Arch/ArchSite.py b/src/Mod/Arch/ArchSite.py index 3ffe04561c..7216a1fa71 100644 --- a/src/Mod/Arch/ArchSite.py +++ b/src/Mod/Arch/ArchSite.py @@ -282,10 +282,10 @@ class Compass(object): def setZOffset(self, offsetInMillimeters): from pivy import coin self.transform.translation.setValue(0, 0, offsetInMillimeters) - + def scale(self, area): from pivy import coin - + scale = round(max(math.sqrt(area.getValueAs("m^2").Value) / 10, 1)) self.transform.scaleFactor.setValue(coin.SbVec3f(scale, scale, 1)) @@ -528,7 +528,7 @@ class _Site(ArchFloor._Floor): "App::Property", "The rotation of the Compass relative to the Site")) if not "UpdateDeclination" in pl: obj.addProperty("App::PropertyBool", "UpdateDeclination", "Compass", QT_TRANSLATE_NOOP( - "App::Property", "Update the Declination value based on the compass roation")) + "App::Property", "Update the Declination value based on the compass rotation")) self.Type = "Site" obj.setEditorMode('Height',2) @@ -696,7 +696,7 @@ class _ViewProviderSite(ArchFloor._ViewProviderFloor): if not "Orientation" in pl: vobj.addProperty("App::PropertyEnumeration", "Orientation", "Site", QT_TRANSLATE_NOOP( "App::Property", "When set to 'True North' the whole geometry will be rotated to match the true north of this site")) - + vobj.Orientation = ["Project North", "True North"] vobj.Orientation = "Project North" @@ -809,31 +809,31 @@ class _ViewProviderSite(ArchFloor._ViewProviderFloor): self.addTrueNorthRotation() else: self.removeTrueNorthRotation() - + def addTrueNorthRotation(self): if hasattr(self, 'trueNorthRotation') and self.trueNorthRotation is not None: return - + from pivy import coin - + self.trueNorthRotation = coin.SoTransform() sg = FreeCADGui.ActiveDocument.ActiveView.getSceneGraph() sg.insertChild(self.trueNorthRotation, 0) self.updateTrueNorthRotation() - + def removeTrueNorthRotation(self): if hasattr(self, 'trueNorthRotation') and self.trueNorthRotation is not None: sg = FreeCADGui.ActiveDocument.ActiveView.getSceneGraph() sg.removeChild(self.trueNorthRotation) self.trueNorthRotation = None - + def updateTrueNorthRotation(self): if hasattr(self, 'trueNorthRotation') and self.trueNorthRotation is not None: from pivy import coin - + angle = self.Object.Declination.Value self.trueNorthRotation.rotation.setValue(coin.SbVec3f(0, 0, 1), math.radians(-angle)) @@ -866,11 +866,11 @@ class _ViewProviderSite(ArchFloor._ViewProviderFloor): zOffset = boundBox.ZMax = pos.z self.compass.setZOffset(zOffset + 1000) - + def updateCompassScale(self, obj): if not hasattr(self, 'compass'): return - + self.compass.scale(obj.ProjectedArea) diff --git a/src/Mod/Fem/femmesh/meshtools.py b/src/Mod/Fem/femmesh/meshtools.py index 3f3f7933ee..562e121832 100644 --- a/src/Mod/Fem/femmesh/meshtools.py +++ b/src/Mod/Fem/femmesh/meshtools.py @@ -1221,7 +1221,7 @@ def get_pressure_obj_faces(femmesh, femelement_table, femnodes_ele_table, femobj # depreciated method for pressure faces for constraint pressure and finite solid element mesh # why did we switch to the get_ccxelement_faces_from_binary_search? # just performance? -# TODO: Find the forum topic disscussion with ulrich1a and post a link +# TODO: Find the forum topic discussion with ulrich1a and post a link def get_pressure_obj_faces_depreciated(femmesh, femobj): pressure_faces = [] for o, elem_tup in femobj['Object'].References: diff --git a/src/Mod/PartDesign/Gui/ViewProviderBody.cpp b/src/Mod/PartDesign/Gui/ViewProviderBody.cpp index 54923f62d4..4b450ce3f5 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderBody.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderBody.cpp @@ -71,7 +71,7 @@ ViewProviderBody::ViewProviderBody() DisplayModeBody.setEnums(BodyModeEnum); sPixmap = "PartDesign_Body_Tree.svg"; - + Gui::ViewProviderOriginGroupExtension::initExtension(this); } @@ -85,7 +85,7 @@ void ViewProviderBody::attach(App::DocumentObject *pcFeat) { // call parent attach method ViewProviderPart::attach(pcFeat); - + //set default display mode onChanged(&DisplayModeBody); @@ -108,8 +108,8 @@ void ViewProviderBody::attach(App::DocumentObject *pcFeat) // TODO Add activate () call (2015-09-08, Fat-Zer) void ViewProviderBody::setDisplayMode(const char* ModeName) { - - //if we show "Through" we must avoid to set the display mask modes, as this would result + + //if we show "Through" we must avoid to set the display mask modes, as this would result //in going into "tip" mode. When through is chosen the child features are displayed, and all //we need to ensure is that the display mode change is propagated to them from within the //onChanged() method. @@ -118,15 +118,15 @@ void ViewProviderBody::setDisplayMode(const char* ModeName) { } void ViewProviderBody::setOverrideMode(const std::string& mode) { - + //if we are in through mode, we need to ensure that the override mode is not set for the body - //(as this would result in "tip" mode), it is enough when the children are set to the correct - //override mode. - + //(as this would result in "tip" mode), it is enough when the children are set to the correct + //override mode. + if(DisplayModeBody.getValue() != 0) Gui::ViewProvider::setOverrideMode(mode); else - overrideMode = mode; + overrideMode = mode; } void ViewProviderBody::setupContextMenu(QMenu* menu, QObject* receiver, const char* member) @@ -224,8 +224,8 @@ void ViewProviderBody::updateData(const App::Property* prop) updateOriginDatumSize (); //ensure all model features are in visual body mode setVisualBodyMode(true); - } - + } + if (prop == &body->Tip) { // We changed Tip App::DocumentObject* tip = body->Tip.getValue(); @@ -246,9 +246,9 @@ void ViewProviderBody::updateData(const App::Property* prop) void ViewProviderBody::slotChangedObjectApp ( const App::DocumentObject& obj, const App::Property& prop ) { - + if (!obj.isDerivedFrom ( Part::Feature::getClassTypeId () ) || - obj.isDerivedFrom ( Part::BodyBase::getClassTypeId () ) ) { // we are intrested only in Part::Features and not in bodies + obj.isDerivedFrom ( Part::BodyBase::getClassTypeId () ) ) { // we are interested only in Part::Features, not in bodies return; } @@ -288,16 +288,16 @@ void ViewProviderBody::slotChangedObjectGui ( void ViewProviderBody::updateOriginDatumSize () { PartDesign::Body *body = static_cast ( getObject() ); - + // Use different bounding boxes for datums and for origins: Gui::Document* gdoc = Gui::Application::Instance->getDocument(getObject()->getDocument()); - if(!gdoc) + if(!gdoc) return; - + Gui::MDIView* view = gdoc->getViewOfViewProvider(this); if(!view) return; - + Gui::View3DInventorViewer* viewer = static_cast(view)->getViewer(); SoGetBoundingBoxAction bboxAction(viewer->getSoRenderManager()->getViewportRegion()); @@ -359,11 +359,11 @@ void ViewProviderBody::updateOriginDatumSize () { } void ViewProviderBody::onChanged(const App::Property* prop) { - + if(prop == &DisplayModeBody) { - + if ( DisplayModeBody.getValue() == 0 ) { - //if we are in an override mode we need to make sure to come out, because + //if we are in an override mode we need to make sure to come out, because //otherwise the maskmode is blocked and won't go into "through" if(getOverrideMode() != "As Is") { auto mode = getOverrideMode(); @@ -384,16 +384,16 @@ void ViewProviderBody::onChanged(const App::Property* prop) { // #0002559: Body becomes visible upon changing DisplayModeBody Visibility.touch(); } - else + else unifyVisualProperty(prop); - + PartGui::ViewProviderPartExt::onChanged(prop); } void ViewProviderBody::unifyVisualProperty(const App::Property* prop) { - if(prop == &Visibility || + if(prop == &Visibility || prop == &Selectable || prop == &DisplayModeBody) return; @@ -403,7 +403,7 @@ void ViewProviderBody::unifyVisualProperty(const App::Property* prop) { PartDesign::Body *body = static_cast ( getObject() ); auto features = body->Group.getValues(); for(auto feature : features) { - + if(!feature->isDerivedFrom(PartDesign::Feature::getClassTypeId())) continue; @@ -420,7 +420,7 @@ void ViewProviderBody::setVisualBodyMode(bool bodymode) { PartDesign::Body *body = static_cast ( getObject() ); auto features = body->Group.getValues(); for(auto feature : features) { - + if(!feature->isDerivedFrom(PartDesign::Feature::getClassTypeId())) continue; @@ -430,8 +430,8 @@ void ViewProviderBody::setVisualBodyMode(bool bodymode) { } std::vector< std::string > ViewProviderBody::getDisplayModes(void) const { - - //we get all display modes and remove the "Group" mode, as this is what we use for "Through" + + //we get all display modes and remove the "Group" mode, as this is what we use for "Through" //body display mode std::vector< std::string > modes = ViewProviderPart::getDisplayModes(); modes.erase(modes.begin()); diff --git a/src/Mod/Path/App/Area.cpp b/src/Mod/Path/App/Area.cpp index 154085c896..360c5dbedd 100644 --- a/src/Mod/Path/App/Area.cpp +++ b/src/Mod/Path/App/Area.cpp @@ -230,7 +230,7 @@ static bool getShapePlane(const TopoDS_Shape &shape, gp_Pln &pln) { // // ADD NOTE: Okay, one thing I find out that for face shape, this // FindSurface may produce plane at the wrong position, so use - // adaptor to get the underlaying surface plane directly (see + // adaptor to get the underlying surface plane directly (see // above). It remains to be seen that if FindSurface has the same // problem on wires pln = GeomAdaptor_Surface(finder.Surface()).Plane(); @@ -333,7 +333,7 @@ static std::vector discretize(const TopoDS_Edge &edge, double deflection // first and last parameters. Passing the original curve first and last // parameters works fine. The following algorithm uses the original curve // parameters, and skip those out of range. The algorithm shall work the - // same for any other discetization algorithm, althgouth it seems only + // same for any other discetization algorithm, althgouth it seems only // QuasiUniformDeflection has this bug. GCPnts_QuasiUniformDeflection discretizer(curve, deflection, first, last); @@ -1826,7 +1826,7 @@ TopoDS_Shape Area::getShape(int index) { } TopoDS_Shape Area::makeOffset(int index,PARAM_ARGS(PARAM_FARG,AREA_PARAMS_OFFSET), - int reorient, bool from_center) + int reorient, bool from_center) { build(); AREA_SECTION(makeOffset,index,PARAM_FIELDS(PARAM_FARG,AREA_PARAMS_OFFSET),reorient,from_center); @@ -1910,7 +1910,7 @@ void Area::makeOffset(list > &areas, last_stepover = 0; } for(int i=0;count<0||i()); else areas.push_back(make_shared()); @@ -1951,7 +1951,7 @@ void Area::makeOffset(list > &areas, if(count>1) FC_TIME_LOG(t1,"makeOffset " << i << '/' << count); if(area.m_curves.empty()) { - if(from_center) + if(from_center) areas.pop_front(); else areas.pop_back(); @@ -2088,7 +2088,7 @@ TopoDS_Shape Area::makePocket(int index, PARAM_ARGS(PARAM_FARG,AREA_PARAMS_POCKE done = true; break; }default: - throw Base::ValueError("unknown poket mode"); + throw Base::ValueError("unknown pocket mode"); } if(!done) { @@ -2220,7 +2220,7 @@ TopoDS_Shape Area::toShape(const CCurve &_c, const gp_Trsf *trsf, int reorient) builder.Add(compound,hWires->Value(i)); shape = compound; } - + if(trsf) shape.Move(TopLoc_Location(*trsf)); return shape; @@ -2654,7 +2654,7 @@ struct ShapeInfo{ std::list wires; if(myWires.empty() || - pstart.SquareDistance(myStartPt)>Precision::SquareConfusion()) + pstart.SquareDistance(myStartPt)>Precision::SquareConfusion()) { nearest(pstart); if(myWires.empty()) @@ -2834,7 +2834,7 @@ typedef Standard_Real (gp_Pnt::*AxisGetter)() const; typedef void (gp_Pnt::*AxisSetter)(Standard_Real); std::list Area::sortWires(const std::list &shapes, - bool has_start, gp_Pnt *_pstart, gp_Pnt *_pend, + bool has_start, gp_Pnt *_pstart, gp_Pnt *_pend, double *stepdown_hint, short *_parc_plane, PARAM_ARGS(PARAM_FARG,AREA_PARAMS_SORT)) { diff --git a/src/Mod/Path/Gui/Resources/panels/PathEdit.ui b/src/Mod/Path/Gui/Resources/panels/PathEdit.ui index 9299ae0ed4..004759a8b2 100644 --- a/src/Mod/Path/Gui/Resources/panels/PathEdit.ui +++ b/src/Mod/Path/Gui/Resources/panels/PathEdit.ui @@ -203,7 +203,7 @@ - <html><head/><body><p>Ordering by Fixture, will cause all operations to be performed in the first coordinate system before switching to the second. Then all operations will be perfomed there in the same order.</p><p>This is useful if the operator can safely load work into one coordinate system while the machine is doing work in another.</p><p>Ordering by Tool, wil minimize the Tool Changes. A tool change will be done, then all operations in all coordinate systems before changing tools.</p><p>Ordering by operation will do each operation in all coordinate systems before moving to the next operation. This is especially useful in conjunction with the 'split output' even with only a single work coordinate system since it will put each operation into a separate file</p></body></html> + <html><head/><body><p>Ordering by Fixture, will cause all operations to be performed in the first coordinate system before switching to the second. Then all operations will be performed there in the same order.</p><p>This is useful if the operator can safely load work into one coordinate system while the machine is doing work in another.</p><p>Ordering by Tool, will minimize the Tool Changes. A tool change will be done, then all operations in all coordinate systems before changing tools.</p><p>Ordering by operation will do each operation in all coordinate systems before moving to the next operation. This is especially useful in conjunction with the 'split output' even with only a single work coordinate system since it will put each operation into a separate file</p></body></html> @@ -395,10 +395,10 @@ - <html><head/><body><p>If multiple coordinate systems are in use, setting this to TRUE will cause the gcode to be written to multiple output files as controled by the 'order by' property. For example, if ordering by Fixture, the first output file will be for the first fixture and separate file for the second.</p><p><br/></p><p><br/></p></body></html> + <html><head/><body><p>If multiple coordinate systems are in use, setting this to TRUE will cause the gcode to be written to multiple output files as controlled by the 'order by' property. For example, if ordering by Fixture, the first output file will be for the first fixture and separate file for the second.</p><p><br/></p><p><br/></p></body></html> - <html><head/><body><p>If True, post-processing will create multiple ouput files based on the <span style=" font-style:italic;">order by</span> setting.</p><p><br/></p><p>For example, if <span style=" font-style:italic;">order by</span> is set to Tool, the first output file will contain the first tool change and all operations, in all coordinate systems, that can be done with that tool before the next tool change is called.</p><p><br/></p><p>If <span style=" font-style:italic;">order by</span> is set to <span style=" font-style:italic;">operation</span> and <span style=" font-style:italic;">split output</span> is true, each operation will be written to a separate file.</p></body></html> + <html><head/><body><p>If True, post-processing will create multiple output files based on the <span style=" font-style:italic;">order by</span> setting.</p><p><br/></p><p>For example, if <span style=" font-style:italic;">order by</span> is set to Tool, the first output file will contain the first tool change and all operations, in all coordinate systems, that can be done with that tool before the next tool change is called.</p><p><br/></p><p>If <span style=" font-style:italic;">order by</span> is set to <span style=" font-style:italic;">operation</span> and <span style=" font-style:italic;">split output</span> is true, each operation will be written to a separate file.</p></body></html> Split Output diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index 8fd6469139..d3776d9c03 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -3805,7 +3805,7 @@ void ViewProviderSketch::draw(bool temp /*=false*/, bool rebuildinformationlayer } catch(Base::CADKernelError &e) { // it is "just" a visualisation matter OCC could not calculate the curvature - // terminating here would mean that the other shapes would not be drawed. + // terminating here would mean that the other shapes would not be drawn. // Solution: Report the issue and set dummy curvature to 0 e.ReportException(); Base::Console().Error("Curvature graph for B-Spline with GeoId=%d could not be calculated.\n", GeoId); @@ -4017,7 +4017,7 @@ void ViewProviderSketch::draw(bool temp /*=false*/, bool rebuildinformationlayer } catch(Base::CADKernelError &e) { // it is "just" a visualisation matter OCC could not calculate the curvature - // terminating here would mean that the other shapes would not be drawed. + // terminating here would mean that the other shapes would not be drawn. // Solution: Report the issue and set dummy curvature to 0 e.ReportException(); Base::Console().Error("Curvature graph for B-Spline with GeoId=%d could not be calculated.\n", GeoId);