Commit Graph

44401 Commits

Author SHA1 Message Date
Furgo
2763bb962f Assembly: Prevent zero-length line creation in ExplodedView
Safeguards the generation of explosion trail lines to avoid creating
invalid geometry.

Previously, if a part displacement was zero (or effectively zero),
`Part.LineSegment` would attempt to create a line with identical start
and end points, causing OpenCascade to throw a `Part.OCCError`. This
resulted in failures during document restoration and recomputes.

This commit introduces a `_createSafeLine` helper method that checks the
distance against a `1e-7` (near-zero) tolerance before attempting to
generate the shape.
2025-11-24 17:26:46 +01:00
Furgo
b571889ab5 App: Handle uncleared Python exceptions during object restoration
When a Python-based object throws an exception during the restoration
process (e.g. inside `onDocumentRestored`), the error is caught by a
generic `catch(...)` block in `Document::afterRestore`.

Previously, this block swallowed the C++ exception wrapper but failed to
clear the underlying Python error state. Leaving the interpreter in this
"dirty" state caused a segmentation fault or `SystemError` later in the
loading process when C++ attempted to interact with the Python API
(specifically in `App::Application::setActiveDocument`).

This commit adds a check for `PyErr_Occurred()` inside the catch block.
If an error is detected, the traceback is printed to the console for
debugging, and `PyErr_Clear()` is called to reset the interpreter state,
allowing the application to continue loading the document without
crashing.
2025-11-24 17:26:46 +01:00
pjcreath
efb10e1b28 Sketcher: prevent undo/redo crash when selected geometry goes away.
Fixes #25497
2025-11-24 08:56:48 -06:00
pjcreath
16aff10544 Sketcher: prevent crash on undo/redo while dragging.
Fixes #25500
2025-11-24 08:54:50 -06:00
xtemp09
eb0c980c1d [GUI] Handle ampersand in windowTitle 2025-11-24 08:18:28 -06:00
Chris Hennes
93eb02b09f Merge pull request #25604 from FreeCAD/dependabot/github_actions/peter-evans/create-pull-request-7.0.9
Bump peter-evans/create-pull-request from 7.0.8 to 7.0.9
2025-11-24 08:10:45 -06:00
dependabot[bot]
890ce2bb29 Bump peter-evans/create-pull-request from 7.0.8 to 7.0.9
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7.0.8 to 7.0.9.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](271a8d0340...84ae59a2cd)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-version: 7.0.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 11:59:57 +00:00
Chris Hennes
748fe5121e Merge pull request #25479 from Syres916/Fix_DlgPropertyLink_Utf8_DocumentName
[Gui] Fix string encoding for document, object and subobject names in PropertyLink, SelectionSearch, PD Sketch Based Tasks, Part Primitives and Document handling.
2025-11-23 23:32:20 -06:00
PaddleStroke
1d30d079b0 Sketcher: Rotate: Fix line length ignored (#25434) 2025-11-23 22:40:04 -06:00
Roy-043
98240a6de5 Draft: fix number_length for imperial dimensions (#25369)
* The number_length function did not take imperial dimensions into account. For `9" + 7/8"` it would return 1.
* In ArchRoof reference number_length function from DraftGui.py to avoid duplicate code.
2025-11-23 22:30:09 -06:00
FEA-eng
44bf1c35d6 FEM: Add Thick Pipe Internal Pressure 2D example (#25191)
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-11-23 22:22:27 -06:00
PaddleStroke
40e4eb8770 Assembly: BOM: fix subassembly 2025-11-23 22:20:11 -06:00
Chris
72d021108f Sketcher: allow grid snapping while hovering mouse over axis (#25226) 2025-11-23 21:50:35 -06:00
chris
d806b4e5f3 sketcher: fix issue #13852 resolve issue with state not updating constraint text 2025-11-23 23:28:51 +01:00
sliptonic
ebbddc97e2 Merge pull request #25570 from Connor9220/FixChipLoad
CAM: Ensure Chipload is restored and displayed with user-preferred units
2025-11-23 12:42:24 -06:00
sliptonic
42e6af4237 Merge pull request #25106 from davidgilkaufman/tool_migrations_custom_dir
[CAM] Offer automatic migration of tools in (old) custom working directory to the new tool system
2025-11-23 12:28:17 -06:00
sliptonic
971fd31068 Merge pull request #22738 from tarman3/bsplinesurface
CAM: Pocket BSplineSurface
2025-11-23 11:49:52 -06:00
sliptonic
e9c3b13c04 Merge pull request #25372 from tarman3/engrave_fix22380
CAM: Engrave - Fix #22380 - duplicates
2025-11-23 11:41:03 -06:00
Billy Huddleston
4432575243 CAM: Ensure Chipload is restored and displayed with user-preferred units
Fixes an issue where Chipload and similar mixin-defined properties were added to
the schema but not reliably restored, because parameter restoration did not always
apply them to the toolbit object. This change ensures Chipload is restored from saved
data and displayed using the user's preferred unit schema, even when no document
is open. This update also ensures the toolbit editor respects the user’s unit schema
preference during editing, even outside an open document.

src/Mod/CAM/Path/Tool/toolbit/models/base.py:
- Restore Chipload (and other parameters) to toolbit.obj if the property exists.

src/Mod/CAM/Path/Tool/toolbit/ui/editor.py:
- Set units schema to user preference when opening the toolbit editor, so Chipload and other values display correctly.
2025-11-23 11:45:47 -05:00
Andrew Burks
bad2989b7b #25474 Added read-only warnings when saving documents (#25532)
* #25474 Added read-only warnings when saving documents

Block saving a file and notify user if windows is unable to save to the file for any reason, or the read-only attribute is checked. Also check std::filesystem::perms for write permission and other checks in FileInfo::isWritable(), although it doesn't seem to matter on windows.

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-11-23 05:09:32 +00:00
Adrian Insaurralde Avalos
3ab8dbe194 pixi: enable building reverse engineering 2025-11-21 16:35:53 -06:00
Roy-043
63c9b176e2 BIM: fix handling of BIM_Sketch view properties (#25339)
* BIM: fix handling of BIM_Sketch view properties

The handling of the sketch view properties was not correct:
* AutoColor was not set to `False`.
* PointSize was missing.
* PointColor was not set to the DefaultShapeVertexColor preference.
* Grid values were never applied. Sketches do not have a GridSnap property and gridSize is not the correct Draft preference.
* Sketch grid snap is a global setting that affects all sketches, the code should not change that setting IMO.

* Remove trailing white space
2025-11-21 10:12:33 +00:00
Logstor
e802aa1821 Removed sys in 'from os import sys, path' 2025-11-20 20:13:16 -06:00
Jacob Oursland
f48db1f855 Enable Reverse Engineering WB.
The Reverse Engineering WB was temporarily disabled as it didn't support Qt6.As it now supports Qt6,
it is time to re-enable the WB.
2025-11-20 17:39:49 -06:00
Chris Hennes
a0419f3874 CI: Remove labels from Crowdin update workflow
Adding labels requires admin privileges, which we don't want this account to have.
2025-11-21 00:20:07 +01:00
Syres916
a10fbf2e8c [Gui] Fix string coding on selection changed 2025-11-20 21:37:05 +00:00
Syres916
76071ffbeb [Part] Fix string encoding for document name and object name 2025-11-20 20:04:48 +00:00
Syres916
83c01fae68 [Gui] Fix string encoding for document name 2025-11-20 20:02:21 +00:00
pre-commit-ci[bot]
6d8c5bd2f9 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-20 19:55:20 +00:00
Syres916
eb08fe2a78 [Gui] Fix string encoding for preselect, select and deselect 2025-11-20 19:52:12 +00:00
pre-commit-ci[bot]
23df7e4cad [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-20 19:22:23 +00:00
Syres916
d19ab48231 [Gui] Fix string encoding for document, object and subojects 2025-11-20 19:19:45 +00:00
pre-commit-ci[bot]
78bb40c419 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-20 19:04:34 +00:00
Syres916
1e30362dd4 [PartDesign] Fix string encoding for document name and face reference 2025-11-20 19:02:25 +00:00
Syres916
61db439744 [Gui] Fix string encoding for document name 2025-11-20 18:37:50 +00:00
pre-commit-ci[bot]
4c8d140373 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-20 16:31:00 +00:00
Syres916
fcd487e0ad [Gui] Fix string encoding document name and object name 2025-11-20 16:28:04 +00:00
Syres916
093a070439 [Gui] Fix incorrect document name when updating PropertyLink 2025-11-19 23:43:52 +00:00
Chris Hennes
deab0abf8e Gui: Translate 'Don't show me again' 2025-11-20 00:28:17 +01:00
PaddleStroke
2266a42009 Assembly: Make the 'ground first part' dialog closable 2025-11-20 00:27:06 +01:00
Kacper Donat
8995f43a15 Gui: Fix stylesheet loading order
For some platforms due to event loop and timer triggering being not
deterministic stylesheets could be loaded before style parameters were
fully loaded. This caused warnings about style parameters to appear
potentially confusing users.

This commit changes the stylesheet loading to happen much earlier in the
process so the stylesheet is applied before theme preselection has
chance to happen.
2025-11-19 13:00:14 -06:00
Kacper Donat
d1a8f99509 Gui: Save defaults layout after first launch 2025-11-19 10:27:20 -06:00
PaddleStroke
1cf6f5f3a6 Assembly: Fix joint on Body-LCS not working 2025-11-19 12:23:59 +01:00
PaddleStroke
be7d41dea7 Assembly/TechDraw: Fix exploded view views (#25426) 2025-11-18 15:54:51 -06:00
PaddleStroke
2a8d648ad3 Assembly: Fix crash on moving unconnected parts 2025-11-18 13:06:33 -06:00
Chris Hennes
b2a1e2a6e1 Gui: Update About banner for 1.2-dev 2025-11-18 19:58:03 +01:00
Chris
3f42824ffa Part: fix splitting of a split that is a container / group (#25293) 2025-11-18 11:48:40 -06:00
Chris Hennes
4fa7dd76f0 Merge pull request #25244 from tetektoza/fix/25232_exp_editor_regressions
Gui: Differentiate completion activation modes in Expression Editor
2025-11-18 10:10:00 -06:00
PaddleStroke
6f90c5ea61 Sketcher: ConstraintList: prevent N transaction on box selection (#25254) 2025-11-18 09:15:03 -06:00
captain0xff
5d387ae014 PartDesign: fix the interactive controls for revolution/groove 2025-11-18 15:39:42 +01:00