Commit Graph

1318 Commits

Author SHA1 Message Date
wmayer
51b7d98788 Base: [skip ci] revert copyright change 2022-03-06 22:20:35 +01:00
Stefan Brüns
bd58a73731 Base: Fix wrong character encoding for micro-siemens
Contrary to any other Unit with micro prefix (e.g. ug, uH, uF) the
string was created with a Latin1 encoding instead of UTF-8.

The problem can be verified with these python statements:
```
FreeCAD.Units.schemaTranslate(FreeCAD.Units.MicroSiemens, 0)
FreeCAD.Units.schemaTranslate(FreeCAD.Units.MicroGram, 0)
```
2022-03-06 11:20:09 -05:00
Uwe
f2c8bdd525 [Base] ConsoleObserver: fix compilation with precompiled headers 2022-03-06 15:08:09 +01:00
Uwe
64ddcc68fc [Base] ConsoleObserver: correct copyright 2022-03-06 14:51:58 +01:00
wmayer
58a719e207 Base: move ILogger sub-classes to their own source files in order to reduce including stream classes in client code 2022-03-06 10:13:47 +01:00
wmayer
2465840791 Base: fix warnings from code analysers:
* replace some C-style casts with static_cast
* remove unneeded destructors
* define default copy-constructor and assignment operator
2022-03-05 19:03:21 +01:00
wmayer
032cea587d Base: implement a lightweight smart pointer for PyObject like Py::Object to reduce includes of Python.h in header files 2022-03-04 15:51:51 +01:00
wmayer
6c1e940b69 Base: use forward declaration instead of including Python.h 2022-03-03 19:18:07 +01:00
wmayer
c07473ba5b Base: use forward declaration instead of including Python.h 2022-03-03 17:37:13 +01:00
Yorik van Havre
88d12c6842 Fixed missing include 2022-03-03 13:12:46 +01:00
Uwe
39ce4dde0d [Base] Exception and others: remove unused includes 2022-03-03 01:01:10 +01:00
Uwe
1eeb1fecd0 [Base] BoundBox etc.: remove unused includes 2022-03-02 13:59:59 +01:00
Uwe
7bb7efc55f [Base] Parameter and Matrix: remove unused includes 2022-03-02 13:28:34 +01:00
Uwe
a5c838fefc [Base] some sorting and cleanup 2022-03-02 01:51:05 +01:00
Uwe
6afab502ca [Base] Geometry etc.: remove unused includes 2022-03-01 13:56:02 +01:00
wmayer
60ee579fb4 Base: fix warnings reported by code analysers
* disable copy-constructor and assignment operator for Stream classes
* remove destructor of sub-classes of SequencerBase
* fix some old C-style cast warnings
2022-03-01 12:20:27 +01:00
Uwe
9a42b61fcb [Base] Py and Placement: remove unused includes 2022-03-01 12:13:58 +01:00
Uwe
f20840442f [Base] Quantity, Rotation, Stream: remove unused includes 2022-03-01 11:27:54 +01:00
Uwe
7b14b3b02e [Base] Reader and Writer: remove unused includes 2022-02-27 23:54:00 +01:00
Uwe
6a606783d6 [Base] remove unused code 2022-02-27 19:30:09 +01:00
wmayer
a5bc46afb2 Base: fix build failure with MSYS/clang 2022-02-26 12:08:02 +01:00
wmayer
f24fe8157a Base: [skip ci] fix build failure with MSYS/clang 2022-02-26 11:16:57 +01:00
Uwe
9ec0bcdcf2 [Base] Units and Uui: remove unused includes 2022-02-24 11:08:56 +01:00
Uwe
c08c4c12ef [Base] Console and BaseClass: remove unused includes 2022-02-24 09:34:01 +01:00
Uwe
89b37a5110 [Base] Exception and FileInfo: remove unused includes 2022-02-23 19:13:13 +01:00
Uwe
418cb98010 [Base] rename a variable to please the spellchecker CI 2022-02-23 00:40:21 +01:00
Uwe
d11d00cb70 [Base] fix typo to silence spellchecker CI 2022-02-22 02:31:51 +01:00
Uwe
8cbf141ae5 fix some typos to silence the spellchecker CI 2022-02-21 13:09:29 +01:00
wmayer
a5e561b31d Base: fix Matrix4D::hasScale
* If all column vectors of the 3x3 sub-matrix are equal the function incorrectly claims that it's uniform scaling.
* Detect also non-uniform scaling and if was applied from the left or right side
* Replace the int with an enum and expose it to Python
* Add several new unit tests
2022-02-15 21:05:11 +01:00
wmayer
1ceba9670d Base: [skip ci] include header with export macro 2022-02-13 16:36:18 +01:00
wmayer
8145923c67 Base: in TimeInfo replace uint64_t with int64_t 2022-02-13 16:29:22 +01:00
luz paz
6953a7cea8 Fix some typos and whitespace 2022-02-12 19:33:28 +01:00
0penBrain
47e7257cd3 Base: introduce uniform scaling of matrix 2022-02-08 17:18:54 +01:00
0penBrain
538f4dd14b Base: fix move+scale Python error cleaning after parsing args 2022-02-08 17:18:54 +01:00
wmayer
befbd95d64 Base: expose UnitsApi::toNumber to Python 2022-02-06 12:47:57 +01:00
wmayer
243f81fd94 Base: harmonize UnitsApi::toString/UnitsApi::toNumber with UnitsSchema::toLocale 2022-02-06 12:47:13 +01:00
wmayer
5f8bb65757 Base: [skip ci] fix inconsistency in overloaded UnitsApi::toNumber() 2022-02-06 08:49:50 +01:00
Yann LEROY
cafb8601e0 Base: Remove old unused C-style function
Those function was used by a commented code, hence never called.
Since it don't have been change for a long time,
it should be safe to remove them.
2022-02-05 19:03:39 +01:00
wmayer
ef2d2db778 Base: [skip ci] add comment about possible issues with Matrix4D::hasScale() 2022-02-04 20:28:46 +01:00
wmayer
eab9afbbad Base: support of multiplication of a matrix with a scalar, add functions to check whether it's the unit or null matrix 2022-02-04 14:35:27 +01:00
0penBrain
f986ab46fd Base: fix bug in matrix multiplication (Python API) 2022-02-04 03:50:44 +01:00
Chris Hennes
8859b8e4cd Core: Python translate() wrapper arg correction
translate()'s third argument is an optional string used as a comment:
"None" is a valid value for this argument (and is indeed the stated
default in the documentation), but as originally written it was not
accepted, only actual strings were allowed. This commit modifies the
format string from "s" to "z", allowing an explicit None argument.
2022-02-01 21:12:49 -06:00
wmayer
12eb5dafb1 Base: implement some convenience methods to get/set rows/columns of a matrix 2022-01-27 00:24:44 +01:00
wmayer
4d87039635 Base: modernize C++11
* remove redundant void-arg
* use nullptr
* replace deprecated headers
2022-01-25 20:21:30 +01:00
wmayer
cbc60a3f44 Base: clean-up code in UnitsApi 2022-01-25 00:26:47 +01:00
wmayer
88ded38ca1 Base: only handle Base::ParserError exceptions for quantity expressions 2022-01-22 01:15:12 +01:00
wmayer
fb84f715fa Base: extend Python wrapper to allow to create a quantity with Units.Quantity(1, 'm') and add a unit test 2022-01-21 14:57:49 +01:00
0penBrain
2fef77e267 [Core] Fix Quantity construction with value as double + unit as string 2022-01-21 14:56:11 +01:00
wmayer
31e2e95203 Base: Exception handling:
* Harmonize FreeCAD with Python exception types
* Implement AbortException::getPyExceptionType() to avoid handling it in client code
* Remove catch block for plain C strings
2022-01-19 18:00:04 +01:00
marioalexis
de59bce3b3 Base: Add 'getTypeIfDerivedFrom' member function to Type class 2022-01-19 08:14:41 +01:00