Commit Graph

37137 Commits

Author SHA1 Message Date
wmayer
65dbd776fb Core: Fix crash when loading a file with v0.21 that was created with v0.22
In v0.22 a version number -1 is added to the material files to distinguish between old and new project file.
But v0.21 doesn't know about this version number and interprets it as number of elements instead.
Because this value is assigned to an unsigned type the value becomes 2**32 - 1. Now trying to create a container of this size requires > 280 GB
of RAM. On most systems FreeCAD new handler will jump in and raises a memory exception to stop the allocation. But an other systems with
plenty of RAM it's tried to allocate the memory and then may crash at some point.

This PR fixes this regression. It puts the version number to the MaterialList XML element as an optional attribute.
With this change FreeCAD v0.22 is still able to load projects that have been created prior to this change.
Additionally FreeCAD v0.21 can again load project files without crashing.

For more details see: https://forum.freecad.org/viewtopic.php?t=87268
2024-05-06 17:56:25 +02:00
marioalexis84
1e4ed56010 Fem: Rescaling and transparency fix for heat constraint symbols (#13723) 2024-05-06 10:54:57 -05:00
marioalexis
0cee0e9f50 Fem: Save and restore custom colors of elements in mesh - fixes #6131 2024-05-06 17:53:39 +02:00
PaddleStroke
4442fa709e Sketcher: Dimension tool : add arc length 2024-05-06 17:50:17 +02:00
wmayer
44af4555c0 Part: Create CompSolid/Compound/Shell if null before adding a sub-shape
Creating a shape with Part.CompSolid(), Part.Compound() or Part.Shell() is a null shape. In order to allow to append sub-shapes with the add()
method a valid shape must be created beforehand.

This fixes #13208
2024-05-06 17:45:58 +02:00
Bas Ruigrok
98320cc839 Gui: Improve lookAtPoint (#13556)
* Gui: Rename NavigationStyle::pan to setupPanningPlane

* Gui: Replace duplicate code with NavigationStyle::setupPanningPlane

* Gui: Use panning plane when hit point not found in lookAtPoint

Also enables navigation animations when pressing MMB while the mouse is not over an object

* Gui: Remove unused methods
2024-05-06 10:45:14 -05:00
sliptonic
f3590de466 Merge pull request #13529 from davesrocketshop/hardness_units_pr
Materials: Update Material Models
2024-05-06 10:43:32 -05:00
bgbsww
4022e4151e Ensure we set up a valid sketch even with invalid external references 2024-05-06 17:42:38 +02:00
wmayer
34837d7e9f PD: Fix crash when adding sketch to loft via tree view
The underlying problem is the method DocumentItem::updateItemSelection() where
the selection is altered. This may cause the destruction and recreation of the
DocumentObjectItems so that the passed pointer can become dangling.

The issue is fixed in two steps:
1. Add the method 'DocumentObjectItem *findItem(App::DocumentObject* obj, const std::string& subname) const'
   to safely re-access the item.
2. Add a boolean flag 'dirtyFlag' and the methods insertItem() and removeItem() to DocumentObjectData.
   This is needed to check when the iterator over the container becomes invalid.
2024-05-06 17:38:59 +02:00
sliptonic
f4a961e8f0 Merge pull request #13668 from Ondsel-Development/RefactorPostCommand
Refactor post command
2024-05-06 09:49:28 -05:00
sliptonic
b39d29ac9d Merge pull request #13667 from Ondsel-Development/refactorsanity
refactor Sanity
2024-05-06 09:48:59 -05:00
WandererFan
32f0581536 Merge pull request #13842 from WandererFan/fixDimRotation3
[TD]fix dimension autocorrect
2024-05-06 08:44:03 -04:00
Furgo
96e5c52909 Revert missed change on the last commit 2024-05-06 11:32:10 +02:00
Furgo
7cf6e58ba3 Look up materials with full path. Revert changes to the Material namespace 2024-05-06 11:32:10 +02:00
Furgo
20fe2aabee Arch: adapt materials to new Materials path scheme 2024-05-06 11:32:10 +02:00
Roy-043
1e49201b6c Clean up... 2024-05-06 11:07:23 +02:00
Roy-043
543f758f23 More files are involved... 2024-05-06 11:07:23 +02:00
Roy-043
6c2bdabc3d Draft: Do not show temporary line object in tree (additional)
#13778 introduced `self.obj.ViewObject.ShowInTree = False` to hide the temporary object. But objects that are hidden in the tree are displayed in the tree when they are selected in the 3D view. This selection occurs during commands that take more than 2 points. The solution is to change `self.obj.ViewObject.Selectable` on mouse button up/down.

Fixes #13700.
2024-05-06 11:07:23 +02:00
Chris Hennes
68ed7c1503 cMake: Restore wrappers for QtWebEngine 2024-05-06 08:08:35 +02:00
wandererfan
5c8b216567 [TD]fix dimension autocorrect
- autocorrect was not handling scaled and rotated reference geometry
  properly.
2024-05-05 20:38:14 -04:00
Chris Hennes
984e4df2a1 Themes: Explicitly remove Editor/Text setting in Classic 2024-05-05 13:46:14 +02:00
sliptonic
2a4090b40d More work on unit tests
Avoid unnecessary reloads from disk
2024-05-04 08:24:00 -05:00
WandererFan
ac1972cf97 Merge pull request #13790 from pavltom/techdraw_split_sheet_autofill
[TechDraw] Issue #13661 - Split sheet autofill to separate values
2024-05-04 09:15:04 -04:00
Max Wilfinger
623eaf8fb7 Changing the stop icon from a green one to a red one. 2024-05-03 14:50:59 -05:00
Chris Hennes
1a72e7559a Merge pull request #13773 from bgbsww/bgbsww-toponamingMissingAppMethods
Toponaming: Add toponaming missing methods in app
2024-05-03 13:44:09 -05:00
bgbsww
920032c5a0 Lint corrections 2024-05-03 12:07:02 -04:00
sliptonic
046c555c9e add generic post processor 2024-05-03 10:16:41 -05:00
sliptonic
c97e199a28 Make Job gui work with new PostProcessor class 2024-05-03 10:16:41 -05:00
sliptonic
798e93b480 fix test script 2024-05-03 10:16:41 -05:00
sliptonic
8022d7df40 Major refactor on post stack 2024-05-03 10:16:41 -05:00
sliptonic
d327ceb65b findParentJob will now return the original object if it is a job rather than None 2024-05-03 10:16:41 -05:00
wmayer
d94f01614b Core: Set tab title for MDIViewPyWrap 2024-05-03 14:18:00 +02:00
Dov Grobgeld
5e37bf11f5 Add <algorithm> include and remove explicit 3rdparty/GSL include reference 2024-05-03 14:17:09 +02:00
Roy-043
d87ea7efdc Merge pull request #13803 from Roy-043/Arch-Arch-Schedule-allow-2-and-3-in-unit-string
Arch: Arch Schedule allow ^2 and ^3 in unit string
2024-05-03 10:04:27 +02:00
bgbsww
b80d628c69 Merge branch 'main' into bgbsww-toponamingMissingAppMethods 2024-05-02 22:43:36 -04:00
WandererFan
768598d4d2 Merge pull request #13784 from WandererFan/defaultTemplate
[TD]add fallback default template
2024-05-02 22:15:00 -04:00
bgbsww
203731e60a Performance measurement tools 2024-05-02 18:53:39 -05:00
bgbsww
20cae6c026 Toponaming/Part: unify revolution changes 2024-05-02 18:50:02 -05:00
Roy-043
9460b2b04c Merge pull request #13798 from paullee0/ArchCurtainWall_01_add_self-Type
[ArchCurtainWall] add self.Type definition like other Arch Objects
2024-05-02 22:31:40 +02:00
Roy-043
a10062caa4 Merge pull request #13778 from yorikvanhavre/draft-hide-templine
Draft: Do not show temporary line object in tree
2024-05-02 22:28:11 +02:00
Roy-043
f3fac15f42 Arch: Arch Schedule allow ^2 and ^3 in unit string
Fixes #13796.
2024-05-02 21:31:26 +02:00
paullee
2d2647efc0 [ArchCurtainWall] add self.Type definition like other Arch Objects
All Arch Objects have self.Type defined, add here for Arch Curtain Wall.

        self.Type = "Axis"
        self.Type = "AxisSystem"
        self.Type = "Building"
        self.Type = "BuildingPart"
        self.Type = "Component"
        self.Type = "Equipment"
        self.Type = "Fence"
        self.Type = "Floor"
        self.Type = "Frame"
        self.Type = "Grid"
        self.Type = "MaterialContainer"
        self.Type = "Panel"
        self.Type = "Pipe"
        self.Type = "Precast"
        self.Type = "Profile"
        self.Type = "Project"
        self.Type = "Rebar"
        self.Type = "Reference"
        self.Type = "Roof"
        self.Type = "Schedule"
        self.Type = "SectionPlane"
        self.Type = "Site"
        self.Type = "Space"
        self.Type = "Stairs"
        self.Type = "Structure"
        self.Type = "Truss"
        self.Type = "Wall"
        self.Type = "Window"

FC Forum Discussion - https://forum.freecad.org/viewtopic.php?t=87210
2024-05-03 01:20:10 +08:00
pavltom
7bf77b5239 [TechDraw] Issue #13661 - Split sheet autofill to separate values 2024-05-02 15:34:38 +02:00
wandererfan
b59657ada6 [TD]add fallback default template 2024-05-02 07:06:58 -04:00
Yorik van Havre
aee2afdca7 Draft: Do not show temporary line object in tree - fixes #13700 2024-05-02 11:04:15 +02:00
wandererfan
5925222b2c [Admin]add privacy policy 2024-05-02 10:13:25 +02:00
Roy-043
66f36fd7d2 Draft: update Draft Point viewprovider to account for ShapeAppearance
Without this mod there is an error when opening a V0.21 file with a Draft Point. As well as when creating a Draft Point in V0.22.
2024-05-02 10:09:28 +02:00
Adrián Insaurralde Avalos
c4b5115f9e Measure: write init message to log instead 2024-05-02 08:09:39 +02:00
bgbsww
4a0df0ea6d Test for changed Sketches avoiding TNP 2024-05-01 20:29:26 -04:00
Zheng, Lei
56e32b9c98 Methods to support Toponaming element maps 2024-05-01 18:02:04 -04:00