Commit Graph

37179 Commits

Author SHA1 Message Date
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
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
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
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
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
wmayer
6e1e832039 Core: Fix flaw in XMLReader class
Remove implementation details of the Document class from the XMLReader class.
Instead keep an array of failed files and check them in the calling instance.
2024-11-17 08:34:03 +01:00
Yorik van Havre
1309208603 BIM: Optimized leader UI (#17310)
* BIM: Optimized leader UI - fixes #17284

* Correct task panel icon for BIM Leader.
* Make BIM Leader task panel title translatable.
* Use a single mode parameter for the Line class.

---------

Co-authored-by: Roy-043 <info@b-k-g.nl>
2024-11-16 18:10:04 +01:00
Roy-043
3f15242ad1 Draft: fix tray construction mode button for Light and Dark themes (#17886)
Fixes #17869.
2024-11-16 18:04:26 +01:00
Gauthier Brière
740f5f18df [Draft] add font path relative (#17819)
* Permit a font file path relative to the FreeCAD file

* Use obj.Document instead of App.ActiveDocument

* use filename = instead of directory =
2024-11-16 18:02:02 +01:00
Yorik van Havre
87779387cc Draft: minor fixes (#17793)
- more tolerance on faultly solids in shape2Dview
- fixed display of dimensions in arch override unit
2024-11-16 17:52:55 +01:00
Roy-043
bb89edc83e Draft: Fix extra_scale error in hatch.py (#17715)
Fixes #17712.
2024-11-16 17:49:35 +01:00
Yorik van Havre
37f50c1b10 Draft: Independence from BIM (#17444)
* Draft: Independence from BIM - follow-up of #17390

* Draft: More info in DXF importer if BIM not present
2024-11-16 17:48:28 +01:00
Chris Mayo
cea8d25c11 Draft: Make startup and tests independent of BIM (#17390) 2024-11-16 17:43:46 +01:00
marioalexis
011ff2e34b Fem: Set mesher task panel log text to read-only 2024-11-16 14:31:48 +01:00
marioalexis
7eed9e317d Fem: Adapt FemPostObject transparency to changes made in #ffa3fa5b5a 2024-11-16 12:49:47 +01:00
Max Wilfinger
fc3996b53f Merge pull request #17637 from furgo16/patch-3
Reword rigid/flexible sub-assemblies tooltip.
2024-11-16 10:03:52 +01:00
Furgo
2577cc9cf0 Re-add the note about right click, with more context 2024-11-16 07:15:05 +01:00
luzpaz
a633be7342 Fix various typos
Found via codespell.
2024-11-15 20:18:46 +01:00
OfficialKris
4d4c4fc708 Modified text of all items on help menu
Used ToolTipText for StatusTip on all menu items
Modified some of the MenuTexts
Modified some of the Pixmaps
2024-11-15 18:57:39 +01:00
Furgo
a5c7fc98ca Reword error log to be more verbose 2024-11-15 18:53:00 +01:00
OfficialKris
5e124f0472 Moved items in the Help menubar 2024-11-15 18:51:14 +01:00
Benjamin Bræstrup Sayoc
e097db8067 [Gui] Vertically center method icon in calltips 2024-11-15 18:47:53 +01:00
marioalexis
934b535c98 Fem: Minor change to Mesh task panels and renaming Gmsh mesh properties group 2024-11-15 18:46:58 +01:00
Max Wilfinger
665bee5e5a Merge pull request #15957 from hasecilu/fix/capitalization
TechDraw: Fix capitalization of 2D and 3D
2024-11-15 18:37:47 +01:00
Max Wilfinger
e8b7fac134 Merge pull request #16535 from WandererFan/translationFixes317And335
[TD] Translation fixes (fix #317 fix #335)
2024-11-15 18:36:44 +01:00
luzpaz
efd4232112 STEP: Rename generic Import/Export dialog title
Closes #16415
2024-11-15 18:36:09 +01:00
wmayer
3c1bf8e864 Core: Extend Color API
* Fix issues with alpha value <> transparency
* Use type traits to convert between different color classes (fixes #14515)
2024-11-15 12:25:25 -05:00
Syres916
e5c3d25316 [Base] Give user feedback on failing to read StringHasherTable 2024-11-15 12:19:25 -05:00
Syres916
6a6699ac86 [Sketcher] Assist user in finding the sketch with the error 2024-11-15 12:15:59 -05:00
Max Wilfinger
82f268f2b4 Merge pull request #14959 from yorikvanhavre/bim-ifc-icons
BIM: Specific IFC icons
2024-11-15 18:11:00 +01:00