Skip to content

ClearNC v0.13.0 — 5-Axis & Lathe Safety Hardening, CAM Geometry Upgrades & Datasheet Studio Redesign

Choose a tag to compare

@github-actions github-actions released this 01 Dec 09:46
· 8 commits to main since this release

ClearNC v0.13.0 — 5-Axis & Lathe Safety Hardening, CAM Geometry Upgrades & Datasheet Studio Redesign

Live Studio: https://primeformlabs.github.io/clearnc/studio.html
Interactive Tutorial (9 Lessons): https://primeformlabs.github.io/clearnc/tutorial.html
Changelog: https://primeformlabs.github.io/clearnc/changelog.html

A huge thank-you to @warun7 (PRs #9–#17) and @cher-dinesh (Issues #18 & #19) for the extraordinary engineering contributions, deep controller audits, and reproducible safety test cases that made this release possible!


Highlights

1. 5-Axis & Mill-Turn Post-Processor, Plane Math & Gouge Verification (PRs #11, #13, #17 · @warun7)

  • Exact G68.2 Z-X-Z Euler Tilted Work Planes & Siemens CYCLE800 _MODE 27: Fixed tilted work-plane Euler angle generation and verifier replay across Fanuc, Mitsubishi, Mazak INTEGREX, and Siemens 840D 5-axis & mill-turn machines.
  • Native Siemens 5-Axis Drilling & Tapping Cycles: Enabled native CYCLE81/CYCLE83/CYCLE84 across all 5 Siemens 5-axis machines (siemens_840d, dmg_mori_dmu50_siemens, dmg_mori_dmu65_monoblock, hermle_c250, hermle_c400) and rejected ISO G81/G83/G84 leaks in the Siemens verifier.
  • Strict ASCII G-Code Comments: Stripped non-ASCII bytes across all 5-axis and mill-turn post-processors (including Okuma OSP-P500 okuma_mu5000v, okuma_multus_u3000, and Makino makino_a51nx).
  • Direct Post-G-Code CNC-GC06 Gouge Replay for 5-Axis & Mill-Turn (PR #13): Extended finished-part G-code gouge verification to tilted 5-axis planes and mill-turn operations across all 55 controller-verified machines.
  • Mill-Turn Turning Parity (PR #11): Brought non-monotonic OD roughing (flanges/valleys/inner fillets), bore chamfers/fillets, and full ID grooving (side: id / id_groove with min_bore safety) to mill-turn.

2. 3-Axis Milling CAM Geometry & Entry Upgrades (PRs #9, #10, #12, #14, #15 · @warun7)

  • Exact Narrow-Gap Outside Profile Offsetting (PR #9): Handles C-clamp mouths, narrow notches, and acute corners without bow-tie loops or gouges.
  • Exact rest_pocket & Polygon/Slot Islands (PR #10): Supports concave polygon and tilted slot islands, multi-island mutual clipping, and island-clipped horizontal raster clearing.
  • Analytical Bulged-Polygon Arc Offsetting (PR #15): Preserves true G02/G03 concentric and tangent vertex arcs on (x, y, bulge) contours with safe tessellated multi-lobe fallback.
  • Helical & Ramp Entries (PRs #12, #14): Honors bare and parameterized entry: helix and entry: ramp across pocket, rest_pocket, slot, and level_rough with wall-clearance radius clamping.

3. Complete Safety & Correct-G-Code Hardening (Closes #18 — 22/22 Verified Fixed · @cher-dinesh)

  • 5-Axis Rigid Tapping (Bug #1): Fixed hardcoded M29 S600 fallback across all 15 5-axis controllers so M29 S and G84/CYCLE84 feed always match programmed RPM, backed by new verifier checks.
  • Lathe & Mill-Turn Feed-Mode Switching (Bug #2): Modal G98/G99 (ISO/Haas/Mazak) and G94/G95 (Siemens/Okuma) switching whenever mm/min feed is programmed, verified by gcode_feed_mode_mismatch.
  • Real 3D level_rough & surface_finish Toolpaths (Bug #3): Replaced the single-diagonal stub with multi-Z-level bidirectional raster clearing and fine finishing passes.
  • Tap Surface Speed (m/min) Consistency (Bug #4): Resolved m/min tap speeds to RPM once and synchronized spindle, M29, and G84/CYCLE84 feed across all dialects.
  • Complete Lathe Operation Feature Support (Bugs #17, #18): Implemented real cutting moves for corner_break (chamfer/fillet), groove edge_chamfer, part-off back_chamfer, thread infeed: flank_29deg/radial/alternating, and face grooving (side: face).
  • Strict Units, Geometry, Tool-Type & Crash Guards (Bugs #5–#16, #19–#22): Rejected unitless speeds/limits (CNC-U01), zero/negative speeds & feeds (CNC-U03), negative stock allowances (CNC-U04), unknown contour/island/points references, face_mill vise jaw collisions (CNC-M06/CNC-SIM02), mismatched thread/bore/bar geometries, wrong tool types for operations, omitted required fields, empty-cut operations, unknown keys, duplicate tool declarations, and non-positive clamp crash inputs (with Studio stale-G-code clearing on WASM traps).

4. Block-Stock Slot CAD Solid Rendering (Closes #19 · @cher-dinesh)

  • Emits progressive per-pass obround capsule pocket CAD subtraction events for X-aligned, Y-aligned, diagonal, and contour-defined slot cuts on block stock (keeping flat_cut on cylindrical stock), with coordinate-hashed contourSignature in the 3D CAD viewer so multiple slots render cleanly side-by-side.

5. Engineering Datasheet Landing Page, 9-Lesson Tutorial & Studio Polish (PRs #16, #17 · @warun7)

  • Reconciled the upgraded datasheet landing page (with live interactive 3D hero part), dedicated 9-lesson tutorial.html, refreshed 8 Studio screenshots, cross-flavor Ctrl+Z undo (keepHistory), and Tab+Enter machine picker selection while preserving 100% of v0.12.0's 55 verified machines (17 OEMs, 9 dialects) and Local-First Browser Workspace IDE.

Verification Summary

  • cargo test --all-targets: 225/225 passed across 25 targets (0 failures, 0 warnings)
  • Golden controller regression: 9/9 verified (3/3 unaffected 3-axis controllers byte-identical; 6/6 updated controllers audited line-by-line)
  • WebAssembly Engine v0.13.0 (3.27 MB): 55/55 machines, 14/14 examples, 13/13 JS files, 22/22 Issue #18 cases verified fixed, Issue #19 exact repro verified passing (0 errors, 0 crashes, 0 gouges)