diff --git a/src/App/Application.cpp b/src/App/Application.cpp index a412db90c4..aab699a2cf 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -206,7 +206,7 @@ PyDoc_STRVAR(FreeCAD_doc, PyDoc_STRVAR(Console_doc, "FreeCAD Console\n" ); - + PyDoc_STRVAR(Base_doc, "The Base module contains the classes for the geometric basics\n" "like vector, matrix, bounding box, placement, rotation, axis, ...\n" @@ -2415,8 +2415,8 @@ std::string Application::FindHomePath(const char* sCall) absPath = path; } else { - // Find the path of the executable. Theoretically, there could occur a - // race condition when using readlink, but we only use this method to + // Find the path of the executable. Theoretically, there could occur a + // race condition when using readlink, but we only use this method to // get the absolute path of the executable to compute the actual home // path. In the worst case we simply get q wrong path and FreeCAD is not // able to load its modules. diff --git a/src/Base/QuantityLexer.c b/src/Base/QuantityLexer.c index dae85866d9..092f365f0f 100644 --- a/src/Base/QuantityLexer.c +++ b/src/Base/QuantityLexer.c @@ -14,7 +14,7 @@ #define FLEX_BETA #endif -/* First, we deal with platform-specific or compiler-specific issues. */ +/* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include @@ -2183,19 +2183,19 @@ static void yy_fatal_error (yyconst char* msg ) } \ while ( 0 ) -/* Accessor methods (get/set functions) to struct members. */ +/* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. - * + * */ int yyget_lineno (void) { - + return yylineno; } /** Get the input stream. - * + * */ FILE *yyget_in (void) { diff --git a/src/Base/QuantityParser.y b/src/Base/QuantityParser.y index c193a829df..d090da37cb 100644 --- a/src/Base/QuantityParser.y +++ b/src/Base/QuantityParser.y @@ -1,5 +1,5 @@ -/* Parser for the FreeCAD Units language */ -/* (c) 2013 Juergen Riegel LGPL */ +/* Parser for the FreeCAD Units language */ +/* (c) 2013 Juergen Riegel LGPL */ /* Represents the many different ways we can access our data */ @@ -36,30 +36,30 @@ | unit { QuantResult = $1 ; } | quantity { QuantResult = $1 ; } | quantity quantity { QuantResult = $1 + $2; } - ; + ; num: NUM { $$ = $1; } | ONE { $$ = $1; } | num '+' num { $$ = Quantity($1.getValue() + $3.getValue()); } - | num MINUSSIGN num { $$ = Quantity($1.getValue() - $3.getValue()); } + | num MINUSSIGN num { $$ = Quantity($1.getValue() - $3.getValue()); } | num '*' num { $$ = Quantity($1.getValue() * $3.getValue()); } | num '/' num { $$ = Quantity($1.getValue() / $3.getValue()); } - | MINUSSIGN num %prec NEG { $$ = Quantity(-$2.getValue()); } + | MINUSSIGN num %prec NEG { $$ = Quantity(-$2.getValue()); } | num '^' num { $$ = Quantity(pow ($1.getValue(), $3.getValue()));} | '(' num ')' { $$ = $2; } - | ACOS '(' num ')' { $$ = Quantity(acos($3.getValue())); } - | ASIN '(' num ')' { $$ = Quantity(asin($3.getValue())); } - | ATAN '(' num ')' { $$ = Quantity(atan($3.getValue())); } - | ABS '(' num ')' { $$ = Quantity(fabs($3.getValue())); } - | EXP '(' num ')' { $$ = Quantity(exp($3.getValue())); } - | LOG '(' num ')' { $$ = Quantity(log($3.getValue())); } - | LOG10 '(' num ')' { $$ = Quantity(log10($3.getValue())); } - | SIN '(' num ')' { $$ = Quantity(sin($3.getValue())); } - | SINH '(' num ')' { $$ = Quantity(sinh($3.getValue())); } - | TAN '(' num ')' { $$ = Quantity(tan($3.getValue())); } - | TANH '(' num ')' { $$ = Quantity(tanh($3.getValue())); } - | SQRT '(' num ')' { $$ = Quantity(sqrt($3.getValue())); } - | COS '(' num ')' { $$ = Quantity(cos($3.getValue())); } -; + | ACOS '(' num ')' { $$ = Quantity(acos($3.getValue())); } + | ASIN '(' num ')' { $$ = Quantity(asin($3.getValue())); } + | ATAN '(' num ')' { $$ = Quantity(atan($3.getValue())); } + | ABS '(' num ')' { $$ = Quantity(fabs($3.getValue())); } + | EXP '(' num ')' { $$ = Quantity(exp($3.getValue())); } + | LOG '(' num ')' { $$ = Quantity(log($3.getValue())); } + | LOG10 '(' num ')' { $$ = Quantity(log10($3.getValue())); } + | SIN '(' num ')' { $$ = Quantity(sin($3.getValue())); } + | SINH '(' num ')' { $$ = Quantity(sinh($3.getValue())); } + | TAN '(' num ')' { $$ = Quantity(tan($3.getValue())); } + | TANH '(' num ')' { $$ = Quantity(tanh($3.getValue())); } + | SQRT '(' num ')' { $$ = Quantity(sqrt($3.getValue())); } + | COS '(' num ')' { $$ = Quantity(cos($3.getValue())); } +; unit: UNIT { $$ = $1; } | ONE '/' unit { $$ = Quantity(1.0)/$3; } @@ -69,7 +69,7 @@ | '(' unit ')' { $$ = $2; } ; quantity: num unit { $$ = $1*$2; } -; +; %% diff --git a/src/Gui/Command.h b/src/Gui/Command.h index 003c608044..f9bd53f2fb 100644 --- a/src/Gui/Command.h +++ b/src/Gui/Command.h @@ -121,8 +121,8 @@ public: protected: /** @name Attributes set by the inherited constructor. * - * They set up the most important properties of the command. - * In the constructor are set default values. + * They set up the most important properties of the command. + * In the constructor are set default values. * The real values should be set in the constructor of the inheriting class. */ //@{ diff --git a/src/Gui/CommandDoc.cpp b/src/Gui/CommandDoc.cpp index cbcb3ddbc1..581f1c48b8 100644 --- a/src/Gui/CommandDoc.cpp +++ b/src/Gui/CommandDoc.cpp @@ -1120,8 +1120,8 @@ void StdCmdDelete::activated(int iMsg) } } } - - //check for inactive objects in selection Mantis #3477 + + //check for inactive objects in selection (Mantis #3477) std::set inactiveLabels; App::Application& app = App::GetApplication(); App::Document* actDoc = app.getActiveDocument(); diff --git a/src/Mod/Assembly/Gui/TaskAssemblyConstraints.ui b/src/Mod/Assembly/Gui/TaskAssemblyConstraints.ui index 4944fd68f9..eb0fdb708b 100644 --- a/src/Mod/Assembly/Gui/TaskAssemblyConstraints.ui +++ b/src/Mod/Assembly/Gui/TaskAssemblyConstraints.ui @@ -151,7 +151,7 @@ - <html><head/><body><p>Special constraint which is in general used to let the geometries be on each other. Therefore it's often the same as align, with the difference that it is also defined for points, as a point can lie on a plane. Note that this constraint has a special behaviour for cylinders. For example, a cylindrical surface can't be on a plane, only touch it. Therefore this is not valid. Furthermore point and line coincident with cylinders don't work on the cylinder surface, but on its center line. The reason for that it is, that this centerline would not be accessible with other constraints, but the surface coincident can be also achieved with the align constraint and value 0. At last specialty the cylinder cylinder constraint shall be mentioned: It works also on the cylinder centerlines and therefore makes them concentric. </p></body></html> + <html><head/><body><p>Special constraint which is in general used to let the geometries be on each other. Therefore it's often the same as align, with the difference that it is also defined for points, as a point can lie on a plane. Note that this constraint has a special behaviour for cylinders. For example, a cylindrical surface can't be on a plane, only touch it. Therefore this is not valid. Furthermore point and line coincident with cylinders don't work on the cylinder surface, but on its center line. The reason for that it is, that this centerline would not be accessible with other constraints, but the surface coincident can be also achieved with the align constraint and value 0. At last specialty the cylinder cylinder constraint shall be mentioned: It works also on the cylinder centerlines and therefore makes them concentric. </p></body></html> Coincident @@ -642,7 +642,7 @@ - <html><head/><body><p>Makes the geometries normals point in the opposite direction. Note that for cylinders the base circles normal is used.</p></body></html> + <html><head/><body><p>Makes the geometries normals point in the opposite direction. Note that for cylinders the base circles normal is used.</p></body></html> Opposite diff --git a/src/Mod/PartDesign/Gui/Utils.cpp b/src/Mod/PartDesign/Gui/Utils.cpp index 20c1ef8f5f..3b0be30a03 100644 --- a/src/Mod/PartDesign/Gui/Utils.cpp +++ b/src/Mod/PartDesign/Gui/Utils.cpp @@ -88,7 +88,7 @@ PartDesign::Body *getBody(bool messageIfNot, bool autoActivate, bool assertModer QMessageBox::warning(Gui::getMainWindow(), QObject::tr("No active Body"), QObject::tr("In order to use PartDesign you need an active Body object in the document. " "Please make one active (double click) or create one.\n\nIf you have a legacy document " - "with PartDesign objects without Body, use the transfer function in " + "with PartDesign objects without Body, use the migrate function in " "PartDesign to put them into a Body." )); } diff --git a/src/Mod/Path/PathScripts/PathDressupLeadInOut.py b/src/Mod/Path/PathScripts/PathDressupLeadInOut.py index 64b31e5623..6f23fc0b5e 100644 --- a/src/Mod/Path/PathScripts/PathDressupLeadInOut.py +++ b/src/Mod/Path/PathScripts/PathDressupLeadInOut.py @@ -185,7 +185,7 @@ class ObjectDressup: return results def getLeadEnd(self, obj, queue, action): - '''returns the Gcode of LeadOut.''' + '''returns the Gcode of LeadOut.''' global currLocation results = [] horizFeed = PathDressup.toolController(obj.Base).HorizFeed.Value diff --git a/src/Mod/Path/PathScripts/PathSurface.py b/src/Mod/Path/PathScripts/PathSurface.py index 5c6945a3aa..b344c1b606 100644 --- a/src/Mod/Path/PathScripts/PathSurface.py +++ b/src/Mod/Path/PathScripts/PathSurface.py @@ -311,7 +311,7 @@ class ObjectSurface(PathOp.ObjectOp): return True def opSetDefaultValues(self, obj, job): - '''opSetDefaultValues(obj, job) ... initialize defauts''' + '''opSetDefaultValues(obj, job) ... initialize defaults''' # obj.ZigZagAngle = 45.0 obj.StepOver = 50 diff --git a/src/Mod/Sandbox/Gui/Command.cpp b/src/Mod/Sandbox/Gui/Command.cpp index 50ee3878d7..67db11a1e3 100644 --- a/src/Mod/Sandbox/Gui/Command.cpp +++ b/src/Mod/Sandbox/Gui/Command.cpp @@ -725,7 +725,7 @@ typedef std::list MeshObjectConstRefList; typedef std::vector MeshObjectConstRefArray; } -struct MeshObject_greater : public std::binary_function { bool operator()(const Mesh::MeshObjectConstRef& x, @@ -1033,7 +1033,7 @@ public: setAttribute(Qt::WA_NativeWindow); #endif } - QPaintEngine *paintEngine() const { + QPaintEngine *paintEngine() const { return 0; } protected: @@ -1427,8 +1427,8 @@ CmdTestGraphicsView::CmdTestGraphicsView() { sGroup = QT_TR_NOOP("Standard-Test"); sMenuText = QT_TR_NOOP("Create new graphics view"); - sToolTipText= QT_TR_NOOP("Creates a new view window for the active document"); - sStatusTip = QT_TR_NOOP("Creates a new view window for the active document"); + sToolTipText= QT_TR_NOOP("Creates a new view window for the active document"); + sStatusTip = QT_TR_NOOP("Creates a new view window for the active document"); } void CmdTestGraphicsView::activated(int) diff --git a/src/Mod/Sketcher/App/planegcs/Geo.cpp b/src/Mod/Sketcher/App/planegcs/Geo.cpp index 5c9bf40175..bc713489aa 100644 --- a/src/Mod/Sketcher/App/planegcs/Geo.cpp +++ b/src/Mod/Sketcher/App/planegcs/Geo.cpp @@ -220,7 +220,7 @@ double Ellipse::getRadMaj(const DeriVector2 ¢er, const DeriVector2 &f1, doub double cf, dcf; cf = f1.subtr(center).length(dcf); DeriVector2 hack (b, cf, - db, dcf);//hack = a nonsense vector to calculate major radius with derivatives, useful just because the calculation formula is the same as vector length formula + db, dcf);//hack = a nonsense vector to calculate major radius with derivatives, useful just because the calculation formula is the same as vector length formula return hack.length(ret_dRadMaj); } @@ -403,17 +403,17 @@ DeriVector2 Hyperbola::CalculateNormal(Point &p, double* derivparam) DeriVector2 cv (center, derivparam); DeriVector2 f1v (focus1, derivparam); DeriVector2 pv (p, derivparam); - + //calculation. //focus2: DeriVector2 f2v = cv.linCombi(2.0, f1v, -1.0); // 2*cv - f1v - + //pf1, pf2 = vectors from p to focus1,focus2 DeriVector2 pf1 = f1v.subtr(pv).mult(-1.0); // <--- differs from ellipse normal calculation code by inverting this vector DeriVector2 pf2 = f2v.subtr(pv); //return sum of normalized pf2, pf2 DeriVector2 ret = pf1.getNormalized().sum(pf2.getNormalized()); - + return ret; } @@ -486,7 +486,7 @@ int ArcOfHyperbola::PushOwnParams(VEC_pD &pvec) pvec.push_back(startAngle); cnt++; pvec.push_back(endAngle); cnt++; return cnt; - + } void ArcOfHyperbola::ReconstructOnNewPvec(VEC_pD &pvec, int &cnt) { @@ -512,14 +512,14 @@ DeriVector2 Parabola::CalculateNormal(Point &p, double* derivparam) DeriVector2 cv (vertex, derivparam); DeriVector2 f1v (focus1, derivparam); DeriVector2 pv (p, derivparam); - + // the normal is the vector from the focus to the intersection of ano thru the point p and direction // of the symmetry axis of the parabola with the directrix. // As both point to directrix and point to focus are of equal magnitude, we can work with unitary vectors // to calculate the normal, substraction of those vectors. - + DeriVector2 ret = cv.subtr(f1v).getNormalized().subtr(f1v.subtr(pv).getNormalized()); - + return ret; } @@ -527,27 +527,27 @@ DeriVector2 Parabola::Value(double u, double du, double* derivparam) { //In local coordinate system, value() of parabola is: - //P(U) = O + U*U/(4.*F)*XDir + U*YDir + //P(U) = O + U*U/(4.*F)*XDir + U*YDir DeriVector2 c(this->vertex, derivparam); DeriVector2 f1(this->focus1, derivparam); - + DeriVector2 fv = f1.subtr(c); - + double f,df; - + f = fv.length(df); - + DeriVector2 xdir = fv.getNormalized(); DeriVector2 ydir = xdir.rotate90ccw(); - + DeriVector2 dirx = xdir.multD(u,du).multD(u,du).divD(4*f,4*df); - DeriVector2 diry = ydir.multD(u,du); - + DeriVector2 diry = ydir.multD(u,du); + DeriVector2 dir = dirx.sum(diry); - + DeriVector2 ret; //point of parabola at parameter value of u, in global coordinates - + ret = c.sum( dir ); return ret; @@ -589,7 +589,7 @@ int ArcOfParabola::PushOwnParams(VEC_pD &pvec) pvec.push_back(startAngle); cnt++; pvec.push_back(endAngle); cnt++; return cnt; - + } void ArcOfParabola::ReconstructOnNewPvec(VEC_pD &pvec, int &cnt) { @@ -612,21 +612,21 @@ DeriVector2 BSpline::CalculateNormal(Point& p, double* derivparam) { // place holder DeriVector2 ret; - + // even if this method is call CalculateNormal, the returned vector is not the normal strictu sensus - // but a normal vector, where the vector should point to the left when one walks along the curve from + // but a normal vector, where the vector should point to the left when one walks along the curve from // start to end. // // https://forum.freecadweb.org/viewtopic.php?f=10&t=26312#p209486 - + if (mult[0] > degree && mult[mult.size()-1] > degree) { - // if endpoints through end poles + // if endpoints through end poles if(*p.x == *start.x && *p.y == *start.y) { // and you are asking about the normal at start point // then tangency is defined by first to second poles DeriVector2 endpt(this->poles[1], derivparam); DeriVector2 spt(this->poles[0], derivparam); - + DeriVector2 tg = endpt.subtr(spt); ret = tg.rotate90ccw(); } @@ -635,7 +635,7 @@ DeriVector2 BSpline::CalculateNormal(Point& p, double* derivparam) // then tangency is defined by last to last but one poles DeriVector2 endpt(this->poles[poles.size()-1], derivparam); DeriVector2 spt(this->poles[poles.size()-2], derivparam); - + DeriVector2 tg = endpt.subtr(spt); ret = tg.rotate90ccw(); } else { @@ -676,7 +676,7 @@ int BSpline::PushOwnParams(VEC_pD &pvec) pvec.insert(pvec.end(), knots.begin(), knots.end()); cnt = cnt + knots.size(); - + pvec.push_back(start.x); cnt++; pvec.push_back(start.y); cnt++; pvec.push_back(end.x); cnt++; @@ -699,7 +699,7 @@ void BSpline::ReconstructOnNewPvec(VEC_pD &pvec, int &cnt) for(VEC_pD::iterator it = knots.begin(); it != knots.end(); ++it) { (*it) = pvec[cnt]; cnt++; } - + start.x=pvec[cnt]; cnt++; start.y=pvec[cnt]; cnt++; end.x=pvec[cnt]; cnt++; diff --git a/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp b/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp index f894c9cf6d..74e1172130 100644 --- a/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp +++ b/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp @@ -3231,7 +3231,7 @@ public: enum SelectMode { STATUS_SEEK_First, /**< enum value ----. */ STATUS_SEEK_Second, /**< enum value ----. */ - STATUS_SEEK_Third, /**< enum value ----. */ + STATUS_SEEK_Third, /**< enum value ----. */ STATUS_SEEK_Fourth, /**< enum value ----. */ STATUS_Close }; @@ -7034,24 +7034,24 @@ public: "conList.append(Sketcher.Constraint('%s',%i))\n" "conList.append(Sketcher.Constraint('Equal',%i,%i))\n" "App.ActiveDocument.%s.addConstraint(conList)\n", - StartPos.x,StartPos.y, // center of the arc1 + StartPos.x,StartPos.y, // center of the arc1 fabs(r), // radius arc1 start,end, // start and end angle of arc1 - StartPos.x+lx,StartPos.y+ly, // center of the arc2 + StartPos.x+lx,StartPos.y+ly, // center of the arc2 fabs(r), // radius arc2 end,start, // start and end angle of arc2 EditCurve[16].x,EditCurve[16].y,EditCurve[17].x,EditCurve[17].y, // line1 EditCurve[0].x,EditCurve[0].y,EditCurve[34].x,EditCurve[34].y, // line2 sketchgui->getObject()->getNameInDocument(), // the sketch - geometryCreationMode==Construction?"True":"False", // geometry as construction or not + geometryCreationMode==Construction?"True":"False", // geometry as construction or not firstCurve,firstCurve+3, // tangent1 firstCurve,firstCurve+2, // tangent2 firstCurve+2,firstCurve+1, // tangent3 firstCurve+3,firstCurve+1, // tangent4 (fabs(lx)>fabs(ly))?"Horizontal":"Vertical", firstCurve+2, // vertical or horizontal constraint firstCurve,firstCurve+1, // equal constraint - sketchgui->getObject()->getNameInDocument()); // the sketch - + sketchgui->getObject()->getNameInDocument()); // the sketch + Gui::Command::commitCommand(); // add auto constraints at the start of the first side diff --git a/src/Mod/Spreadsheet/App/Spreadsheet_legacy.py b/src/Mod/Spreadsheet/App/Spreadsheet_legacy.py index e00a4c945c..1bd8b8073d 100644 --- a/src/Mod/Spreadsheet/App/Spreadsheet_legacy.py +++ b/src/Mod/Spreadsheet/App/Spreadsheet_legacy.py @@ -447,9 +447,9 @@ class Spreadsheet: #msg = ex.message #raise Exception(msg) #would discard the type return result - + def recompute(self,obj): - "Fills the controlled cells and properties" + "Fills the controlled cells and properties" if obj: if hasattr(obj,"Controllers"): import Draft diff --git a/src/Mod/Test/Document.py b/src/Mod/Test/Document.py index 7cb976b921..ec242aa71d 100644 --- a/src/Mod/Test/Document.py +++ b/src/Mod/Test/Document.py @@ -382,7 +382,7 @@ class DocumentSaveRestoreCases(unittest.TestCase): self.failUnless(self.Doc.Label_2.Link == self.Doc.Label_3) self.failUnless(self.Doc.Label_1.LinkSub == (self.Doc.Label_2,["Sub1","Sub2"])) self.failUnless(self.Doc.Label_2.LinkSub == (self.Doc.Label_3,["Sub3","Sub4"])) - # do NOT save transient properties + # do NOT save transient properties self.failUnless(self.Doc.Label_1.TypeTransient == 4711) self.failUnless(self.Doc == FreeCAD.getDocument(self.Doc.Name)) diff --git a/src/Tools/generateTemplates/templateClassPyExport.py b/src/Tools/generateTemplates/templateClassPyExport.py index 4d4e1b8f3e..bbe4a0004d 100644 --- a/src/Tools/generateTemplates/templateClassPyExport.py +++ b/src/Tools/generateTemplates/templateClassPyExport.py @@ -798,7 +798,7 @@ PyObject *@self.export.Name@::_getattr(const char *attr) // __getattr__ functi int @self.export.Name@::_setattr(const char *attr, PyObject *value) // __setattr__ function: note only need to handle new state { try { - // setter for special Attributes (e.g. dynamic ones) + // setter for special Attributes (e.g. dynamic ones) int r = setCustomAttributes(attr, value); // r = 1: handled // r = -1: error