Commit Graph

357 Commits

Author SHA1 Message Date
Billy Huddleston
4a6991b771 CAM: Fix Topo recomputation by only updating when values change in Toolbits
- Use PathUtil.setProperty instead of direct setattr for schema properties to ensure proper FreeCAD notifications.
- Only update custom shape properties if the value has changed, reducing unnecessary recomputation.
- For SpindleDirection and Material, only update the property if the new value differs from the current value, and use PathUtil.setProperty for consistency.
- This prevents overwriting existing values with defaults and avoids triggering unwanted recomputation.
2025-10-02 18:56:53 -04:00
sliptonic
5349b819b0 Merge pull request #24046 from Connor9220/FixCAMSanityReport
CAM: Fix CAM Sanity Report
2025-09-29 11:09:06 -05:00
sliptonic
b18a3b3536 Merge pull request #24148 from Connor9220/ConvertTappingOpToExperimental
CAM: Convert tapping operation to experimental feature, Add tap pitch / spindle speed, Fix toolbit schema bugs, update legacy linuxcnc post
2025-09-29 11:03:13 -05:00
Billy Huddleston
cbeb67b509 CAM: Convert tapping operation to experimental feature, Add tap pitch support, improve tapping logic, and update toolbit schema and legacy linuxcnc post
CAM/App/PathSegmentWalker.cpp
- Add G74 to drill/tap/bore G-code recognition for tapping cycles

CAM/InitGui.py
- Move CAM_Tapping command behind experimental feature flag
- Only group drilling/tapping commands if both are enabled

CAM/Path/Base/Generator/tapping.py
- Add pitch and spindle_speed parameters to tapping.generate
- Output S (spindle speed) and F (pitch) in generated G-code

CAM/Path/Op/Tapping.py
- Require Pitch property for tap tools and SpindleSpeed for tool controllers
- Pass pitch and spindle speed to tapping.generate
- Use SpindleDirection to determine right/left hand tap

CAM/Path/Post/scripts/linuxcnc_post.py
- Handle G84/G74 tapping cycles: convert pitch and spindle speed to feed rate
- Remove F and S from output and recalculate F as needed

CAM/Path/Tool/shape/models/tap.py
- Add Pitch property to ToolBitShapeTap schema
- CAM/Path/Tool/toolbit/models/tap.py
- Show pitch and rotation in tap tool summary
- Use is_imperial_pitch to format pitch as TPI or mm

CAM/Path/Tool/toolbit/util.py
- Add is_imperial_pitch utility to classify pitch as imperial or metric

CAM/Tools/Bit/375-16_Tap.fctb
- Remove unused parameters (Coating, Rotation, TPI, Type)
- Keep only relevant tap parameters for new schema
2025-09-25 16:26:03 -04:00
Billy Huddleston
695cb49345 CAM: Fix SpindleDirection and Material not updating from toolbit files; reduce log noise
- Change missing property log in shape/doc.py from warning to debug
- Ensure SpindleDirection property exists and is set, defaulting to "Forward"
- Ensure Material property exists and is set, defaulting to "HSS"
- Update SpindleDirection and Material from toolbit file parameters if provided
2025-09-25 13:21:57 -04:00
Pascal de Bruijn
a3ebead67f CAM: fix PocketShape OffsetPattern broken by #23649 2025-09-23 17:25:44 +02:00
sliptonic
66c7f82f4a Merge pull request #22336 from dbtayl/fix_22177
[CAM] Correctly process Adaptive extensions
2025-09-23 09:24:01 -05:00
sliptonic
a7abaaef23 Merge pull request #23575 from tarman3/stock1mm
CAM: Fix stock create for flat objects
2025-09-23 09:22:30 -05:00
sliptonic
fc71a76f50 Merge pull request #24070 from tarman3/leadinout_fix3
CAM: LeadInOut - Remove useless var
2025-09-23 09:20:59 -05:00
sliptonic
91489bcf18 Merge pull request #24138 from pmjdebruijn/cam-stepover
CAM: Pocket sensible default StepOver
2025-09-23 09:20:17 -05:00
Billy Huddleston
c2d8077d96 CAM: Fix CAM Sanity Report
Fix base template substitution and improve tool/op formatting in sanity report, also update HTML/CSS and image handling.

- Major HTML/CSS refactor for CAM Sanity Report template:
  - Rewrote HTMLTemplate.py with modern, responsive CSS, semantic HTML, and accessibility improvements.
  - Added CSS reset, responsive image handling, and improved table/list styling.
  - Introduced .heading-container and .top-link for right-aligned "Top" navigation links on all major sections and tool headers (hidden in print).
  - Updated all section and tool headers to use new navigation and layout.
  - Cleaned up legacy markup, removed inline styles, and standardized variable substitution using string.Template syntax (${key}, ${val}).
  - Updated base_template in HTMLTemplate.py to use string.Template syntax (${key}, ${val}) instead of %{key}, %{val} for correct variable substitution.

- Enhanced image generation and embedding:
  - Updated ImageBuilder to support high-DPI (800x800) images and direct byte output for embedding.
  - All report images (base, stock, datum, tool) now use in-memory bytes for embedding when possible.
  - Tool images support a toggle for using toolbit thumbnails or fallback head-on renders.
  - ReportGenerator now embeds images as base64 when requested, with correct HTML tags.

- Improved squawk, tool, and operation data formatting:
  - Squawk dates now use localized string formatting.
  - Tool diameter and feedrate now use .UserString for better display.
  - Spindle speed now formatted as integer with "rpm" suffix.
  - Operation feed and speed values also use .UserString and "rpm" formatting.
  - Fixed _format_bases in ReportGenerator.py to iterate over base_data.items() and pass {"key": key, "val": val} to the template, ensuring all bases are listed correctly.
  - General code cleanup and improved maintainability throughout the CAM Sanity reporting stack.
2025-09-22 13:44:53 -04:00
Billy Huddleston
69ba0d2241 CAM: Fix group dropdown showing individual letters by ensuring groups is a list
- Add type check in PropertyCreate to wrap CustomPropertyGroups as a list if not already
- Prevents dropdown from displaying each character of a string as a separate group option
2025-09-22 12:59:26 -04:00
tarman3
544605bde7 CAM: LeadInOut - Remove useless var 2025-09-22 19:50:11 +03:00
sliptonic
3ffb861d11 Merge pull request #23892 from alihantadal/feature_23649_update_confusing_nomenclature_offset_pattern
CAM: Improve confusing nomenclature: Offset Pattern (#23649)
2025-09-22 11:42:31 -05:00
sliptonic
873210d190 Merge pull request #23957 from tarman3/leadinout_fix
CAM: LeadInOut - Fix for rapid move in end
2025-09-22 11:33:12 -05:00
Chris Hennes
f6128e5fab Merge pull request #24113 from sliptonic/versions
[CAM]: Asset versions and Various Fixes
2025-09-22 11:04:09 -05:00
Pascal de Bruijn
2ce559834b CAM: Pocket sensible default StepOver 2025-09-22 17:46:16 +02:00
Chris Hennes
da380d8b64 Merge pull request #24017 from sliptonic/betterunitschema
[CAM] change dialog to allow directly switching unit schema
2025-09-22 10:40:24 -05:00
David Kaufman
a85f53d0bb [CAM] reorder job tabs to put Setup first 2025-09-22 10:37:27 -05:00
pre-commit-ci[bot]
af592924b6 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-09-22 13:51:05 +00:00
sliptonic
21fa5facbf codeQl and suggestions from discussion. 2025-09-22 08:47:48 -05:00
sliptonic
9c81c71728 fix default library name on import 2025-09-21 13:32:31 -05:00
sliptonic
260aa3abf1 refactor migration 2025-09-21 13:14:13 -05:00
sliptonic
f65a826b08 library and bit import improvements 2025-09-21 12:01:27 -05:00
sliptonic
2dee048f0e template directory to camassets 2025-09-21 12:01:27 -05:00
tarman3
37eefde380 CAM: LeadInOut - Fix for path without rapid move in the end 2025-09-19 22:59:10 +03:00
sliptonic
4911c23d1f Merge pull request #23718 from pmjdebruijn/cam-pocketshape-offset
CAM: PocketShape defaults to Offset and 50% StepOver
2025-09-19 14:27:02 -05:00
pre-commit-ci[bot]
dfb3ae2ef4 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-09-19 19:17:09 +00:00
sliptonic
b7153e12e0 [CAM] Robustly test schemas to find the ones that work.
Robustly test current schema.

Fixes #22549
2025-09-19 14:14:08 -05:00
sliptonic
5f909452d2 [CAM] change dialog to allow directly switching unit schema 2025-09-19 14:12:50 -05:00
sliptonic
31d609eec8 Merge pull request #23720 from davidgilkaufman/leadinout_migration
[CAM] add missing migration from intermediate version for lead in/out dressup
2025-09-19 11:29:38 -05:00
sliptonic
8df2a54ccd Merge pull request #21578 from lagnat/main
CAM: Dragknife dressup adds unnecessary maneuvers
2025-09-19 11:24:43 -05:00
sliptonic
12a7151806 Merge pull request #23724 from davidgilkaufman/adaptive_reenable_profile
[CAM] regression fix: re-enable adaptive profile mode
2025-09-17 16:41:51 -05:00
sliptonic
a8c1c2f9dd Merge pull request #23902 from deimi/fix-import-snapmaker-post
CAM: fix library import in snapmaker postprocessor
2025-09-17 15:43:50 -05:00
sliptonic
e2ca3cce4b Merge pull request #23916 from davidgilkaufman/remove_qsignalblocker
[CAM] bugfix: replace python uses of QSignalBlocker
2025-09-15 14:10:54 -05:00
sliptonic
15eeb8ab1f Merge pull request #23776 from davidgilkaufman/fix_missing_tool_proxy
[CAM] regression fix: migrate old tools to new system
2025-09-15 14:08:47 -05:00
sliptonic
768cbbc85b Merge pull request #23856 from Connor9220/library-editor
CAM: Replace the main library editor dialog and add copy & paste & drag & drop support
2025-09-15 10:37:19 -05:00
David Kaufman
2cb86f259e also add qt5 compatibility for checkbox state change signal 2025-09-14 14:59:21 -04:00
David Kaufman
9ce9c6b99a [CAM] replace python uses of QSignalBlocker 2025-09-13 22:13:55 -04:00
Matthias Deimbacher
c0c9212c97 CAM: fix library import in postprocessor 2025-09-13 21:33:31 +02:00
Alihan Tadal
6bb3a39e39 CAM: Let old files adapt OffsetPattern property changes 2025-09-13 11:53:39 +03:00
Alihan Tadal
afff03c38b CAM: Improve confusing nomenclature: Offset Pattern (#23649) 2025-09-13 08:35:29 +03:00
Billy
60bcf64a01 CAM: Consistently rename "Tool" to "Toolbit" in UI and code
- Updated all user-facing strings from "Tool" to "Toolbit" for clarity and consistency.
- Changed combo box filtering logic to use index for "All Toolbit Types" (localization-safe).
- Improved visual distinction for "All Toolbits" in library editor (bold/italic).
- Reduced default SVG icon size in ShapeWidget for a more compact display.
- Updated window titles, labels, tooltips, and placeholder texts to use "Toolbit".
- Removed obsolete string comparisons in filtering logic.
- Change the Menu item from "Toolbit Library Editor" to "Toolbit Library Manager"
2025-09-12 18:04:57 -04:00
sliptonic
4ae36283d0 Ensure Qt5 compatibility with enums
Correct LGPL headers

rework bullnose  Fixes #19050
2025-09-12 15:24:16 -04:00
sliptonic
78bd46f815 fixes
fix duplicate toolbits
add tools to 'all tools'
context menus and deletion
/CamAssets/Tool/  directory structure
Assets and preferences
2025-09-12 14:19:30 -04:00
Billy
81faf7727c CAM: Remove hardcoded style for Tool Number, Fix TestPathToolBitSerializer
Fix issue with toolshapes
Renamed fillet to radius
Added Tool Type Filter to library
Fix units so that they honor user preference
Remove the QToolBox widget from the Shape Selector page and combine into a single page.
Fix issue with PropertyBag so that CustomPropertyGroups as a string is converted to enum and enums are handled correctly.
Update TestPathPropertyBag test for enum changes.
Update TestPathToolBitListWidget
Update TestPathToolLibrarySerializer to match new LinuxCNC output
Fix LinuxCNC export too handle ALL tool types, use user preferences for units, and include all lcnc fields
2025-09-12 14:18:33 -04:00
tarman3
34f4f16383 CAM: Clean DogboneDressup after PR#22250 (#23752) 2025-09-12 09:43:18 -05:00
sliptonic
10d1031e9b Make default postprocessor empty string. (#23706)
* Make default postprocessor empty string.

Default post when creating a job is now not set.  This will cause the user to be prompted for a post instead
This PR also cleans up some unit tests to avoid loading from disk

* [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-09-11 16:07:38 -05:00
Samuel Abels
2168e3cd99 CAM: Add AssetManager.copy() and .deepcopy()
CAM: Add copy/paste support for the ToolBitBrowser

CAM: Move library dropdown and sort order combo to dedicated row to give them more space

CAM: Fix: PathAssetManagerTest failed

CAM: Add YamlSerializer

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

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

CAM: Fix CodeQL complaints

CAM: add LibraryProperties dialog

CAM: Replace the LibraryEditor

CAM: allow for editing tool number in the tool editor dialog

CAM: Remember last selected library and sort order in preferences

CAM: support natural sort order in tool and library lists

CAM: Fix CodeQL complaints

CAM: Fix: not all attributes included in YAML serialization

CAM: Fix: UTF8 chars not included in LinuxCNC export

Fix: tool library not displayed when loading it for the first time

CAM: Fix: custom shape class not found

CAM: Check dependencies on import for friendlier error messages

CAM: Open file dialogs in home by default

CAM: Show "All Tools" entry in library list in the library editor

CAM: fix: error on sorting tools with no tool number

CAM: Fix: traceback if library contained tool number as string

CAM: Fix: Linter errors in manager.py

CAM: Fix: separator between library and tool buttons

CAM: Add drag & drop support to the library editor

CAM: Fix numerous linter errors on the AssetManager

CAM: Show current library in library editor window title

CAM: Add dedicated icons for library add + remove

CAM: Support F2 key in library editor

CAM: library editor handles delete key when library list is in focus; focus search field by default

CAM: fix: tool list in dock initially not loading

CAM: Fix: library editor did not open from "all tools" list

CAM: Increase precision of parameters in tool summary to 3 digits

fix TestToolBitListWidget
2025-09-11 10:45:41 -05:00
David Kaufman
874fe54053 [CAM] migrate old tools to new system 2025-09-09 11:49:55 -04:00