Commit Graph

1316 Commits

Author SHA1 Message Date
wmayer
d038801aca Gui: move class SelectionObserverPython to its own source files 2022-11-22 15:44:26 +01:00
wmayer
6770b0ba7d Base: move class ProgressIndicatorPy to its own files 2022-11-22 15:07:33 +01:00
wmayer
cd3960f456 Base: restore ConsoleSingleton::IsMsgTypeEnabled
For more details see comments on #7457
2022-11-21 23:18:37 +01:00
wmayer
7193ea0007 Base: [skip ci] fix readability-identifier-length 2022-11-19 16:54:08 +01:00
wandererfan
23b1ed84a4 [Units]Allow querying schema for unit of measure 2022-11-19 16:49:46 +01:00
Zheng, Lei
ae8ba0de3d Gui: fix shortcut context handling in ShortcutManager
Related #6097

Qt ignores shortcut of actions in invisible toolbar, but not for actions
in a hidden menu action of menu bar, which is likely a Qt bug. The
desired behavior should be that of toolbar actions, so that actions
belong to different workbenches can have the same shortcut without
conflict.

This commit works around this inconsistency by ensuring only the active
actions are added in menu bar. In addition, all active actions will be
added to a zero sized child widget of the main window, which ensures the
shortcuts of these actions being active regardless whether the action is
in toolbar or menu bar, visible or not.
2022-11-10 23:20:18 +01:00
Chris Hennes
fa8e0a6865 Remove various sys.version_info >= 3 checks 2022-11-09 14:08:54 +01:00
marioalexis
a1bc959637 Base: Check sequence size in getVectorFromTuple function 2022-11-04 08:55:30 -04:00
Chris Hennes
1fac3fead0 cMake: Add support for compiling against Qt6 (#7647)
Removes the BUILD_QT5 flag and adds a new FREECAD_QT_VERSION option,
which can be set to either "Auto" (default), 5, or 6. Auto detects which
version of Qt is installed on the system and chooses it. If both version
are installed, Qt5 is used.

Note that this DOES NOT implement compiling against Qt6, it only adds
the necessary cMake infrastructure to begin work on the source code
changes that will be required.
2022-10-31 09:24:09 -05:00
luz paz
57d561f683 Fix source comment typo 2022-10-23 09:14:44 -05:00
Uwe
bf3d7f64ca [Base, Sketcher] remove redundant boolean checks 2022-10-10 02:49:17 +02:00
Uwe
f66263ec37 [TD] Gui, Dlg*: remove unused includes
- also sort includes
- also two whitespace changes
2022-10-09 19:14:31 +02:00
0penBrain
7e44838745 Remove some trailing whitespaces 2022-10-07 12:40:17 -07:00
0penBrain
48520718f9 [Bugfix]Base: Python method 'isEqual' of Vector shall be Const 2022-10-07 12:40:17 -07:00
wmayer
4aefcb5cc2 Base: fix build failure with MSVC 2022-10-05 21:47:47 +02:00
wmayer
716ceecd02 Base: add helper function to convert a string of a triple of floats into Vector3f 2022-10-05 18:58:51 +02:00
wmayer
249eb7ff79 Qt6: remove or replace QTextCodec 2022-09-30 14:52:11 +02:00
berniev
86eab9aa77 play 2022-09-24 16:35:01 +02:00
marioalexis
ce91630ab1 Base: Add helper function to check Python types 2022-09-24 05:10:34 +02:00
wmayer
7470d800fd Base: fix const-correctness and include required header 2022-09-22 15:58:58 +02:00
marioalexis
be8b5f345c Base: Replace C cast 2022-09-18 11:06:51 -05:00
berniev
5678fc1abe remove xcerces2 2022-09-09 08:02:35 +02:00
wmayer
3569b73965 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
c7a03dde81 Base: make isMultiUnitLength() and isMultiUnitAngle() const 2022-09-01 17:07:30 +02:00
wandererfan
c51f804b3b [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
4e42ff7baa Base: modernize C++: replace 'typedef' with 'using' 2022-08-29 11:42:09 +02:00
wmayer
f15fe90339 Base: [skip ci] optimize writing Inventor file 2022-08-28 13:01:12 +02:00
wmayer
f4f03d022e Base: [skip ci] whitespace improvements 2022-08-28 12:20:49 +02:00
marioalexis
6f6854edd5 Base: Fix warning -Wrange-loop-construct 2022-08-28 12:04:21 +02:00
wmayer
d1b6764514 Base: support of SoFaceSet in InventorLoader 2022-08-26 14:51:43 +02:00
wmayer
9d041d8497 Base: implement loading of OpenInventor files (currently only SoIndexedFaceSet is supported) 2022-08-26 12:39:04 +02:00
wmayer
2af16e4804 Base: [skip ci] fix scale factor in unit schemes 2022-08-24 11:24:52 +02:00
wmayer
ff38f8b8e8 CMake: [skip ci] remove trailing whitespaces 2022-08-24 07:46:07 +02:00
Jonas Bähr
1394c62cdd Fix build on MacOS-X 10.14: missing cmath header
This undoes a small part of commit 5de761eef0cb059c899fd6388dc2a5f88e40f526,
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
8c298493de Mod: replace std::ifstream/std::ofstream with Base::ifstream/Base::ofstream 2022-08-21 12:46:53 +02:00
wmayer
dd25480c2d Base: implement default constructor and open() function for Base::ifstream and Base::ofstream 2022-08-21 11:23:04 +02:00
wmayer
68f760d958 Base: [skip ci] improve whitespaces 2022-08-15 11:42:26 +02:00
wmayer
b485f7943c Base: expose enum NumberFormat to Python 2022-08-15 11:12:53 +02:00
Uwe
3c00213506 [Base] [skip CI] fix a typo in QuantityPy.xml 2022-08-15 01:22:02 +02:00
Uwe
94cc1b867a [Gui] revert the revert of setting unit factor for F/m
- see https://github.com/FreeCAD/FreeCAD/commit/2f0824be#r81159352
2022-08-14 22:58:12 +02:00
Uwe
91bf791e3c [Gui] revert setting unit factor for F/m
- see https://github.com/FreeCAD/FreeCAD/commit/2f0824be#r81159352
2022-08-14 20:49:58 +02:00
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