Commit Graph

44702 Commits

Author SHA1 Message Date
Roy-043
348eef644b 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
7cd88534b5 Gui: Fix non-Latin groupName (#26285) 2025-12-19 18:53:16 -06:00
Kacper Donat
87b257546f Gui: Wrap strings with QStringLiteral 2025-12-19 13:14:25 -06:00
chris
22552848fd sketcher: fixes issue #26167 no polygon distort when repositioning / constraining 2025-12-19 11:22:20 +01: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
sliptonic
d48073fbbf 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
26cc33ecfb [Core] Fix macro path append to sys.path 2025-12-18 13:19:21 -06:00
Kacper Donat
b5d60baa68 Stylesheets: Fix separators appearance 2025-12-18 19:47:51 +01:00
Billy Huddleston
a7b6078b1d 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
0c1ef0c77f 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
fe3dc9f06a 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
6c6cff7322 Update translations from Crowdin 2025-12-17 21:10:10 -06:00
Chris Hennes
0ba75a7573 PartDesign: Compiler warning cleanup 2025-12-17 11:08:38 -06:00
Chris Hennes
c7c4c6f0cc TechDraw: Compiler warning cleanup 2025-12-17 11:08:38 -06:00
Chris Hennes
50f029edd4 Sketcher: Compiler warning cleanup 2025-12-17 11:08:34 -06:00
Chris Hennes
36332bf9ca Measure: Compiler warning cleanup 2025-12-17 11:08:22 -06:00
Chris Hennes
04a9c1e7b0 Assembly: Compiler warning cleanup 2025-12-17 11:08:12 -06:00
Chris Hennes
0416a5bc0b Gui: Compiler warning cleanup 2025-12-17 11:07:55 -06:00
Chris Hennes
55a55725eb App: Compiler warning cleanup 2025-12-17 10:41:27 -06:00
Furgo
e147e5a260 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
8fd81d4109 Assembly: Ball drag mode. (#26222) 2025-12-16 19:08:50 +01:00
sliptonic
a13502dccb Merge pull request #26205 from Connor9220/PreserveTSPTunnelExtraData
CAM: Update TSP tunnel solver
2025-12-16 09:31:14 -06:00
Saksham Malhotra
b7735044c4 PartDesign: move AllowCompound to Base property group (#26180) 2025-12-15 21:45:29 -06:00
Kacper Donat
68f2c6f864 chore: Add code quality problem report form 2025-12-15 21:18:34 -06:00
Kacper Donat
a0356796ac 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
646b0f4492 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
04df03cea1 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
d116764dc3 CAM: Avoid bosses when pocketing. (#24723) 2025-12-15 12:29:28 -06:00
sliptonic
12355f37e9 Merge pull request #25826 from tarman3/pathcommands_qtcore
CAM: PathCommands - Remove unused import QtCore
2025-12-15 11:59:37 -06:00
sliptonic
e1e8323dc1 Merge pull request #25839 from tarman3/slot_remove_0
CAM: Slot - Remove .0
2025-12-15 11:58:59 -06:00
sliptonic
44a5960d57 Merge pull request #26123 from Connor9220/AddCommandAnnotationsTests
CAM: Add comprehensive tests for Command constructor annotations
2025-12-15 11:57:28 -06:00
sliptonic
bf3a471948 Merge pull request #24726 from Connor9220/TwoOptTSPSolver
CAM: 2-Opt TSP solver
2025-12-15 11:55:20 -06:00
Chris Hennes
10ed34bd4c Gui: Correct UTF-8 support for property names 2025-12-15 18:26:51 +01:00
Roy-043
2efd63614f BIM: ArchReference: fix coin node handling
Fixes #25772.
2025-12-15 17:24:00 +00:00
Chris Hennes
3208b6de5f PD: Don't warn about Midplane on document load 2025-12-15 18:22:31 +01:00
Roy-043
1c8df498f3 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
5ba7f207ab PD: Correct is-datum-in-body check 2025-12-15 18:20:04 +01:00
Roy-043
15bb0ee896 BIM: use optimalBoundingBox in getCutVolume 2025-12-15 17:19:56 +00:00
drwho495
88b5cde45f Implement Fix
Switch from checking child tag to checking the materTag
2025-12-15 11:17:42 -06:00
Roy-043
e6e285315c 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
aefd2592a8 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
16032ae34c 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
29eeab3624 Sketcher: Do not autoscale if there are blocked geometries 2025-12-15 09:20:20 -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
Billy Huddleston
095cdb14a7 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
3476562dd7 fem: attempt to resolve issue #19798 2025-12-14 12:15:35 -06:00
Yash Suthar
8413922e52 Core: fix "Save Image" giving dark area as compare to viewport
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
2025-12-14 14:49:58 +01:00
Kacper Donat
bf697ca710 Gui: Use largest possible marker if needed
This is a quick and dirty fix for https://github.com/FreeCAD/FreeCAD/issues/22010

Basically if we want to use a bigger marker size than available, we use the biggest one
available. This is not a good way to fix the issue - we should ensure that the marker
size that the user requests is actually available - this, however, requires more
significant changes to the code.
2025-12-13 16:23:59 -06:00
Billy Huddleston
d940c499b7 CAM: Add TSP tunnel solver with flipping and Python bindings
Introduce TSPTunnel struct and implement TSPSolver::solveTunnels
for optimizing tunnel order with support for flipping and start/end points.
Expose the new functionality to Python via pybind11, returning tunnel
dictionaries with flipped status.

src/Mod/CAM/App/tsp_solver.cpp:
- Add solveTunnels implementation for tunnel TSP with flipping and route endpoints

src/Mod/CAM/App/tsp_solver.h:
- Define TSPTunnel struct
- Declare solveTunnels static method in TSPSolver

src/Mod/CAM/App/tsp_solver_pybind.cpp:
- Add Python wrapper for solveTunnels
- Expose solveTunnels to Python with argument parsing and result conversion
2025-12-13 10:59:47 -05:00
xtemp09
df6d148a85 [GUI] Rename Cancel ‘Close’ in Add Property dialog 2025-12-13 15:19:41 +01:00