Commit Graph

994 Commits

Author SHA1 Message Date
wmayer
1789c957df Base: [skip ci] Add function to read the CD of a zip file from a std::istream 2022-09-05 18:53:37 +02:00
wmayer
9381a8b2fb Base: make isMultiUnitLength() and isMultiUnitAngle() const 2022-09-01 17:07:30 +02:00
wandererfan
16ff6dfbbb [Base]identify schemas which use multiple units
- allow querying a schema to determine if it uses multiple
  units for length (ex ft/in) or angles (ex DMS).
2022-08-31 16:31:27 -04:00
wmayer
d2168f51b9 Base: modernize C++: replace 'typedef' with 'using' 2022-08-29 11:42:09 +02:00
wmayer
196983cf95 Base: [skip ci] optimize writing Inventor file 2022-08-28 13:01:12 +02:00
wmayer
47f69d1389 Base: [skip ci] whitespace improvements 2022-08-28 12:20:49 +02:00
marioalexis
4cd8e2e93f Base: Fix warning -Wrange-loop-construct 2022-08-28 12:04:21 +02:00
wmayer
89ad254b7c Base: support of SoFaceSet in InventorLoader 2022-08-26 14:51:43 +02:00
wmayer
8b7f721cd0 Base: implement loading of OpenInventor files (currently only SoIndexedFaceSet is supported) 2022-08-26 12:39:04 +02:00
wmayer
c538824309 Base: [skip ci] fix scale factor in unit schemes 2022-08-24 11:24:52 +02:00
wmayer
a899f078bd CMake: [skip ci] remove trailing whitespaces 2022-08-24 07:46:07 +02:00
Jonas Bähr
983e13c3b7 Fix build on MacOS-X 10.14: missing cmath header
This undoes a small part of commit 9ec0bcdcf2,
which seems a bit too agressive. Without the cmath header the build fails
using Apple clang version 11.0.0 (clang-1100.0.33.17) on Mojave with the
following error:

.../FreeCAD-git/src/Base/UnitsSchemaInternal.cpp:39:24: error: call to 'abs' is ambiguous
    double UnitValue = std::abs(quant.getValue());
                       ^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/stdlib.h:132:6: note: candidate function
int      abs(int) __pure2;
         ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdlib.h:111:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long      abs(     long __x) _NOEXCEPT {return  labs(__x);}
                                           ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdlib.h:113:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);}
                                           ^
1 error generated.
2022-08-24 07:40:04 +02:00
wmayer
5014bab534 Mod: replace std::ifstream/std::ofstream with Base::ifstream/Base::ofstream 2022-08-21 12:46:53 +02:00
wmayer
5be214b885 Base: implement default constructor and open() function for Base::ifstream and Base::ofstream 2022-08-21 11:23:04 +02:00
wmayer
bc2f04889b Base: [skip ci] improve whitespaces 2022-08-15 11:42:26 +02:00
wmayer
020bf1789a Base: expose enum NumberFormat to Python 2022-08-15 11:12:53 +02:00
Uwe
517fde7881 [Base] [skip CI] fix a typo in QuantityPy.xml 2022-08-15 01:22:02 +02:00
Uwe
262658685a [Gui] revert the revert of setting unit factor for F/m
- see https://github.com/FreeCAD/FreeCAD/commit/9db5dff7#r81159352
2022-08-14 22:58:12 +02:00
Uwe
37a3338537 [Gui] revert setting unit factor for F/m
- see https://github.com/FreeCAD/FreeCAD/commit/9db5dff7#r81159352
2022-08-14 20:49:58 +02:00
Uwe
9db5dff744 [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
91ea39a5c0 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
6067b18774 Base: [skip ci] improve whitespaces 2022-08-09 08:25:59 +02:00
Markus Fröschle
4b538a38ab 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
b4305c7b46 Base: add Transform/Transformed to Line3<> and Polygon3<> 2022-08-04 11:46:38 +02:00
wmayer
4d00faeceb Base: add methods to transform a Vector3f with a Rotation or Placement 2022-08-04 11:45:39 +02:00
wmayer
c49854b47b Base: implement Line3 Polygon3 class 2022-08-04 02:17:22 +02:00
wmayer
7824d7b1df Base: fix several warnings reported by code analyzers 2022-08-02 13:04:50 +02:00
wmayer
c6de515b20 Base: [skip ci] fix -Winconsistent-missing-override 2022-08-02 12:43:54 +02:00
wmayer
34432c09f7 Base: fix build failure because number_long() has been removed in PyCXX 2022-08-02 12:41:04 +02:00
berniev
8aff4a7503 Base: Modernise ctors dtors defs etc 2022-08-02 12:37:46 +02:00
berniev
4043d049bc remove redundant void from Base 2022-07-31 14:10:34 +02:00
wmayer
2e3f3bab7e Base: [skip ci] use Precision class in Rotation::makeRotationByAxes 2022-07-30 17:21:59 +02:00
wmayer
923de19044 Base: add Precision class 2022-07-30 17:16:28 +02:00
wmayer
bd5ef26536 Base: add Precision class
and move the Python binding from Part to Base module
2022-07-30 17:10:56 +02:00
wmayer
91cffca077 App: use namespace prefix for classes in Base 2022-07-28 14:18:12 +02:00
wmayer
9ad8486a25 Base: replace C macro with function and lambda expressions 2022-07-28 13:49:03 +02:00
marioalexis
eccf4fed96 Base: Clean up code and improve docstrings in Python Console module 2022-07-28 13:30:01 +02:00
wmayer
d0791a9494 Base: help clazy with export macro 2022-07-27 19:09:56 +02:00
wmayer
0bef4e82f2 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
bf7e6aac4a 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
90abdf2752 [Base] remove some more superfluous nullptr checks 2022-07-18 13:07:16 +02:00
Uwe
bd6ffcc7e0 [Base] remove more superfluous nullptr checks 2022-07-18 03:29:03 +02:00
Uwe
53571f7196 [Base] remove superfluous nullptr checks 2022-07-18 03:16:22 +02:00
wmayer
201f4c9a5a Core: replace PyObject_IsTrue with Base::asBoolean 2022-07-16 14:04:05 +02:00
wmayer
231de30c2f Base: add convenience function to convert PyObject_IsTrue to a boolean 2022-07-16 12:41:01 +02:00
wmayer
339bb73e9f 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
761ff7bab4 Base: [skip ci] fix regression in ~ILoggerBlocker caused by ea0c3e8598 2022-07-14 14:32:52 +02:00
Uwe
ea0c3e8598 [Base] fix a -Wunused CI compiler warning 2022-07-09 16:23:04 +02:00
0penBrain
95a98669a4 Gui: implement temporary blocker for console observer 2022-07-05 13:35:18 +02:00
Uwe
96cb9dce0b [Base] Tools2D.h: a simplification and code style unification 2022-07-03 15:54:33 +02:00