Table of Contents

PreSettingCommand Panel (General Config)

The key model is PreSettingCommand, labelled General Config. It is one command carrying a bundle of session settings — the machining resolution, the machining motion resolution, collision detection, pause on failure, physics — plus an optional read of a meshed-geometry file.

Where a General Config Comes From

How a mission acquires these settings is the first thing to know about this panel.

The Add Command dialog is served by the server's command catalog, which reflects every engine command carrying [CommandCatalog]. PreSettingCommand carries no such attribute, so the dialog cannot produce one — the catalog keeps presetting only as a readable kind key, and creating a command looks the kind up in the addable set alone. What the web offers instead is the same settings as five separate Setup commands, each placeable anywhere in the list:

  • Machining Resolution — MachiningResolutionCommand, 0.125 mm by default, reading Machining Resolution [0.125 mm] in the list. One created through the Add Command dialog directly under the Mission root takes the licensed default instead — the coarser of 0.125 mm and the width the licence allows the current workpiece (Workpiece.LicensedDefaultResolution_mm of the workpiece's reference size), so a value the user never chose is not clamped with a warning at the first play; without a cap, or without a workpiece to measure, that is 0.125 mm. One created into a nested List starts at the plain 0.125 mm, as a duplicate does: the follow a setup edit runs walks the root list alone. Its ladder picker greys the rungs finer than the width the cuts would run at — the licensed width, or the stock's own when the stock standing is already finer than the licence — and carries the captions described under the number field below.
  • Machining Motion Resolution — MachiningMotionResolutionCommand, Feed Per Cycle by default.
  • Collision Detection — CollisionDetectionCommand, on by default.
  • Pause on Failure — PauseOnFailureCommand, off by default.
  • Physics — PhysicsCommand, on by default, its field declared physics-licence gated.

Machining Resolution and Machining Motion Resolution ship editors of their own. The other three declare their one scalar with [CommandField] and are served by the generic field editor, which builds their input and its server-localized label from that declaration — so the web ships strictly more here than one bundle panel, and none of the three needed frontend code.

A project file never brings a reader to this panel either. Reading a stored bundle materializes those five commands in its place, in the order the bundle applies them, preceded by a Read-mode Record Meshed Geometry entry whenever the meshed-geometry read is enabled or a file is set. The bundle's own enable state is consumed into every entry the expansion produces, and the Record entry additionally keeps the bundle's read flag. A bundle stored as the project's bare root command expands the same way, and what the project saves from then on is the split commands.

That leaves one case this panel serves: a PreSettingCommand an API caller constructed into the list in place, which has not yet round-tripped through a project file. It edits that command through the commands/{path}/presetting/* endpoints, and every field is a PUT of its own.

When the Settings Take Effect

A list runs its entries in order and skips any entry whose Enable box is clear. General Config's Run then assigns straight onto the session shell, in this order: the meshed-geometry read when it is enabled, the machining resolution, the motion resolution, collision detection, pause on failure, physics.

So these are positional settings, not global pre-run settings. A program entry above this command plays under whatever was in force before it; entries below it play under these values, until something further down changes the session again. The five Setup commands state the same contract one setting at a time — each is documented as taking effect “from this command on” — and each can sit at a different point in the list, which is what having them separate buys.

Layout

In the web client the command owns two tree nodes: the command node carrying the machining settings, and one section child carrying the meshed-geometry file reference.

  • Command Node
    • Machining Resolution Number Field
      • The model is MachiningResolution_mm.
      • Unit mm, floored at 0, default 0.125. A free numeric field — the web offers no option list.
      • Under a licence that caps the resolution the field can grey nothing, so it carries the captions the Machining Resolution command's ladder picker shows, keyed on the same mission.machiningResolution.* strings: one naming the width the licence allows the current workpiece — 1/N of its longest side, taken to the coarser rung — with the ratio and the longest side (GET /api/Workpiece/resolution-cap answers all three; the free field's copy drops the picker's closing “Finer widths are not offered”, since a free field withholds nothing); one, while the stock standing is already finer than the licence, saying that its width is the finest the cuts run at; and, when the field's value is finer than the licensed width and than that stock (or no stock stands yet), one saying the cuts then run at the finer of the licensed width and the stock's own. That is the engine's rule: a stock already finer than the licence — a .wct read at its own resolution, say — is cut no finer than its own width, a request finer than both the licence and the stock is clamped to the finer of the two widths, with the warning, and a request not finer than the stock refines nothing and is not warned. The verdict is the engine's too: the value is judged by the width the engine would build for it, so 0.4 reads as 0.25; and the stock's width is known only while a stock stands for this geometry, stockWidth being null until the stock is built and while the stock standing is another geometry's (a geometry edit whose stock the next play has yet to build). The first caption is left out when the licensed width is the engine's own floor, 0.001953125, where no picker greys a rung; the last when the width the cuts run at is at or below that floor, and until the command has loaded, so the stand-in value is never judged. A setup edit lets only the root list's Machining Resolution commands follow the licensed default, not this bundle's value.
    • Motion Resolution
      • The model is MachiningMotionResolution.
      • A caption over a select with three choices: Feed Per Cycle, Feed Per Tooth and Fixed.
      • Fixed adds a row of two number fields inline, both floored at 0: Linear Resolution (mm) and Rotary Resolution (deg), the two values of FixedMachiningMotionResolution.
      • Switching the type to Fixed carries the outgoing resolution's current linear and rotary values into the new fixed pair rather than resetting them.
    • Enable Collision Detection CheckBox
    • Enable Pause On Failure CheckBox
    • Enable Physics CheckBox
      • The model is EnablePhysics.
      • Default value: true
      • Disabled unless the advanced-physics licence is held. The engine declares the same gate on the split Physics command's field, so both editors refuse the same edit for the same reason.
  • Meshed Geometry Section Node
    • The node's own tree checkbox is EnableReadMeshedGeom; the panel below it holds the file reference only. The flag decides what runs, not what can be edited, so the field stays editable whether or not the box is ticked — a read can be prepared before it is switched on.
    • Meshed Geometry File Field
      • The model is MeshedGeomFile.
      • Hinted as a .wct or .stl path relative to the project folder.
    • Browse Button
      • Opens the shared server-side file explorer, filtered to .wct / .stl with an All Files fallback. It opens on the project directory and allows no other root, so a pick always yields a project-relative path.

Every edit saves as it is made. A rejected save is reported and the panel reloads the command, so what is on screen is what the server holds.

Note

The session's machining resolution is seeded from the workpiece's initial resolution when a project is loaded or assigned — not on a runtime reset and not when the workpiece is swapped, so an explicit setting survives both. This command carries its own value, and overwrites the session's with it at the moment the command runs.

Source Code Path

See HiNC App Anatomy for git repository links.

Web Application

HiNC-2025-webservice (Quasar CLI SPA):

  • wwwroot-src/src/components/mission/PreSettingCommandPanel.vue — this editor in both of its modes: the command node's machining settings, and the meshed-geometry section's file field with its Browse button.
  • wwwroot-src/src/components/controlTree/missionItemTypes.ts — maps the presetting kind to this panel, declares its one Meshed Geometry section child, and turns EnableReadMeshedGeom into that node's tree checkbox on read and on write.
  • wwwroot-src/src/components/controlTree/useControlTreeHost.ts — which nodes show a checkbox: a command node ticks its own enable flag, a section node with an enable flag ticks that, and every other node hides the box. A disabled command dims its whole subtree.
  • wwwroot-src/src/components/controlTree/MissionSectionPanel.vue — renders one section of a command's editor headerless, the breadcrumb already naming it.
  • wwwroot-src/src/components/widgets/FileExplorerDialog.vue — the server-side browser Browse opens, with the project-directory root and the filter list this panel passes it.
  • wwwroot-src/src/components/mission/GenericCommandPanel.vue — the editor the three bespoke-panel-less Setup commands get (Collision Detection, Pause on Failure and Physics), built from their declared scalar fields.
  • wwwroot-src/src/api/mission.ts — loadPreSetting and the nine presetting/* PUTs behind it.
  • wwwroot-src/src/i18n/en/mission.ts — the panel's wording, including the Rotary Resolution label and the meshed-geometry hint and filter names.
  • wwwroot-src/src/stores/appState.ts — the physics-licence flag the Enable Physics checkbox reads.
  • Missions/MissionCommandCatalog.cs — the addable set the Add Command dialog is built from: the reflected [CommandCatalog] entries, plus presetting as a read-only kind key that creation never looks at.
  • Missions/MissionController.cs — the commands/{path}/presetting/* endpoints: enable-read-meshed-geom, meshed-geom-file, machining-resolution-mm, machining-motion-resolution-type, fixed-linear-resolution-mm, fixed-rotary-resolution-deg, enable-collision-detection, enable-pause-on-failure and enable-physics. The type switch is where the current linear and rotary values are carried into a new fixed resolution.

HiAPI Engine

  • HiNc/SessionCommands/PreSettingCommand.cs — the model, its defaults, the order Run applies them onto the session shell, and the expansion into the split Setup commands.
  • HiNc/SessionCommands/CommandCatalogAttribute.cs — the attribute the catalog reflects, and the five categories. A command without it stays loadable from project files but is not offered for creation.
  • HiNc/SessionCommands/CommandFieldAttribute.cs — the scalar-field declaration the generic editor renders, with its label, unit and physics-licence gate.
  • HiNc/SessionCommands/ListCommand.cs — the in-order run that skips disabled entries, and the XML read path that expands a stored bundle in place.
  • HiNc/MachiningProcs/MachiningProject.cs — the same expansion for a bundle stored as the project's bare root command.
  • HiNc/SessionCommands/MachiningResolutionCommand.cs, HiNc/SessionCommands/MachiningMotionResolutionCommand.cs, HiNc/SessionCommands/CollisionDetectionCommand.cs, HiNc/SessionCommands/PauseOnFailureCommand.cs and HiNc/SessionCommands/PhysicsCommand.cs — the five Setup commands the web catalog offers, their defaults and their list titles. The detection, pause and physics settings each carry the “from this command on” wording.
  • HiNc/MachiningProcs/LocalProjectService.cs — the session's machining resolution and the seeding from the workpiece's initial resolution on project load or assignment.

See Also

  • PostExecutionCommand Panel — the other half of the positional pair: these settings apply forward, those outputs cover everything up to there
  • The Other Commands — the five Setup commands this bundle expands into, as a task
  • Mission — the rest of the command panels