Commit Graph

795 Commits

Author SHA1 Message Date
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
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
Yorik van Havre
cbdac756a8 Merge pull request #4963 from Helios113/stiffness
Base: Adding stiffness units
2021-08-18 10:04:46 +02:00
Preslav
4ab37fc0ca Added stiffness units to FreeCAD [mN/m, N/m, kN/m, MN/m] 2021-08-16 12:27:41 +01:00
Syres916
e215c22519 [Base] Remove one unnecessary precision level 2021-08-12 11:13:29 +01:00
Syres916
463ff88a57 [Base] Increase precision 2021-08-12 10:55:50 +01:00
Heewa Barfchin
bf6dfb7572 Fix lost filename in err msg
In some circumstances, FileExceptions are constructed empty, then have a
filename assigned to them, but the error message in these scenarios is
left as the default "unknown" one, which is sometimes shown to users.
This change fixes that case to be consistent with instances that are
constructed with the filename.
2021-05-14 12:34:20 -04:00
wmayer
b69ef38c7f allow to enable PCH for gcc and clang 2021-05-03 17:37:58 +02:00
Zheng, Lei
c1454dfbed Base: add new API Rotation::get/setEulerAngles()
Exposed to Python as new constructor parameters and
Rotation.toEulerAngles()

This function uses the code from OCCT
gp_Quaternion::Get/SetEulerAngles() to support all 24 possible
generalized euler rotation sequences. Call Rotation.toEulerAngles()
without argument to obtain all possible sequence types.
2021-05-02 17:20:45 +08:00
wmayer
b5c49a6b77 Base: allow to use the classes XUTF8Str and StrXUTF8 outside FreeCADBase 2021-04-28 10:56:17 +02:00
wmayer
2f276601f8 Fix generation and build of python classes for 3.8 2021-04-27 14:35:34 +02:00
markus
aa0dcff74f Fix generation and build of python classes for 3.9 2021-04-27 00:41:53 +02:00
wmayer
86b1308f45 Base: [skip ci] do not make PyBaseProxy class declaration dependent on ATTR_TRACKING 2021-04-26 15:57:17 +02:00
wmayer
f82af9eca2 Base: remove obsolete swig source files 2021-04-26 11:20:13 +02:00
wmayer
44e82ac3c4 App: remove some more deprecated Py2 code
and remove deprecated void from function signature and replace 0 or NULL with nullptr
2021-04-26 10:55:56 +02:00
wmayer
af16ab02a0 Base: remove some more deprecated Py2 code
and remove deprecated void from function signature and replace 0 or NULL with nullptr
2021-04-26 10:29:48 +02:00
luz paz
142c2c2c4d Base: remove Py2 code 2021-04-26 09:23:58 +02:00
wmayer
56fb65de62 Base: use Python's weak reference mechanism to avoid memory leaks due to cyclic dependencies 2021-04-23 11:02:19 +02:00
wmayer
e084df62b9 Base: add convenience functions to create a QString from quantity 2021-04-20 14:56:29 +02:00
wmayer
cd9319f125 Base: add convenience functions to create a QString from quantity or double 2021-04-20 14:07:20 +02:00
Mateusz Skowroński
92683e1f63 Fix CMake warning: qt5_make_output_file is not part of the official API, and might be removed in Qt 6. 2021-04-19 15:10:53 +02:00
wmayer
d4e01609fe Base: [skip ci] add convenience function to get PyObjectBase from GeometryT 2021-04-12 15:12:21 +02:00
wmayer
a2574987b4 Base: [skip ci] remove Py2 code from PyObjectBase 2021-04-12 14:17:16 +02:00
wmayer
7f01c558df Py: fix memory leak 2021-04-12 00:06:00 +02:00
wmayer
111a21e45c Base: do not report C++ exception when converting it to Python exception
See https://forum.freecadweb.org/viewtopic.php?f=23&t=56464
2021-04-11 14:54:11 +02:00
wmayer
69aa35578e Base: Vector3::GetAngle() uses a smaller epsilon 2021-04-06 11:37:35 +02:00
Chris Hennes
71c9c24374 [Base] Remove deprecated Qt < 5.9 code 2021-04-01 19:28:43 +02:00
donovaly
bcc669b930 [Base] add electrical conductivity
- this is necessary to perform electrodynamics simulations. Since the typical values are in the range of 1e6 S/m, we need the new units kS and MS

- since this is for simulations, also add electrical conductivity to the FEM material cards
2021-03-25 17:13:52 +01:00
Benjamin Nauck
231c470e7e [Base] Remove unused std::make_unique back port
std::make_unique was introduced in c++14, so no need to have it back
ported anymore.
2021-03-06 21:20:32 +01:00
Benjamin Nauck
f6c9cc90ee [Base] Remove includes to StdStlTools.h as that's not needed anymore
std::make_unique was introduced in c++14, so no need to use the back
ported version
2021-03-06 21:20:32 +01:00
David Carter
5edd7d01a0 Base: fixes #0004586: Conversion error for PoundForce (lbf) 2021-03-03 12:39:49 +01:00
wmayer
df0f979f3b App/Gui: fix memory leaks:
+ add function to cleanup units and quantities in debug build
+ fix reference leak in PropertyVector::getPyPathValue()
+ fix reference leak in PropertyPlacement::getPyPathValue()
+ in InterpreterSingleton::init() use a static std::vector<wchar_t*> instead of a C array
  to free memory at program end
+ in MainWindow::closeEvent() explicitly delete all task watchers
+ in ReportOutputObserver constructor pass parent to QObject
+ in PropertyEditor destructor explicitly delete QItemEditorFactory
2021-02-27 10:56:19 +01:00
wmayer
0965fd4439 Base: [skip ci] take care of case-sensitivity of header file 2021-02-18 10:17:03 +01:00
Chris Hennes
a0bbb173f4 LGTM: Remove unused Time() function
The ConsoleSingleton::Time() function is flagged by LGTM for using
two different unsafe time-related functions. It is not called anywhere
in the current codebase, and is not exposed in the Python API, so was
removed rather than being repaired.
2021-02-11 12:51:31 +01:00
wmayer
503a5a99d2 Base: [skip ci] fix MSVC build failure 2021-02-08 09:58:25 +01:00
Chris Hennes
7d5a1d7e5d Remove catch block for plain C strings
LGTM complains about this construct leaking memory. Commit 13927b2465
eliminated the parts of FreeCAD that throw those strings. This commit
eliminates the catch block.
2021-02-07 13:41:42 +01:00
wmayer
13927b2465 [skip ci] Do not throw plain C string as exception 2021-02-06 15:52:21 +01:00
luz paz
45eea3d9e7 Fix various typos [skip ci]
Found via codespell v2.1.dev0  
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,apoints,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,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
```
2021-02-03 14:08:57 +01:00
Mateusz Skowroński
2559f2d29c Fix build warnings from deprecated Boost headers (they are used internally by Boost). Thanks @wwmayer for the hint. 2020-12-29 10:20:53 +01:00
wmayer
a152cd2d96 Py: [skip ci] replace PyList_Append with Py::List::append 2020-12-13 16:44:14 +01:00
donovaly
0baabcaa45 [TD] fix unit mismatch bug
- also make global decimal option italic since it only affects new dimensions
- also fix a typo in UnitsApi.h
2020-12-03 15:50:06 +01:00
luz paz
d5f6c096b8 Base: Fix header uniformity, whitespace, and doxygen
[skip ci]
2020-11-22 18:12:16 +01:00