Table of Contents

PhysicsCommand Panel

The key model is PhysicsCommand, labelled Physics: one of the five Setup commands of the Add Command dialog. It carries two values, Enable — whether physics is simulated from the command on — and FeedbackMode — whether that physics is computed in Feedback Mode or in Ideal Mode, the default. The panel is the web application's one control for Feedback Mode.

The panel renders on the command's own node under the Mission root of the Execution page's Control Tree; the command has no section child nodes. Its tree checkbox only decides whether the run plays the command.

Layout

  • PhysicsCommand Panel
    • Enable Physics CheckBox — the first row, marked data-field="enable".
      • The model is Enable.
      • Default value: true
      • Disabled unless the advanced-physics licence is held: the engine declares the field physics-licence gated, as it does on General Config's Enable Physics.
    • Sub-options — indented under Enable Physics, marked data-testid="physics-sub-options", and rendered only while Enable Physics is ticked: Feedback Mode is a sub-option of physics, not a setting beside it.
      • Feedback Mode CheckBox — marked data-field="feedbackMode"; its explanation sits in its tooltip, not on the panel. See Feedback Mode.
      • “Not in this cloud plan” caption — one line under the Feedback Mode checkbox, rendered only while the licence's plan does not include Feedback Mode, and marked data-testid="feedback-mode-not-in-plan".

Neither checkbox depends on the Preference menu's Show Physics Options: the Physics command's row is on the Mission branch with that preference on or off, and so is its panel, Feedback Mode shown by Enable Physics alone.

Behavior

  • Two fields over the generic field endpoints. The panel has no endpoint of its own. It reads the command's declared fields with GET /api/Mission/commands/{path}/fields and writes one with PUT /api/Mission/commands/{path}/fields/{key}, the body a bare JSON boolean; the two keys are enable and feedbackMode. Both checkbox labels are the label the read answers, which the server takes from the engine's command vocabulary in the request's language — the same vocabulary the row's title is built from, so the panel and the row cannot disagree on a word.

  • The row says what the command will set. After a save the panel reports the change and the tree relabels the command's row: Physics [On], Physics [On, Feedback Mode] with both ticked, or Physics [Off] with Enable Physics clear, whatever Feedback Mode holds.

  • When Feedback Mode shows. Only while Enable Physics is ticked. Clearing Enable Physics takes the sub-options away, and the command then turns Feedback Mode off when it runs — see below; the save writes enable alone, so the command keeps its Feedback Mode value, and ticking Enable Physics again shows the box as it was.

  • When Feedback Mode is disabled. In two cases while it shows, and in each the box still shows the value the command stores:

    Case Why
    The advanced-physics licence is not held the field is declared physics-licence gated, as Enable Physics is
    The licence's plan does not include Feedback Mode feedbackModeInPlan of GET /api/preference/license-caps is false; the caption under the box says so

    The plan is read through getLicenseCaps, which reads a response without feedbackModeInPlan as included; a read that fails leaves the plan unknown, and an unknown plan disables nothing.

Feedback Mode

Feedback Mode is two project-level switches set together:

  • The chip-stock truncation — EnableChipStockTruncation. The chip thickness the milling force reads counts only the stock that was still there when the previous tooth passed. Off, the whole span from the cutting edge back to the previous tooth's circle counts as stock.
  • The deflection transformation — EnableDeflectionTransformation. Each step's sweep is shifted by the tip deflection the previous step's largest force bends the tool to, so the stock and the geometry difference carry the deflected tool; the toolpath and the step's feed and feed per tooth stay as programmed, and the first step after a change to another tool starts undeflected. Off, the tool cuts where the program puts it.

With both on, the machining pipeline runs its steps one at a time: each step waits for the force of the step before it, a tool change included, so a play is slower. With both off — Ideal Mode — the steps overlap in the pipeline.

  • What the command sets when it runs. One action sets three switches on the session shell: EnablePhysics to Enable, and both EnableChipStockTruncation and EnableDeflectionTransformation to FeedbackModeRequested, which is Enable and FeedbackMode together.

    Enable Physics Feedback Mode Physics Chip-stock truncation Deflection transformation
    ticked ticked on on on
    ticked not ticked on off off
    not ticked either off off off

    Without physics there is no force to cut the chip back by or to bend the tool with, and the chip-stock truncation alone would still run the pipeline one step at a time, so a command with Enable Physics clear turns both switches off. The command keeps its Feedback Mode value meanwhile, and ticking Enable Physics again brings the mode back.

  • From the command on. Like every Setup command it is positional: the programs below it play in the mode it set, until something further down sets the switches again. What a mission script, a REST call or the project file set before the command runs is replaced, on or off; a mission with no Physics command plays with the two switches as the project holds them. What the command set stays in the project and is saved with it: a Physics entry disabled or removed afterwards no longer runs, so the switches keep what its last run set. To go back to Ideal Mode, keep the entry and clear Feedback Mode.

  • What the tooltip says. It names the two halves, says that each step waits for the one before it and that the unticked default is Ideal Mode.

  • Saved with the mission. The project file stores the command with an <Enable> and a <FeedbackMode> element. A command stored before the field existed reads it as false, and so does the Physics command a stored General Config bundle expands into.

  • Under a plan without it. The command still sets both switches; the play then computes as in Ideal Mode whatever they say: the engine reads ChipStockTruncationInEffect and DeflectionTransformationInEffect, each a switch and the plan, and the first step after each reset says FeedbackMode--NotInPlan. The command, the switches, their REST pairs and the project file keep what was set (Signing In with a Cloud Account).

  • Set before a play. The runner reads both switches at every step, so a change reaches the next step played, while the steps already played keep the mode they were played under; turned on in the middle of a play, the steps of the first feed per tooth after the change look back at steps that recorded no stock and can read a thinner chip than they should. To compare the two modes, play the program once under each, under a licence that includes Feedback Mode. With either switch on, the step-physics recompute answers a change of an input that moves the forces with a request to replay instead, and so it does when the chip-stock truncation was switched since the play or, with it on, the licence's plan came to include or dropped Feedback Mode (Step Physics Recompute). With the chip-stock truncation on, NC optimization reads the chip table each step's play stored, and asks for a replay when the step cache holds none (What the Run Reports). Under a plan without Feedback Mode the recompute and NC optimization, like the play, take both switches as off.

Each Switch on Its Own

The two switches belong to the project's runner configuration, and each can be set without the command:

Surface Chip-stock truncation Deflection transformation
Physics command FeedbackMode — both at once, when the command runs the same field
Mission script EnableChipStockTruncation(API) EnableDeflectionTransformation(API)
REST GET / PUT /api/Controller/chip-stock-truncation GET / PUT /api/Controller/deflection-transformation
C# host EnableChipStockTruncation EnableDeflectionTransformation
Project file <EnableChipStockTruncation> <EnableDeflectionTransformation>

The command replaces what was set before it runs. Every row below the first writes the same two switches the command writes, so a value set ahead of the command — on or off — lasts only until the run reaches the command. That holds for a PUT sent before the play and for the project file's elements as well: neither sets a switch for a mission that runs a Physics command. To set one switch alone, put a Script entry below the Physics command in the mission and set the switch there: EnableDeflectionTransformation = true; turns the transformation on from there with the chip-stock truncation as the command left it.

Each GET answers a bare JSON true or false; each PUT takes a bare JSON boolean as its body and answers 200 with no body. Without a loaded project all four answer 404 with the coded NoProjectLoaded payload, and that is their only guard: they need no legacy controller model (Legacy Controller Model). A project file without one of the two elements reads that switch as off.

Source Code Path

See HiNC App Anatomy for git repository links.

Web Application

HiNC-2025-webservice (Quasar CLI SPA):

  • wwwroot-src/src/components/mission/PhysicsCommandPanel.vue — this editor: Enable Physics, the Feedback Mode sub-option rendered under it only while it is ticked, the two cases that disable Feedback Mode, the caption under a plan without it, and the change it reports after a save.
  • wwwroot-src/src/components/controlTree/missionItemTypes.ts — maps the physics kind to this panel in the per-kind editor map; a kind absent from that map gets the generic field editor.
  • wwwroot-src/src/components/mission/GenericCommandPanel.vue — the generic field editor, whose physics-licence gate on a declared field this panel applies to both of its checkboxes.
  • wwwroot-src/src/api/mission.ts — loadCommandFields and setCommandField, the read and the write of a command's declared fields this panel uses.
  • wwwroot-src/src/api/preference.ts — getLicenseCaps, the read of whether the licence's plan includes Feedback Mode.
  • wwwroot-src/src/stores/appState.ts — the physics-licence flag both checkboxes read.
  • wwwroot-src/src/i18n/en/mission.ts — the physics block: the Feedback Mode tooltip and the caption under a plan without Feedback Mode. The two labels are not here; the server sends them.
  • Missions/MissionController.cs — the generic commands/{path}/fields read and commands/{path}/fields/{key} write on /api/Mission.
  • Missions/MissionCommandFields.cs — the reflection layer behind those two endpoints: it describes and updates a command's [CommandField] properties, which is where the keys enable and feedbackMode and their localized labels come from.
  • Controller/ControllerController.cs — the two switches' own REST surface on /api/Controller: GET / PUT chip-stock-truncation and GET / PUT deflection-transformation, each a bare JSON boolean over the project's runner configuration, guarded on a loaded project alone.
  • Environments/PreferenceController.cs — GET license-caps, which answers feedbackModeInPlan.

HiAPI Engine

  • HiNc/SessionCommands/PhysicsCommand.cs — the model: Enable and FeedbackMode with their defaults, labels and physics-licence gate, FeedbackModeRequested, the XML round-trip, Run setting the three switches in one action, and the row title.
  • HiNc/SessionCommands/CommandFieldAttribute.cs — the field declaration both properties carry, with its label and physics-licence gate.
  • HiNc/SessionCommands/PreSettingCommand.cs — the expansion of a stored General Config bundle into the split Setup commands, this one among them.
  • HiNc/MachiningProcs/SessionShell.cs and HiNc/MachiningProcs/LocalProjectService.cs — the two switches as properties of the mission script's shell and of the project service, which read and write the project's runner configuration, and EnablePhysics on the shell.
  • HiMech/MachiningProcs/MachiningActRunnerConfig.cs — EnableChipStockTruncation and EnableDeflectionTransformation, the two switches behind Feedback Mode, with their elements in the project file, and ChipStockTruncationInEffect and DeflectionTransformationInEffect, each a switch and the licence's plan, which a play reads.

See Also

  • PreSettingCommand Panel — the General Config bundle a stored project expands into this command and four others, and the rule all five share: each applies from its own position on
  • Mission Root Panel — which command kinds have an editor of their own, and the generic field editor the rest get
  • Physics and Feedback Mode — the end-user task: choosing the mode before a play
  • The Other Commands — the five Setup commands as a task, this one among them
  • Step Physics Recompute — what a change after a play in Feedback Mode recomputes in place, and when it asks for a replay
  • Mission — the rest of the command panels