Commit Graph

654 Commits

Author SHA1 Message Date
wmayer
34a083b159 handle possible exceptions for FreeCAD.Units.Unit(input string) 2019-11-03 19:01:27 +01:00
wmayer
0b47fb6ded support quantities in a string of the form: value / unit 2019-11-03 18:47:33 +01:00
luz.paz
1c981e8f14 Fix typos and misc. formatting [skip ci]
Found via `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,currenty,dof,doubleclick,dum,eiter,elemente,feld,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`
2019-10-21 16:02:23 -03:00
wmayer
8d5bc7eb09 [skip ci] remove unused variable 2019-10-21 12:04:23 +02:00
wmayer
d7ca604c99 Support for Frequency in quantity parser 2019-10-21 11:49:55 +02:00
wmayer
3500451a04 Basic support for Frequency as unit 2019-10-20 18:14:56 +02:00
howetuft
b858757bb2 Fix -Wdeprecated-copy warnings (rule of 5/3/0)
Fix -Wdeprecated-copy warnings in various places. Consists in enforcing
rule of five/three/zero (https://en.cppreference.com/w/cpp/language/rule_of_three)
mainly by deleting redundant copy constructors or copy assignment operators
that replicate default constructors/operators, or more rarely by adding
missing copy/move constructors/operators.
See also https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c20-if-you-can-avoid-defining-default-operations-do
2019-10-20 17:02:17 +02:00
wmayer
f98446e5cb restore old behaviour of Python wrapper of Console class to increase flexibility when using in worker threads 2019-10-20 13:51:53 +02:00
wmayer
3613d834fc in RedirectStdOutput/RedirectStdError/RedirectStdLog only flush when last character is newline to avoid garbled output in log file 2019-10-20 13:42:51 +02:00
wmayer
f94bf69a3c fix -Winconsistent-missing-override 2019-10-20 13:23:41 +02:00
wmayer
aa011746e5 minor optimization in ConsoleObserverFile, if prefix is unknown then still write passed message 2019-10-20 12:52:08 +02:00
ezzieyguywuf
f27e4590a6 Refactor and rename ConsoleObserver...
...Renamed to "ILogger", to designate that this is an Interface for a
Logger. This "Interface" is pure virtual, so that it cannot be
instantiated directly. This makes it clear that it is intended to be
derived.

Finally, got rid of all the individual log-style methods and replaced
with SendLog. The idea here is that day-to-day users will only interact
with ILogger through ConsoleSingleton (or, likely, LoggerSingleton in
the future). This singleton will manage an arbirtary collection of
ILogger, and call SendLog with the appropriate parameters based on what
the user requests.

Therefore, the singleton itself will have the individual Log, Message,
Error, etc... methods, while stil allowing us to simplify the code base
of ILogger and its derived classes.
2019-10-20 11:46:15 +02:00
luz.paz
788a509184 Doxygen: Base/Parameter.h description
Adding a cursory description for `Parameter.h` + typo fix for it's companion .cpp file. 

.
2019-10-19 16:14:53 -03:00
wmayer
f8f52e6fcf replace some old C style casts with static_cast or reinterpret_cast 2019-10-18 15:50:15 +02:00
wmayer
81b615bfb9 fix several memory leaks in ParameterGrp when removing nodes from DOM document 2019-10-18 15:43:22 +02:00
wmayer
736511e5b6 + implement a correct cleaning of a parameter group without creating ghost instances of ParameterGrp 2019-10-18 15:38:58 +02:00
wmayer
9a6824a3fe + before creating element in DOM document check if the group node still has the correct name 2019-10-18 15:34:20 +02:00
Richard
6eacb17b3e Update swigpyrun.in for Python 3.8
In Python 3.8 some functions related to thread state were intentionally made private.

This fix (specific to FreeCAD) was suggested here:

https://bugs.python.org/issue35886
2019-10-18 10:12:59 +02:00
wmayer
ee63c324c1 Add an XSD validation scheme and implement ParameterManager::CheckDocument(), function is used in the parameter editor 2019-10-14 22:56:03 +02:00
wmayer
e0bb5701f6 expose Placement.slerp to Python 2019-10-12 23:58:54 +02:00
DeepSOIC
3da76af1f9 Base: Placement: change argument order of slerp() in Py
to be consistend with that of C++ one, and of RotationPy
2019-10-12 20:35:20 +02:00
DeepSOIC
23e708323c Base: Placement: expose ScLERP to python 2019-10-12 15:39:39 +02:00
DeepSOIC
63d0435a95 Base: ScLERP placement interpolation 2019-10-12 15:39:39 +02:00
wmayer
fd352c14f1 expose Roation.slerp to Python 2019-10-11 01:14:35 +02:00
wmayer
9ed08a8136 avoid adding extra newlines when writing user.cfg 2019-10-10 22:03:13 +02:00
Zheng, Lei
71c54272a0 Fix various Py::Object leak 2019-10-08 17:53:20 +02:00
wmayer
38740a0e4a add method RotationPy.toMatrix() 2019-10-07 19:27:54 +02:00
wmayer
ccbd5792e9 improve RotationPy::number_power_handler: make computation more efficient and less prone to round-off errors 2019-10-07 19:23:14 +02:00
Zheng, Lei
890bc90b0c Base: add RotationPy.RawAxis
Expose rotation raw axis
2019-10-07 17:24:31 +02:00
Zheng, Lei
12000cd490 Base: fix __pow__ operator in MatrixPy/PlacementPy/RotationPy 2019-10-07 17:24:30 +02:00
Zheng, Lei
43e0d96160 Base: remove VectorPy right multiplication to matrix/placement/rotation 2019-10-07 17:24:30 +02:00
luz.paz
7b7797f4f3 Fix various (doxy) typos and whitespace issues
Found via `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,currenty,dof,doubleclick,dum,eiter,elemente,feld,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`
2019-10-03 07:57:13 +02:00
wmayer
f9ca1b18a4 add function to escape special characters in strings 2019-10-03 01:43:08 +02:00
wmayer
426674f225 add function to escape special characters in file names 2019-09-28 19:32:34 +02:00
Zheng, Lei
6b6c0a503c App: fix QuantityPy __add__ and __sub__ 2019-09-28 15:32:12 +02:00
Zheng, Lei
83284a3cdd Base: add Python number protocol support to Placement/Rotation 2019-09-28 15:32:00 +02:00
Zheng, Lei
783947ecd4 Base: improve base python object number protocol 2019-09-28 15:30:23 +02:00
Tomas Pavlicek
29e7f695d5 Polish classes in Tools2D 2019-09-25 15:18:58 +02:00
wmayer
378de3c8a1 fix -Wcatch-value=, fix -Wpedantic 2019-09-18 14:36:23 +02:00
wmayer
b50b21576e core system
force strict ISO C++ (-Wpedantic)
TODO: still a lot of variadic macros are not valid ISO C++
2019-09-18 01:01:14 +02:00
wmayer
006e1198dd use NaN for invalid quantities instead of DOUBLE_MIN 2019-09-16 18:00:24 +02:00
wmayer
1f3d2389bc start to replace old C-style casts with static_cast or reinterpret_cast, avoid implicit casts 2019-09-16 17:59:18 +02:00
wmayer
570165fc0d move method setTransform() from ViewVolumeProjection to ViewProjMethod, restructure ViewProjMethod 2019-09-10 23:21:09 +02:00
wmayer
9b15d01b29 fix implementation of Rotation::isSame(const Rotation& q, double tol) and extend Python bindings 2019-09-10 14:17:07 +02:00
Zheng, Lei
4b0baba39f Base: fix Matrix4D::hasScale() tol checking 2019-09-10 14:17:06 +02:00
Zheng, Lei
95dfd5a6cd Base: fix verbose checking in Console::Log() 2019-09-10 14:17:06 +02:00
wmayer
e228f23b27 fix -Wreturn-std-move 2019-09-07 14:45:03 +02:00
wmayer
15c9ae1e26 remove wrong typename keyword 2019-09-07 00:29:18 +02:00
wmayer
e981537446 fix -Wunused-local-typedef 2019-09-06 23:03:43 +02:00
wmayer
9f7075bb8f extend convertTo function to also support SbRotation/Base::Rotation 2019-09-06 21:29:51 +02:00