Commit Graph

29650 Commits

Author SHA1 Message Date
PaddleStroke
223877873b Sketcher: Offset & tranforms: enable external geos input. (#17615)
* Sketcher: Offset & tranforms: enable external geos input.
* Sketcher: enable delGeometries to handle external geos.
2024-11-25 10:57:16 -06:00
Syres916
d26fa7047c [Part] [Post 1.0] Preferences > Shape view > Maximum angle deflection warn user... (#16007)
* [Part] Preferences max angle deflection alert

* [Part] Comment added as requested
2024-11-25 10:50:58 -06:00
wandererfan
2ff1a2b6de [TD]fix area calculation 2024-11-25 17:49:21 +01:00
paul
cb328a6ce7 [Draft Gui_Stretch] Improve Stretch Rectangle Behaviour (#18063)
* [Draft gui_stretch] Improve Stretch Rectangle Behaviour

Feature Improvement discussed at FreeCAD Forum :
- https://forum.freecad.org/viewtopic.php?t=92124#p792118  (Draft_Stretching the whole rectangle creates a new wire)

Currently, 3 cases in general, proposed PR improve Case 3 below :

1. The original object is a Rectangle, if after stretching it is no longer a rectangle, it makes a copy turning it into a Wire which reflect the result of stretching.
   - Current behanviour is good for user, no change.
2. If after stretching it is still a rectangle, the code just resize the original.
   - Current behanviour is good for user, no change.
3. Now, if the user 'stretch' the whole rectangle, the code creates a copy as DWire in the 'stretched location'.
** - Users find this not intuitive, better just move the whole rectangle.
2024-11-25 14:47:06 +01:00
Roy-043
af71f75b9a BIM+Draft: Bring back human figure
* For the human figure attached to the Draft grid a hard-coded point list is used (instead deriving the points from human figure.brep). This is more efficient and avoids a dependency on the BIM WB.
* The default for the human figure preference of the grid was changed to false. And the tooltip adjusted.
2024-11-25 13:34:53 +01:00
Roy-043
7ff12bace9 Draft: minor improvements for gui_edit.py (#17970)
* Draft: minor improvements for gui_edit.py

* Fix error...
2024-11-25 13:34:23 +01:00
Roy-043
a52487b7a2 BIM: Fix calculation of fence sections (#18042)
* BIM: Fix calculation of fence sections

The length  and placement of fence sections was only correct if they were cut to size.

* Fix required another change.
2024-11-25 12:24:39 +01:00
Roy-043
542bb5a1fe Increase the delay to be on the safe side. 2024-11-25 11:40:55 +01:00
Roy-043
83a5eaeef4 Draft: avoid listing status bar widgets in toolbar area context menu
Fixes #16832.

In V1.0 the two Draft status bar widgets appear as checkboxes without label in the toolbar area context menu. They should not be listed in that menu, as was the case in V0.21. Their visibility is controlled via preferences.

Additionally, in case the Draft WB is only preloaded, the widgets would display in another workbench. This is prevented by using a delay.
2024-11-25 11:40:55 +01:00
mosfet80
cf64d095ec [App] clean AppJtReader.cpp (#15626)
Clean code
2024-11-22 11:25:42 -06:00
marioalexis
3fa067c632 Fem: Avoid legacy Netgen meshing if there is no referenced shape - fixes #17814 2024-11-22 12:24:46 -05:00
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
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
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
2b4b8e4479 PD: Cleanup code of TaskRevolutionParameters 2024-11-22 11:59:21 -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
Yorik van Havre
6388b8669e BIM: Support for additions/subtractions in NativeIFC - fixes #16631 2024-11-22 11:38:36 -05:00
haruka tsubota
cabdea2764 Add help message about customizing BOM export file format in Assembly workbench 2024-11-22 11:35:00 -05: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
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
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
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
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
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