Commit Graph

673 Commits

Author SHA1 Message Date
David Kaufman
183e82607a Fix units/extract RESOLUTION_FACTOR from area constants
Most of the code treats RESOLUTION_FACTOR as "number of clipper units in
a single step" -- a linear distance unit. However, there are a few
locations in which it is treated as unitless, multiplied by area
constants. This commit folds the current value of RESOLUTION_FACTOR into
these other contents in preparation for declaring it to have distance
units and increasing its value.
2025-11-12 21:36:05 +01:00
David Kaufman
2f91f74ac9 refinements 2025-11-12 21:36:02 +01:00
David Kaufman
04a9579561 [CAM] WIP fix adaptive stepover bug, many debug statements remain 2025-11-12 21:36:02 +01:00
pre-commit-ci[bot]
25c3ba7338 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
Billy Huddleston
ec2a41b86b CAM: Fix ReferenceError when accessing deleted toolbit object
Prevent crash (CAMTests) in ToolBitRecomputeObserver when the toolbit object has been deleted/missing
by catching ReferenceError before accessing its Document attribute. This ensures slotRecomputedDocument
exits gracefully if the object is no longer valid.

src/Mod/CAM/Path/Tool/toolbit/models/base.py
- Wrapped access to self.toolbit_proxy.obj.Document in try/except to handle ReferenceError
if object is deleted/missing, preventing crash during document recompute.
2025-11-10 18:44:02 -06:00
Billy Huddleston
2d83e86f07 CAM: Improve Z retract reliability in rotational scan after geometry recompute
Introduced FLOAT_EPSILON for robust floating point comparisons, resolving cases
where Z axis retract moves were missing after geometry recompute in 3D Surface
rotational scan operations. This prevents precision errors from causing the
cutter to skip intended lifts between rings or scan lines.

src/Mod/CAM/Path/Op/Surface.py
 - Added FLOAT_EPSILON constant
 - Updated Z move comparison logic to use tolerance
2025-11-10 10:45:58 -06:00
Billy Huddleston
871ab6df64 CAM: Fix infinite recompute loop when ToolBit properties use expressions
A bug in the ToolBit model caused an infinite recompute loop and UI freeze when properties such as Diameter, Flutes, or CuttingEdgeHeight were set to expressions. The visual representation update was being triggered during document recompute, which could recursively trigger further recomputes. This fix defers visual updates by queuing them and processing only after the document recompute completes, using a document observer. The observer is cleaned up after use and on object deletion, preventing memory leaks and repeated recompute cycles.

src/Mod/CAM/Path/Tool/toolbit/models/base.py:
- ToolBitRecomputeObserver: Document observer class that triggers queued visual updates after recompute completes via slotRecomputedDocument.
- _queue_visual_update: Queues a visual update to be processed after document recompute.
- _setup_recompute_observer: Registers the document observer for recompute completion.
- _process_queued_visual_update: Processes the queued visual update and cleans up the observer.
- onChanged: Now queues visual updates instead of calling them directly.
- onDelete: Cleans up any pending document observer before object removal.
2025-11-10 10:43:15 -06:00
neurallambda
df7ee72171 Fix CAM job "no attribute Proxy" (#25034) 2025-11-10 10:42:32 -06:00
tarman3
2e37667371 CAM: Slot - Fix references enumeration 2025-11-10 10:41:58 -06:00
Florian Foinant-Willig
3ae8f3d57a OCC usage: fix deprecated Handle_* 2025-11-06 10:43:52 +01:00
sliptonic
22309af65c Merge pull request #24732 from tarman3/dressup_icon
CAM: Fix Dressups icon Active state
2025-11-03 11:14:15 -06:00
pre-commit-ci[bot]
f413a569b3 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-10-31 21:06:39 +00:00
PhoneDroid
ba99bc5da4 [ CAM ]: Update SPDX License Identifiers 2025-10-31 17:00:32 -04:00
sliptonic
05b7ad0e9c Merge pull request #24875 from tarman3/simsubmenu
CAM: Simulators - Drop down menu in toolbar
2025-10-31 11:11:34 -05:00
Billy Huddleston
5b2987bd07 CAM: Fix expression editor so that widgets refresh after closing
src/Gui/QuantitySpinBox.cpp:
- Call updateExpression() after setExpression() in QuantitySpinBox

src/Gui/SpinBox.cpp:
- Call updateExpression() after setExpression() in ExpressionSpinBox

src/Gui/Widgets.cpp:
- Call onChange() after setExpression() in ExpLineEdit

src/Mod/CAM/Path/Base/Gui/Util.py:
- Connect to showFormulaDialog signal and refresh CAM QuantitySpinBox Python wrapper when dialog closes
2025-10-28 15:29:01 -05:00
github-actions
11fecb1558 Update translations from Crowdin 2025-10-27 21:06:54 -05:00
tarman3
478f8a0c76 CAM: Fix Dressups icon Active state 2025-10-27 20:21:45 +02:00
sliptonic
3a5b565bd8 Merge pull request #24809 from sebastianohl/main
Zero-4 machine controller don't like two M-commands in one line
2025-10-27 12:11:27 -05:00
Billy Huddleston
478292b9ec CAM: Refactor LeadInOut task panel to use QuantitySpinBox and improve migration/visibility logic
- Replace QDoubleSpinBox widgets with Gui::QuantitySpinBox in DressUpLeadInOutEdit.ui for all lead-in/out numeric fields, enabling unit/expressions support.
- Register QuantitySpinBox as a custom widget in the .ui file.
- Refactor TaskDressupLeadInOut panel setup:
  - Add setupSpinBoxes, setupGroupBoxes, setupDynamicVisibility for cleaner UI initialization.
  - Use PathGuiUtil.QuantitySpinBox for all numeric fields and ensure updateWidget() is called for each.
  - Centralize signal registration and field updates using getSignalsForUpdate and pageGetFields.
  - Move group box signal handler to a class method.
  - Share hideModes dictionary for field visibility logic.
  - Add dynamic label switching for "Radius"/"Length" with translation placeholders.
  - Remove the Include layers Check Box
- Improve ObjectDressup migration:
  - Use shared hideModes from TaskDressupLeadInOut.
  - Set default angles to 90 instead of 45.
  - Preserve previous style values when migrating StyleOn/StyleOff.
  - Ensure field visibility is updated after migration.
- Add Perpendicular and Tangent to lead_styles in correct order.
2025-10-27 12:10:06 -05:00
tarman3
9a81201b24 CAM: Simulator submenu in toolbar 2025-10-27 12:46:06 +02:00
tarman3
06e0fb4c19 CAM: LeadInOut - Fix isActive() 2025-10-23 15:16:02 +03:00
Sebastian Ohl
70be188426 adding newline, as the Zero-4 machine controller don't like two M-commands in one line 2025-10-23 13:54:22 +02:00
tarman3
3ea894029f CAM: LeadInOut - Fix LeadIn off 2025-10-23 06:48:14 +03:00
tarman3
f8662d75eb CAM: LeadInOut - Revert Perpendicular and Tangent styles 2025-10-22 20:22:49 +03:00
sliptonic
f1c7d91a74 Merge pull request #24433 from tarman3/leadinout_radius
CAM: LeadInOut - Radius and ToolController
2025-10-22 11:55:09 -05:00
github-actions
50d1dec4e0 Update translations from Crowdin 2025-10-20 09:57:05 -05:00
Chris Hennes
e806592d92 Merge pull request #24734 from Syres916/CAM_Fix_SetupSheet_Table_MinHeight
[Gui] fix Arch Grid QTableview height and buttons width...
2025-10-20 09:41:51 -05:00
Lawrence Woestman
fd2e4b1397 CAM: Incorporated the first round of feedback 2025-10-19 16:24:41 -07:00
Lawrence Woestman
b8c6d59ab6 CAM: Add proposed Epic for improving postprocessors 2025-10-19 15:19:57 -07:00
tarman3
68084b64c9 CAM: LeadInOut - Radius and ToolController 2025-10-18 18:37:37 +03:00
Syres916
879c083abf Merge branch 'FreeCAD:main' into CAM_Fix_SetupSheet_Table_MinHeight 2025-10-18 11:27:03 +01:00
David Kaufman
909cd46a9f fix bug opening job ui panel 2025-10-17 15:08:10 -04:00
sliptonic
f3186f4dc0 remove old supplemental fixture 2025-10-17 12:10:22 -05:00
David Kaufman
e3874a1973 [CAM] make the adaptive model aware feature optional (#24553)
* [CAM] make the adaptive model aware feature optional

* fix CAM tests

* placate github codql

* remove model-aware-only properties from the adaptive task ui panel
2025-10-17 10:42:15 -05:00
sliptonic
8df09d92c0 Merge pull request #24661 from tarman3/icon
CAM: Fix icon while changing Active state for class ObjectOp
2025-10-17 10:41:20 -05:00
sliptonic
b72f83136c Merge pull request #24606 from tarman3/toggle
CAM: Toggle Operation improve
2025-10-17 10:41:00 -05:00
Billy Huddleston
906edf7078 Promote embedded toolbits to correct shape type during migration
- Enhance _promote_toolbit to handle embedded toolbits that still have a "Custom" shape type.
- If ShapeType is "Custom" but ShapeID is present, attempt to promote to the correct shape class using ShapeID.
- Log promotion for traceability.
- This improves migration of legacy embedded toolbits and ensures proper shape assignment.
2025-10-15 18:04:40 -04:00
tarman3
c995a331b6 CAM: Fix icon and Active state for class ObjectOp 2025-10-15 07:39:02 +03:00
Syres916
8d3a2e93fd Merge branch 'FreeCAD:main' into CAM_Fix_SetupSheet_Table_MinHeight 2025-10-12 18:38:46 +01:00
tarman3
f17c46f8ec CAM: Toggle Operation improve 2025-10-12 15:22:35 +03:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ
cab1261a42 CAM: Remove UTF-8 coding declarations (#24527)
These declarations are no longer needed for Python 3+.
2025-10-09 13:49:18 -05:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ
78f29138bc CAM: Updated SPDX License Identifiers (#24525) 2025-10-09 00:36:39 +00:00
PhoneDroid
b5b9913293 Updated SPDX License Identifiers 2025-10-08 19:11:11 -05:00
Chris Hennes
9780cf931f Update translations 2025-10-05 2025-10-07 19:21:58 +02:00
sliptonic
432583bb20 Merge pull request #24069 from tarman3/leadinout_fix2
CAM: LeadInOut - Fix SafeHeight
2025-10-06 10:58:21 -05:00
sliptonic
5e06ae1b4d Merge pull request #24179 from tarman3/oldsim
CAM: Old simulator - Fix z for G2,G3
2025-10-06 10:45:42 -05:00
sliptonic
eba0450647 Merge pull request #24392 from Connor9220/FixToolbitTopo
CAM: Fix Topo recomputation by only updating when values change in Toolbits
2025-10-03 12:20:10 -05:00
sliptonic
10f5cb7479 Merge pull request #24323 from tarman3/leadinout_fix6
CAM: LeadInOut - Fix ZeroDivisionError for LineZ
2025-10-03 11:30:24 -05:00
sliptonic
ec0a78280b Merge pull request #24216 from tarman3/leadinout_threshold
CAM: LeadInOut - Fix RetractThreshold in Task panel
2025-10-03 11:28:59 -05:00
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