Commit Graph

69 Commits

Author SHA1 Message Date
Samuel Abels
6150eac59f 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
170c1a274d [CAM] change default TC name to 5mm endmill (#23692) 2025-09-06 09:56:52 -05:00
David Kaufman
db9a615985 [CAM] Add UI elements for viewing and editing tool controller parameters from within the operation edit UI (#23180)
* [CAM] extract tool controller ui elements into their own file

* [CAM] make the changes in the tool controller UI only apply when ok is clicked

* [CAM] Add tool controller edit panel to the Profile operation

* [CAM] Add copy button to in-operation tool controller editor

* [CAM] clean up changes

* [CAM] Add tool controller edit UI to all operations

Notes on changes that were not a simple copy/paste job from the changes
I made for Profile:

- Deburr: changed TC/coolant rows from 1 and 2 to 0 and 1

- Probe: didn't work at all initially due to bug in main where ShapeName
  changed to ShapeType. I added a utility for reading either a ShapeType
or a ShapeName (check for both properties, convert ShapeType to lower
case) and applied it to probe and camotics

- Drilling: moved Keep Tool Down checkbox up from row 8 to row 2 (all
  intermediate rows were missing) and added the edit checkbox in row 3
below it

- VBit, Probe (or anything else that requires a specific tool type): in
  Base.py setupToolController(), I added a check to see if the currently
selected tool is an invalid type, and if so and there is a valid tool,
then change to that one. This fixes two UI bugs. Plausibly pre-existing,
if there is one valid tool and an invalid tool is selected, it's
impossible to switch to the valid one because you can't generate a combo
box change event for the new tool. Definitely new: if an invalid tool is
selected and there are no valid tools, the combo box will be empty but
the new tool controller edit utility will let you edit the current TC
anyway.

- Thread Milling: replaced the Tool Controller GroupBox with the
  standard QFrame layout, and added the checkbox. Note that this
operation doesn't have a UI element for coolant -- likely a bug, but I
didn't look into it

- Surface: Changed from form layout to grid layout. Deleted an old
  SurfaceEdit.ui file -- it was replaced with PageOpSurfaceEdit.ui in
2017 but not deleted (commit 77af19e7489e1fc637a68cdad220e5dd430dc2b9)

- Waterline: Changed from form layout to grid layout

* [CAM] Bug fixes

setupUi() wasn't called on the tool controller editor, preventing
changes in its UI from being written back to the object immediately.
This caused weird behavior where if you edited a field twice it would
reset the second time it was focused

Added a hook to automatically update the TC combo box when the TC name
(or anything else about it, since that was easier) changes

* Fix usage of QSignalBlockers

* [CAM] Block scroll events on tool number and spindle direction when not
focused

Specifically, if you mouse over either of these UI elements and use the
scroll wheel, it used to focus the element and change its value. This
commit makes it do neither of those things, for these specific elements,
as a measure against users accidentally changing these values.

* disable tcNumber edit field in operations panel

* Add "New tool controller" option to TC combo box

When selected, it opens (toggles, technically) the tool bit dock and
returns to the previous selection. Adding a new tool controller using
the dock (already, before this commit) automatically switches the
operation's tool controller to the new one

* Add "Copy" option to tool controller combo box

* Copy TC function only in combo box, no button

* [CAM] update in-operation "new tool controller" function to use a dialog

* [CAM] make the tool selector always a dialog and never a dock

* remove spacer from ToolControllerEdit.ui to fix exces white space

* [CAM] change tool dialog default sizing/spacing

* [CAM] fix bug where copying tool controller doesn't copy all values
2025-09-02 10:19:33 -05:00
Ryan Kembrey
4ff71394da CAM: Update UI strings for consistency
Closes: #22350
2025-08-04 20:13:52 +02:00
sliptonic
35a6d485ee Merge pull request #22228 from knipknap/fix-custom-attribute-edit
CAM: Various bugfixes for CAM tool management
2025-08-04 10:39:25 -05:00
Samuel Abels
8430fd5615 CAM: fix: CAM tests use files from user asset dir 2025-07-08 20:39:52 +02:00
Samuel Abels
59b73c08d3 CAM: Fix: rename vbit and threadmill back to v-bit and thread-mill to avoid backward compatibility issues 2025-06-30 22:59:14 +02:00
Samuel Abels
071747b376 CAM: Fix: shape parameters coming from the attributes section in the fctb file were not normalized 2025-06-30 21:48:21 +02:00
Samuel Abels
6464196d3a CAM: Fix: Tool editor ignored shape attributes if they were not in the Shape group. Now it reads all except Base 2025-06-30 20:27:54 +02:00
Samuel Abels
be16390773 CAM: make ToolBitShape more robust against invalidly typed parameters in toolbit files (e.g. Flutes with string value) 2025-06-30 20:27:26 +02:00
Samuel Abels
e23a01d8c6 CAM: Fix: Remove invalid normalization of shape name 2025-06-30 20:26:51 +02:00
Samuel Abels
55ed4e2e47 CAM: gracefully handle tool numbers that are strings in the tool library JSON 2025-06-29 21:39:04 +02:00
Samuel Abels
1f4799ecf4 CAM: Fix: ToolBitShapeCustom properties not editable if they had no type specified in the schema 2025-06-29 21:34:06 +02:00
Samuel Abels
f7038b9d64 CAM: fix toolbit editor shape resolution for high DPI displays 2025-06-29 13:15:47 +02:00
Samuel Abels
15b8dedc1c CAM: Fix: Tools without icon now display the thumbnail from the FCStd file 2025-06-29 12:57:32 +02:00
Samuel Abels
c69707a42f CAM: Fix: Chipload is not written to fctb file 2025-06-29 11:52:22 +02:00
Samuel Abels
7a614cb45a CAM: store tool quantities in user units, not metric 2025-06-29 11:52:07 +02:00
Samuel Abels
d19dcb2bcb CAM: Fix: custom shape attributes not showing in toolbit editor 2025-06-29 01:30:06 +02:00
sliptonic
441d3742cc Merge pull request #21961 from knipknap/tool-cleanups
CAM: Some cleanups (moving DetachedDocumentObject around)
2025-06-23 15:02:24 -05:00
Samuel
4a52ab9f05 CAM: Show abbreviations next to properly labels in the toolbit editor (#21887) 2025-06-16 10:40:32 -05:00
Samuel Abels
a07303025a CAM: move DetachedDocumentObject into a dedicated module for better reuse 2025-06-12 17:01:36 +02:00
Samuel Abels
dce6a577f0 fix: preferences key for asset path 2025-06-02 16:45:12 +02:00
Samuel Abels
a74d25c072 CAM: Fix: case_sensitive argument for glob() not supported in Python 2.10 2025-05-29 20:18:40 +02:00
Samuel Abels
6be1fc9bf4 CAM: Handle import of unknown shape types gracefully; allow case insensitive filenames, and allow invalid tool ID data type 2025-05-29 19:50:51 +02:00
Samuel Abels
6500e14c6c CAM: Fix: Custom tool parameters not showing up in property editor 2025-05-28 09:39:43 +02:00
Samuel Abels
1cd7e7015f CAM: Fix: Chamfer schema was missing TipDiameter 2025-05-27 22:50:40 +02:00
Samuel Abels
d63cfa50cb CAM: remove left over debug print 2025-05-27 16:20:24 +02:00
Samuel Abels
23536f0ff3 CAM: No need to copy defaultl shapes anymore, because the asset manager now dynamically fetches built-in shapes as a fallback 2025-05-27 16:04:10 +02:00
Samuel Abels
a6de157b1e CAM: Fix: ShapeType not displayed correctly in property editor 2025-05-27 12:46:12 +02:00
Samuel Abels
a2a5303df8 CAM: Improved handling of toolbit shape type inference 2025-05-27 12:07:19 +02:00
Samuel Abels
5fe73e2393 CAM: Refactor ToolBit.from_dict() for clarity and to generate more relevant warnings 2025-05-27 09:30:35 +02:00
Samuel Abels
63ebc0ae68 CAM: Change Camotics file extension to .json 2025-05-26 23:53:58 +02:00
Samuel Abels
7284c32b9d CAM: use three decimals in LinuxCNC export 2025-05-26 23:43:28 +02:00
Samuel Abels
36f0f21b63 CAM: Fix: all toolbits in camotics exported as Cylindrical 2025-05-26 23:42:44 +02:00
Samuel Abels
bd9f1257bc CAM: only copy shape icons if the shape folder is not initialized 2025-05-26 23:36:50 +02:00
pre-commit-ci[bot]
3be67e0286 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-05-26 17:17:07 +00:00
Samuel Abels
315eaf56a4 CAM: Fix: Only attach view if the Gui is up 2025-05-26 19:13:00 +02:00
Samuel Abels
2015cfedfb CAM: Fix recursionlimit due to invalid overwrite of exec() 2025-05-26 19:04:27 +02:00
Samuel Abels
2b9257f669 CAM: Reintroduce Save button for the library editor 2025-05-26 18:49:17 +02:00
Samuel Abels
c688591121 CAM: Fix: viewprovider not added when adding a tool to a document from the dock 2025-05-26 18:16:23 +02:00
Samuel Abels
1e68d4045f CAM: Add CamAssetManager now falls back to builtin assets if not found in user assets 2025-05-26 17:40:19 +02:00
Samuel Abels
cf2d1ae480 CAM: AssetManager now supports passing mutilple stores to all get_*() methods 2025-05-26 17:40:03 +02:00
Samuel Abels
0fb67224d3 CAM: Fix: updateSpinBox renamed to updateWidget 2025-05-20 17:08:21 +02:00
Samuel Abels
d5bc1642dc CAM: Update asset manager docs 2025-05-20 12:24:15 +02:00
Samuel Abels
a6edfcfa97 CAM: Fix some type hints and unnecessary debug output 2025-05-20 01:17:37 +02:00
pre-commit-ci[bot]
f594eecabe [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-05-19 22:45:31 +00:00
Samuel Abels
c8b53ed015 CAM: Add explicit implementation of FileStore.exists(), so AssetManager.exists() does not log FileNotFound warnings 2025-05-20 00:40:48 +02:00
Samuel Abels
5502ab750b CAM: Fix: Show builtin shapes in separate section in shape selector 2025-05-20 00:29:25 +02:00
Samuel Abels
cc41e6cfff CAM: Show shape ID on shape buttons 2025-05-20 00:28:46 +02:00
Samuel Abels
5b7a230f65 CAM: Handle shape schema violations gracefully (for now) 2025-05-20 00:07:26 +02:00