Commit Graph

44800 Commits

Author SHA1 Message Date
Kacper Donat
06a9c56656 Stylesheets: Fix checked QToolButton style 2025-10-20 00:10:57 +02:00
Kacper Donat
777726f093 Stylesheets: Add styling for QPlainTextEdit 2025-10-20 00:10:57 +02:00
Kacper Donat
c5ff1b4550 Stylesheets: Resreve space for right arrow 2025-10-19 23:09:21 +02:00
opgl
fdd7dac561 CI (crowdin synchronization): Removed committing unneeded log file 2025-10-19 15:46:03 -05:00
tetektoza
d5f9059199 Gui: Fix stack-use-after-return in DlgSettingsLightSources lambdas
Randomly discovered during some other bug hunt, only with
AddressSanitizer on. Basically, ASAN detected stack-use-after-return
when playing with spinboxes in the Light Sources preferences when Qt
signal handlers tried to invoke lambda callbacks that referenced
deallocated stack memory.

The main problem is that those lambda functions in the constructor
were captruing by reference. When they were connected to Qt signals
and invoked after constructor completed, they accessed stack vars that
have gone out of scope.

So fixed that by changing lambda captures from `[&]` to explicit captures:
- [this] for lambdas needing only class member access
- [this, updateLight] for lambdas that need both class members and the
`updateLight` lambda.
2025-10-19 22:23:36 +02:00
theo-vt
a431ccc156 Quickmeasure: Allow measuring the length of a parabola 2025-10-19 12:31:47 -05:00
Furgo
2796296a24 BIM: Fix widget value setting in ArchMaterial (#24710)
ArchMaterial's view provider has a setTaskValue helper to set values of widgets inside a task panel. While specific to ArchMaterial, the real place where the helper is called is at BIM_Classification. It appears it's not a general but more like an ad-hoc API for a specific purpose and for a specific object.

In any case, this fix allows widgets that expect a numerical value to have their value set. Before, their value was set as text, unexpectedly.
2025-10-19 09:13:51 +00:00
opgl
ac21faf35e CI (automated crowding synchronization): fix commiting additional log file 2025-10-18 14:37:10 -05:00
tarman3
68084b64c9 CAM: LeadInOut - Radius and ToolController 2025-10-18 18:37:37 +03:00
sliptonic
a94382dd07 Merge pull request #24725 from davidgilkaufman/adaptive_model_aware_checkbox
[CAM] fix bug opening job ui panel
2025-10-18 10:07:23 -05:00
paul
4ff8998198 [ArchStairs] Fix StringerOverlap & StructureOffset (#24608)
1. Fix #24321
2. Fix - The 'Structure Offset' property does not allow to insert negative values

(Forum Discussion
- https://forum.freecad.org/viewtopic.php?t=100060 contains discussion on the above 2 issues)
2025-10-18 14:44:21 +00:00
Furgo
e28f54f598 BIM: Prevent editing label on double-click (#24712)
Before this fix, double-clicking on an ArchMultimaterial object opened its task panel as expected. Unexpectedly, its label was selected and set for edit.

- The tree view's double-click handling expects the view-provider to declare whether it handled the double-click.
- The ViewProvider API's doubleClicked() is documented to return bool (True if handled).
- If a view provider's doubleClicked method returns None/False, the tree falls back to the default Qt behavior (which is beginning inline editing of the item label).
- In ArchMaterial.py the view provider calls self.edit() (or FreeCADGui.ActiveDocument.setEdit(...)) but the method that the tree actually calls (the view provider's doubleClicked) does not return True. Because the method returns None, the tree continues and starts inline label-editing.

In summary: setEdit returning True is fine, but doubleClicked is the method the tree checks; it must return True to suppress the default inline rename.
2025-10-18 15:34:10 +02:00
Syres916
879c083abf Merge branch 'FreeCAD:main' into CAM_Fix_SetupSheet_Table_MinHeight 2025-10-18 11:27:03 +01:00
Syres916
36b263a906 [Gui] change global QPushbutton min-width from 64px to 80px 2025-10-18 11:26:50 +01:00
ebswift
bbea8ace72 Fix compilation error in TaskFeatureParameters.cpp 2025-10-17 22:35:44 -05:00
theo-vt
171389d9d3 Measure: allow length measurement for ellipse, hyperbola and parabola (#24659) 2025-10-17 21:34:07 +00:00
Chris
65d166f356 PD: Fix uninfomative error message box (#24705) 2025-10-17 19:48:31 +00:00
David Kaufman
909cd46a9f fix bug opening job ui panel 2025-10-17 15:08:10 -04:00
sliptonic
f3186f4dc0 remove old supplemental fixture 2025-10-17 12:10:22 -05:00
David Kaufman
e3874a1973 [CAM] make the adaptive model aware feature optional (#24553)
* [CAM] make the adaptive model aware feature optional

* fix CAM tests

* placate github codql

* remove model-aware-only properties from the adaptive task ui panel
2025-10-17 10:42:15 -05:00
sliptonic
8df09d92c0 Merge pull request #24661 from tarman3/icon
CAM: Fix icon while changing Active state for class ObjectOp
2025-10-17 10:41:20 -05:00
sliptonic
b72f83136c Merge pull request #24606 from tarman3/toggle
CAM: Toggle Operation improve
2025-10-17 10:41:00 -05:00
sliptonic
7bb4bacc11 Merge pull request #24674 from Connor9220/EmbeddedToolMigrationFix
CAM: Fix embedded toolbits showing up as custom.
2025-10-17 10:40:40 -05:00
Chris Hennes
855d76bb40 Addon Manager: Synchronize with 2025.10.16 version 2025-10-17 05:25:19 +02:00
Chris Hennes
e4b6b32f11 Merge pull request #24684 from furgo16/patch-34
BIM: remove obsolete Python 2 urllib2 import
2025-10-16 15:48:43 -05:00
Furgo
ae0946ac9d BIM: replace obsolete urllib2 in BimTutorial 2025-10-16 21:21:40 +02:00
Furgo
da4832fb50 BIM: remove obsolete Python 2 urllib2 import
Python 3 combined the former `urllib`, `urllib2`, `urlparse` Python 2 modules into subpackages of `urllib`. FreeCAD is written in Python 3, thus the `urllib2` import fallback will not work and needs to be removed.
2025-10-16 21:21:40 +02:00
tetektoza
0e6d4aa1d7 Gui: Restore focus to tree upon deletion and move selection to next obj (#24679) 2025-10-16 13:13:08 -05:00
PaddleStroke
e278d22d42 Sketcher: Fix ctrlA with filter vertex index issue (#24665)
* Sketcher: Fix ctrlA with filter vertex index issue

* [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-10-16 13:01:30 -05:00
Chris Hennes
5e75a3ece9 Merge pull request #24692 from Roy-043/BIM-improve-MultiMaterial-task-panel
BIM: improve MultiMaterial task panel
2025-10-16 12:56:20 -05:00
captain0xff
8496d25279 Gui: fix null handling logic in Application::setEditDocument 2025-10-16 12:54:20 -05:00
Furgo
a89c7eedcf BIM: add missing DraftGeomUtils import (#24683)
Added import for DraftGeomUtils to ArchCommands.makeFace to prevent crash.
2025-10-16 18:00:32 +02:00
Roy-043
bdb817a6a1 BIM: improve MultiMaterial task panel
Update MultiMaterialColumnWidth values to 120
2025-10-16 15:00:35 +02:00
Roy-043
0bfc4ac41e BIM: improve MultiMaterial task panel
Remove extra left margin from the first column in the tree view.
2025-10-16 14:58:59 +02:00
marcuspollio
aef287cbb6 Update .git-blame-ignore-revs for BIM and Draft .pre-commit and Black format 2025-10-15 21:39:09 -05:00
Billy Huddleston
906edf7078 Promote embedded toolbits to correct shape type during migration
- Enhance _promote_toolbit to handle embedded toolbits that still have a "Custom" shape type.
- If ShapeType is "Custom" but ShapeID is present, attempt to promote to the correct shape class using ShapeID.
- Log promotion for traceability.
- This improves migration of legacy embedded toolbits and ensures proper shape assignment.
2025-10-15 18:04:40 -04:00
Billy Huddleston
bcefebca5f CAM: Simplify annotation handling in GCode and improve annotation parsing
src/Mod/CAM/App/Command.cpp:
- Removed requirement for annotations= prefix; now all text after ; is treated as annotation data.
- Updated Command::toGCode to output annotations as key-value pairs in comments.
- Improved setFromGCode to extract annotations from any comment after ;.
- Enhanced annotation parsing to handle quoted strings and floating-point numbers.
- Simplified XML serialization and restoration logic for annotations.

src/Mod/CAM/App/Path.cpp:
- Added addCommandNoRecalc, allowing bulk loading of commands without repeated recalculation.
- Refactored RestoreDocFile to read GCode files line-by-line, parse each command, and call recalculate() only once after all commands are loaded.
- Added explanatory comment above the old implementation.

src/Mod/CAM/App/Path.h:
- Declared addCommandNoRecalc in the Toolpath class.

src/Mod/CAM/CAMTests/TestPathCommandAnnotations.py:
- Adjusted unit test for scientific notation annotation to check only 6 decimal places.
- Adjusted unit test 10 to properly handle assertions with the toGCode method

src/Mod/CAM/PathSimulator/AppGL/GCodeParser.cpp:
- GCodeParser::ParseLine: Truncate at first semicolon (annotations / comment)
2025-10-15 14:43:40 -04:00
Billy Huddleston
a970235484 CAM: Enhance Path.Command annotations with variant type, type-safe API, and robust persistence
- Refactored `Annotations` member to use `std::variant<std::string, double>` for type-safe storage of both string and numeric values.
- Implemented C++ methods:
	- `setAnnotation(key, value)`: overloaded for string and double types.
	- `getAnnotation(key)`: returns annotation value as string.
	- `getAnnotationString(key)`: returns string annotation.
	- `getAnnotationDouble(key, fallback)`: returns numeric annotation.
	- `getAnnotationValue(key)`: returns raw variant value.
	- `hasAnnotation(key)`: checks for annotation existence.
	- `setAnnotations(annotationString)`: parses and stores values as double if possible, otherwise as string.
- Improved XML serialization (`Save`) and deserialization (`Restore`) to persist annotation types and values, including annotation count for robust restoration.
- Updated Python bindings:
	- `Annotations` property now supports mixed-type values (str/float).
	- Values are returned as native Python types.
	- Type errors are raised for invalid assignments.
- Expanded tests in `TestPathCommandAnnotations.py`:
	- Added cases for mixed-type annotations, edge cases, and in-memory persistence using `dumpContent`/`restoreContent`.
	- Verified type preservation and correct restoration.
- Ensured backward compatibility for string-only annotations and improved error handling.

**How to use annotations in Python:**

```import Path

c = Path.Command('G1', {'X': 10.0, 'Y': 20.0, 'F': 1000.0})
c.Annotations = {
	'tool_name': '6mm_endmill',      # string
	'spindle_speed': 12000.0,        # float
	'feed_rate': 1500,               # int (stored as float)
	'operation': 'pocket',           # string
	'depth_of_cut': -2.5,            # negative float
}
print(c.Annotations)  # {'tool_name': '6mm_endmill', 'spindle_speed': 12000.0, ...}
print(type(c.Annotations['spindle_speed']))  # <class 'float'>
print(type(c.Annotations['tool_name']))      # <class 'str'>

xml = c.dumpContent()
c2 = Path.Command()
c2.restoreContent(xml)
print(c2.Annotations)  # Restored with correct types

c.addAnnotations('speed:1000 operation:drill')
print(c.Annotations['speed'])        # 1000.0 (float)
print(c.Annotations['operation'])    # 'drill' (str)
```
2025-10-15 14:26:13 -04:00
marcuspollio
50e4864efb Add Draft workbench to .pre-commit-config (#24664)
* Add Draft workbench to .pre-commit-config

* [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-10-15 11:21:09 +02:00
tetektoza
87f88bba30 BIM: Remove icon after unclone (#24654)
As the title says - upon unclone icon is not being removed, but the
cloned item stops mirroring original item which is correct, so this just
aligns the icon removal logic with the correct behavior.
2025-10-15 10:21:38 +02:00
tarman3
c995a331b6 CAM: Fix icon and Active state for class ObjectOp 2025-10-15 07:39:02 +03:00
Chris Hennes
41ce37233d Merge pull request #22696 from schmidtw/assembly-crash-fix
Fix: Prevent attempting to access non-existant nodes.
2025-10-14 10:14:51 -05:00
Kacper Donat
2b90740855 PartDesign: Fix boolean fuse without tools
This fixes issue where exception was thrown when no tools were selected
preventing the task dialog from being opened.
2025-10-14 10:05:24 -05:00
Kacper Donat
96b76b4e41 PartDesign: Ignore errors due to object misconfiguration in previews
This adds ignoring catch to the updatePreview method of
ViewProviderTransformed so it does not report issues that happen because
recompute takes place on object that is not yet fully configured.
2025-10-14 10:04:28 -05:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ
3f918a5d35 [ Surface ]: Updated SPDX (#24560) 2025-10-14 10:02:53 -05:00
PhoneDroid
7595a83f36 [ OpenSCAD ]: Updated SPDX 2025-10-14 10:01:41 -05:00
PhoneDroid
d9cf2b65b5 [ MeshPart ]: Update SPDX 2025-10-14 10:01:02 -05:00
PhoneDroid
2a56489feb [ Base ]: Updated SPDX 2025-10-14 10:00:04 -05:00
dependabot[bot]
325dd3b701 Bump github/issue-metrics from 3.25.0 to 3.25.1
Bumps [github/issue-metrics](https://github.com/github/issue-metrics) from 3.25.0 to 3.25.1.
- [Release notes](https://github.com/github/issue-metrics/releases)
- [Commits](17c6bd18e9...c640329f02)

---
updated-dependencies:
- dependency-name: github/issue-metrics
  dependency-version: 3.25.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-14 15:53:53 +02:00
Chris Hennes
7bc525f885 Merge pull request #23592 from ryankembrey/td-vertices
TechDraw: Fix vertices regressions
2025-10-14 08:26:50 -05:00