Skip to content

Commit 7d12567

Browse files
Introduce 3D milling stock simulation
1 parent 98894b3 commit 7d12567

143 files changed

Lines changed: 26372 additions & 18588 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ app/gcode/kernel/frontend/_native_parser*.so
2727
app/gcode/kernel/milling/_native_executor.c
2828
app/gcode/kernel/milling/_native_executor*.pyd
2929
app/gcode/kernel/milling/_native_executor*.so
30+
app/gcode/**/_native_stock.c
31+
app/gcode/**/_native_stock*.pyd
32+
app/gcode/**/_native_stock*.so
3033
app/tools/_native_discovery.c
3134
app/tools/_native_discovery*.pyd
3235
app/tools/_native_discovery*.so

‎CHANGELOG.md‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
# Changelog
22

3+
## 2.0.0 - 2026-10-10 - 2026-10-11
4+
5+
**The main feature of 2.0.0 is 3D milling stock removal on the GPU.** It adds inspection of the remaining material throughout a three-axis program, configurable surface detail and export of the current machining stage as STL, alongside the existing turning simulator.
6+
7+
### GPU milling stock removal
8+
9+
The milling simulator now keeps material state in GPU memory and renders the machined surface directly. Compute shaders apply cutter sweeps to affected stock regions, and a height hierarchy supports surface rendering. This replaces CPU material subtraction and repeated CPU reconstruction of display triangles. Program execution and trajectory preparation remain on the CPU; STL serialization reads the simulated GPU state. OpenGL 4.3 is required.
10+
11+
- Add 3D material-removal simulation for three-axis milling alongside the existing turning simulation. Resolve removal from cutter sweeps and configured tool geometry, including flat, face, ball and corner-radius mills. The current milling model is a three-axis height field; tilted cutters and undercuts are outside its scope.
12+
- Add a separate **Stock Removal** toolbar toggle for entering and leaving simulation. Keep Play/Pause, stepping, rewind and the playback slider synchronized with the displayed stock and tool position. Retain the turning simulation engine and replay behavior.
13+
- Extend the Stock dialog with automatic milling bounds, machining allowance and manual X/Y/Z bounds. Automatic stock uses the selected WCS zero as its top; manual bounds support facing above zero. Persist milling stock settings independently of turning settings.
14+
- Move milling material removal to OpenGL 4.3 compute shaders, keeping the remaining stock in GPU memory. Remove CPU material-removal kernels and CPU adaptive surface reconstruction. Update affected texture regions and their height hierarchy; render the surface directly on the GPU.
15+
- Preserve the selected five-level milling **Accuracy** regardless of program size, playback speed or frame cost. Changing Accuracy rebuilds the current GPU state at the selected resolution.
16+
- Prepare trajectory frames on a cancellable background worker, coalesce slider requests and discard obsolete frames. Perform GPU updates and rendering on the thread owning the OpenGL context.
17+
- Render bilinear height patches with analytical ray intersections and surface normals. Restore solid stock-colored box sides and bottom faces, including visibility from below; through cuts leave no false bottom cap. Retain rapid-cut damage coloring.
18+
- Add **Save stock as STL** to the Plot context menu during milling simulation. Export a detached readback of the current GPU stock on a cancellable worker and replace the destination atomically. Length units and maximum edge length control serialization; surface detail comes from simulation Accuracy. The retained linear/angular deviation fields do not reconstruct a finer surface.
19+
- Add configurable stock-material and machined-surface colors in Options / Colors, with persistence and Restore Defaults. Update English/Russian stock and export interface strings and packaged Qt resources.
20+
21+
### Tool setup, execution and release checks
22+
23+
- Refresh milling tool-name discovery for face, flat, ball, bull, tapered-ball, slot and chamfer cutters, including common CAM naming variants. Correct the first D50 face mill in `toolchange.nc` and the D10 ball mill in `bottle.nc`.
24+
- Treat milling T addresses as preselection until M6 activates the selected tool, including M6 in a following block and named SINUMERIK tools. Exclude tools that are only preselected from Tool Library / Current Program, keep operation hints attached to the active tool, and preserve turning tool-selection semantics.
25+
- Rebuild active stock simulation after editing or assigning current-program tool geometry, restoring the playback position. Cancel outstanding milling workers when leaving simulation or closing the window.
26+
- Remove obsolete CPU milling-stock tests and cover actual GPU removal, ball geometry, rewind/replay, rapid damage, Accuracy, box sides/bottom and STL readback. Keep turning simulation and its regression coverage unchanged.
27+
- Fix spurious milling positioning moves caused by floating-point roundoff after incremental motion followed by absolute coordinates or drilling cycles. Restore FANUC and SINUMERIK incremental indexed-program replay checks without expected-failure marks.
28+
- Preserve installed development tools when synchronizing the native build environment, avoiding attempts to remove a running Ruff language server during packaging.
29+
330
## 1.9.8 - 2026-10-09
431

532
- Reorganize the bilingual project landing page into feature sections with grouped screenshots, blue controls and larger text. Retain the video demonstration, crop its white borders and add full-viewport image/video previews with a top-right close button.

0 commit comments

Comments
 (0)