Commit Graph

42179 Commits

Author SHA1 Message Date
dependabot[bot]
28a61222c4 Bump step-security/harden-runner from 2.12.0 to 2.12.1
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.12.0 to 2.12.1.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](0634a2670c...002fdce3c6)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.12.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-16 11:18:56 -05:00
dependabot[bot]
a9f95f2b88 Bump github/codeql-action from 3.28.19 to 3.29.0
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.19 to 3.29.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](fca7ace96b...ce28f5bb42)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-16 11:18:46 -05:00
Benjamin Nauck
ff8e1efeba Sketcher: Refactor GeoDef and ConstrDef structs
- Fix comment for mid-point
- Use in-class member initializers instead of constructor
- Remove redundant default constructor (got redundant after initializers)
- Made comments doxygen compatible
2025-06-16 11:18:25 -05:00
tetektoza
acac7ac51b BIM: Fix Arch_SectionPlane having incorrect display style upon init
Regressed from previous behavior - there was Arch's refactor and the
base element that `SectionPlane` was inheriting from was
`App::FeaturePython`, not `Part::FeaturePython`. This changes a lot, since
`Part::FeaturePython` has predefined color (black in this case), which
later on - during property set of `SectionPlane` in properties caused
skipping of preferred setup of color.
2025-06-16 18:15:53 +02:00
Yorik van Havre
79ae800b77 Merge pull request #21826 from 3x380V/fix_21812
Spreadsheet: Re-enable zooming and fix cursor change
2025-06-16 18:10:27 +02:00
Benjamin Nauck
1cf0f8570d App: Trim “Gui::” and “NavigationStyle” more securely
By using regex we can remove prefix and suffix more securely as we can’t assume all navigation styles are formatted the same (mistakes can happen)
2025-06-16 11:07:40 -05:00
Chris Hennes
a5cc926bf5 Merge pull request #21921 from furgo16/add-prefcheckablegroupbox
Gui, Draft, BIM: Add PrefCheckableGroupBox, use it in IFC exporter preferences page
2025-06-16 11:06:30 -05:00
George Peden
13e236dfe6 Sketcher: Add contextual input hints to edit tools (InputHints Phase 3) (#21806)
* Add input hints to fillet and chamfer tools

* Add hints to trimming tool

* Add hints to splitting tool

* Implement hints for extend tool

* Add hints to external geometry

* Add hints to Carbon Copy tool

* Hint updates to align with developer guidelines

* change "click to set" to "set" per PR comments

* Use enum (or declare one) to be type safe per PR comments

* For "trivial" one-step / one-state tools, refactor with direct hint return rather than using declarative / table pattern.

* Refactor hint tables initializers with C++20 features per PR feedback

- Use designated initializers (.state = , .hints = ) for clearer structure
- Add 'using enum Gui::InputHint::UserInput' to eliminate repetitive prefixes
- Applied to DrawSketchHandlerExtend and DrawSketchHandlerFillet

* Refactor Splitting tool hint implementation with direct return (trivial) pattern

* For fillet change "vertex" to "point" per PR feedback

* Change hint to "pick location on edge to split" per PR feedback
2025-06-16 11:05:13 -05:00
Max Wilfinger
d59f404267 Gui: Center notification label and disable show report view by default (#21872)
* Gui: Center notification label and disable show report view by default

* Stylesheet: min-width: 0 for QStatusBar QPushButton
2025-06-16 11:03:58 -05:00
Furgo
272505d22b Import: DXF, handle non-standard 8859_1 encoding (#21905)
* Import: improve DXF importer exception handling

* Import: DXF, pinpoint erroneous header section when reading

* Import: tackle 8859_1 non-standard encoding name
2025-06-16 18:02:56 +02:00
Roy-043
c749270a25 BIM: fix display of help menu items after reactivation
Fixes #21873.
2025-06-16 17:54:43 +02:00
Chris Hennes
488b5e2849 Merge pull request #21924 from hyarion/fix/lcs-crash
Gui: Fix crash when creating a LCS
2025-06-16 10:42:55 -05:00
Ryan Kembrey
f338a779e0 TechDraw: Add spacing preview without OCCT calls 2025-06-16 10:41:21 -05:00
Samuel
4a52ab9f05 CAM: Show abbreviations next to properly labels in the toolbit editor (#21887) 2025-06-16 10:40:32 -05:00
Furgo
267c957a7d 3rdParty: avoid warnings from libE57Format (#21818)
* 3rdParty: avoid warnings from libE57Format

* Suppress all warnings from libE57Format

* Fix typo in original file
2025-06-16 10:39:12 -05:00
Furgo
c9a3397bc7 BIM: fix ArchPipe's view provider initialization 2025-06-16 17:37:28 +02:00
paddle
24efbf4234 Part: FaceMakerRing from RealThunder's branch.
Co-authored-by: Zheng Lei <realthunder.dev@gmail.com>
Co-authored-by: Pierre-Louis Boyer <pierrelouis.boyer@gmail.com>
2025-06-16 10:33:35 -05:00
Max Wilfinger
c1d17bcc6b Sketcher: ShowDimensionalName by default 2025-06-16 10:32:42 -05:00
dependabot[bot]
37ea7eb7c2 Bump prefix-dev/setup-pixi from 0.8.8 to 0.8.10 (#21973)
* Bump prefix-dev/setup-pixi from 0.8.8 to 0.8.10

Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.8.8 to 0.8.10.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](19eac09b39...14c8aabd75)

---
updated-dependencies:
- dependency-name: prefix-dev/setup-pixi
  dependency-version: 0.8.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update pixi-version as well

Co-authored-by: Jackson Oursland <jacob.oursland@gmail.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
Co-authored-by: Jackson Oursland <jacob.oursland@gmail.com>
2025-06-15 17:07:18 -05:00
Captain
ce54149637 Gui: refactor SoLinearDragger (#21451)
* Gui: refactor SoLinearDragger

* further improvements

* allow changing label visibility

* change SoLinearDraggerContainer to not inherit from SoDragger

---------

Co-authored-by: captain <captain@captain.captain.com>
2025-06-14 23:21:25 +02:00
theo-vt
76952aabc7 Sketcher: Fix autoscale issue with the origin (#21952)
* Correctly handle geo ids < 0 in scale handler
2025-06-14 13:07:19 -05:00
Benjamin Bræstrup Sayoc
b54bbf57f9 Gui: use parameter observer for locale parameter
Parameter change should be independent of the use of the preference window.
2025-06-14 18:25:03 +02:00
Chris Hennes
c134c05e8b Base: Disable XML external entity expansion
Addresses https://github.com/FreeCAD/FreeCAD/security/code-scanning/29
2025-06-13 10:44:01 +02:00
pre-commit-ci[bot]
bc5cf27109 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-06-13 10:40:48 +02:00
Syres916
39dc1e6210 [Gui] C++ preparation for deprecation of QCheckBox…
…stateChanged -> checkStateChanged
2025-06-13 10:40:48 +02:00
tetektoza
b4dcfe57f6 Sketcher: Fix OVP accepting input prematurely in Position and Dimensions
Fixes the problem where if user has selected `Position and dimensions`
mode in Preferences, then after first keystroke on 2nd label after
typing something in 1st label before, the input is being accepted
without allowing them to enter a number with more than 2 digits.
2025-06-13 10:10:58 +02:00
tetektoza
2bbd570754 Sketcher: Fix OOB access to OVPs
Stupid mistake of mine from previous refactor - some of the OVPs do not
contain those elements and thus should not be accessed prematurely.

This patch moves access to the OVPs when it's actually needed so it
won't go out of bounds.
2025-06-13 10:10:58 +02:00
Alfredo Monclus
d4e6a50808 Gui: fix double-click on checkboxes locking the properties 2025-06-13 10:10:31 +02:00
Roy-043
b1358b7f55 Draft: OrthoArray task panel change some strings to sentence case (#21959)
X Axis -> X axis
Same for Y and Z.
2025-06-12 19:52:52 +02:00
Benjamin Nauck
07b040fee1 Gui: Fix regression pointed out in review
paddlestroke:
> Here we actually need to keep App::Origin. Because we do not allow deletion ONLY of origin objects. Not of normal LCS.

While the original code:
```cpp
auto origin = dynamic_cast<App::Origin*>(lcs);
if (origin && !origin->getInList().empty()) {
```
...handles this perfectly fine, intent isn't obvious when reading it.
Using `is<T>()` shows intent better and should avoid similar situations in the future.
2025-06-12 10:33:56 +02:00
Benjamin Nauck
e5a81b9f44 Gui: Refactor LCS fixes
* use early exit to highlight main execution path
* use `auto*` for pointer
* use getObject<T>() instead of casting result from getObject()
* remove empty updateData()
* rename origin to lcs in setTemporaryVisibility for clarity
2025-06-12 10:27:06 +02:00
Luz Paz
78d995f2b8 TechDraw: fix typo in comment 2025-06-11 21:51:23 +02:00
Max Wilfinger
a05cb9847c Gui: Fix dragger update when moving to target object and make flip independent of selected components. 2025-06-11 20:58:47 +02:00
tetektoza
53c394ea52 Sketcher: Refactor access to OVPs to not repeat array access everytime
As the title says. I think personally this increases readability just a
little bit and I thought it's low effort to refactor.

Instead of checking the OVPs through array everytime, since we access
them multiple times in different scenarios - just cache them on the
beginning of state and access the variable, instead of array.
2025-06-11 13:30:35 +02:00
wmayer
2a664ea7ab Gui: Fix crash when creating a LCS
This is a left-over of the regressions introduced with PR 18126.
Thanks to some moderinization of the code base and replacing static with dynamic casts undefined behaviour
has changed to well-defined behaviour but now unchecked null pointers.

This change does some extra null pointer checks and uses the now correct types for down casting.

Hint: Upstream still uses many static casts here that already cause undefined behaviour when creating a LCS.
This could be the reason for the possible crashes when deleting a LCS as described in 20261

# Conflicts:
#	src/Gui/ViewProviderCoordinateSystem.cpp
2025-06-11 08:26:17 +02:00
Ladislav Michl
54fae95685 Revert "Sheet: Disable zooming"
This reverts 0c4fb60 ("Sheet: Disable zooming") as it breaks some
users workflow.
2025-06-11 06:54:59 +02:00
Kacper Donat
ea9ca39db9 Spreadsheet: Fix cursor being stuck resize state when scaled 2025-06-11 06:54:59 +02:00
Furgo
f1aa692b71 BIM: Use PrefCheckableGroupBox in IFC exporter preferences page 2025-06-11 02:44:52 +02:00
Furgo
cf5cf2babf Draft: handle reading defaults from PrefCheckableGroupBox 2025-06-11 02:44:52 +02:00
Furgo
3d02973951 Gui: add new PrefCheckableGroupBox widget 2025-06-11 02:44:52 +02:00
wandererfan
9a18895cd0 [TD]fix bad element name in Vertex::Restore 2025-06-10 13:46:57 -05:00
wmayer
2c2ebc6ed2 Test: Do not write test files into CWD
When running the tests make sure to write the test files into the temp directory.

This fixes issue 19112
2025-06-10 17:11:25 +02:00
Jacob Oursland
fde5ad9af6 CI: set MACOS_DEPLOYMENT_TARGET=10.13 for Intel macOS.
The MACOS_DEPLOYMENT_TARGET was not explicitly set, resulting in a default of 10.9, which does not support C++
features needed by some components in FreeCAD. This PR sets the MACOS_DEPLOYMENT_TARGET to 10.13 to build
for platforms running macOS High Sierra (2017) or newer.
2025-06-10 09:41:53 -03:00
Ladislav Michl
a37509956e Gui: fix ViewProviderCoordinateSystem::claimChildren()
Until 8de6382 ("Gui: Fix stackoverflow when loading corrupted file")
a static_cast was used to obtain App::Origin object, however with
introducing App::LocalCoordinateSystem this was no longer correct,
although not causing any troubles as OriginFeatures moved into
LocalCoordinateSystem as well.

Recent use of getObject template triggered this problem, so use now
correct cast to App::LocalCoordinateSystem.

Fixes: 19702dc ("Core: Add App::LocalCoordinateSystem")
2025-06-10 10:20:06 +02:00
Kacper Donat
cbf32cd77b Gui: Add guidelines for input hints 2025-06-10 07:05:06 +02:00
Mino-Tsuzuku
e70fde5773 Draft: Fix several SVG import bugs (#20293)
* Fix #19422 SVG: use tag create wrong size object
Fix #19072 SVG: import <defs> keyword as object without <use>
and Fix bug that not reported, <symbol> keyword as object without <use>
and Fix bug that not reported, nested use tag not import correctly.
 To do this. I make preprocessor that replace use tag to it's referenced object.
and remove symbol tag and defs tag from loaded svg.
 there is a subeffect, name of imported object that related to symbol tag is changed.

* Fix  incorrect import when use tag nesting context.

* fix error when use tag not exist.

* rebased aprospero PR20293.
fix several bugs.
1,x and y attribute of use tag is not processed under certain condition.
2,Doesn't finish importing when referenced ID is not exist.
3,Doesn't finish importing when use tag use href instead of xlink:href

* Refactor: Use data.get() for cleaner dictionary key handling

* Refactored code for simplicity following suggested changes.

* Add <a> tag support.( <a>tag  is  almost same with <g> tag at visual effect )

* Correct mistakes in the if condition handling href and xlink:href

* Modify the code to retain the original namespace definitions, as removing all namespaces may cause incorrect importing process.
2025-06-09 23:44:37 +02:00
Jackson Oursland
1d9c3a51ba CI: install black for python format checker (#21858) 2025-06-09 14:51:59 -03:00
Syres916
0967b3b3f4 [BIM] Fix Attribute Error when user moves and then deletes the BimViewArea dock widget (#21830)
* [BIM] Fix attribute error when user deletes the BimViewArea dock widget

* [BIM] Fix Attribute Error for both Qt5 and Qt6

* Update src/Mod/BIM/bimcommands/BimViews.py

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-06-09 17:36:04 +00:00
theo-vt
be24c6bbf3 Sketcher: Sketch autoscale (#21084)
* Working scale prototype

* Call viewAll to fit geometries in the viewport post-scaling

* Exclude angle dimensions

* Scale the viewport rather than calling viewAll

* Scale dimension annotation along geometries

* Early return when counting more than one dimensional constraint

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Disable sketch autoscale if there are external geometries in the sketch

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add a setting to disable the feature _ and eventually parametrize

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Check for objects in the viewport in the sketch's ancestry to decide wheter or not to autoscale

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* More consistent camera scaling

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Check for visual indicator in the whole document

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Find visible items in nested assemblies

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Check visual elements in assemblies nested in assemblies

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Set the dimension even if the scaling fails

* Allow constraints that interact with the origin axis/root

* Remove unused variable

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Misc fixes from review

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-06-09 18:31:44 +02:00
Kacper Donat
83b2027395 Gui: Add BitmapFactory::empty method
This adds empty(QSize) method to bitmap factory that creates empty
pixmap. This may seem useless, but after creating bitmap one needs to
remember to clear it and to properly set DPR - BitmapFactory will take
care of it.
2025-06-09 12:20:08 -04:00