Commit Graph

44706 Commits

Author SHA1 Message Date
sliptonic
aefd625f72 Merge pull request #26217 from tarman3/array_icon
CAM: Array - Fix ViewProviderArray and icons
2025-12-20 10:11:02 -06:00
tarman3
9f7861135d CAM: Array - Fix ViewProviderArray and icon 2025-12-20 10:45:20 +02:00
Chris Hennes
746cd9a944 Addon Manager: Update to 2025.12.19
Minor bug fixes and translation update.
2025-12-20 06:58:03 +01:00
Christoph Moench-Tegeder
9392a0e369 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
Roy-043
3461e0fed7 Part: fix Part_EditAttachment nesting handling (#26298)
* Part: fix Part_EditAttachment nesting handling

Fixes #26264.

The previous 'fix' (#25887) did not consider that the object to-be-attached may not be in the global space.

The code in this PR has been tested on the forum:
https://forum.freecad.org/viewtopic.php?p=862968#p862968

* [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-12-19 20:40:37 -06:00
VM4Dim
6c04ea765f Gui: Fix non-Latin groupName (#26285) 2025-12-19 18:53:16 -06:00
Kacper Donat
4e2221a913 Gui: Wrap strings with QStringLiteral 2025-12-19 13:14:25 -06:00
chris
b1e6730da8 sketcher: fixes issue #26167 no polygon distort when repositioning / constraining 2025-12-19 11:22:20 +01:00
Yash Suthar
e5b3d5a6da Part: added floating point fallback in PropertyLinks::_updateElementReference
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
2025-12-19 10:52:26 +01:00
sliptonic
de7c2359ac Merge pull request #26260 from Connor9220/UpdateTSPSolver
CAM: Add open-route optimizations to point-based TSP solver
2025-12-18 16:11:32 -06:00
Syres916
45d305939d [Core] Fix macro path append to sys.path 2025-12-18 13:19:21 -06:00
Kacper Donat
724eec1dae Stylesheets: Fix separators appearance 2025-12-18 19:47:51 +01:00
Billy Huddleston
79aa87c593 CAM: Add open-route optimizations to point-based TSP solver
Improves the point-based TSP solver to match tunnel solver behavior
for open routes (no endpoint constraint). Now applies 2-opt and
relocation optimizations that allow reversing or relocating segments
to the end of the route, resulting in better path optimization when
the ending point is flexible. Now links tsp_solver with
Python3::Python and uses add_library for compatibility with FreeCAD
and Fedora packaging.

src/Mod/CAM/App/tsp_solver.cpp:
- Add optimization limit variables for controlled iteration
- Add 2-opt and relocation optimizations for open routes
- Use Base::Precision::Confusion() for epsilon values
- Track last improvement step for efficient loop control

src/Mod/CAM/App/CMakeLists.txt:
- Switch tsp_solver from pybind11_add_module to add_library
- Link tsp_solver with pybind11::module and Python3::Python
- Update include directories for consistency
2025-12-18 12:15:22 -05:00
PaddleStroke
9697e11c4b Measure: getPlacement const (#26216)
* Measure: getPlacement const

* Update MeasureBase.h

* Update MeasureBase.cpp

* Update MeasureArea.h

* Update MeasureArea.cpp

* Update MeasureLength.h

* Update MeasurePosition.cpp

* Update MeasureLength.cpp

* Update MeasureRadius.cpp

* Update MeasurePosition.cpp

* Update MeasurePosition.h

* Update MeasureRadius.h

* Update MeasurePosition.h
2025-12-18 14:04:32 +01:00
Kacper Donat
2ea7c39563 Compiler warning cleanup (#26229)
* App: Compiler warning cleanup

* Gui: Compiler warning cleanup

* Assembly: Compiler warning cleanup

* Measure: Compiler warning cleanup

* Sketcher: Compiler warning cleanup

* TechDraw: Compiler warning cleanup

* PartDesign: Compiler warning cleanup
2025-12-18 07:50:26 +01:00
freecad-gh-actions-translation-bot
9b07585b88 Update translations from Crowdin 2025-12-17 21:10:10 -06:00
Chris Hennes
e5d7920dd7 PartDesign: Compiler warning cleanup 2025-12-17 11:08:38 -06:00
Chris Hennes
364fddcecc TechDraw: Compiler warning cleanup 2025-12-17 11:08:38 -06:00
Chris Hennes
c5973e27f8 Sketcher: Compiler warning cleanup 2025-12-17 11:08:34 -06:00
Chris Hennes
f4a647aaf0 Measure: Compiler warning cleanup 2025-12-17 11:08:22 -06:00
Chris Hennes
dd5a3ed37b Assembly: Compiler warning cleanup 2025-12-17 11:08:12 -06:00
Chris Hennes
38fd5c7153 Gui: Compiler warning cleanup 2025-12-17 11:07:55 -06:00
Chris Hennes
b15e279bc5 App: Compiler warning cleanup 2025-12-17 10:41:27 -06:00
Furgo
08cc569d6a Refactor problem report template for improved previews
Reorder fields so that the problem description will be rendered first in previews.
2025-12-17 11:01:02 +01:00
PaddleStroke
ed9184f16b Assembly: Ball drag mode. (#26222) 2025-12-16 19:08:50 +01:00
sliptonic
2b52a54a27 Merge pull request #26205 from Connor9220/PreserveTSPTunnelExtraData
CAM: Update TSP tunnel solver
2025-12-16 09:31:14 -06:00
Saksham Malhotra
44584858a5 PartDesign: move AllowCompound to Base property group (#26180) 2025-12-15 21:45:29 -06:00
Kacper Donat
d89fac9e3f chore: Add code quality problem report form 2025-12-15 21:18:34 -06:00
Kacper Donat
a96f3535b6 Gui: Fix segfault in Safe Mode
This fixes segfault that was caused by changing settings in
FirstStartWidget that triggered change event on not fully intialized
StartView.

It is quick and dirty fix that just disables handling of the event
causing segfault until widget is fully ready. The correct solution would
be to remove the logic that changes settings from the widget (as it
should not be there) and instad move it to another place in pipeline.
This would be however much more work and segfault should be fixed ASAP.
2025-12-15 21:06:51 -06:00
Billy Huddleston
98680a6a02 CAM: Update TSP tunnel solver
Update TSP tunnel solver to match revised Pythonlogic, including
improved early exit, open-ended route handling, and performance tweaks.
Also ensure extra data in tunnel dictionaries is preserved through the
C++/Python interface and add a test for passthrough of extra keys.

src/Mod/CAM/App/tsp_solver.cpp:
- Refactor optimization loop to use lastImprovementAtStep and limit
variables
- Add special handling for open-ended routes (no end point)
- Change epsilon to 10e-6 for consistency with Python
- Cache distance calculations for relocation step

src/Mod/CAM/App/tsp_solver_pybind.cpp:
- Preserve extra keys from input tunnel dicts in output
- Set tunnel index for passthrough

src/Mod/CAM/CAMTests/TestTSPSolver.py:
- Add test to verify extra data in tunnel dicts is preserved through
TSP solver
- Print extra data for debugging
2025-12-15 21:50:51 -05:00
Billy Huddleston
71082aade6 CAM: Preserve extra tunnel data through TSP solver
Ensures that all extra keys in tunnel dictionaries are preserved after
TSP solving by copying the original input dict and updating solver
results. Adds a dedicated test to verify passthrough of extra data and
prints extra keys for debugging.

src/Mod/CAM/App/tsp_solver_pybind.cpp:
- Copy original tunnel dict and update with solver results to preserve extra keys

src/Mod/CAM/CAMTests/TestTSPSolver.py:
- Add test_09_tunnels_extra_data_passthrough to verify extra data preservation
- Print extra tunnel data in print_tunnels for easier debugging
2025-12-15 16:32:03 -05:00
sliptonic
a6202a50b9 CAM: Avoid bosses when pocketing. (#24723) 2025-12-15 12:29:28 -06:00
sliptonic
7bcc3619d8 Merge pull request #25826 from tarman3/pathcommands_qtcore
CAM: PathCommands - Remove unused import QtCore
2025-12-15 11:59:37 -06:00
sliptonic
4edd1a679f Merge pull request #25839 from tarman3/slot_remove_0
CAM: Slot - Remove .0
2025-12-15 11:58:59 -06:00
sliptonic
04199153a5 Merge pull request #26123 from Connor9220/AddCommandAnnotationsTests
CAM: Add comprehensive tests for Command constructor annotations
2025-12-15 11:57:28 -06:00
sliptonic
64405215d4 Merge pull request #24726 from Connor9220/TwoOptTSPSolver
CAM: 2-Opt TSP solver
2025-12-15 11:55:20 -06:00
Chris Hennes
2b8ad1924e Gui: Correct UTF-8 support for property names 2025-12-15 18:26:51 +01:00
Roy-043
f10ec930f8 BIM: ArchReference: fix coin node handling
Fixes #25772.
2025-12-15 17:24:00 +00:00
Chris Hennes
90f98807ef PD: Don't warn about Midplane on document load 2025-12-15 18:22:31 +01:00
Roy-043
7fcae3d19d BIM: ArchReference: handle transparency-alpha switch
The 'old' DiffuseColor comes in 2 flavors. In v0.21.2 it stores transparency values. In v1.0.2 and v1.1 it stores alpha values. The ArchReference code should handle both. DiffuseColor is still used by BuildingParts in v1.0.2 and v1.1.

The solution is a bit hacky: if 100% transparency occurs we assume we are actually dealing with alpha values.
2025-12-15 17:21:29 +00:00
Chris Hennes
3cb1d812db PD: Correct is-datum-in-body check 2025-12-15 18:20:04 +01:00
Roy-043
0b2b9d2fda BIM: use optimalBoundingBox in getCutVolume 2025-12-15 17:19:56 +00:00
drwho495
3e3134cb73 Implement Fix
Switch from checking child tag to checking the materTag
2025-12-15 11:17:42 -06:00
Roy-043
44baf5f1e5 Draft: make Draft_AnnotationStyleEditor dialog wider
Increase AnnotationStyleEditorWidth from 450 to 600 to mitigate #25983.
2025-12-15 11:16:28 -06:00
Kacper Donat
0120299a80 Gui: Respect both content size and minimum width for buttons
This is a hacky fix for https://github.com/FreeCAD/FreeCAD/issues/23607

Basically after widget is shown or polished we enforce it's minimum size to at
least cover the minimum size hint - something that QSS ignores if min-width is
specified.
2025-12-15 10:17:34 -06:00
Chris Hennes
3118469338 Merge pull request #25914 from AjinkyaDahale/sk-fix-25281
Sketcher: Handle angle constraint on sketchobject changes
2025-12-15 10:15:13 -06:00
theo-vt
e5946a624a Sketcher: Do not autoscale if there are blocked geometries 2025-12-15 09:20:20 -06:00
Kacper Donat
88d721b14c 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
Billy Huddleston
12106c1b30 CAM: Add comprehensive TSP tunnel solver tests and wrapper function
Added extensive test coverage for the TSP tunnel solver including linear
 tunnels, pentagram diagonals, and complex wire geometries with various
 constraint combinations. Introduced a Python wrapper function for
 tunnel sorting that integrates with the C++ solver.

src/Mod/CAM/CAMTests/TestTSPSolver.py:
- Renumbered existing tests to run in sequential order
(test_01_simple_tsp, test_02_start_point, etc.)
- Added print_tunnels() helper function for displaying tunnel
information with original indices
- Added test_06_tunnels_tsp: Tests 7 linear tunnels with varying
lengths, connectivity, and flipping behavior
- Added test_07_pentagram_tunnels_tsp: Tests pentagram diagonal tunnels
 with no constraints, start+end constraints, and start-only constraints
- Added test_08_open_wire_end_only: Tests end-only constraint on complex
 wire with 8 tunnels including crossings and diagonals

src/Mod/CAM/PathScripts/PathUtils.py:
- Added sort_tunnels_tsp() wrapper function that interfaces with the C++
tsp_solver.solveTunnels()
- Supports allowFlipping, routeStartPoint, and routeEndPoint parameters
2025-12-14 16:45:51 -05:00
chris
5f0d99f4f3 fem: attempt to resolve issue #19798 2025-12-14 12:15:35 -06:00