Skip to content

Commit cc532ae

Browse files
5-Axis TCP & Tilted Working Plane
1 parent fc4fd6d commit cc532ae

48 files changed

Lines changed: 24731 additions & 11738 deletions

Some content is hidden

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

‎CHANGELOG.md‎

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

3+
## 1.7.1 - 2026-09-30
4+
5+
- Added a bilingual prompt to reload the open document after another program changes it on disk. Declining keeps editor changes; accepting reloads the file and warns before discarding unsaved edits.
6+
- Added `.ptp` to the GUI Open/Save file filters. When UTF-8 decoding fails on Open, the editor tries Windows-1251 and preserves the detected encoding on Save.
7+
- Added `G68.2` tilted working planes and `G53.1` table-axis indexing for `fanuc_mill` with the enabled angled AC/BC table profiles. The physical tool axis is solved against the selected profile; programs without a supported profile or with an unreachable orientation stop explicitly. Included vertical arcs, DXF geometry, machine-reference bypass, cube golden tests, and guarded NC export.
8+
- Added continuous five-axis `G43.4` TCP motion for the angled AC and BC table profiles. TCP activation and rotary indexing preserve the current physical point; `G53 Z0` and `G91 G28 Z0` return to the configured home Z. Added a corpus-wide FANUC milling trace continuity regression check and the `impeller.ptp` / `impeller2.ptp` fixtures.
9+
- Added the tapered ball mill (`TAPER_BALL_MILL`) to milling tool definitions, dimension validation, discovery and preview geometry.
10+
11+
- Added milling `M19` spindle-orientation and `M29` rigid-tapping preparation signals. An `S` word on an `M19` block is recorded as an orientation angle without replacing spindle RPM; `M29 S...` sets RPM, marks following `G84` cycles as rigid tapping, and `G80` clears that state.
12+
- Added regression checks for `M19` orientation, `M29` with `G84` in `G95` and `G94` feed modes, and cancellation of rigid-tapping preparation by `G80`.
13+
- Expanded both FAQs with complete tables of recognized milling G and M functions, clarified Type A/Type B turning-cycle codes and GUI resource limits, and revised the Russian terminology and export explanations.
14+
315
## 1.7.0 - 2026-09-29
416

517
- Corrected physical milling views for horizontal and vertical spindle profiles, including camera orientation and restoring the selected view after changing kinematics.

‎FAQ.md‎

Lines changed: 85 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ The same FAQ can be packaged for offline use in **Help → FAQ**.
106106
- [Does P dwell in turning G83/G84 create geometry?](#does-p-dwell-in-turning-g83g84-create-geometry)
107107
- [What happens if a modal drilling/tapping cycle is left in an invalid state?](#what-happens-if-a-modal-drillingtapping-cycle-is-left-in-an-invalid-state)
108108
- [FANUC milling](#fanuc-milling)
109+
- [Which milling G functions are recognized?](#which-milling-g-functions-are-recognized)
110+
- [Which milling M functions are recognized?](#which-milling-m-functions-are-recognized)
109111
- [What basic milling motion is modeled?](#what-basic-milling-motion-is-modeled)
110112
- [How is indexed rotary milling handled in 1.6.7?](#how-is-indexed-rotary-milling-handled-in-167)
111113
- [Which rotary profiles have been checked?](#which-rotary-profiles-have-been-checked)
@@ -369,7 +371,7 @@ uv run --no-dev python main.py
369371

370372
### Which input encodings are supported?
371373

372-
The normal document encodings are UTF-8 and Windows-1251. The CLI exposes the supported encodings through `--encoding`.
374+
The normal document encodings are UTF-8 and Windows-1251. The GUI opens `.ptp` files by default and tries Windows-1251 if UTF-8 decoding fails; saving preserves the detected encoding. The CLI exposes the supported encodings through `--encoding`.
373375

374376
### Are compact FANUC blocks accepted?
375377

@@ -451,11 +453,12 @@ Yes. Supported modal groups are checked for conflicts within one block. A confli
451453

452454
Yes. The default execution budget protects against runaway macros, recursive calls and pathological cycles:
453455

454-
| Resource | Default limit |
456+
| Resource | GUI default |
455457
| --- | ---: |
456458
| Executed blocks | 500,000 |
457459
| Subprogram/macro calls | 10,000 |
458-
| Generated motions | 200,000 |
460+
| Generated motions | 2,147,483,647 |
461+
| Auto update max segments | 2,147,483,647 |
459462
| Cycle iterations | 100,000 |
460463
| Macro loop iterations | 100,000 |
461464
| General call depth | 64 |
@@ -934,20 +937,20 @@ If the required geometry cannot be established safely, the result is not present
934937

935938
The current turning cycle layer includes:
936939

937-
| Cycle | Purpose in the kernel |
938-
| --- | --- |
939-
| G70 | P-Q finishing contour |
940-
| G71 | Longitudinal roughing |
941-
| G72 | Facing roughing |
942-
| G73 | Pattern-repeat roughing |
943-
| G74 | Z peck / face grooving |
944-
| G75 | X peck / radial grooving |
945-
| G76 | Two-line multipass threading |
946-
| G83 | Axial peck drilling |
947-
| G84 | Axial tapping |
948-
| G90 | Modal longitudinal turning cycle |
949-
| G92 | Modal threading cycle |
950-
| G94 | Modal facing cycle |
940+
| Type A | Type B | Purpose in the kernel |
941+
| --- | --- | --- |
942+
| G70 | G70 | P-Q finishing contour |
943+
| G71 | G71 | Longitudinal roughing |
944+
| G72 | G72 | Facing roughing |
945+
| G73 | G73 | Pattern-repeat roughing |
946+
| G74 | G74 | Z peck / face grooving |
947+
| G75 | G75 | X peck / radial grooving |
948+
| G76 | G76 | Two-line multipass threading |
949+
| G83 | G83 | Axial peck drilling |
950+
| G84 | G84 | Axial tapping |
951+
| G90 | G77 | Modal longitudinal turning cycle |
952+
| G92 | G78 | Modal threading cycle |
953+
| G94 | G79 | Modal facing cycle |
951954

952955
Cycle geometry is expanded into ordinary logical motions. Those motions are then consumed by playback, statistics, Stock Removal and export.
953956

@@ -1206,6 +1209,62 @@ The runtime can report an `UNCLOSED_CYCLE`-class execution error rather than sil
12061209

12071210
## FANUC milling
12081211

1212+
### Which milling G functions are recognized?
1213+
1214+
This table lists the G codes recognized by the `fanuc_mill` kernel. Details and limits are explained below.
1215+
1216+
| G code | Function in the kernel |
1217+
| --- | --- |
1218+
| G00 | Rapid positioning |
1219+
| G01 | Linear interpolation |
1220+
| G02 / G03 | Clockwise / counterclockwise circular interpolation |
1221+
| G04 | Dwell signal; no spatial motion |
1222+
| G10 | Program WCS offsets (`L2`, `L20`) |
1223+
| G15 / G16 | Cancel / enable polar coordinate programming |
1224+
| G17 / G18 / G19 | Select XY / XZ / YZ plane |
1225+
| G20 / G21 | Inch / millimetre input units |
1226+
| G28 | Reference return using the configured home |
1227+
| G40 / G41 / G42 | Cancel / left / right cutter-radius compensation |
1228+
| G43 / G49 | Track / cancel tool-length state; G43 does not apply H geometry to the plotted path |
1229+
| G43.4 | Continuous TCP linear and rotary motion for the enabled angled AC/BC table profiles; circular rotary arcs and combination with G68.2 are unsupported |
1230+
| G50 / G51 | Cancel / enable coordinate scaling |
1231+
| G52 | Local coordinate shift |
1232+
| G53 | Non-modal machine-coordinate motion |
1233+
| G54–G59 | Select work coordinate system |
1234+
| G54.1 P1–P99 | Parsed and selected; the GUI has no offset setting, so the offset is zero unless the program sets it with G10 L20 |
1235+
| G65 | Call a Macro B program |
1236+
| G68 / G69 | Enable / cancel coordinate rotation |
1237+
| G68.2 / G53.1 | Tilted working plane / tool-axis orientation (3+2, `fanuc_mill` with two-axis table-table, head-head or head-table kinematics) |
1238+
| G73 | High-speed peck drilling cycle |
1239+
| G80 | Cancel canned cycle |
1240+
| G81 | Drilling cycle |
1241+
| G82 | Drilling cycle with dwell |
1242+
| G83 | Full-retract peck drilling cycle |
1243+
| G84 | Tapping cycle |
1244+
| G85 | Boring cycle with feed return |
1245+
| G86 | Boring cycle with spindle-stop signal |
1246+
| G90 / G91 | Absolute / incremental programming |
1247+
| G94 / G95 | Feed per minute / feed per revolution |
1248+
| G98 / G99 | Return to initial / R plane in canned cycles |
1249+
1250+
### Which milling M functions are recognized?
1251+
1252+
| M code | Function in the kernel |
1253+
| --- | --- |
1254+
| M00 / M01 | Stop / optional-stop signal |
1255+
| M02 / M30 | End program |
1256+
| M03 / M04 / M05 | Spindle clockwise / counterclockwise / stop signals |
1257+
| M06 | Tool-change event for the selected T number |
1258+
| M07 | Recognized; no machine-specific coolant action is modeled |
1259+
| M08 / M09 | Coolant on / off signals |
1260+
| M19 | Spindle-orientation signal; S on this block is an angle, not spindle RPM |
1261+
| M29 | Prepare rigid tapping; S on this block sets spindle RPM for the following G84 |
1262+
| M98 / M99 | Call / return from subprogram |
1263+
1264+
Unknown M codes produce `UNSUPPORTED_M_CODE` warnings. Recognized M codes describe trace signals and program flow; they do not simulate machine hardware.
1265+
1266+
`M29 S500` followed by `G84` marks rigid tapping in the trace. With `G95`, `F1.5` is 1.5 mm per revolution in metric mode; with `G94`, the equivalent feed at 500 RPM is `F750` mm/min. `G80` clears the rigid-tapping preparation. M29 syntax and whether it is required depend on the machine configuration. The kernel records synchronization semantics but does not simulate an encoder or spindle acceleration.
1267+
12091268
### What basic milling motion is modeled?
12101269

12111270
The milling kernel supports XYZ rapid, linear and circular/helical motion in the active G17/G18/G19 plane.
@@ -1224,7 +1283,7 @@ For the checked `4ax_table_c` profile, concurrent X/C feed blocks and C-only blo
12241283

12251284
The `4ax_table_a` and `4ax_table_b` profiles have been compared with the programs in `tests/fixtures/milling/indexed_table_a.nc` and `tests/fixtures/milling/indexed_table_b.nc`. The `4ax_table_c` profile is checked against `tests/fixtures/milling/indexed_table_c.nc`: its X/C contour overlays the program's first XY contour within 0.05 mm at the sampled endpoints. The fixture files are reference inputs, not definitions of a machine. Automated checks also cover A/B angle signs, G90/G91, and repeated G28/G53 behavior.
12261285

1227-
The catalog also contains head, mixed head/table, angled-axis and two-rotary-axis profiles. They remain in JSON with `enabled: false` and are hidden from the GUI because their geometry has not been checked against equivalent reference programs. Only `4ax_table_a`, `4ax_table_b` and `4ax_table_c` have `enabled: true`; **None** is the default selection. The confirmed scope is indexed 3+1 for vertical mill/table A and horizontal mill/table B, plus the checked planar X/C contour for table C. The schema does not specify rotary pivot locations, tool-center-point behavior or controller-specific offsets.
1286+
The catalog also contains head, mixed head/table and other two-rotary-axis profiles. They remain in JSON with `enabled: false` and are hidden from the GUI. The enabled profiles are `4ax_table_a`, `4ax_table_b`, `4ax_table_c`, `5ax_table_ac_angled` and `5ax_table_bc_angled`; **None** is the default selection. The angled AC/BC tables support indexed 3+2 through G68.2/G53.1. The schema does not specify rotary pivot locations, tool-center-point behavior or controller-specific offsets.
12281287

12291288
The JSON editor validates a profile and saves it to `rotary_profiles.json` beside the user's `config.ini`. It does not change the installed catalog. A selected profile defines the table/head axis and sign explicitly; the software cannot infer those properties from an A, B or C word. Execution steps retain the selected WCS and the configured rotary angles. G10 L2 and WCS changes preserve the current machine position after a table index.
12301289

@@ -1309,6 +1368,8 @@ G68 enables coordinate rotation around the programmed center in the active plane
13091368

13101369
The active transform applies to later endpoints and I/J/K arc vectors. Enabling or cancelling the transform does not itself create a motion segment.
13111370

1371+
G68.2 X/Y/Z I/J/K defines a 3+2 tilted working plane with Z-X-Z Euler angles. Select a kinematics profile with two distinct rotary axes first; supported topologies include table-table, head-head and head-table. G53.1 must be the next standalone block: it solves the selected profile's rotary angles to align the physical tool axis with functional +Z. An unreachable orientation stops with a diagnostic. G69 cancels the plane while retaining the indexed rotary position. This model applies only to `fanuc_mill`. Explicit A/B/C addresses during the tilted plane and simultaneous G68 rotation are unsupported. G53 and G28 reference motions use machine coordinates. Expanded NC export is unavailable for these programs; Full Program preserves the source.
1372+
13121373
### How does G51/G50 scaling work?
13131374

13141375
Milling G51 supports:
@@ -1324,11 +1385,15 @@ Axis-specific scaling of an arc can turn a circle into non-circular geometry. Th
13241385

13251386
### Is G53 supported in milling?
13261387

1327-
Yes. G53 is non-modal machine-coordinate motion. It does not overwrite the active WCS for later ordinary work-coordinate blocks. With a selected table profile, the machine-axis target is mapped into the fixed WCS display frame after the indexed orientation is applied.
1388+
Yes. G53 is non-modal machine-coordinate motion. It does not overwrite the active WCS for later ordinary work-coordinate blocks. An absolute zero axis target such as `G53 Z0` resolves to the configured machine home on that axis; non-zero absolute and incremental targets retain their machine-coordinate meanings.
13281389

13291390
### Is G28 supported in milling?
13301391

1331-
Yes. The configured reference-return path is resolved through the execution kernel rather than handled only by the GUI. For indexed milling, the intermediate and home targets are resolved on machine axes before their trace points are transformed for display.
1392+
Yes. The configured reference-return path is resolved through the execution kernel rather than handled only by the GUI. For indexed milling, the intermediate and home targets are resolved on machine axes before their trace points are transformed for display. `G91 G28 Z0` returns the Z axis to the configured home Z.
1393+
1394+
### Is continuous five-axis TCP (`G43.4`) supported?
1395+
1396+
For `fanuc_mill`, continuous `G0/G1` tool-center motion with simultaneous linear and rotary axes is supported on the angled AC and BC table profiles. Activating TCP and indexing rotary axes preserve the current physical point in the plotted trace. `G2/G3` rotary TCP motion and combining TCP with `G68.2` are unsupported. This is toolpath interpretation, not a complete machine or collision simulation.
13321397

13331398
### How are milling arcs programmed?
13341399

0 commit comments

Comments
 (0)