Commit Graph

32116 Commits

Author SHA1 Message Date
wmayer
daa23162a4 Base: fix pow() of Unit 2023-02-27 20:07:01 +01:00
Daniel-Khodabakhsh
c815cb8a82 Update CONTRIBUTING.md
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2023-02-27 10:33:24 -06:00
Daniel-Khodabakhsh
d4b61af3d3 Improve usage of the term 'platform' in CONTRIBUTING.md
This PR improves `CONTRIBUTING.md` by replacing some instances of the term `Platform` with `GitHub` for the following reasons:

* This was unnecessary legalese which made the document harder to comprehend.
* Fixes a few ambiguous usages of the term:
  * In one usage there is ambiguity if there is a platform called "Platform".
  * Ambiguous with other usages of the word when referring to the runtime platform.
* Fixes one incorrect usage of the term, where reference to `"Platform"` was intended to refer to any other platform OTHER THAN `GitHub` or `"the Platform"`.
2023-02-27 10:33:24 -06:00
Uwe
7cab1aa415 [FEM] [skip ci] fixes for flow example
- the heat solver settings were wrong so that the heat was actually not calculated for convection
- also set more realistic temperatures
2023-02-27 15:03:34 +01:00
Bernd Hahnebach
0cea42dfd8 IFC: import helper, add method to convert IFC color to RGB col 2023-02-27 13:38:57 +01:00
Uwe
4f324add9f [App] attempt to fix compiler warnings in Property.h
- "conversion from 'size_t' to 'int', possible loss of data" in for loops by modernizing the for loops
- fix warning about uninitialized variable
2023-02-27 02:20:01 +01:00
Uwe
a000dcf60a [App] sort units in FreeCADInit.py 2023-02-27 00:12:06 +01:00
Jonas Bähr
d0b5b5fb6c PD: Fix exception from InvoluteGear with zero fillets
While gears without a root fillet may have limited real-live use cases,
during number-input it happens regulary to have a zero fillet radius as
intermediate state. With this commit such a situation is now handled
gracefully.
2023-02-26 23:28:33 +01:00
Uwe
de8988049d [App] [skip ci] some comment fixes
- also a sorting fix
2023-02-26 23:19:19 +01:00
Uwe
1032fe4468 [Base] fix issues with new units
- also sort units for better overview
2023-02-26 22:19:31 +01:00
wmayer
4714135880 Plugin: harmonize with FreeCAD widgets 2023-02-26 21:59:19 +01:00
Uwe
35338171f1 [App] register all available unit properties
- was missing in #6717
2023-02-26 19:12:25 +01:00
Uwe
33f336ddd9 [App] sort properties
- to keep better the overview
2023-02-26 18:07:41 +01:00
M G Berberich
6832743262 add cbrt (cube root) to expressions (#8629)
This adds a function cbrt(arg) to the freecad-expressions that computes
the cube root of arg. Instead of arg^(1/3) this handles the units of the
argument, so that one can compute units from p.e. ml to mm.
  cbrt(27 ml) → 30 mm
instead of
  (27 ml)^(1/3) → 30
2023-02-26 17:49:58 +01:00
Uwe
2a098b1471 [Core] add missing velocity property
- fixes compilation because declared in header but no code
- also sort the properties to keep the overview
2023-02-26 16:38:02 +01:00
wmayer
bb1de399ad Gui: add function View3DSettings::stopAnimatingIfDeactivated() 2023-02-26 16:20:58 +01:00
Oliver Oxtoby
9d5ab79a4c [App] [Base] Add missing Property classes for all Units (#6717)
- Add missing Property classes for all Units
- Add missing units to unit calculator, as well as some missing string representations
- also change units used for dynamic viscosity to the customary Pa*s
2023-02-26 15:28:28 +01:00
wmayer
94f3a476a9 Gui: refactor View3DInventor and move handling of settings to separate classes 2023-02-26 15:17:39 +01:00
Chris Hennes
e8dd1802f6 Sketcher: Silence Coverity warning
Coverity CID 350580: Uninitialized scalar variable. The analyzer doesn't like the incomplete construction of the ConstraintId object (the 'Type' field was uninitialized).
2023-02-26 13:48:48 +01:00
wmayer
1483e28ffd App: fix several Lint warnings:
* ignore bugprone-easily-swappable-parameters
* handle bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions
* handle readability-uppercase-literal-suffix
* handle readability-braces-around-statements
2023-02-26 13:30:44 +01:00
wmayer
3fb943864e Gui: use Color::fromPackedRGBA to simplify client code 2023-02-26 13:30:44 +01:00
wmayer
c747dbde52 Tests: fix Lint issue cppcoreguidelines-init-variables 2023-02-26 13:30:44 +01:00
wmayer
f091ca1d37 App: fix some Lint issues:
* readability-identifier-length
* cppcoreguidelines-pro-type-member-init
2023-02-26 13:30:44 +01:00
wmayer
f66ec96a77 Import: enable multi-threading support of RWGltf_CafWriter for OCCT 7.7 2023-02-26 13:30:44 +01:00
Uwe
099de1ae9f modernize usage of connect() 2023-02-26 10:38:28 +01:00
Uwe
fc1a6012cf [Widgets] register transparency property of Gui::ColorButton
- at the moment it is not possible to set the property "allowTransparency" in Qt Designer
2023-02-26 10:38:28 +01:00
Chris Hennes
d26b84df3f Gui: Eliminate variable reuse
Coverity complains about USE_AFTER_FREE here, and it was difficult to reason about the code. To help address this, use different variables for the different parameter groups.
2023-02-26 10:36:16 +01:00
Uwe
c32bf8e99a [TD] fix compiler about a variable redefinition 2023-02-26 10:31:36 +01:00
Chris Hennes
db53c46b42 Spreadsheet: Fix possible null dereference
Fixes Coverity CID 184299.
2023-02-26 10:22:37 +01:00
wmayer
0d23594107 Core: add functions setPackedARGB and fromPackedRGBA 2023-02-26 10:11:53 +01:00
wmayer
7c359469ba Gui: use Color::asPackedRGB<QColor>() 2023-02-26 10:11:53 +01:00
wmayer
41e6c17605 Points: use Color::getPackedARGB() for pcl colors 2023-02-26 10:11:53 +01:00
wmayer
7a3bcded06 App: move Color class to its own sources 2023-02-26 10:11:53 +01:00
wmayer
85ad88d101 Import: [skip ci] fix some minor Lint issues 2023-02-26 09:04:26 +01:00
wmayer
c3fc619b99 Import: support to export to glTF file in headless mode 2023-02-26 09:04:26 +01:00
wmayer
e2c9b32ebe Test: add unit tests for expressions with operator 2023-02-26 09:00:27 +01:00
wmayer
b55a5682ad Tests: add unit tests for expression tokenizer 2023-02-26 09:00:27 +01:00
wmayer
972329be99 App: split tokenizer handling of ExpressionCompleter to its own class 2023-02-26 09:00:27 +01:00
wmayer
aa04870ea9 Tests: exclude some lint warnings 2023-02-26 08:58:51 +01:00
wmayer
3a589cba11 Tests: add unit tests for Matrix4D and Rotation 2023-02-26 08:58:51 +01:00
Chris Hennes
aa788af4bd Part: SectionCutting cutTransparency initialization
Addresses Coverity CID 356563: Uninitialized scalar.
2023-02-26 05:40:32 +01:00
Uwe
53b275a735 [Gui] fix initialization of NaviCube colors
- the color is stored in for RRGGBBAA and must be passed in form AARRGGBB to QColor. In NaviCube.cpp this is already done right and the same is necessary for View3DInventor.cpp
2023-02-26 05:35:39 +01:00
Uwe
f3bcdf7f4b [Sketch] [skip ci] fix UI file
- compiler stumbles over inexisting tabstop target
 the fix was automatically done Qt Designer
2023-02-26 04:59:27 +01:00
Chris Hennes
e3544117ab App: Add None=0 to enumeration
Addresses Coverity CID 356649, uninitialized scalar.
2023-02-25 21:53:01 -06:00
Uwe
de78e9d7ef [Material] add new card to CMake 2023-02-26 04:21:32 +01:00
Vladimir
7c7f8c8c10 [Material] Add Titanium alloy to materials (#8636)
* Add Titanium alloy
2023-02-26 03:53:39 +01:00
Abdullah Tahiri
849f8ced13 Part/Sketcher: Grid - set grid orientation
==========================================

Extend ViewProviderGridExtension so that it is aware of the absolute direction of the XY plane on which the grid is to be drawn.

Fix the calculation of the cam origin.
2023-02-25 23:13:55 +01:00
Abdullah Tahiri
b4926c769e Sketcher: Grid - Imperial
=========================

Fix grid calculation in Imperial units in Auto mode (wrong scaling).

Remove observer as unit does not need to be observed.
2023-02-25 23:13:55 +01:00
0penBrain
05a5e7b341 Sketcher/Grid: fix error in parameter function call
Sketcher/Grid: fix algorithm computing the automatic grid spacing

Sketcher/Grid: forcefully redraw grid when one of its parameter is changed

Sketcher/Grid: always authorize user to change grid spacing, even if 'auto spacing' is enabled

Sketcher/Grid: apply a default factor of 10 for 'auto spacing' if number of subdivision is 1
2023-02-25 23:13:55 +01:00
Abdullah Tahiri
f9e0c1fd57 Sketcher: Grid - correction of design decisions
===============================================

Removal of ViewProviderGridExtension properties:
-GridStyle
-GridSnap

Improvement of ViewProviderGridExtension API:
- color via App::Color

Toolbar grid command:
- Conversion of Snapping to edit parameter
- Snap gets a class enum to support future Snapping functionalities as edit parameter

Sketcher Settings:
- Removal of snap preference

Behaviour:
- ShowGrid, GridAuto, GridSize preferences do not change any existing VP. They apply to any newly created sketch.
- Do not limit grid to hardcoded values

Snap to grid:
- Code updated to use closestpoint functionality provided by the extension,

Several other fixes
2023-02-25 23:13:55 +01:00