Commit Graph

24 Commits

Author SHA1 Message Date
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
wmayer
cc2e507817 fix -Wreturn-std-move 2019-09-07 14:45:03 +02: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
1106404b1e implement true divide handler of the number protocol for Quantity 2018-10-27 15:27:27 +02:00
wmayer
c2fa8d02b4 fixes #0002419: Matrix rotation and Units compatibility 2017-10-25 13:50:06 +02:00
looooo
2f467da92a py3: base: repair compile-fail 2017-05-21 12:35:41 +02:00
Yorik van Havre
0bc16d353b py3: Base: files I-R ported to python3
PyObjectBase.cpp and PyObjectBase.h not included
issue 0000995
2017-05-18 16:00:05 +02:00
wmayer
39e589a4d7 fix -Wextra in FreeCADBase 2016-09-21 15:02:02 +02:00
wmayer
65f72237d7 Fix element A41 in 4x4 Matrix class 2015-12-10 17:35:54 +01:00
Sebastian Hoogen
af50cbf964 fixes #0001422: Subclass Exception
inherit Base.FreeCADError form RuntimeError
inherit Part.OCCError from Base.FreeCADError
inherit OCCDomainError from Part.OCCError
inherit OCCRangeError from Part.OCCError
inherit OCCConstructionError from OCCDomainError
inherit OCCDimensionError from OCCDomainError
Added PY_CATCH_OCC macro
replace PyExc_Exception
use FreeCADError in makeWireString
catch exception in BSplineCurve.increasedegree
2014-09-17 11:15:56 +02:00
wmayer
fafe85ba86 + fixes #0001418: Base::Matrix4d can't invert rotoinversion 2014-02-17 16:42:28 +01:00
wmayer
ed4729dac1 + extend number protocol 2014-02-14 13:53:47 +01:00
wmayer
8c354c7635 + extend number protocol 2014-02-14 13:45:56 +01:00
wmayer
438b6d4681 + extend number protocol 2014-02-14 12:46:30 +01:00
wmayer
f82628ca35 Make Python API more pythonic 2013-10-09 21:16:04 +02:00
wmayer
a7164046b4 0000856: Wrong inverse of a matrix 2012-10-22 16:21:27 +02:00
wmayer
dcb5ebbd70 Expose Matrix4D::analyse to python 2012-06-13 11:02:24 +02:00
wmayer
74cf9b4521 Return a NotImplemented exception when comparing Matrix or Vector with other types 2012-03-13 08:49:01 +01:00
wmayer
1cffe8429e 0000623: Matrix and Vector API extension 2012-03-12 11:13:58 +01:00
wmayer
9b49861cd6 0000623: Matrix and Vector API extension 2012-03-11 16:32:08 +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