Commit Graph

975 Commits

Author SHA1 Message Date
Uwe
865481fcf4 [FEM] fix handling of vacuum permittivity
- fix message that permittivity object was not handled
- set an expression, otherwise the user gets only "0.000" for the default of 8.8e-12
- use as unit the common "F/m" (this is also more user-friendly than "s^4*A^2 / (m^3*kg)")
- fix a ToDo
2022-08-14 17:59:42 +02:00
wmayer
00bdd16dff Base: extend Placement/Rotation API
* Add Placement::isSame() and expose to Python
* Add Placement::multRight/Placement::multLeft
* Fix PlacementPy::rotate
* Add Rotation::multRight/Rotation::multLeft
* Add a test feature FeatureTestPlacement for uni tests
* Add unit tests
2022-08-09 11:54:05 +02:00
wmayer
b35f66e7c6 Base: [skip ci] improve whitespaces 2022-08-09 08:25:59 +02:00
Markus Fröschle
0c06f0d01d Fix Placement.rotate() to match documentation
Documentation for Placement.rotate() claims this function would be
compatible to TopoShape.rotate() which isn't exactly correct as the
generated placements differ because of backwards multiplication.

This commit adds a "comp" (as in "compatible") keyword argument that -
when "True" (default is False) - produces a Placement that is interchangable with the one
that is generated from TopoShape.rotate().
2022-08-09 07:22:46 +02:00
wmayer
27757fc246 Base: add Transform/Transformed to Line3<> and Polygon3<> 2022-08-04 11:46:38 +02:00
wmayer
513ef44a13 Base: add methods to transform a Vector3f with a Rotation or Placement 2022-08-04 11:45:39 +02:00
wmayer
d2d2bd57fe Base: implement Line3 Polygon3 class 2022-08-04 02:17:22 +02:00
wmayer
d92eaf7a72 Base: fix several warnings reported by code analyzers 2022-08-02 13:04:50 +02:00
wmayer
94c3c481bd Base: [skip ci] fix -Winconsistent-missing-override 2022-08-02 12:43:54 +02:00
wmayer
75ee04299a Base: fix build failure because number_long() has been removed in PyCXX 2022-08-02 12:41:04 +02:00
berniev
15419982d4 Base: Modernise ctors dtors defs etc 2022-08-02 12:37:46 +02:00
berniev
ba5c312a58 remove redundant void from Base 2022-07-31 14:10:34 +02:00
wmayer
8abd40a788 Base: [skip ci] use Precision class in Rotation::makeRotationByAxes 2022-07-30 17:21:59 +02:00
wmayer
b4719a3fb3 Base: add Precision class 2022-07-30 17:16:28 +02:00
wmayer
7628569b43 Base: add Precision class
and move the Python binding from Part to Base module
2022-07-30 17:10:56 +02:00
wmayer
f9bdc3aca7 App: use namespace prefix for classes in Base 2022-07-28 14:18:12 +02:00
wmayer
4101ab23bb Base: replace C macro with function and lambda expressions 2022-07-28 13:49:03 +02:00
marioalexis
c38a6759d9 Base: Clean up code and improve docstrings in Python Console module 2022-07-28 13:30:01 +02:00
wmayer
eeaf12601a Base: help clazy with export macro 2022-07-27 19:09:56 +02:00
wmayer
25483b78be Fix several clazy issue:
* Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference]
2022-07-24 22:29:06 +02:00
wmayer
9b30f9328b Fix several clazy issue:
* Suppress non-POD static [-Wclazy-non-pod-global-static]
* Call to temporary is a no-op: [-Wclazy-writing-to-temporary]
* Unused QString [-Wclazy-unused-non-trivial-variable]
2022-07-24 21:39:59 +02:00
Uwe
61303b0a01 [Base] remove some more superfluous nullptr checks 2022-07-18 13:07:16 +02:00
Uwe
746f24efa3 [Base] remove more superfluous nullptr checks 2022-07-18 03:29:03 +02:00
Uwe
4b2ffd2eca [Base] remove superfluous nullptr checks 2022-07-18 03:16:22 +02:00
wmayer
ab6c75fad9 Core: replace PyObject_IsTrue with Base::asBoolean 2022-07-16 14:04:05 +02:00
wmayer
a34911605c Base: add convenience function to convert PyObject_IsTrue to a boolean 2022-07-16 12:41:01 +02:00
wmayer
bfb544a739 Base: add convenience classes/functions that are marked as deprecated in Qt 5.15 and removed in Qt 6 2022-07-14 14:52:23 +02:00
wmayer
8ed9f1ac0e Base: [skip ci] fix regression in ~ILoggerBlocker caused by 9b984c11c3ce90 2022-07-14 14:32:52 +02:00
Uwe
1847cb2b4f [Base] fix a -Wunused CI compiler warning 2022-07-09 16:23:04 +02:00
0penBrain
43772e985c Gui: implement temporary blocker for console observer 2022-07-05 13:35:18 +02:00
Uwe
3a2fbc47e0 [Base] Tools2D.h: a simplification and code style unification 2022-07-03 15:54:33 +02:00
ChenOrange
90469005aa Vector2d:fix rotate bug 2022-07-03 14:52:27 +02:00
wmayer
e2250d6966 Py3: properly port to Py3.11 2022-07-02 19:36:27 +02:00
Uwe
1945f23f69 [Base] UnitsSchemaInternal: improve code readability 2022-07-02 05:15:11 +02:00
wmayer
55828c22c0 Py: make FreeCAD to compile with Py3.11 2022-07-01 17:54:50 +02:00
wmayer
97f9320bb3 Core: fix minor issues:
+ fix issues found by clang's clazy tool
+ fix cppcoreguidelines-pro-type-member-init
  * Make sure that all class members are initialized in the constructor
2022-06-30 16:31:16 +02:00
wmayer
316352fa50 Base: [skip ci] fix slight regression caused with 13549473e 2022-06-30 13:13:00 +02:00
Uwe
e4158ea615 [Base] remove unused MSC code
this part was initially part of #7036 but then accidentally reverted
2022-06-28 00:58:12 +02:00
mosfet80
c86f0ce670 Remove old msc ver. Freecad 0.20 require 64 bit and windows 7 or higher. For this reason, msc libraries less than 1800 will no longer be used. (#7036)
* remove msc<1800
2022-06-28 00:42:33 +02:00
wmayer
455ed09240 C++ core guidelines:
* ES.87: Don’t add redundant == or != to conditions
2022-06-25 17:38:57 +02:00
marioalexis
0273d7e1a8 Base: Minor changes in some Python docstrings 2022-06-25 17:12:06 +02:00
wmayer
f5235a8057 cppcoreguidelines-pro-type-union-access
According to https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md using union for type-punning is undefined behaviour.
 Replace it with std::memcpy
2022-06-24 14:29:50 +02:00
marioalexis
fbfb6c3ed3 Base: Use PyObject_IsTrue in combination with conditional ternary operator 2022-06-22 19:50:03 -04:00
ShuffleWire
f09040052a Base: add Const attribute to many MatrixPy methods
multiply(), determinant(), isOrthogonal(),
submatrix(), analyze() also get the const attribute
2022-06-22 19:16:38 -04:00
wmayer
41c7edc6d5 Base: add Const attribute to MatrixPy::inverse() 2022-06-22 13:49:11 +02:00
marioalexis
adfac77e61 Base: Add function to get Python object types for SWIG interfaces 2022-06-21 21:01:37 -04:00
marioalexis
f5c5de9d61 Base: Fix wrong function name in RotationPy documentation. 2022-06-20 02:12:16 +02:00
marioalexis
af94c6c9b7 Base: Set angle in Rotation::inverse function 2022-06-19 15:44:05 +02:00
Uwe
a04db55476 [Base] remove unnecessary Boolean comparisons 2022-06-19 15:17:50 +02:00
marioalexis
fb30939e8f Base: Improve docstrings in BoundBoxPy.xml 2022-06-13 08:42:40 -04:00