Commit Graph

39749 Commits

Author SHA1 Message Date
marioalexis
742b8cd13f Fem: Add preference entry to set Gmsh log verbosity - fixes #17673 2024-11-22 12:24:11 -05:00
mwganson
c37e117918 [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
889c5ea516 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
b9ec2ee3db 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: beeda0e47f051722d6096c99bd949b390e197bdc
2024-11-22 12:20:14 -05:00
Kim Kirwan
bea058d280 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
d0da5f7969 Assembly: Pressing Esc while a task is active will not escape edit mode 2024-11-22 12:15:57 -05:00
luzpaz
bb66de4739 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
5852f6c7f6 Bump OndelSolver version - Include compilation fix for Ubuntu with old GCC versions 2024-11-22 12:12:06 -05:00
Chris Hennes
b1ae9ac258 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
ffcf2cedbe 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
d50e8bdfe3 Gui: Add overloaded function Document::openEditingView3D(const App::DocumentObject*) 2024-11-22 12:00:56 -05:00
Pieter Hijma
6f47183b53 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
2b4b8e4479 PD: Cleanup code of TaskRevolutionParameters 2024-11-22 11:59:21 -05:00
mosfet80
22bde65661 Clean FindKDL.cmake
update orocos version used by oldest supported focal fossa
clean cmake
2024-11-22 11:53:12 -05:00
mwganson
fb642e9c9f [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
f4d213d299 BIM: Only dusplay context menu items when in BIM WB - fixes #17043 2024-11-22 11:48:03 -05:00
Benjamin Nauck
40616bb119 Remove octal in expressions when there's a leading zero 2024-11-22 11:47:18 -05:00
Yorik van Havre
6388b8669e BIM: Support for additions/subtractions in NativeIFC - fixes #16631 2024-11-22 11:38:36 -05:00
Zbyněk Winkler
7a25eea8a9 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
cabdea2764 Add help message about customizing BOM export file format in Assembly workbench 2024-11-22 11:35:00 -05:00
mosfet80
8c68631015 Delete src/Tools/generateTemplates/templateModuleGui.py
the file is never used
2024-11-22 11:34:08 -05:00
wmayer
f71d152d66 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
ac14e2c960 MSVC: Fix compiler warnings 2024-11-22 16:53:00 +01:00
wmayer
b1f3fe9115 Tests: Add unit test for PR #16763 2024-11-22 12:05:30 +01:00
wmayer
10e9d09763 Tests: Add unit test for PR #16576 2024-11-22 12:02:30 +01:00
wmayer
4c5e3979ce PD: move refine model parameter to separate function 2024-11-22 11:59:49 +01:00
wmayer
fed93b78f3 Part: move refine model parameter to separate function 2024-11-22 11:59:49 +01:00
wmayer
23999464e4 Part: move model check to separate function
This is to avoid code duplication.
2024-11-22 11:59:49 +01:00
wmayer
01f5095aa8 PD: Fix convoluted event handling of dress-up task boxes 2024-11-22 11:55:46 +01:00
wmayer
4a4618f7d7 Tests: Add unit test to explore a null shape 2024-11-22 10:52:45 +01:00
Max Wilfinger
ba9682f38f Update PROBLEM_REPORT.yml
Add "needs confirmation" as default tag for new issues.
2024-11-22 07:50:01 +01:00
wmayer
fadfc7e270 App: Apply clang format (part 2) 2024-11-21 21:17:42 +01:00
wmayer
164f1e3813 Mesh: Fix linter warnings 2024-11-21 21:16:55 +01:00
wmayer
fbd9eac848 Mesh: Fix linter warnings 2024-11-21 18:30:22 +01:00
wmayer
6f5259af26 App: Apply clang format (part 1) 2024-11-21 07:54:24 +01:00
wmayer
463cc08f3f Part: Expose Geometry::isSame() to Python 2024-11-20 23:37:39 +01:00
wmayer
8a80ce2ca4 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
5daaf23980 Core: Add method ProjectFile::containsFile 2024-11-20 09:44:35 -05:00
Benjamin Bræstrup Sayoc
52fe0eec53 [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
00acfd5b2a Sketcher: refactor, drop return in void returning functions 2024-11-18 12:21:25 -05:00
mosfet80
2c95085def [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
a5f6846e7f [Mod] clean FemMesh.cpp
Removed dead code
2024-11-18 18:01:59 +01:00
Kris Slyka
27115e98e4 [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
2eec246e95 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
a174d87fac 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
8ea82a849c 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
250107301c Contribute helper files for CLion debugging 2024-11-18 08:55:56 -05:00
hasecilu
e5be24d422 Addon Manager: Show repository URL if it exists on the metadata
Fix: #14777
2024-11-18 08:51:15 -05:00
hasecilu
1657d46241 Addon Manager: Show involved branches' names on branch change operation
Fix #12969
2024-11-18 08:47:52 -05:00
Yorik van Havre
31d9d9d881 BIM: Fixed image loading of the tutorial - fixes #17863 2024-11-18 14:22:44 +01:00