Commit Graph

39285 Commits

Author SHA1 Message Date
marioalexis
be8dfbfc7e Fem: Add preference entry to set Gmsh log verbosity - fixes #17673 2024-11-22 12:24:11 -05:00
mwganson
a9554c2fe0 [Part CheckGeometry] add results entry for valid shapes without any errors, show skipped objects, add report view generator link in results panel label, addresses issue #17545 2024-11-22 12:22:01 -05:00
Chris Hennes
64f63ae97e Merge pull request #15528 from ppphp/move_some_inventor
refactor: move some nodes to Inventor folder
2024-11-22 12:20:50 -05:00
bdieterm
b63ba9b4f4 Gui: improve performance of macro execution and fix time measurement
This commit improves the performance of Python code from FreeCAD macros by:
* using the chrono C++ stdlib header instead of QTime
* checking for the elapsed time ONLY every 1000th Python opcode execution

And this commit fixes time measurement by using a monotonic time source
instead of a normal one.
The previous implementation using QTime would give a negative time duration
if the start time is 23:59:59 and the end time is 00:00:01.

related commit: e78f74b01a
2024-11-22 12:20:14 -05:00
Kim Kirwan
a0e0713fef Repair XML Files - fixes #10730
In ../src/Mod/Part/App/Geom2d/ sixteen out of seventeen XML
files needed repair as per the GitHub issue. Tabbing in those
sixteen files set to 4-spaces no-tab-chars. Other minor
changes as needed.
2024-11-22 12:18:11 -05:00
PaddleStroke
979075ce0d Assembly: Pressing Esc while a task is active will not escape edit mode 2024-11-22 12:15:57 -05:00
luzpaz
6034f06383 Gui: Remove newline from dialog string
This commit removes superflous newline that disrupts the flow of the sentence displayed in the VarSet dialog. See #16776
2024-11-22 12:13:53 -05:00
huguesdpdn-aerospace
bc94cbb97e Bump OndelSolver version - Include compilation fix for Ubuntu with old GCC versions 2024-11-22 12:12:06 -05:00
Chris Hennes
500e5bed1c Merge pull request #17767 from wwmayer/issue_17764
Core: Avoid cyclic dependencies when dragging an object into a group
2024-11-22 12:11:15 -05:00
Chris Hennes
b15bcbf8d1 Merge pull request #17170 from marioalexis84/fem-netgen_local_refinement
Fem: Add local refinement and second order linear for Netgen meshing
2024-11-22 12:05:39 -05:00
wmayer
3db3f7546d Gui: Add overloaded function Document::openEditingView3D(const App::DocumentObject*) 2024-11-22 12:00:56 -05:00
Pieter Hijma
e63c335e05 Gui: Improve localization support in VarSet dialog (#17480)
* Gui: Improve localization support in VarSet dialog

* Gui: Adopt QObject translate

This is not the ideal implementation but for the 1.0 release this is
currently the better option.  A separate issue has been filed for post
1.0 in https://github.com/FreeCAD/FreeCAD/issues/17510 that also covers
the `DlgAddProperty`.
2024-11-22 11:00:19 -06:00
wmayer
28282e6800 PD: Cleanup code of TaskRevolutionParameters 2024-11-22 11:59:21 -05:00
mosfet80
841a10f2e0 Clean FindKDL.cmake
update orocos version used by oldest supported focal fossa
clean cmake
2024-11-22 11:53:12 -05:00
mwganson
d8286158b0 [PartDesign] change claimChildren() function to include all profile objects except for other Part Design features 2024-11-22 11:51:30 -05:00
Yorik van Havre
73f3cd9f95 BIM: Only dusplay context menu items when in BIM WB - fixes #17043 2024-11-22 11:48:03 -05:00
Benjamin Nauck
19fa91253f Remove octal in expressions when there's a leading zero 2024-11-22 11:47:18 -05:00
Yorik van Havre
4bdb104bed BIM: Support for additions/subtractions in NativeIFC - fixes #16631 2024-11-22 11:38:36 -05:00
Zbyněk Winkler
d2e407d096 Improve/fix debian docker build (#17003)
* fix paths following past renames

* add missing dependencies

* switch to debian:12 (bookworm)

* patch opencascade to silence warnings
2024-11-22 10:37:33 -06:00
haruka tsubota
2c1348fdc2 Add help message about customizing BOM export file format in Assembly workbench 2024-11-22 11:35:00 -05:00
mosfet80
5e21dd3b37 Delete src/Tools/generateTemplates/templateModuleGui.py
the file is never used
2024-11-22 11:34:08 -05:00
wmayer
be1622176c Core: Fix dangling pointer in SoFCUnifiedSelection::setSelection
This fixes #17965: Measurement: Crash when clicking on COM label
2024-11-22 17:02:28 +01:00
wmayer
aea09d4a45 MSVC: Fix compiler warnings 2024-11-22 16:53:00 +01:00
wmayer
6f23f01e50 Tests: Add unit test for PR #16763 2024-11-22 12:05:30 +01:00
wmayer
2137dbc8d0 Tests: Add unit test for PR #16576 2024-11-22 12:02:30 +01:00
wmayer
98fec525b0 PD: move refine model parameter to separate function 2024-11-22 11:59:49 +01:00
wmayer
0e0df5b92e Part: move refine model parameter to separate function 2024-11-22 11:59:49 +01:00
wmayer
e299c46a94 Part: move model check to separate function
This is to avoid code duplication.
2024-11-22 11:59:49 +01:00
wmayer
f3d84b601f PD: Fix convoluted event handling of dress-up task boxes 2024-11-22 11:55:46 +01:00
wmayer
a4bc06219b Tests: Add unit test to explore a null shape 2024-11-22 10:52:45 +01:00
Max Wilfinger
2197d626b4 Update PROBLEM_REPORT.yml
Add "needs confirmation" as default tag for new issues.
2024-11-22 07:50:01 +01:00
wmayer
5771c94523 App: Apply clang format (part 2) 2024-11-21 21:17:42 +01:00
wmayer
fcea9343b3 Mesh: Fix linter warnings 2024-11-21 21:16:55 +01:00
wmayer
7a2bfb7370 Mesh: Fix linter warnings 2024-11-21 18:30:22 +01:00
wmayer
4e82a0af48 App: Apply clang format (part 1) 2024-11-21 07:54:24 +01:00
wmayer
ee18317e08 Part: Expose Geometry::isSame() to Python 2024-11-20 23:37:39 +01:00
wmayer
2819ca438e Start: fixes #17857: Icon-files of the startup screen are not removed from /tmp
It's basically a port of #10951 to the new start page implementation.

Note: Icon files are not removed but re-used instead.

The commit adds some new functions:

* getThumbnailsImage()
  Returns the name of the PNG inside a project file

* getThumbnailsName()
  Returns the directory name containing the image files

* getThumnailsParentDir()
  Returns the parent directory of the directory containing the image files

* getThumbnailsDir()
  Returns the path to the thumbnail directory. There is no need to always create a unique directory
  after each restart because it doesn't harm if the thumbnail directoy contains deprecated files.

* createThumbnailsDir()
  Creates the thumbnail directoy if it doesn't exist yet.

* getSha1Hash
  Helper function to compute a SHA-1 hash of a given path. If the same path is passed
  then the hash value will be the same.
  This way it can be avoided to create a different image file from a project file
  after each restart.

* getUniquePNG
  Computes the path of a PNG image file for a given project file. It's also possible
  to pass an arbitrary string as argument.

* useCachedPNG
  If the PNG image exists and if it's newer than the project file True is returned
  and False otherwise.

For a given project file it is checked if the thumbnail directory already contains
a cached image. If it's newer than the project file it will used, otherwise it will
be re-created.

Fix freecadCanOpen() abd DisplayedFilesModel::addFile() to also check for lower-case
file extensions.
2024-11-20 09:44:35 -05:00
wmayer
22782e53f3 Core: Add method ProjectFile::containsFile 2024-11-20 09:44:35 -05:00
Benjamin Bræstrup Sayoc
cdb92768fe [TechDraw] Return logic simplification (#16504)
* [TechDraw] AppTechDrawPy.cpp return logic simplification

* [TechDraw] CosmeticExtension.cpp return logic simplification

* [TechDraw] DrawBrokenView.cpp return logic simplification

* [TechDraw] HatchLine.cpp return logic simplification

* [TechDraw] LineGenerator.cpp return logic simplification

* [TechDraw] Preferences.cpp return logic simplification

* [TechDraw] ShapeExtractor.cpp return logic simplification

* [TechDraw] MDIViewPage.cpp return logic simplification

* [TechDraw] QGILeaderLine.cpp return logic simplification

* [TechDraw] QGIRichAnno.cpp return logic simplification

* [TechDraw] QGTracker.cpp return logic simplification
2024-11-18 16:14:47 -03:00
Jiří Pinkava
f9ba94c70b Sketcher: refactor, drop return in void returning functions 2024-11-18 12:21:25 -05:00
mosfet80
0fee326c54 [cmake] clean InitializeFreeCADBuildOptions.cmake
cmake version is always greater than 3.4.3
The verification is done in the cmakefile in the root folder
2024-11-18 12:14:39 -05:00
mosfet80
8f0e61bffd [Mod] clean FemMesh.cpp
Removed dead code
2024-11-18 18:01:59 +01:00
Kris Slyka
2f6329d6e7 [tools] fcinfo: fix syntax warnings and improve output for git diffs (#16312)
* Fix syntax warnings about invalid escape sequences

Backspaces in regular expressions were not escaped properly leading to warnings on every invocation of the program.

* Improve formatting of fcinfo output

* Printing of part BREP file properties (hash and size) has been made optional since these values often change without explicit user action making git diffs almost unreadable by hiding actual changes behind a flood of changed hashes because a base feature further up the history was changed. There is a new option (-p) to re-enable the printing of these file properties.

* Unformatted float outputs have been replaced with proper formatting using f-strings which round the values to a sensible number of places.

* Colors are printed in their native 0-255 range. Printing them as float brings no benefit here.

* Most string concatenation for output has been replaced with f-strings

* Fix printing of color properties
2024-11-18 17:52:16 +01:00
Jiří Mácha
71f0104bb2 Assembly: fixed defect in the migrationScript4 function
The old CAD model created by the development version of FreeCAD
(in which the Assembly workbench was used) contained joints that,
for some reason, had an empty Joint Connector 1 reference (Reference1).

This was causing an exception and a crash of the Python function
called migrationScript4. The FreeCAD Report view contained:

23:28:29  pyException: Traceback (most recent call last):
  File "/FreeCAD/Mod/Assembly/JointObject.py", line 175, in onDocumentRestored
    self.createProperties(joint)
  File "/FreeCAD/Mod/Assembly/JointObject.py", line 181, in createProperties
    self.migrationScript4(joint)
  File "/FreeCAD/Mod/Assembly/JointObject.py", line 514, in migrationScript4
    if hasattr(joint, "Reference1") and joint.Reference1[0] is not None:
                                        ~~~~~~~~~~~~~~~~^^^
<class 'TypeError'>: 'NoneType' object is not subscriptable

This patch attempts to avoid such exceptions by validating the type of
the property variable before accessing it.
2024-11-18 17:46:44 +01:00
PaddleStroke
a049641771 Assembly: Store DocumentObject instead of mbdPart for the dragged parts. Fixing the bug where doDragStep was 50% of time failing to find the correct DocumentObject due to bundling. 2024-11-18 17:43:53 +01:00
Benjamin Nauck
3875c306ac Spreadsheet: Double click separator to resize to content
Qt handles resize to content on double clicking the separator in the header, by default.
However this does not work in FreeCAD.

There are no comments on why this was done and is therefore treated as bug instead of feature.

Manual testing has been performed after the change and:

* Scaling by double clicking separator in header works
* Sizes are correctly stored in sheet when resizing to content
2024-11-18 09:12:22 -05:00
bgbsww
d8d35f133d Contribute helper files for CLion debugging 2024-11-18 08:55:56 -05:00
hasecilu
4c1f94f6c2 Addon Manager: Show repository URL if it exists on the metadata
Fix: #14777
2024-11-18 08:51:15 -05:00
hasecilu
8619b03bbc Addon Manager: Show involved branches' names on branch change operation
Fix #12969
2024-11-18 08:47:52 -05:00
Yorik van Havre
36cf031f0b BIM: Fixed image loading of the tutorial - fixes #17863 2024-11-18 14:22:44 +01:00