Table of Contents

Step Colors

Your own categories of steps: conditions over a step's properties that put each step in a leaf, with a colour and a chart lane per leaf, saved with the project.

A color tree sorts the steps of a run into categories you name — overloaded, rapid, in the air, cutting — by conditions over the step's properties: a step goes down the tree's list from the top and stops at the first node whose condition holds. A leaf is a category, with a colour of its own and a lane of its own on the Color Index Time Chart; a group is a condition whose own list sorts further the steps it takes. The project keeps its trees and every play reads them, and the tree that is the color index — the step property the Color Index Time Chart plots and the 3D view colours the tool path and the cut faces by — colours the run by its leaves. HiNC defines two trees of its own as well, Machining State and Machining State (No Physics), which the root lists first, read-only (Engineering View Coloring). The trees are the Execution page's fourth Control-Tree root, Step Colors, below Mission, Program and Step Variables, at Control-Tree path execution/step-colors.

Where it is

The root's panel lists three groups.

  • Built-in — the trees HiNC defines, read-only, before the project's: one row each, the name with the key and the number of leaves under it, a strip of the leaves' colours — the first fourteen — and the Inspecting badge while the color index reads the tree. A click unfolds the row to the tree's leaves, each with its colour, its name and its condition in one line, a group as a row of its own with its condition and its leaves one level in, above Set as color index — the Inspecting badge once the tree is the color index — and Copy to project tree… (Copying a built-in tree). A built-in tree is not saved with the project, it follows HiNC's version, and it has no node in the Control Tree.
  • Project — the trees this project defines, one row each: the name, with the key and the number of leaves under it, a strip of the leaves' colours, an Inspecting badge on the tree the color index reads, and a badge for what the engine made of the tree. Registered means it is in use. The others say why a tree is not: Does not compile — a problem keeps the tree from compiling, such as a term without a key; Unreadable — the tree was written by a version this one does not understand, and is kept as written; Key of a built-in property — a key named like a built-in step property or a built-in tree, or under MC.; Key repeated in the project — a step variable of the project or an earlier tree has the same key. Each tree is also a node under the root, its groups and leaves nodes under it, and its row selects that node. In the Control Tree a tree's row carries Inspecting too, and its state while it is not registered.
  • Registered at run — the trees a mission script registered for this session with RegisterStepColorTree, listed read-only with their colours. They have no node, and they go with the session.

Edits in this branch change the project in memory. They reach the project file when the project is saved, File › Save, and the panel says so under the list.

The Execution page's left dock: the run header with the six transport buttons and a green finished badge; under it the Mission and Program roots folded, the Program row carrying its Follow switch, refresh and recompute buttons, the Step Variables root with nothing under it, and the Step Colors root expanded over one child, Load check, badged Inspecting; the panel below is titled Step Colors and shows first the Built-in group with its count, the hint that its trees are defined by HiNC and read-only, not saved with the project, follow HiNC's version, and that one is copied to be changed, and two folded rows, each with an unfold arrow at its right — Machining State over MachiningState, its leaf count and a strip of swatches, red, red, orange, orange, orange, orange, yellow, yellow, yellow, blue, yellow-green, green, cyan and violet, and Machining State (No Physics) over MachiningStateGeometry, its leaf count and a strip of swatches, red, red, blue, cyan and violet; under a rule, the Project group with its count and an Add color tree button, the hint that the trees are defined in the project and saved with it and that every play colors its steps by them from the load on, and one row — Load check over LoadCheck, its leaf count and a strip of swatches, red, blue, green and cyan, badged Inspecting, with a Registered badge at its right — then the line that changes stay in memory until the project is saved, File › Save; under a rule, the Registered at run group with its count and its read-only hint, holding one row, Motion kind over MotionKind, its leaf count and a cyan and a yellow swatch

The branch at /execution?tree=execution/step-colors after a play. Machining State and Machining State (No Physics) are HiNC's built-in trees; Load check is the tree of the example at the end of this page, set as the color index; Motion kind was registered by the mission's script.

Adding a tree

Add color tree opens New Color Tree, which asks for a key. The key is checked as you type, by the rules of a step variable's key: it may not be empty, hold a comma, a quote or a slash, or be a lone . or ... The color trees and the step variables share one set of keys, so a key a tree or a step variable of the project already has is refused, and so is a built-in step property's key, one under MC., or a built-in tree's, MachiningState or MachiningStateGeometry (The key of a built-in color tree.). Add only ever adds: a key another browser tab added meanwhile is refused on the key field, and no tree is replaced. A key that a tree registered at run has is taken, with a warning: the project's tree replaces that one for the session.

The tree starts with one leaf, named Otherwise, which takes every step, and its panel opens.

Copying a built-in tree

Copy to project tree… — on a built-in tree's row, or in the Color Index Time Chart's Colors dropdown while the tree is the color index — opens Copy to Project Tree: a Key, which starts at the tree's key and Copy, MachiningStateCopy or MachiningStateGeometryCopy, or …Copy2 and on when that is taken, and is checked as a new tree's key is; a Name, which starts at the tree's name and (copy); and the hint that the copy is the project's own tree, saved with the project and editable, that HiNC's later versions leave it as it is, and that it carries no notes. Copy adds the copy at the end of the project's trees with the built-in tree's nodes — their numbers, conditions and hues, the leaves' names and short names in the app language — and opens its panel: from there it is a tree like any other. The color index stays where it was.

The tree's panel

The header carries the tree's state, Set as color index — or the Inspecting badge, when the color index already reads this tree — and Delete, with Revert and Apply at its right. Under it come the Key, the Name (shown in the lists and on the chart; empty shows the key) and the rule a step follows, in one line: A step goes down a list from the top and stops at the first node whose condition holds: a leaf gives it its color, a group passes it to its own list. Then Nodes, the tree's top-level list, with Add leaf and Add group. Each row of the list shows a leaf's colour, the node's name and its condition in one line — Any: 3 terms, Is Rapid = yes, Otherwise · shows Max Spindle Power Ratio — as the node's row in the Control Tree does, and a click opens the node. The preview is at the foot of the panel (below).

Set as color index makes this tree the color index: the Color Index Time Chart beside switches to it, and the 3D view colours the run by it, without a play. It is the same choice as picking the tree in the chart's property picker, where the tree is listed by its name. The note under the button says what it is: A project setting: every connected viewer sees it. The button is off, with the reason under it, while the tree is not registered — its state says why — and while it has changes not applied, since the color index reads the tree as applied.

Changing the key and applying renames the tree, and the color index and the chart's settings follow it, as the hint under the field says; where the Step Present Preference dialog lists the old key, it lists the new one next to it. Delete removes the tree from the project, after a confirmation. When the tree was the color index and nothing else is left under its key, the color index keeps the key, and a notification says that the charts and the 3D view show no value until a tree or a step variable is defined under the key again; when another tree under the key remains, or a tree or a step variable registered at run under it comes back, the color index reads that one, and nothing is said.

A tree that is Unreadable shows no nodes: its panels say it is kept as written, and Apply replaces it with the tree edited here.

Groups and leaves

Add leaf and Add group — on the tree's panel for its top level, on a group's panel for inside the group — add a node and open its panel. The node is numbered as it is added — in a tree added here, its first leaf, the Otherwise, is 1, the next node 2, and so on — and a number is never given twice, not even after its node is deleted. The number names a node until it has a name of its own, Leaf 2 or Group 5, and it is the node's address: execution/step-colors/LoadCheck/n2 is node 2 of the tree under the key LoadCheck, wherever the node stands, so a link to a node keeps working when the node moves. A new node goes before the last node of its list when that one takes every step — a node after an Otherwise would get no step — and at the end of the list otherwise. Its condition takes no step until you give it a term (Writing a Condition).

A group takes the steps its condition holds for and hands them down its own list, Children, where each stops at the first child whose condition holds. A step none of the children takes gets no colour: it does not come back out to the nodes after the group. The group's panel holds the Name, the Condition and the Children, with their own Add leaf and Add group.

A step falls into one leaf, and more leaves can hold on it. Below the leaf that takes a step, a leaf holds on it when its own condition holds and so does the condition of every group above it, whichever node took the step; an Otherwise holds only on the steps it takes, and no node after it in its list holds. The step keeps its one leaf — its colour in the 3D view, its row in Step Properties and in the step file, its count in Colors and in the preview — and the Color Index Time Chart bars, beside that leaf's lane, the lane of every leaf that holds on the step (Watching the Run: the Strip Charts).

A leaf colours the steps it takes. Its panel holds the Name, the Short name, the Hue, the Condition and Value shown on the time chart:

  • Short name is what the lane of the chart shows, about 9 Latin letters or 5 CJK characters. Empty shows the name, cut to fit. The tip on the axis, the legend and Colors keep the full name.
  • Hue is a bar over the colour wheel, a Degrees field and Auto, with the leaf's colour beside them. Under Auto the leaf takes the colour its number has as an ID — the colour a tool of that number is drawn in — which the bar and the field show once the tree is applied; before, the field is empty and the colour's tooltip says Shown after Apply. Automatic colours skip the stretches hatched on the bar, 300° to 30° (at both of its ends) and 220° to 270°: the reds, where colours that already mean something sit — a collision's among them — and the deep blues, which the canvas background swallows. A hue picked by hand may use them. Unticking Auto starts from the colour the leaf has, so nothing changes until you move the bar or type a hue, and from 120° on a leaf not applied yet. A hue outside 0 to 360 is kept and drawn modulo 360, with a warning.
  • Value shown on the time chart is a property with a numeric value, whose values the Color Index Time Chart draws in the leaf's lane, from the steps the leaf takes and from the steps of a more important leaf on which it holds; Not shown draws none. The 3D view paints a leaf's steps in its one colour either way.

Two leaves on one condition. A leaf whose condition is the very same as that of an earlier leaf of its list — the same join and the same terms in the same order — takes no step: each step it holds for is the earlier leaf's, as Step Properties, the 3D view and the step file say, and the preview below reads the later leaf 0 steps, since it counts the leaf each step falls into. It holds wherever the earlier leaf holds, so the Color Index Time Chart bars its lane beside the earlier leaf's and draws its Value shown on the time chart there, as for any leaf that holds; a value the chart can read only from the step cache, such as a step variable a mission script writes onto the steps, leaves a gap and a ? on the lane's name. In the legend's row of the tree the later leaf is left out where the earlier one is listed. In Colors the later leaf's row counts the earlier leaf's steps that hold its value, its share of the same drawn time with those steps counted once, and reads — when none of those steps holds one. That is how the built-in Machining State draws High breakage probability over Stress overload's steps (Reading the Load Leaves), and a copy of the tree keeps it because the conditions are copied. Changing one of the two conditions makes them ordinary leaves again.

Both panels end with the up and down arrows (Move up, Move down), which move the node one place in its list, Delete, and Move to, which takes the node, with what is under it, to the Top level of the tree or into another group, by the group's name: before that list's last node when that one is an Otherwise, else at its end. A moved node keeps its number, and so its address. Delete removes a leaf at once — Revert brings it back until you apply — and asks first for a group that holds nodes; the tree's panel then opens.

Writing a condition

A node's condition is either Otherwise, which takes every step that reaches it, or a Join — All hold or Any holds — over terms, each a key, a comparison and a threshold, a ratio's threshold typed in percent. How a term is written, what a missing value does and how terms are added is Writing a Condition.

Applying

Every panel of a tree — the tree's own and those of its groups and leaves — edits one set of changes, the tree's. Moving from one node of the tree to another, or to the tree's row, asks nothing, and the changes go along. The Control Tree's rows show them at once, a name typed or a node added, before anything is applied.

Apply, on any panel of the tree, sends the whole tree: its key, its name and every node. Revert puts the tree back as it was last applied. Whatever you type while Apply is on its way stays in the editor, not applied. An applied tree is in the project in memory at once, and when it is the color index, the 3D view and the Color Index Time Chart show it without a play.

Leaving the tree with changes not applied asks first, in Unapplied Changes: Cancel stays, Discard drops the changes, Apply & Switch applies them and goes on once they are applied. A switch that does not ask — another page from the menu bar, Follow on the Program row taking the selection to the file the run is in — keeps the changes, and they are there when you come back to the tree. Loading, reloading or closing the project, or starting a new one, drops them without asking, and so does closing or reloading the browser tab.

What is wrong is marked where it is, on the field, the node or the term, with the full explanation on hover:

  • Errors, which keep the tree from being applied: a term without a key (Pick a key.), a comparison without a threshold (Type a threshold.), a comparison this version does not know. The header of every panel of the tree lists the errors elsewhere in it, under To fix elsewhere in this tree: — up to three, each a link that opens its place, and +N more for the rest.
  • Warnings, for a tree that is legal but likely not what was meant, from a check that runs half a second after each edit and changes nothing: a condition with no terms (No terms: it holds for every step. under All hold, No terms: it holds for no step. under Any holds); a node after one that takes every step (Stands after a node that takes every step: no step reaches it.); a group with no children; a list with no node that takes every step, whose leftover steps get no colour; and a hue outside 0 to 360.
  • Tags on a term whose key reads otherwise than a step property: Physics hidden, above; Unresolved, a key no step property has at the time — a step variable since deleted, or a key only a play or a script registers — which reads as no value until one does; and A color tree's key, which always reads as no value.

The marks do not hold Apply back. Only a key refused by the checks under Adding a tree does, on every panel of the tree, and the server's answer decides the rest: what it refuses comes back marked where it points, and nothing of the tree is applied; the warnings of a tree it applied come back as notifications.

If the tree is changed somewhere else while you have changes not applied — in another browser tab on the same project, or by an agent over the HTTP API — the panels say so: Apply puts your version over that change, and Revert takes it. Without changes of your own, the panels follow it.

Trying it on the played steps

Preview over the played steps, at the foot of the tree's panel, runs the tree as it stands in the editor, applied or not, over the steps the run has played: those in the strip charts' window, Display range, or All steps. It changes nothing — not the color index, not the colours — and runs only when you press Preview. Before anything has played, the button is off and the panel says to play the mission first.

The answer names the range it covered and its first and last step, then lists each leaf with its colour, its Steps, its Time and its Share of the time — in percent with two decimals, 0% for none and <0.01% for a share under 0.01 % —, a No value row for the steps no leaf took, and the Total. A leaf that took no step is a result too. Under the table the selected step — select one on a chart, in the Program viewer or in the 3D view — is followed through the tree: the nodes it was tried at, in order, ✓ where the condition held and ✗ where it did not, ending at its leaf with the leaf's value when the leaf shows one — the leaf the step falls into; the leaves that also hold on it are not followed here, the chart's bars show them —, and after them the values the tree read on the step, Read: and each key's value, = yes or = no for a yes or no. A ratio's value there, the leaf's included, and the breakage probability's read in percent, as Step Properties prints them: Stress Ratio 82.35%. A zone's value, the leaf's included, reads its name, as Step Properties prints it too: Stress Critical Zone Flute.

Editing the tree, switching the range, moving the strip charts' window while Display range is picked, selecting another step or recomputing the physics marks the result as old, with a line saying which; press Preview again for a fresh one.

The Preview over the played steps section of the Load check tree's panel: a toggle with Display range picked beside All steps, a Preview button and the hint that the preview changes nothing, not the color index, not the colors; a line naming the display range and its first and last step, steps 0 to 12157; a table with Leaf, Steps, Time and Share columns, one row each for Overload, Rapid, Air and Cut with their swatches, then No value and Total, the steps and the share reading Overload 0 and 0%, Rapid 243 and 0.90%, Air 4156 and 34.31%, Cut 7759 and 64.79%, No value 0 and 0%, Total 12158 and 100.00%; and under it the selected step's line, Step 6079, then Overload ✗ → Rapid ✗ → Air ✗ → Cut ✓ with Cut's value in brackets, 2.37%, and Read: with the three ratios' values — Stress Ratio 0.82%, Max Spindle Torque Ratio 1.38%, Max Spindle Power Ratio 2.37% — Is Rapid = no and Is Touched = yes

The preview on the tree's panel at /execution?tree=execution/step-colors/LoadCheck, over the whole run, with a cutting step selected.

In the charts and the colours

A tree colours the run while it is the color index: set with Set as color index, or picked by its name in the Color Index Time Chart's property picker, under Engineering view, which lists HiNC's built-in trees first and a tree registered at run as well.

  • The 3D view paints the tool path and the cut faces of each step in its leaf's colour, and a step no leaf took in pale green, the colour of a step without a value. No colour scale bar is drawn for a tree.
  • The Color Index Time Chart draws one lane per leaf, named on its axis by the leaf's short name — the name, cut to fit, when the leaf has none — the first leaf's lane at the top, a grey bar in the lane of each leaf that takes or holds on the steps a pixel column shows, and in a leaf's lane the band of the value it shows (Watching the Run: the Strip Charts).
  • The chart's Colors dropdown shows the tree in place of a colour range: Color tree: and the tree's name, In the display range, each leaf with its colour, its Steps and its Time share, a No value row when some steps fell into no leaf, and Edit color tree →, which opens the tree's panel here. For a tree registered at run it reads Registered at run, read-only instead. For a built-in tree it lists, under In the display range, what the leaves cannot show — collision detection that was off or ran without a collision licence, steps from a CSV program, and for Machining State the physics switched off, the spindle capability the ratios are read against and the tools whose stress ratio could not be evaluated (Reading the Notes) — and reads Built-in, read-only, with Copy to project tree… in place of the link.
  • Step Properties shows a tree once you add its key, listed under Engineering View in the Step Present Preference dialog (Inspecting a Step). The row reads the number and the name of the step's leaf, 3 · Rapid in the example below, the number alone for a leaf without a name, and - for a step no leaf took.
  • A step file — Post-Execution › Step Files Output (The Other Commands) — carries a column under each registered tree's key, with the number of each step's leaf.

The Session Info panel filling the center column, the canvas hidden, on the Color Index tab: the group bar reads Load check, Colors, the range chip [0..12158] / 12158 and Time (s): —, and the reset control is two arrows. The Color Index Time Chart draws the Load check tree in four lanes named Overload, Rapid, Air and Cut — the leaves have no short name, so the axis prints the name, and the open dropdown covers the first lane — with Time (s) at the lower left: stretches tinted in the leaves' colours, a translucent grey bar filling each stretch's lane, the thin rapid stretches barring the Air lane as well, with nothing joining the bars of two lanes, each lane the cell between two horizontal grid lines, and, in the Cut lane over the cyan stretches, the band of Max Spindle Power Ratio. The Colors dropdown is open over the plot, reading Color tree: Load check and In the display range above a table of the four leaves with their swatches, Steps and Time share (Overload 0 and 0%, Rapid 243 and 0.90%, Air 4156 and 34.31%, Cut 7759 and 64.79%), and an Edit color tree → link. The legend lists Load check and Cut · Max Spindle Power Ratio, the latter with its least and greatest value, 0.05% ~ 12.06%; Overload shows no value, so it has no value row

The Color Index Time Chart at /execution, with Load check as the color index and its Colors dropdown open.

An example: a load check

A tree that marks every step of a run as an overload of the cutter or the spindle, a rapid move, a move in the air, or a cut:

Node Condition Hue Value shown
Overload (2) Any holds: Stress Ratio, Max Spindle Torque Ratio and Max Spindle Power Ratio, each Greater than 100 % 0°, by hand —
Rapid (3) Is Rapid Is yes Auto —
Air (4) Is Touched Is no Auto —
Cut (1) Otherwise Auto Max Spindle Power Ratio

The number after each name is the node's: the value Step Properties and the step file print for the leaf's steps. To build it, with Preference › Show Physics Options on:

  1. On the Step Colors root's panel, Add color tree, the key LoadCheck, Add. The tree's panel opens on a tree with one leaf, Otherwise; type Load check as its Name.
  2. Add leaf. The leaf's panel opens, Leaf 2: name it Overload, untick Auto under Hue and type 0 as the Degrees, then Add terms…, tick the three ratios under Physics, and Add 3. Each term comes in as Greater than 0: type 100 as each threshold, the field being in percent. The join is Any holds already.
  3. Select the tree's row, Load check, and Add leaf again: Rapid, with Add terms… and Is Rapid under Common, which comes in as Is yes.
  4. Once more: Air, with Is Touched, its comparison set to Is no.
  5. Open Otherwise: name it Cut, and under Value shown on the time chart pick Max Spindle Power Ratio.
  6. Apply, from any of the panels, then Set as color index on the tree's panel.

A step goes down the list in that order, so a rapid move is a rapid whether it touches anything or not, and Air takes the feed moves that touch nothing. Air's condition holds on a rapid move that touches nothing as well, so the chart bars both Rapid and Air over such a move; give Air the second term Is Rapid Is no to keep the two apart. The three ratios have a value only where the physics ran: on a play without it no step is an overload, and the steps go on to the leaves below. The threshold 100 %, where each ratio reaches its limit, is the example's choice — the built-in Machining State draws its lines there too — not a limit HiNC enforces. The thermal stress ratio is left out of Overload on purpose: it is a long-term indicator, which at or above 100 % marks machining that loses points — a loss of tool life, not a breakage risk — and which, with the shipped, conservative thermal properties, usually reaches 100 % under a toolmaker's recommended cutting data (Evaluating Process Machinability); Machining State gives it a leaf of its own, Thermal stress overload, after its overloads, and ordinary cuts often fall into it (Reading the Load Leaves).

See Also