Commit Graph

19 Commits

Author SHA1 Message Date
Jolbas
31637adaa0 Create rotation from any matrix
To help find a matrix components a decompose method is added to Matrix class
2023-09-28 15:25:29 -05:00
wmayer
455fd3b2e5 Base: use NoArgs in MatrixPy 2023-09-27 17:48:53 +02:00
wmayer
7eff934913 Base: fix incorrect method names of Matrix class about diagonal and trace 2023-09-18 01:21:07 +02:00
Jonas Bähr
34b176c1db Remove C++ escaping from *Py.xml templates
Now all escaping required for the C++ code generation is done when the
.cpp/.h files are generated. Previously, only newlines were escaped
automatically. This was a) inconsistent and b) leaked c++ details into
the xml data.
In addition, the escaping is now done in one central place, harmonizing
the three previous implementations.

Pre-existing c++ escape sequences in the XML files have been replaced by
their literal equivalent so that the resulting python doc sting remains
unchanged.
2023-08-16 13:17:25 +02:00
wmayer
68f760d958 Base: [skip ci] improve whitespaces 2022-08-15 11:42:26 +02:00
marioalexis
0273d7e1a8 Base: Minor changes in some Python docstrings 2022-06-25 17:12:06 +02:00
ShuffleWire
f09040052a Base: add Const attribute to many MatrixPy methods
multiply(), determinant(), isOrthogonal(),
submatrix(), analyze() also get the const attribute
2022-06-22 19:16:38 -04:00
wmayer
41c7edc6d5 Base: add Const attribute to MatrixPy::inverse() 2022-06-22 13:49:11 +02:00
marioalexis
aed7ab0367 Base: Improve docstrings in MatrixPy.xml 2022-05-31 11:48:04 +02:00
wmayer
0208608b9e 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
a5f0265a43 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
wmayer
674871a393 Base: implement some convenience methods to get/set rows/columns of a matrix 2022-01-27 00:24:44 +01:00
Zheng, Lei
2d9ca92594 Base: misc patches
Convenience macros/function (in Interpreter.h)

* FC_PY_GetObject/Callable(), look for callables in a python object,
  which will be used in future patch to improve performance in various
  python observer/features.

* pyCall(WithKeywords)(), helper function to invoke the callable

Matrix4D:

* hasScale(), check if there is any scale in the transformation. If so,
  further check if the scale is uniform or not. This will be used in
  future patch for Part::TopoShape to decide which type of transform to
  apply.

Placement:

* translate/rotate(), new convenience API

Rotation:

* isSame/multiVec(), new convenience API

Polygon2d:

* Intersect(), GetCenter(), new convenience API.

FlagToggler:

* New class for exception safe flag toggling, similar to StateLocker
  but with template (actually, FlagToggler is added earlier by me).

BitsetLocker:

* New class for exception manipulation of a std::bitset variable.
2019-08-17 14:52:08 +02:00
wmayer
8345b0c1c3 add method multVec to MatrixPy class for better consistency 2019-01-22 15:57:10 +01:00
wmayer
f82628ca35 Make Python API more pythonic 2013-10-09 21:16:04 +02:00
wmayer
dcb5ebbd70 Expose Matrix4D::analyse to python 2012-06-13 11:02:24 +02:00
wmayer
1cffe8429e 0000623: Matrix and Vector API extension 2012-03-12 11:13:58 +01:00
wmayer
6e4f689079 0000623: Matrix and Vector API extension 2012-03-11 16:22:17 +01:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00