Commit Graph

733 Commits

Author SHA1 Message Date
wmayer
1c91c1287e Base: [skip ci] Various fixes in InterpreterSingleton::runStringWithKey:
+ fix memory leak (localDictionary) by replacing C API with PyCXX
+ don't write the whole code as error message if an error occurs. Python raises an exception with all relevant information for debugging
2020-09-04 09:58:21 +02:00
mwganson
df0204466e [CheckGeometry] fix segfault, reformat output with lower case, use try/except to check for runtime python errors and fall back on OCCT method if script failed. 2020-09-03 12:09:38 +02:00
mwganson
b553ebe48b [check geometry] decrement some pyobject references 2020-09-03 12:09:38 +02:00
mwganson
9bb3b0e046 [CheckGeometry] fix python2 build 2020-09-03 12:09:38 +02:00
mwganson
1b8a410d29 [CheckGeometry] fix py2 build failure 2020-09-03 12:09:38 +02:00
mwganson
dc3befbff3 [CheckGeometry] update a source code comment 2020-09-03 12:09:38 +02:00
mwganson
a4e38baeb3 [CheckGeometry] add new shapecontent builder instead of OCCT's to correct some errors in OCCT's values and to add for some more advanced information, e.g. volume or area, add new method to Base::Interpreter runStringWithKey() -- allows to run a python script and get a string return value 2020-09-03 12:09:38 +02:00
wandererfan
e989b5f7a4 [Base]use degree symbol in Imperial schemes 2020-08-29 11:13:35 -04:00
Bernd Hahnebach
7852957623 Base: add new unit schema for mm and N for use in FEM 2020-08-07 19:19:44 +02:00
wmayer
0dff8a6618 Base: [skip ci] add class ViewOrthoProjMatrix for orthogonal projections in 3d 2020-08-07 13:06:06 +02:00
wmayer
cd5341001e remove superfluous includes of iostream, use iosfwd instead 2020-07-28 15:22:23 +02:00
wmayer
767b2787c1 LGTM: [skip ci] remove some obsolete FIXME comments from source code 2020-07-28 09:49:20 +02:00
wmayer
5a2d0633b8 LGTM: [skip ci]: Ambiguously signed bit-field member
Until C++11 bit fields with integral types should have explicit signedness only.
It is implementation specific whether an -typed bit field is signed, so there could be unexpected sign extension or overflow.

This means that if depending on the compiler int32_t is not explicitly defined as signed the UnitSignature structure may not work
as expected. Since C++14 this has changed and an int of a bit-field is always signed:
https://stackoverflow.com/questions/33723631/signed-bit-field-in-c14
2020-07-27 16:00:47 +02:00
wmayer
3b0eeb63e8 LGTM: [skip ci] fix: Inconsistent definition of copy constructor and assignment ('Rule of Two')
Remove user-defined copy constructor of Exception classes without assignment operator
2020-07-27 13:47:41 +02:00
wmayer
eff0655d83 LGTM: [skip ci] fix: Wrong type of arguments to formatting function 2020-07-24 19:58:48 +02:00
wmayer
410e65ce2f Coverity: Suppress false-positives 2020-07-20 17:34:28 +02:00
wmayer
43d9e82f97 Coverity: Uncaught exception 2020-07-20 17:34:26 +02:00
wmayer
12670655a9 Coverity: Uninitialized scalar variable 2020-07-20 17:34:23 +02:00
wmayer
ab8f06d9ab PVS: V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. 2020-07-18 10:59:27 +02:00
Cyril Waechter
7b897e06fd Fix comment in Quantity.cpp 2020-07-11 19:37:47 +02:00
wmayer
2b5ef38a86 Base: fix build failure for Py2 2020-06-30 10:27:53 +02:00
wmayer
864555bc93 Base: let PyStreambuf figure out if String or Bytes object must be written to file 2020-06-29 18:04:32 +02:00
wmayer
daec778694 [skip ci] improve possibility to create a QApplication in a thread 2020-06-21 00:07:21 +02:00
wmayer
c23a1f6edd Base: [skip ci] include sstream in swigpyrun source files 2020-06-20 11:28:48 +02:00
wmayer
70b2d49550 Gui: [skip ci] fix Gui.subgraphFromObject and improve error text if wrapping fails 2020-06-19 15:07:57 +02:00
wmayer
ce7c3a4213 replace use of deprecated function ftime with gettimeofday 2020-06-12 17:51:33 +02:00
wmayer
2c113442a7 Qt5: 'void QTime::start()' / 'int QTime::elapsed() const' / 'int QTime::restart()' are deprecated: Use QElapsedTimer instead [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
3f212ad8ac Porting Py3.8/Py3.9:
Since Py3.3: 'Py_ssize_t PyUnicode_GetSize(PyObject*)' is deprecated [-Wdeprecated-declarations]
Since Py3.9: 'PyObject* PyEval_CallObjectWithKeywords(PyObject*, PyObject*, PyObject*)' is deprecated [-Wdeprecated-declarations]
Since Py3.9: 'void PyEval_InitThreads()' is deprecated [-Wdeprecated-declarations]
2020-06-12 17:51:33 +02:00
wmayer
fdc07cb6c9 Py3.8: [skip ci] missing initializer for member '_typeobject::tp_vectorcall' [-Wmissing-field-initializers] 2020-06-08 14:40:00 +02:00
wmayer
b0e92abcb5 Base: [skip ci] in XMLReader class replace assert(0) calls with throwing an XMLAttributeError exception 2020-06-07 14:24:46 +02:00
wmayer
ae641dc527 Python: [skip ci] tp_print slot has been replaced with tp_vectorcall_offset in Py3.8 2020-06-07 12:53:47 +02:00
wmayer
24bb210a0c Python: [skip ci] change order of supported arguments in UnitPy::PyInit 2020-05-27 22:03:05 +02:00
wmayer
ff3cdfaf74 Python: [skip ci] exception handling in PyInit to avoid to close application 2020-05-26 22:55:07 +02:00
qingfengxia
5da01ab8b0 Base: add VolExpansionCoeff and complete KinematicViscosity unit 2020-05-23 00:03:09 +02:00
wmayer
618089d6d8 remove deprecated std::binary_function 2020-05-11 13:46:37 +02:00
wmayer
d5d16de06b Gui: [skip ci] implement function to rename parameter group 2020-05-01 22:47:30 +02:00
wmayer
6306dc0276 Base: [skip ci] Parameter Editor: Rename group creates new group 2020-05-01 20:08:43 +02:00
wmayer
492d3c5c06 Base: [skip ci] support of spheres in InventorBuilder 2020-04-08 18:01:13 +02:00
Eric Trombly
5ecbc89f30 change isOnLine to isOnLineSegment 2020-04-06 06:34:53 -05:00
Eric Trombly
5f648aa2c1 remove sleep calls, change some for loops to list comp, move isPointOnLine to base vector 2020-04-06 06:34:53 -05:00
luz.paz
d36c3ebe57 Trivial code formatting for some {.cpp,.h} files 2020-04-06 12:55:27 +02:00
wmayer
ec8b1bc072 [skip ci] use QLocale class consistently to make it possible to change it application-wide 2020-03-26 16:37:45 +01:00
wmayer
1cfe6d2cc7 Part: [skip ci] support of expressions of Euler angles in attachment dialog 2020-03-21 14:27:53 +01:00
wmayer
49bfbf73f8 Base: [skip ci] add method to more easily set the Python error indicator from a Base::Exception 2020-03-18 17:53:13 +01:00
wmayer
2dfc4099b6 CMake: use XercesC_LIBRARIES to store debug and release version of xerces 2020-03-16 12:24:40 +01:00
wmayer
c165edd52c Base: [skip ci] implement method Quantity.toStr() to control string representation 2020-02-29 22:51:55 +01:00
wmayer
9c154f705c Base: [skip ci] improve repr() for quantity
https://forum.freecadweb.org/viewtopic.php?f=10&t=43718
https://forum.freecadweb.org/viewtopic.php?f=10&t=43431&p=369556#p369575
2020-02-29 00:20:21 +01:00
plgarcia
d222f7b55f Change backup policy
1 - Reports the error to the user in a popup.
2 - Names of the backups include the timstamp instead of a number. Names have more sense and the files can be sorted by names what is also the age order.
3 - Behaviors when changing configuration improved, the number of files present on the system was not reduced when reducing the number of backups or backups deactivated.
2020-02-24 23:06:26 +01:00
wmayer
1c8d0d1d84 Base: [skip ci] support of __round__ of QuantityPy 2020-02-16 21:50:06 +01:00
donovaly
66354b3c58 add units Gauss, Weber and Oersted 2020-01-07 07:36:22 -03:00