Commit Graph

848 Commits

Author SHA1 Message Date
wmayer
27d2a8d17b Base: fix build failure with MSYS/clang 2022-02-26 12:08:02 +01:00
wmayer
40077d4109 Base: [skip ci] fix build failure with MSYS/clang 2022-02-26 11:16:57 +01:00
Uwe
4d0a5c045c [Base] Units and Uui: remove unused includes 2022-02-24 11:08:56 +01:00
Uwe
832a6eb43b [Base] Console and BaseClass: remove unused includes 2022-02-24 09:34:01 +01:00
Uwe
581a66aa2d [Base] Exception and FileInfo: remove unused includes 2022-02-23 19:13:13 +01:00
Uwe
7d1e7fa506 [Base] rename a variable to please the spellchecker CI 2022-02-23 00:40:21 +01:00
Uwe
288ccdb004 [Base] fix typo to silence spellchecker CI 2022-02-22 02:31:51 +01:00
Uwe
e2dd2627e8 fix some typos to silence the spellchecker CI 2022-02-21 13:09:29 +01: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
13e985252d Base: [skip ci] include header with export macro 2022-02-13 16:36:18 +01:00
wmayer
077c272d14 Base: in TimeInfo replace uint64_t with int64_t 2022-02-13 16:29:22 +01:00
luz paz
6718d8797e Fix some typos and whitespace 2022-02-12 19:33:28 +01:00
0penBrain
6030e9aac5 Base: introduce uniform scaling of matrix 2022-02-08 17:18:54 +01:00
0penBrain
1e22d2ea19 Base: fix move+scale Python error cleaning after parsing args 2022-02-08 17:18:54 +01:00
wmayer
3bc1e62604 Base: expose UnitsApi::toNumber to Python 2022-02-06 12:47:57 +01:00
wmayer
e38f378acc Base: harmonize UnitsApi::toString/UnitsApi::toNumber with UnitsSchema::toLocale 2022-02-06 12:47:13 +01:00
wmayer
e5a3854fe2 Base: [skip ci] fix inconsistency in overloaded UnitsApi::toNumber() 2022-02-06 08:49:50 +01:00
Yann LEROY
82090b6a8c 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
9d9de3d51b Base: [skip ci] add comment about possible issues with Matrix4D::hasScale() 2022-02-04 20:28:46 +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
0penBrain
49d628ffb0 Base: fix bug in matrix multiplication (Python API) 2022-02-04 03:50:44 +01:00
Chris Hennes
b7794444bd 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
674871a393 Base: implement some convenience methods to get/set rows/columns of a matrix 2022-01-27 00:24:44 +01:00
wmayer
cad0d01883 Base: modernize C++11
* remove redundant void-arg
* use nullptr
* replace deprecated headers
2022-01-25 20:21:30 +01:00
wmayer
5502d1f2a7 Base: clean-up code in UnitsApi 2022-01-25 00:26:47 +01:00
wmayer
3945dc0f74 Base: only handle Base::ParserError exceptions for quantity expressions 2022-01-22 01:15:12 +01:00
wmayer
07bb92e004 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
66c513c698 [Core] Fix Quantity construction with value as double + unit as string 2022-01-21 14:56:11 +01:00
wmayer
659a55ffb9 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
33b2c7d353 Base: Add 'getTypeIfDerivedFrom' member function to Type class 2022-01-19 08:14:41 +01:00
wmayer
c68183d9d6 Base: [skip ci] add class Flags 2022-01-08 19:18:04 +01:00
wmayer
254bc470b0 Base: [skip ci] support bitmask operations for enums 2022-01-08 15:48:40 +01:00
luz paz
daa508a55c Fix more typos + whitespace fix and added 'TODO'
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,apoints,ba,beginn,behaviour,bloaded,bottome,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childrens,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,inout,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oce,oder,ontop,orgin,orginx,orginy,ot,pard,parm,parms,pres,programm,que,rady,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,./build/doc/SourceDocu`
2022-01-04 18:57:56 -06:00
wmayer
bb69d9b663 Base: fix issue found by lgtm: Inconsistent definition of copy constructor and assignment ('Rule of Two') 2021-12-28 17:47:20 +01:00
Zheng, Lei
611e79af53 App: insert UUID property to trace the source of copied object
A property _ObjectUUID will be added to an object before it is being to
copied, if the property does not exists. Anoter propert _SourceUUID
property will be added to any copied object, with value set to its
source objct's _ObjectUUID.
2021-12-21 21:41:02 -07:00
luz paz
f9461f78f3 Base: translate doxygen from DE/FR to EN
For the purpose of making the source documentation uniform, source comments in this file were translated to english.
2021-12-22 01:17:06 +01:00
wmayer
f978765b8a Base: fix memory leak when creating object with factory method 2021-12-11 14:26:40 +01:00
wmayer
16c7ee80f3 Base: [skip ci] allow to access the twin pointer of a PyObjectBase 2021-12-11 08:33:50 +01:00
luz paz
d877ee4d47 Make source code comments use gender neutral pronouns
The changes also include some grammatical fixes as well.
2021-12-02 16:18:04 -05:00
wmayer
09c91738cc Base: add methods to Vector2dPy 2021-11-14 20:05:22 +01:00
wmayer
0c0e34b203 Base: implement number protocol for Vector2dPy 2021-11-14 19:25:29 +01:00
wmayer
53db547270 Base: add factory method to Vector2dPy 2021-11-14 18:18:38 +01:00
wmayer
c3f10e8e62 Base: [skip ci] C++11: modernize use nullptr (replaces NULL or 0) 2021-10-27 19:26:26 +02:00
wmayer
b803d987b9 Base: [skip ci] handle gimbal lock when computing Euler angles 2021-10-27 17:02:07 +02:00
wmayer
16c08ec96f Base: [skip ci] in Rotation class allow to set angle in radian
App.Rotation(axis, angle) still defines the angle in degree
App.Rotation(axis, Degree=angle) does the same as above
App.Rotation(axis, Radian=angle) defines the angle in radian
2021-10-27 10:59:34 +02:00
wmayer
e424faa131 Base: harmonize Python API of Rotation class 2021-10-27 10:40:35 +02:00
wmayer
497c1895e8 Base: [skip ci] expose Rotation.fromEuler() to Python 2021-10-27 00:34:36 +02:00
wmayer
3f6986c881 Base: implement a way to test translator for testing purposes 2021-10-26 16:58:42 +02:00
wmayer
fc2e842aca Base: [skip ci] Modify GetASCII to include empty strings 2021-10-23 22:56:45 +02:00
wmayer
057cce2538 Base: [skip ci] add method to check for null vector 2021-10-19 19:19:31 +02:00