From 33caa1ec3066cd6cd312608f534c3d2dd6bdfbdd Mon Sep 17 00:00:00 2001 From: luz paz Date: Tue, 20 Oct 2020 22:05:19 -0400 Subject: [PATCH] Fix various typos Found via `codespell v2.0.dev` ``` codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml ``` --- src/Mod/Draft/draftgeoutils/edges.py | 4 ++-- src/Mod/Draft/draftgeoutils/geometry.py | 6 +++--- src/Mod/Draft/draftmake/make_sketch.py | 2 +- src/Mod/Part/App/BRepFeat/MakePrismPyImp.cpp | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Mod/Draft/draftgeoutils/edges.py b/src/Mod/Draft/draftgeoutils/edges.py index fc910c3cab..df50f0d4a0 100644 --- a/src/Mod/Draft/draftgeoutils/edges.py +++ b/src/Mod/Draft/draftgeoutils/edges.py @@ -114,8 +114,8 @@ def isSameLine(e1, e2): def is_line(bspline): """Return True if the given BSpline curve is a straight line.""" -# previous implementation may fail for a multipole striaght spline due -# a second order error in tolerance, wich introduce a difference of 1e-14 +# previous implementation may fail for a multipole straight spline due +# a second order error in tolerance, which introduce a difference of 1e-14 # in the values of the tangents. Also, may fail on a periodic spline. # step = bspline.LastParameter/10 # b = bspline.tangent(0) diff --git a/src/Mod/Draft/draftgeoutils/geometry.py b/src/Mod/Draft/draftgeoutils/geometry.py index ee64ed5b3d..1695e2bec4 100644 --- a/src/Mod/Draft/draftgeoutils/geometry.py +++ b/src/Mod/Draft/draftgeoutils/geometry.py @@ -297,7 +297,7 @@ def is_planar(shape, tol=-1): def is_straight_line(shape, tol=-1): """Return True if shape is a straight line. function used in other methods because Part.Shape.findPlane assign a - plane and normal to straight wires creating priviliged directions + plane and normal to straight wires creating privileged directions and to deal with straight wires with overlapped edges.""" if len(shape.Faces) != 0: @@ -319,7 +319,7 @@ def is_straight_line(shape, tol=-1): first_point = edge.firstVertex().Point last_point = edge.lastVertex().Point dir_edge = edge.tangentAt(edge.FirstParameter) - # chek if edge is curve or no parallel to start_edge + # check if edge is curve or no parallel to start_edge # because sin(x) = x + O(x**3), for small angular deflection it's # enough use the cross product of directions (or dot with a normal) if (abs(edge.Length - first_point.distanceToPoint(last_point)) > err @@ -410,7 +410,7 @@ def get_spline_surface_normal(shape, tol=-1): u = (u0 + u1)/2 v = (v0 + v1)/2 first_normal = first_surf.normal(u, v) - # chek if all faces are planar and parallel + # check if all faces are planar and parallel for face in shape.Faces: surf = face.Surface if not surf.isPlanar(tol): diff --git a/src/Mod/Draft/draftmake/make_sketch.py b/src/Mod/Draft/draftmake/make_sketch.py index 2785fa0397..2647a2b4ac 100644 --- a/src/Mod/Draft/draftmake/make_sketch.py +++ b/src/Mod/Draft/draftmake/make_sketch.py @@ -127,7 +127,7 @@ def make_sketch(objects_list, autoconstraints=False, addTo=None, normal = DraftGeomUtils.get_normal(shapes_list[0], tol) else: - # supose all geometries are straight lines or points + # suppose all geometries are straight lines or points points = [vertex.Point for shape in shapes_list for vertex in shape.Vertexes] if len(points) >= 2: poly = Part.makePolygon(points) diff --git a/src/Mod/Part/App/BRepFeat/MakePrismPyImp.cpp b/src/Mod/Part/App/BRepFeat/MakePrismPyImp.cpp index 12bdee0cc6..4a9e830726 100644 --- a/src/Mod/Part/App/BRepFeat/MakePrismPyImp.cpp +++ b/src/Mod/Part/App/BRepFeat/MakePrismPyImp.cpp @@ -53,7 +53,7 @@ int MakePrismPy::PyInit(PyObject* args, PyObject* kwds) PyObject* Direction; int Fuse; PyObject* Modify; - static char* keywords[] = {"Sbase", "Pbase", "Skface", "Direction", "Fuse", "Modifiy", nullptr}; + static char* keywords[] = {"Sbase", "Pbase", "Skface", "Direction", "Fuse", "Modify", nullptr}; if (PyArg_ParseTupleAndKeywords(args, kwds, "O!O!O!O!iO!", keywords, &(TopoShapePy::Type), &Sbase, &(TopoShapePy::Type), &Pbase, @@ -110,7 +110,7 @@ PyObject* MakePrismPy::init(PyObject *args, PyObject* kwds) PyObject* Direction; int Fuse; PyObject* Modify; - static char* keywords[] = {"Sbase", "Pbase", "Skface", "Direction", "Fuse", "Modifiy", nullptr}; + static char* keywords[] = {"Sbase", "Pbase", "Skface", "Direction", "Fuse", "Modify", nullptr}; if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!O!O!O!iO!", keywords, &(TopoShapePy::Type), &Sbase, &(TopoShapePy::Type), &Pbase,