Commit Graph

2427 Commits

Author SHA1 Message Date
Pieter Hijma
788fe423e8 Doc: Improve App::DocumentObject documentation
It also improves documentation from other files for relevant dependent
functions.
2026-01-12 08:39:48 +01:00
Pieter Hijma
d0b1191b2d Doc: Move App::DocumentObject documentation
App::DocumentObject had docstrings both in the cpp file and in the
header file.  All documentation has been moved to the header file. In
cases where documentation existed in both the header and cpp file, the
documentation has been reconciled.
2026-01-12 08:27:51 +01:00
Kacper Donat
800990bacd Part: Introduce PreviewUpdateScheduler
This commit introduces PreviewUpdateScheduler class that is responsible
to schedule the true recompute of the preview. View Providers (or other
components) can use this service to ask for the preview recompute to
happend at a time that is convinent for a program and that won't impact
performance.

The provided implementation uses Queued Connections in Qt to calculate
preview essentially on next run of the event loop. It allows business
logic in FreeCAD (like property propagation) to execute fully and then
recompute preview once. This greately reduces number of recompute calls
for previews.
2026-01-11 20:32:50 -06:00
tritao
69058376e6 Base: Remove Boost-based signals and switch to FastSignals. 2026-01-07 21:16:16 +00:00
wmayer
f9cbeb91b1 Simplify code using xerces namespace 2026-01-07 14:37:59 +01:00
Max Wilfinger
3cdc42fd58 Merge pull request #25897 from marioalexis84/fem-magnetic_flux_density 2026-01-07 10:15:20 +01:00
drwho495
9b64da827a TopoNaming: Improve ElementMapVersion definition. (#26691)
This change makes the program only mark an object's ElementMapVersion with the "1" prefix if the object has a hasher AND an element map.
2026-01-06 15:36:19 +00:00
Yash Suthar
9e22524e11 Core: Fix premature merge of property in debug mode
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
2026-01-05 17:51:47 +01:00
freecad-gh-actions-translation-bot
2592406b35 Update translations from Crowdin 2026-01-05 08:47:20 +01:00
chris
6df651b5c8 partdesign: fix issue #25811 while not breaking #14720 topo naming 2026-01-02 18:52:30 +01:00
drwho495
e9ea3d0d25 TopoNaming: Enable migration code for 1.0.X -> 1.1 (#26538) 2025-12-30 13:24:09 +01:00
Yash Suthar
ee7d84bb03 Fix : added empty link check to prevent null entry in document link map (#26406)
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
2025-12-29 17:35:01 +01:00
freecad-gh-actions-translation-bot
7fe10f7436 Update translations from Crowdin 2025-12-29 11:31:39 +01:00
PhoneDroid
8abd25c999 [ App ]: Update SPDX License Identifiers 2025-12-25 11:55:37 -06:00
Christoph Moench-Tegeder
4f4f4425aa Include sys/sysctl.h on FreeBSD when using sysctl()
The ApplicationDirectories::findHomePath() on BSD uses sysctl()
to find the path to the running executable. On FreeBSD, we need
to include sys/sysctl.h for that - and as it is not included anywhere
else, add it to the includes directly in front of this function,
with a suitable ifdef.
2025-12-19 20:55:52 -06:00
Yash Suthar
dbd2bade1e Part: added floating point fallback in PropertyLinks::_updateElementReference
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
2025-12-19 10:52:26 +01:00
Syres916
26cc33ecfb [Core] Fix macro path append to sys.path 2025-12-18 13:19:21 -06:00
Chris Hennes
55a55725eb App: Compiler warning cleanup 2025-12-17 10:41:27 -06:00
marioalexis
0f148f6e63 Base: Add millitesla unit 2025-12-16 14:26:31 -03:00
drwho495
88b5cde45f Implement Fix
Switch from checking child tag to checking the materTag
2025-12-15 11:17:42 -06:00
Kacper Donat
fc93004c89 Gui: Improve transform UI responsivness
This introduces much faster CenterOfMassProvider#supports method that
can be used as cheap pre-check to see if the object supplied could have
the center of mass and so delay the domputation to a moment where it is
actually needed.
2025-12-15 09:18:27 -06:00
luzpaz
5c0ff4bd8a Fix typos
Fixes various documentation/source-comment typos
2025-12-12 13:59:38 +01:00
PaddleStroke
893a9d19b6 Core: move getPlacementProperty to be more accessible (#26088)
* Core: move getPlacementProperty to be more accessible

* Update DocumentObject.h

* Update DocumentObject.cpp

* Update ViewProviderDragger.h

* Update ViewProviderDragger.cpp

* Update DocumentObject.h

* Update DocumentObject.cpp

* Update ViewProviderLink.cpp

* Update DocumentObject.h

* Update DocumentObject.cpp

* Update DocumentObject.h
2025-12-12 11:59:03 +00:00
PaddleStroke
7a8135d863 Core: Add getPlacementOf replacing previous getGlobalPlacement logic. (#26059)
* Core: Add getPlacementOf replacing previous getGlobalPlacement logic.

* Update src/App/DocumentObject.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update DocumentObject.cpp

* Fix error when called from python with targetObj == None

---------

Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-12-10 22:47:20 +01:00
freecad-gh-actions-translation-bot
f7483a08b4 Update translations from Crowdin 2025-12-08 22:31:48 -06:00
Frank David Martínez M
d7a7416398 [Core] FreeCADInit and FreeCADGuiInit refactoring (#23413) 2025-12-04 11:10:53 -06:00
Chris Hennes
dfb9baf678 Merge pull request #24262 from mnesarco/pyi-fixes-1 2025-11-29 20:23:37 -06:00
PaddleStroke
79f66b75f3 Datums: Prevent 'doesn't contain feature with role' error on load 2025-11-28 12:08:38 +01:00
github-actions
68cb0a3270 Update translations from Crowdin 2025-11-25 21:20:42 -06: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
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
Logstor
e802aa1821 Removed sys in 'from os import sys, path' 2025-11-20 20:13:16 -06:00
David Carter
f4e78e3163 Materials: Assigning material without appearance
Assigning a material without an appearance reset the appearance to the
default appearance.

There were two main problems. One was the comparison function for
App::Material objects. It would return false when the UUID or MatType
values were different although there are many circumstances where this
could be true and the appearance be the same. It also incorrectly
compared the imagePath.

The second problem was the logic for detecting if an object has already
been assigned an appearance by assigning a material or manually setting
the appearance. If assigned a material, the appearance should update but
not if it has been set manually. This logic has been corrected.
2025-11-17 17:43:14 +01:00
Chris Hennes
4d0c35dd2d Core: Convert transparency to alpha (#24891)
* Core: Convert transparency to alpha

Create new `Base::getVersion()` function for extracting a program
version enumeration given a version string.

Convert transparency to alpha value for old project files.

* Base/App: Address review comments

---------

Co-authored-by: wmayer <wmayer@freecad.org>
2025-11-17 17:15:19 +01:00
Pieter Hijma
0083364dbe Doc: Improve the documentation of transactions (#21494) 2025-11-14 12:52:13 -06:00
github-actions
8432fab0a9 Update translations from Crowdin 2025-11-11 23:44:18 -06:00
Frank Martinez
3561d25c2d [License] Fix pyi license headers. 2025-11-11 13:26:18 -05:00
Frank Martinez
7fe379e5ea [bindings] remove redundant signatures. batch1 2025-11-11 13:23:10 -05:00
Frank Martinez
1cf57d6e11 [bindings] Format with yapf (precommit will reformat) 2025-11-11 13:23:10 -05:00
Frank Martinez
1b0c0399e9 [bindings] Fix overload order 2025-11-11 13:23:10 -05:00
Frank Martinez
a3232103d5 Fixed docstrings 2025-11-11 13:23:10 -05:00
Frank Martinez
39d15c011e black formatting 2025-11-11 13:23:10 -05:00
Frank Martinez
47e3162dcb [bindings] re-shape some keyword-only signatures 2025-11-11 13:23:09 -05:00
Frank Martinez
0eae00b9a1 [bindings] Code formatting 2025-11-11 13:23:09 -05:00
Frank Martinez
748004b4e4 [bindings] fix signatures in pyi files 2025-11-11 13:16:26 -05:00
Frank Martinez
8c7f381416 [bindings] Document 2025-11-11 13:08:06 -05:00
Frank Martinez
33f605a125 [bindings] ComplexGeoData 2025-11-11 13:08:05 -05:00
Frank Martinez
f1248c2418 [bindings] ApplicationDirectories 2025-11-11 13:08:05 -05:00
Florian Foinant-Willig
ee34d09f7a Core: add a check on object deletion 2025-11-09 16:44:40 -06:00
Max Wilfinger
aeb83b3c05 App: Apply code review suggestions 2025-11-02 17:38:06 +01:00