Commit Graph

473 Commits

Author SHA1 Message Date
Billy Huddleston
b5d97057be CAM: Introduce unified ToolBit parameter migration logic for Bullnose tools
- Added new migration system to handle legacy parameter conversion for ToolBit assets and objects.
- Implemented ParameterAccessor abstraction for consistent access to dicts and FreeCAD objects.
- Centralized migration logic for CornerRadius from TorusRadius or FlatRadius/Diameter, restricted to Bullnose shape-type.
- Updated asset and object initialization to use migration logic and filter Bullnose parameters.

src/Mod/CAM/Path/Tool/camassets.py:
- Integrate new migration logic for ToolBit assets using ParameterAccessor and migrate_parameters.
- Ensure shape-type is set before parameter migration; only write changes if migration occurred.

src/Mod/CAM/Path/Tool/toolbit/migration.py:
- Add ParameterAccessor class and migrate_parameters function for unified migration.
- Handle legacy parameter conversion for Bullnose tools.

src/Mod/CAM/Path/Tool/toolbit/models/base.py:
- Apply migration logic to ToolBit objects on restore.
- Filter Bullnose parameters to remove FlatRadius after migration.

src/Mod/CAM/Path/Tool/shape/models/bullnose.py:
- Add filter_parameters method to remove FlatRadius for Bullnose.

src/Mod/CAM/Path/Op/SurfaceSupport.py:
- Derive FlatRadius from CornerRadius and Diameter if both are present.

src/Mod/CAM/Path/Op/Surface.py:
- Remove obsolete setOclCutter method.
2025-12-01 11:30:00 -06:00
sliptonic
db65e44bca CAM: fixes bug with op creation/cancelation (#25800) 2025-12-01 10:59:49 -06:00
Billy Huddleston
708717cee2 CAM: Turn off debugging in CAM Preferences
Debugging was left on by mistake. Also 'Setting asset path' log message was at info level. Changed to debug level.
2025-12-01 10:53:02 -06:00
Roy-043
6a65b45242 Convert asset path to string in filePath function 2025-12-01 10:51:16 -06:00
sliptonic
98a2cb52c3 Merge pull request #25273 from Thom-de-Jong/main
CAM: Exporting G-code can be canceled from the editor dialog
2025-11-30 14:04:22 -06:00
sliptonic
46f9cb0ac5 Merge pull request #25253 from tarman3/geom_usehelixforbspline
CAM: Path.Geom.cmdsForEdge() - remove useless 'useHelixForBSpline'
2025-11-30 09:59:03 -06:00
Thom de Jong
bbb3bdd839 Merge remote-tracking branch 'upstream/HEAD' 2025-11-30 12:43:31 +01:00
sliptonic
28b9fa0151 Merge pull request #25553 from tarman3/leadinout_overtravel6
CAM: LeadInOut - Fix regression after #24829
2025-11-29 12:34:37 -06:00
sliptonic
eb8b2ddad2 [CAM] Reimplemented Mill facing operation (#24367) 2025-11-28 23:26:36 +00:00
tarman3
91fd699f2d CAM: Path.Geom.cmdsForEdge() - remove useless 'useHelixForBSpline' 2025-11-28 20:13:24 +02:00
sliptonic
f18842114f Merge pull request #25205 from tarman3/isVertical
CAM: Path.Geom.isVertical() for BSpineSurface (simple face after scale)
2025-11-28 12:08:10 -06:00
sliptonic
effe043019 Merge pull request #25635 from tarman3/oputil_1_linter
CAM: OpUtil - Fix linter errors
2025-11-28 12:03:06 -06:00
sliptonic
1ff6d15b64 Merge pull request #25023 from sebastianohl/main
CAM: fixing drill handling, as KinetiNC does not implement G81 etc. correctly
2025-11-28 11:54:08 -06:00
sliptonic
c3068b2b66 Merge pull request #25022 from s-ohl-ostfalia-de/main
CAM: adding cooling feature to Kinetic post processor
2025-11-28 11:52:29 -06:00
sliptonic
83fc0385a3 Merge pull request #24807 from tarman3/inspect
CAM: Line numbers in Inspect window
2025-11-28 11:48:24 -06:00
sliptonic
e20fd153ed Merge pull request #23862 from tarman3/gcode_editor_dialog
CAM: Show line numbers in export gcode dialog
2025-11-28 11:47:01 -06:00
Thom de Jong
dc4f9c694d Change button text and disable OK when text unchanged 2025-11-25 22:10:32 +01:00
pre-commit-ci[bot]
6da7cb2f9f [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-24 23:12:28 +00:00
Lawrence Woestman
f349336fc8 CAM: fix for linuxcnc ignoring --preamble argument, with test 2025-11-24 14:40:16 -08:00
tarman3
06bc4f61e0 CAM: OpUtil - Fix linter errors 2025-11-24 23:21:36 +02:00
Billy Huddleston
9cab1f8f52 CAM: Make CAM tests and serialization robust to locale-dependent decimal separators
Updated CAM unit tests and LinuxCNC serializer to handle decimal separators consistently, ensuring tests pass regardless of system locale. Assertions now compare FreeCAD.Units.Quantity objects directly or normalize decimal separators in strings. LinuxCNC serializer output is forced to use periods for decimals.

src/Mod/CAM/CAMTests/TestPathToolBitListWidget.py:
- Normalize decimal separators in tool description assertions for locale robustness.

src/Mod/CAM/CAMTests/TestPathToolBitPropertyEditorWidget.py:
- Use FreeCAD.Units.Quantity for direct quantity comparisons in property editor tests.

src/Mod/CAM/CAMTests/TestPathToolBitSerializer.py:
- Compare deserialized and serialized quantities using FreeCAD.Units.Quantity for consistency.

src/Mod/CAM/CAMTests/TestPathToolShapeClasses.py:
- Compare parameter values and units directly instead of relying on string formatting.

src/Mod/CAM/Path/Tool/library/serializers/linuxcnc.py:
- Force period as decimal separator in LinuxCNC serializer output to avoid locale issues.
2025-11-24 18:53:32 +01:00
sliptonic
ebbddc97e2 Merge pull request #25570 from Connor9220/FixChipLoad
CAM: Ensure Chipload is restored and displayed with user-preferred units
2025-11-23 12:42:24 -06:00
sliptonic
42e6af4237 Merge pull request #25106 from davidgilkaufman/tool_migrations_custom_dir
[CAM] Offer automatic migration of tools in (old) custom working directory to the new tool system
2025-11-23 12:28:17 -06:00
sliptonic
971fd31068 Merge pull request #22738 from tarman3/bsplinesurface
CAM: Pocket BSplineSurface
2025-11-23 11:49:52 -06:00
Billy Huddleston
4432575243 CAM: Ensure Chipload is restored and displayed with user-preferred units
Fixes an issue where Chipload and similar mixin-defined properties were added to
the schema but not reliably restored, because parameter restoration did not always
apply them to the toolbit object. This change ensures Chipload is restored from saved
data and displayed using the user's preferred unit schema, even when no document
is open. This update also ensures the toolbit editor respects the user’s unit schema
preference during editing, even outside an open document.

src/Mod/CAM/Path/Tool/toolbit/models/base.py:
- Restore Chipload (and other parameters) to toolbit.obj if the property exists.

src/Mod/CAM/Path/Tool/toolbit/ui/editor.py:
- Set units schema to user preference when opening the toolbit editor, so Chipload and other values display correctly.
2025-11-23 11:45:47 -05:00
tarman3
a0876f8060 CAM: LeadInOut - Fix regression after #24829 2025-11-21 23:00:37 +02:00
tarman3
dc776de547 CAM: Line numbers in Inspect window 2025-11-17 19:55:54 +02:00
tarman3
0e0f948d71 CAM: Show line numbers in export gcode dialog 2025-11-17 19:55:15 +02:00
tarman3
889dc7059c CAM: Pocket BSplineSurface 2025-11-17 19:53:47 +02:00
tarman3
5dd3d3d8b1 CAM: Engrave - Fix #22380 - duplicates 2025-11-17 19:40:05 +02:00
sliptonic
8c8b26ee4b Merge pull request #25371 from tarman3/engrave_fix9114
CAM: Engrave - Fix #9114 - Unable to engrave an arc
2025-11-17 11:19:23 -06:00
Billy Huddleston
900d5ae255 CAM: Fix crash when Path panel widgets are deleted
Prevent RuntimeError by safely handling missing or deleted geometry import
widgets in Path operation panels. This ensures the UI update code does not
fail if the underlying C++ objects are destroyed, improving stability when
panels are closed or the UI changes.

src/Mod/CAM/Path/Op/Base.py:
- Wrap geometry import widget access in try/except to avoid crashes
- Add error handling for panel widget deletion scenarios
2025-11-17 11:11:24 -06:00
tarman3
2e3a4d541c CAM: LeadInOut - Fix overtravel 2025-11-17 10:45:08 -06:00
David Kaufman
767ee484ba Hopefully placate CodeQL 2025-11-17 09:18:30 -05:00
tarman3
a514cfdf4b CAM: Engrave - Fix #9114 - Unable to engrave an arc 2025-11-16 20:47:21 +02:00
sliptonic
bb172e4a6b CAM: Renaming of postprocessors and cleanup (#24771)
* Post Processor cleanup and rename

remove unused files
Basic implementation of generic post
add blending mode support for linuxcnc
add mocking for postprocessor tests
Add tests for generic post
linuxcnc test only tests linuxcnc specific functionality

minor improvements
add arc splitting to refactored post processors
Refactor smoothie post
move posts to legacy.  Remove 'refactored'
lint cleanup
fixes #19417

* [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-11-15 09:46:34 -06:00
tarman3
00a4de14e7 CAM: Slot operation - Tooltip - single slot (#25087)
* CAM: Slot tooltip

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

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

---------

Co-authored-by: sliptonic <shopinthewoods@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-14 23:25:14 +00:00
tarman3
1ed08a2e43 CAM: Geom - isVertical for BSpineSurface 2025-11-14 23:22:09 +02:00
David Kaufman
f22d0e2292 migrate silently, no prompts 2025-11-14 14:37:05 -05:00
sliptonic
e212f2a175 Merge pull request #25212 from tarman3/geom_segm
CAM: Path.Geom.cmdsForEdge() - remove useless 'segm'
2025-11-14 12:32:38 -06:00
sliptonic
011a6d93bd Merge pull request #25215 from tarman3/geom_clean
CAM: Path.Geom - fix linter errors
2025-11-14 12:25:37 -06:00
sliptonic
bd844b8273 Merge pull request #24852 from tarman3/inspect_mhs
CAM: Inspect - decrease default Max Highlighter Size
2025-11-14 12:23:27 -06:00
sliptonic
f9c05d18af Merge pull request #25074 from tarman3/slot_face
CAM: Slot - Reject incorrect faces selection
2025-11-14 12:15:53 -06:00
sliptonic
86037a1462 Merge pull request #23285 from davidgilkaufman/feed_rate_percentage
[CAM] Feed rate percentage for ramp and lead in/out moves
2025-11-14 12:07:49 -06:00
sliptonic
4dd03be0dc Merge pull request #24676 from Connor9220/TappingWithAnnotations
CAM: Add rigid tapping support to linuxcnc_post.py via Annotations
2025-11-14 11:39:59 -06:00
sliptonic
4005b78e6d Merge pull request #22764 from tarman3/postprocess
CAM: Post Process only selected Operations
2025-11-14 11:35:27 -06:00
Thom de Jong
cca733810f Merge branch 'main' into main 2025-11-14 17:52:07 +01:00
Max Wilfinger
fd45dc1721 Merge branch 'main' into main 2025-11-14 15:16:11 +01:00
tarman3
b0a79a6f2c CAM: DressupArray - Fix python import 2025-11-14 00:11:44 +02:00
tarman3
0dc28c57d7 CAM: Path.Geom - fix linter errors 2025-11-14 00:07:05 +02:00