Commit Graph

654 Commits

Author SHA1 Message Date
wmayer
4539bd90b7 handle possible exceptions for FreeCAD.Units.Unit(input string) 2019-11-03 19:01:27 +01:00
wmayer
0a5b1f3aab support quantities in a string of the form: value / unit 2019-11-03 18:47:33 +01:00
luz.paz
30a717beac 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
210601c2be [skip ci] remove unused variable 2019-10-21 12:04:23 +02:00
wmayer
617a8d7598 Support for Frequency in quantity parser 2019-10-21 11:49:55 +02:00
wmayer
4d831ea442 Basic support for Frequency as unit 2019-10-20 18:14:56 +02:00
howetuft
3e5d3460c7 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
77bc9cd8d5 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
4a6b80dbb6 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
c71c893a50 fix -Winconsistent-missing-override 2019-10-20 13:23:41 +02:00
wmayer
5ba9bc6a16 minor optimization in ConsoleObserverFile, if prefix is unknown then still write passed message 2019-10-20 12:52:08 +02:00
ezzieyguywuf
9fcc18b08e 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
b877cc49a7 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
fd2940ead7 replace some old C style casts with static_cast or reinterpret_cast 2019-10-18 15:50:15 +02:00
wmayer
4642913b61 fix several memory leaks in ParameterGrp when removing nodes from DOM document 2019-10-18 15:43:22 +02:00
wmayer
7a45d74bc7 + implement a correct cleaning of a parameter group without creating ghost instances of ParameterGrp 2019-10-18 15:38:58 +02:00
wmayer
4dedd32031 + 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
f53baef54a 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
bd76bbd625 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
b656301c9b expose Placement.slerp to Python 2019-10-12 23:58:54 +02:00
DeepSOIC
6f5fa8e305 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
048671a507 Base: Placement: expose ScLERP to python 2019-10-12 15:39:39 +02:00
DeepSOIC
6a9e4b710b Base: ScLERP placement interpolation 2019-10-12 15:39:39 +02:00
wmayer
a276bf46ee expose Roation.slerp to Python 2019-10-11 01:14:35 +02:00
wmayer
e61680d5d0 avoid adding extra newlines when writing user.cfg 2019-10-10 22:03:13 +02:00
Zheng, Lei
8426ebe2ba Fix various Py::Object leak 2019-10-08 17:53:20 +02:00
wmayer
6222cb310b add method RotationPy.toMatrix() 2019-10-07 19:27:54 +02:00
wmayer
edcb33f120 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
cc94eb9966 Base: add RotationPy.RawAxis
Expose rotation raw axis
2019-10-07 17:24:31 +02:00
Zheng, Lei
b2ba93c4fc Base: fix __pow__ operator in MatrixPy/PlacementPy/RotationPy 2019-10-07 17:24:30 +02:00
Zheng, Lei
c5fd45f762 Base: remove VectorPy right multiplication to matrix/placement/rotation 2019-10-07 17:24:30 +02:00
luz.paz
fb32601746 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
9e5f602acd add function to escape special characters in strings 2019-10-03 01:43:08 +02:00
wmayer
504590902d add function to escape special characters in file names 2019-09-28 19:32:34 +02:00
Zheng, Lei
f16c265f00 App: fix QuantityPy __add__ and __sub__ 2019-09-28 15:32:12 +02:00
Zheng, Lei
ff3ec0c7fd Base: add Python number protocol support to Placement/Rotation 2019-09-28 15:32:00 +02:00
Zheng, Lei
1efadc928e Base: improve base python object number protocol 2019-09-28 15:30:23 +02:00
Tomas Pavlicek
cdb978efee Polish classes in Tools2D 2019-09-25 15:18:58 +02:00
wmayer
5746c37b7e fix -Wcatch-value=, fix -Wpedantic 2019-09-18 14:36:23 +02:00
wmayer
9fa56345cf 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
5c9d30b25a use NaN for invalid quantities instead of DOUBLE_MIN 2019-09-16 18:00:24 +02:00
wmayer
52916175ed 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
6ebd0f4e5b move method setTransform() from ViewVolumeProjection to ViewProjMethod, restructure ViewProjMethod 2019-09-10 23:21:09 +02:00
wmayer
3726006942 fix implementation of Rotation::isSame(const Rotation& q, double tol) and extend Python bindings 2019-09-10 14:17:07 +02:00
Zheng, Lei
7e3c7a165e Base: fix Matrix4D::hasScale() tol checking 2019-09-10 14:17:06 +02:00
Zheng, Lei
14fedb0965 Base: fix verbose checking in Console::Log() 2019-09-10 14:17:06 +02:00
wmayer
cc2e507817 fix -Wreturn-std-move 2019-09-07 14:45:03 +02:00
wmayer
19abb09fab remove wrong typename keyword 2019-09-07 00:29:18 +02:00
wmayer
530b75d594 fix -Wunused-local-typedef 2019-09-06 23:03:43 +02:00
wmayer
b14cf8a00d extend convertTo function to also support SbRotation/Base::Rotation 2019-09-06 21:29:51 +02:00