Commit Graph

920 Commits

Author SHA1 Message Date
sliptonic
14c23be550 Code cleanup. 2026-01-08 19:26:25 -05:00
sliptonic
8653c25853 Rearranged some properties.
added back bcnc comment output
2026-01-08 19:26:25 -05:00
Billy Huddleston
a2e2f5b518 CAM: Remove colons from labels, fix lint, and update imports
Removed explicit colons from all form labels.
Fixed lint warnings and replaced wildcard imports with explicit
imports for clarity and maintainability.

src/Mod/CAM/Path/Machine/ui/editor/machine_editor.py:
- Removed ':' from all form labels
- Fixed lint warnings (missing docstrings, empty except, etc.)
- Replaced wildcard imports with explicit imports

src/Mod/CAM/Path/Machine/models/__init__.py:
- Updated __all__ and imports for explicit API

src/Mod/CAM/Path/Tool/assets/ui/preferences.py:
- Updated imports to use package-level import

src/Mod/CAM/Path/Machine/models/machine.py:
- Added explanatory comments to empty except blocks
- Fixed duplicate variable assignment
- Added missing class docstrings

src/Mod/CAM/CAMTests/TestMachine.py:
- Fixed unused variable warning by using returned filepath
2026-01-08 19:26:25 -05:00
Billy Huddleston
9a23768983 CAM: Add Machine Library and Editor
This PR introduces a machine object and a machine library, along with a
new machine editor dialog for creating and editing *.fcm machine asset
files. The editor is integrated into the CAM preferences panel, with new
Python modules for the dialog and minimal model validation. Machine
management (add, edit, delete) is now available in the CAM asset
preferences panel.

Key Features:
- Machines now have a type and units property. The machine type can be
used to distinguish between different classes of machines (e.g., mill,
lathe, laser).
- Machine units are stored internally and in the .fcm JSON file as
metric. Note: This differs from how toolbits work (which store units in
their native units)
- Support for 2-5 axis machines.
- Support for multiple spindles (up to 9)
- Processor defaults
- JSON Text Editor with basic validation and line numbers.
2026-01-08 19:26:25 -05:00
jffmichi
ae8412468a CAM: fix Radius Mill TipDiameter resetting 2026-01-07 11:53:35 +01:00
sliptonic
962db90dc7 Merge pull request #26647 from Connor9220/FixToolbitLabelAndControllerNaming
CAM: Fix duplicate label issues with toolbits
2026-01-05 11:15:02 -06:00
freecad-gh-actions-translation-bot
2592406b35 Update translations from Crowdin 2026-01-05 08:47:20 +01:00
luzpaz
0cf92f28c7 CAM: Fix typo in tooltip for ToolBitLibraryEdit.ui
Modifies 'tool bit' to 'toolbit'.

Fixes https://github.com/FreeCAD/FreeCAD-translations/issues/339
2026-01-05 07:08:39 +01:00
Billy Huddleston
a7c9cbee9e CAM: Add 0.05 um to V-bit tip diameter to prevent invalid sketch constraints
This commit applies a simple fix to the V-bit tool definition, adding a
small offset (+0.05 um) to the tip diameter. This prevents the sketch
from generating invalid constraints due to a zero or near-zero tip size.

src/Mod/CAM/Path/Op/SurfaceSupport.py:
- Add +0.05 um to tip diameter calculation to avoid constraint errors in
sketches
2026-01-04 10:42:06 -09:00
Billy Huddleston
2a24a539e6 CAM: Fix duplicate label issues with toolbits
Addresses problems caused by the "Allow duplicate object labels in one
document" option. Toolbit sub-objects now always get unique labels by
temporarily disabling this option during copy, preventing expression and
property binding errors. Also ensures tool controllers always use the
"TC: " prefix for consistency.

src/Mod/CAM/Path/Tool/shape/models/base.py:
- Temporarily disable DuplicateLabels during shape copy to enforce
unique labels

src/Mod/CAM/Path/Main/Gui/Job.py:
- Add "TC: " prefix to tool controller names when adding from the Job
panel
2026-01-04 13:39:20 -05:00
freecad-gh-actions-translation-bot
7fe10f7436 Update translations from Crowdin 2025-12-29 11:31:39 +01:00
sliptonic
c5ce65cfb8 Merge pull request #25398 from tarman3/migrateRampDressups
CAM: _migrateRampDressups - fix #25391
2025-12-27 11:31:07 -06:00
sliptonic
92d2e669f2 Merge pull request #26324 from tarman3/array_refactor_PathArray
CAM: Array - Refactor class PathArray
2025-12-27 11:26:48 -06:00
sliptonic
96bec2fd4d Merge pull request #26322 from tarman3/utils_splitArcs_deflection
CAM: Path.Post.Utils.splitArcs() - Fix zero deflection
2025-12-27 11:22:48 -06:00
sliptonic
83f74f32c2 Merge pull request #26422 from Dimitris75/CAM-Fix-Waterline-OCL-Adaptive
CAM: Waterline OCL Adaptive - Fix Linear and Angular Deflection Values
2025-12-27 11:22:21 -06:00
sliptonic
ebeb7b50c3 Merge pull request #25841 from tarman3/slot_clearPath
CAM: Slot - Clear path if can not create slot
2025-12-27 11:21:40 -06:00
sliptonic
798ba4d9aa Merge pull request #25374 from tarman3/engrave_baseobject
CAM: Engrave - Remove useless property BaseObject
2025-12-27 11:21:23 -06:00
sliptonic
2d00530225 Merge pull request #22484 from tarman3/ramp
CAM: RampEntry Dressup - Remove X0Y0 from beginning
2025-12-27 11:20:06 -06:00
horseDeveloper
4892154faf Fixing Leftover references from migration from freecadweb.org (#26163) 2025-12-26 11:11:12 -06:00
Dimitris75
99a4a98cb3 Fix Linear and Angular Deflection Values
Fix Linear and Angular Deflection Values
2025-12-25 00:16:21 +02:00
sliptonic
065fea473f CAM: Fix pure vertical linking move (#26195) 2025-12-23 12:19:32 -06:00
sliptonic
a139cef80f Merge pull request #26316 from tarman3/millfacing_icon
CAM: MillFacing - Fix icon active state
2025-12-23 10:58:30 -06:00
sliptonic
2a6e3f8fbe Merge pull request #26413 from MTronics/issue_#26343_CAM_relation_to_stock_gets_lost
Issue #26343: CAM Tasks panel ignores selected Stock
2025-12-23 10:21:45 -06:00
sliptonic
5124ee33c6 CAM: fix tolerance issue with hole detection (#26404) 2025-12-23 09:12:52 -06:00
pre-commit-ci[bot]
1763f46abf [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-12-23 12:07:53 +00:00
MTronics
3a7177764e Issue #26343: CAM Tasks panel ignores selected Stock
The current code in \src\Mod\CAM\Path\Main\Gui\Job.py (line 719) ignores selected stock selections. In case of e.g. cloned stock objects it defaults to the first item in the combolist, showing a wrong stock selection.

The cause lies in comparing different strings to find a label match, but one string object is generic (short name) while the other one has a suffix created during the clone process. The strings never match and the ridgid string comparison fails. I recommend using a partial (needle in haystack) string comparison.
2025-12-23 12:48:14 +01:00
Billy Huddleston
88a28f64c5 CAM: Add migration for Toolbit Units property
This PR adds migration for toolbit units by automatically infering the
Units (Metric/Imperial) from toolbit parameter strings and sets the
Units property if missing. It adds a utility function to detect units
from JSON. This is done at the JSON level during migration to ensure
that all toolbits have the correct Units property set.

src/Mod/CAM/Path/Tool/toolbit/migration.py:
- Infer Units from parameter strings if not set during migration
- Set Units property and log inference
- Refactor migration logic for clarity and reliability

src/Mod/CAM/Path/Tool/toolbit/models/base.py:
- Use Path.Log.debug instead of print when adding Units property

src/Mod/CAM/Path/Tool/toolbit/util.py:
- Add units_from_json() to infer Metric/Imperial from parameter strings
2025-12-23 00:32:47 -05:00
sliptonic
d2daf0fc20 Merge pull request #22304 from tarman3/taskpanel
CAM: Task panel - Select shapes from several objects
2025-12-22 17:07:37 -06:00
sliptonic
8845c1e256 Merge pull request #23149 from Dimitris75/OCL-Adaptive
CAM: Add OCL Adaptive Algorithm to Waterline Operation
2025-12-22 16:47:54 -06:00
sliptonic
9b570424d1 Merge pull request #25049 from phaseloop/v-routing
CAM: improved VCarve routing using "virtual edge backtracking"
2025-12-22 16:44:13 -06:00
sliptonic
4a1b74cf86 Merge pull request #24819 from tarman3/copyOp
CAM: OperationCopy - Allow for all and Recursive copy Dressup
2025-12-22 16:41:36 -06:00
sliptonic
326d423501 Merge pull request #24872 from tarman3/toggle_operation
CAM: ToggleOperation - Allow for Job and Operations group
2025-12-22 16:41:05 -06:00
freecad-gh-actions-translation-bot
8b7ec488f0 Update translations from Crowdin 2025-12-22 12:40:21 +01:00
tarman3
df3f311813 CAM: Array - Refactor class PathArray 2025-12-20 21:03:06 +02:00
tarman3
4f8ed3b1a0 CAM: Path.Post.Utils.splitArcs() - Fix zero deflection 2025-12-20 20:02:29 +02:00
tarman3
59aa295ec6 CAM: Array - Fix ViewProviderArray and icon 2025-12-20 10:45:20 +02:00
tarman3
efdabea4e0 CAM: MillFacing - Fix icon active state 2025-12-20 10:17:56 +02: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
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
freecad-gh-actions-translation-bot
6c6cff7322 Update translations from Crowdin 2025-12-17 21:10:10 -06:00
pre-commit-ci[bot]
be6c633d62 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-12-16 20:57:34 +00:00
Dimitris75
a840988ddb Refactor bounding box and tool path limit calculations
Refactor bounding box calculations for OCL Adaptive algorithm to improve clarity and maintainability.
2025-12-16 22:55:22 +02:00
pre-commit-ci[bot]
5b0cdb2b6d [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-12-16 20:23:12 +00:00
Dimitris75
93410b264a Override deflection values for OCL Adaptive algorithm
Added logic to override deflection values for OCL Adaptive algorithm to improve topology stability.
2025-12-16 22:18:47 +02:00
pre-commit-ci[bot]
f9bb30217b [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-12-16 15:39:06 +00:00
Dimitris75
67df5bd709 Use dynamic LinearDeflection and AngularDeflection values
Remove Temporary values from Mesh
2025-12-16 17:37:04 +02:00
sliptonic
a13502dccb Merge pull request #26205 from Connor9220/PreserveTSPTunnelExtraData
CAM: Update TSP tunnel solver
2025-12-16 09:31:14 -06:00
Dimitris75
b2ff8c5edc Merge branch 'OCL-Adaptive' of https://github.com/Dimitris75/FreeCAD into OCL-Adaptive 2025-12-16 14:27:21 +02:00
Dimitris75
a6bc504a2a Add OCL Adaptive in Tooltip
Add OCL Adaptive algorithm in UI Tooltip
2025-12-16 14:27:15 +02: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