Commit Graph

836 Commits

Author SHA1 Message Date
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
wmayer
9a933a6015 Base: [skip ci] add class Flags 2022-01-08 19:18:04 +01:00
wmayer
56bfb9804c Base: [skip ci] support bitmask operations for enums 2022-01-08 15:48:40 +01:00
luz paz
dc288a7ade 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
cdac3e9a34 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
b32369d185 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
a40c57786c 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
56d86df5bb Base: fix memory leak when creating object with factory method 2021-12-11 14:26:40 +01:00
wmayer
2f99b5b56d Base: [skip ci] allow to access the twin pointer of a PyObjectBase 2021-12-11 08:33:50 +01:00
luz paz
0042f58e4c 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
03dd79c155 Base: add methods to Vector2dPy 2021-11-14 20:05:22 +01:00
wmayer
3c1ea5883c Base: implement number protocol for Vector2dPy 2021-11-14 19:25:29 +01:00
wmayer
50523fe951 Base: add factory method to Vector2dPy 2021-11-14 18:18:38 +01:00
wmayer
cd8ce95f53 Base: [skip ci] C++11: modernize use nullptr (replaces NULL or 0) 2021-10-27 19:26:26 +02:00
wmayer
b159144e13 Base: [skip ci] handle gimbal lock when computing Euler angles 2021-10-27 17:02:07 +02:00
wmayer
cd91c73382 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
4c886771d1 Base: harmonize Python API of Rotation class 2021-10-27 10:40:35 +02:00
wmayer
951a0be9c7 Base: [skip ci] expose Rotation.fromEuler() to Python 2021-10-27 00:34:36 +02:00
wmayer
4061c047a0 Base: implement a way to test translator for testing purposes 2021-10-26 16:58:42 +02:00
wmayer
9f2dd4a363 Base: [skip ci] Modify GetASCII to include empty strings 2021-10-23 22:56:45 +02:00
wmayer
0b63548ea1 Base: [skip ci] add method to check for null vector 2021-10-19 19:19:31 +02:00
Yorik van Havre
d95f085760 Merge pull request #4787 from chennes/addThemeSupport
[GUI] Add Preference Pack support
2021-10-14 12:41:06 +02:00
wmayer
44ffc4653f Base: [skip ci] use PyNumber_Check instead of PyFloat_Check/PyLong_Check to check for numbers 2021-09-30 14:22:56 +02:00
wmayer
dfe84ef123 Base: [skip ci] pass the full file path to the FileException 2021-09-29 14:02:46 +02:00
0penBrain
e1dc69f56d [Core] Rotation : improve gimbal lock handling
Tolerance copied from OCC "gp_Quaternion.cxx"
2021-09-27 16:52:21 +02:00
Chris Hennes
b432592fb2 Merge branch 'master' into addThemeSupport 2021-09-24 07:51:04 -05:00
wmayer
7f772ba227 port to MSYS2/clang 2021-09-20 18:15:44 +02:00
wmayer
e211b89cf8 port to MSYS2/clang 2021-09-19 19:49:44 +02:00
Preslav
d7ac25e3cf Ammending stiffness units 2021-09-17 11:08:08 +02:00
wmayer
40d2955c66 Base: split export/import macros from FCConfig.h and move them to FCGlobal.h
The FCGlobal.h can be included in a Global.h header file of an extension module.

The reason is that some IDEs (e.g. QtCreator) fails to detect the export/import macros when only defined in the PreCompiled.h files and thus raise a parser warning.
2021-09-14 16:40:30 +02:00
Chris Hennes
075f9cdc74 Merge pull request #4791 from heewa/fix-lost-err-msg
[Base] Fix lost filename in err msg
2021-09-14 09:23:03 -05:00
0penBrain
59a4a4c361 [Core] Rotation : fix gimbal lock handling
+ fix Euler representation on GUI
2021-09-13 18:34:58 +02:00
Yorik van Havre
fa057ca7d3 Merge pull request #4772 from realthunder/EulerAngles
Base: add new API Rotation::get/setEulerAngles()
2021-08-31 10:40:23 +02:00