Commit Graph

33333 Commits

Author SHA1 Message Date
wandererfan
dcf9e34bbc [TD]fix tearing of page edges 2025-12-22 11:16:15 -06:00
Roy-043
09c9141f9e Part: fix Part_EditAttachment unitless input error (#25923) 2025-12-22 11:12:46 -06:00
Florian Foinant-Willig
5a61610689 fix %r format spec 2025-12-22 11:04:47 -06:00
marbocub
b9e8370404 Sketcher: add reverse mapping correction to Carbon Copy (#25745)
* Sketcher: add reverse mapping correction to Carbon Copy

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

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

* Replace M_PI with std::numbers::pi

* Replace vector initialization with Base::Vector3d::UnitX/UnitY, apply suggestions from code review

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

* Fix guard clause logic, apply suggestions from code review

* Replace std::numbers::pi with pi via `using std::numbers`

* Fix issues reported by the linter

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-12-22 15:00:49 +01:00
chris
e660ca5a29 partdesign: pd: fix for issue #25794 2025-12-22 14:58:07 +01:00
Chris
37a83a48b9 Part Design: Add sketch sub element names for refs in revolutions (#26227)
* part design: partdesign: pd: fix regression issue #26223 add sketch sub element names for refs in revolutions

* refractor code to remove else blocks as every condition has a return statement, make lsp happy
2025-12-22 14:56:53 +01:00
Alfredo Monclus
111c6df9b0 PartDesign: fix hole clearance not appearing in the taskpanel when switching type 2025-12-22 14:56:09 +01:00
Alfredo Monclus
35bcb14d89 PartDesign: fix thread depth not shown in taskpanel 2025-12-22 14:55:45 +01:00
Chris Hennes
9e5e52c0ff PD: Fix missing silent mode check in GetTopoShapeVerifiedFace
Also ensure that all calls to this method actually verify the result.
2025-12-22 14:34:25 +01:00
Furgo
28fb82fac4 BIM: incremental UX improvements, iteration 1 (#25147) 2025-12-22 13:34:56 +01:00
Kacper Donat
ffd4487f6d PartDesign: Chamfer - migrate Size and Size2 for older files (#26137)
* PartDesign: Chamfer - migrate Size and Size2 for older files

* Apply suggestions from code review

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-12-22 11:52:55 +00:00
freecad-gh-actions-translation-bot
310419d45e Update translations from Crowdin 2025-12-22 12:40:21 +01:00
Louis Gombert
7eaff5f20f Part: clean mesh before adding triangulation in setupCoinGeometry
Calling BRepMesh_IncrementalMesh repeatedly would accumulate BRep_CurveRepresentation instances attached to the BRep_TEdges of the shape. We now clean added triangulations before adding a new one, which improves performance in the long run.

Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-12-22 12:01:18 +01:00
Roy-043
584614bb01 BIM: fix deletion of BuildingPart in strict IFC mode (#26219)
* BIM: fix deletion of BuildingPart in strict IFC mode

Add `sg = FreeCADGui.ActiveDocument.ActiveView.getSceneGraph()` to `onDelete`.

* BIM: fix deletion of BuildingPart in strict IFC mode

Explicitly call `obj.ViewObject.Proxy.attach(obj.ViewObject)`.

* BIM: fix deletion of BuildingPart in strict IFC mode

In `ifc_vp_buildingpart` call `attach` from `ArchBuildingPart.ViewProviderBuildingPart`.
2025-12-21 20:16:17 -06:00
Chris
dc896b58ca Sketcher: Allow live preview of sketch placement (#26033)
along with unit tests
2025-12-21 17:34:30 +01:00
Furgo
f0e4be61fe BIM: Initialize SketchArch variable before use (#26336) 2025-12-21 10:36:35 +01:00
Furgo
e9d2822add BIM: fix lock removal of Sill property 2025-12-21 10:27:12 +01:00
Furgo
ab16aa0161 BIM: rename ArchWindow's Sill property to SillHeight and handle one-w… (#26277)
* BIM: rename ArchWindow's Sill property to SillHeight and handle one-way migration

* BIM: properly remove the locked "Sill" property
2025-12-20 22:26:52 +01:00
Louis Gombert
9b827c0436 SVG export: improve performance (#26149)
* SVG export: use a set to match edges instead of a list

Lookup in edge list becomes O(1), significantly improving SVG export speed

* [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-20 22:23:55 +01: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
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
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
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
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
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
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