Namespace Hi.MachiningProcs
Classes
- AllowNoActiveSessionAttribute
Marks a session-scoped controller action as callable without an active session, exempting it from RequireActiveSessionAttribute. Use on the session lifecycle entry points (BeginSession / EndSession), which by definition run when no session exists yet.
- AllowNoLoadedProjectAttribute
Marks a project-level controller action as callable without a loaded project, exempting it from RequireLoadedProjectAttribute. Use on the endpoints that create or load a project (which by definition run when no project is open yet).
- ApiActionResult
The shared outcome envelope for a web-API action: whether it succeeded and the messages it reported, in order. Returned by the project-level surface (LocalProjectServiceController) and, on the no-active-session boundary, by the session-scoped surface (SessionShellController via RequireActiveSessionAttribute). A REST / AI caller therefore reads the progress / success / error notifications inline in the HTTP response instead of only out-of-band via the SignalR sinks, and can branch on Success without parsing severities.
- LocalProjectService
Root(Local) project service. Apply absolute file path.
- LocalProjectServiceController
HTTP controller exposing the project-level (session-independent) operations of Hi.MachiningProcs.LocalProjectServiceController.LocalProjectService — the lean API-user surface, parallel to SessionShellController (which mirrors the session-scoped SessionShell). A controller mirrors exactly one body; project-level settings belong here, not bolted onto the session controller.
- MachiningActRunner
Represents a runner for machining actions that manages milling steps, tool paths, and collision detection.
- MachiningActRunnerConfig
Represents the configuration for a milling act runner. Provides settings for physics simulation, evaluation, and temperature control.
- MachiningParallelProc
Represents a parallel processing system for milling operations that manages various tasks such as sweeping, subtraction, force calculation, and physics simulation.
- MachiningParallelProc.StepTaskBundle
Represents a bundle of tasks related to a milling step.
- MachiningParallelProc.SubstractionResult
Represents the result of a subtraction operation.
- MachiningProject
Represents a milling project that manages the execution, simulation, and analysis of NC programs.
- MachiningSession
Represents a machining session that manages the execution and optimization of machining operations. Provides functionality for controlling the machining process, handling optimization options, and managing session state. Implements IDisposable to clean up SessionWriters on session end.
- MessageDto
One reported IMessage, flattened for JSON transport.
- MillingUtil
Provides utility methods for milling calculations and operations.
- NcRunnerSessionState
NC pipeline state held on a MachiningSession and shared across multiple RunControlLines(string, IEnumerable<string>, MachiningSession, StepDiagnosticProgress, NcDiagnosticProgress, CancellationToken) calls within that session. The per-layer SyntaxPieceLayers are extended via AppendSource(IEnumerable<T>) for each subsequent file so that
Previous/Nextconnectivity (and thusModalCarrySyntaxdeep-clone) crosses file boundaries.
- ProjectFileBusyException
Thrown when a project-file operation (New / Load / Save / SaveAs / Reload) is requested while another one is already in progress. The newcomer is cancelled rather than queued; controllers surface this as HTTP 409 Conflict.
- ProxyProjectService
Delegate (User-based) Project Service. Apply relative file path from AdminDirectory.
- RequireActiveSessionAttribute
Action filter for the session-scoped web-API surface: before a guarded action runs, verifies a machining session is active (SessionShell is non-null). When none is active it short-circuits with HTTP 409 and an NoActiveSession() envelope, so a REST / AI caller gets a helpful “call BeginSession() first” notice instead of a null-reference 500. Apply at the controller level; exempt the session lifecycle entry points (BeginSession / EndSession) with AllowNoActiveSessionAttribute.
- RequireLoadedProjectAttribute
Action filter for the project-level web-API surface: before a guarded action runs, verifies a project is loaded (MachiningProject is non-null). When none is loaded it short-circuits with HTTP 409 and an NoProjectLoaded() envelope, so a REST / AI caller gets a helpful “create or load a project first” notice instead of a null-reference 500 (the project-level members —
MachiningActRunner.Config, workpiece, runners — are null until a project is open). Apply at the controller level; exempt the endpoints that create or load a project with AllowNoLoadedProjectAttribute.
- SessionShell
End-user-facing facade for a machining session: aggregates session lifecycle, NC playback, optimization, geometry I/O, and scripting infrastructure into a single delegation surface. Used as the C# script globals object and as the concrete target of ISessionCommand implementations.
- SessionShellController
HTTP controller exposing SessionShell over the web API. Each action delegates to the underlying SessionShell instance owned by Hi.MachiningProcs.SessionShellController.LocalProjectService.
- SetupController
Controller for setup operations of machining projects.
- ShellProgress
Append-only, thread-safe sink for session-level routine / lifecycle messages on the IMessage channel — one of the partitioned message homes.
This is partitioned by message kind, orthogonal to the other sinks: plain SimpleMessage notices that belong to the session as a whole (cache reset, file load / save progress, session start/done) live here; messages tied to a particular machining step live in StepDiagnosticProgress; NC-pipeline diagnostics live in
NcDiagnosticProgress.Append-only: session-routine messages are emitted sequentially, so report order already is execution order — there is no per-step anchor and no stable-index bookkeeping.
- SpindleSpeedCache
Represents cached spindle speed information.
- StepDiagnostic
An IMessage produced while constructing a MachiningStep, anchored to the step's execution-order StepIndex and (when available) its NC-source SentenceCarrier.
Decorator over an inner Message — the five IMessage members delegate to it — so a plain SimpleMessage emitted during step processing can be upgraded to a step-anchored diagnostic without the producer needing to know the step context.
- StepDiagnosticAnchorUtil
Bridges a step-anchored IProgress<T> sink (e.g. StepDiagnosticProgress) back to the generic IProgress<T> surface, so out-of-step-pipeline producers can keep using the id-first MessageUtil shorthands (
ValidationError,ConfigurationWarning, …) and still land a StepDiagnostic on the sink.
- StepDiagnosticProgress
Append-only, thread-safe sink for step-anchored diagnostics on the IMessage channel.
This sink stores only StepDiagnostic: every message is anchored to a motion step. Per-step batches arrive via FlushTo(IProgress<StepDiagnostic>); out-of-pipeline emits (e.g. stroke-limit / tooling diagnostics) anchor themselves with AnchoredToStep(IProgress<StepDiagnostic>, int, ISentenceCarrier) before reporting. Data that already has another owner is not duplicated here — NC diagnostics live in
NcDiagnosticProgress, plain session-level notices live in ShellProgress, cutter positions live in the CL strip.Because every StepDiagnostic carries its own StepIndex anchor, ordering is recovered downstream by sorting on that anchor. Producers therefore only ever Report(StepDiagnostic) (append) — even from parallel step-processing tasks — and never insert at a computed position.
- StepScopedProgress
A per-step IProgress<T> of IMessage that accumulates the messages emitted while one step is built, upgrading any plain message to a StepDiagnostic anchored to this step's StepIndex / SentenceCarrier. An already step-anchored StepDiagnostic is kept unchanged. (NC diagnostics are not seen here — they live in their own NcDiagnosticProgress, not on this channel.)
It does not forward to a downstream sink as messages arrive; instead it collects them into MessageList and is drained once via FlushTo(IProgress<StepDiagnostic>) at the step's sequential post-physics stage. Because that stage runs strictly in step order, the per-step batches land in execution order with no position-scanning insert.
No locking: a single step's construction is a data-dependency chain (substraction → physics → post-physics), so only one task writes MessageList at a time; parallelism across steps writes to different scopes. Each parallel step task therefore holds its own instance — never a shared mutable "current step" on StepDiagnosticProgress, which would race.
Interfaces
- IMachiningProjectGetter
Interface for objects that can provide a MachiningProject instance.
- IProjectService
Interface for services that manage machining projects.
Enums
- RenderingFlag
Flags that control which elements are rendered in the visualization.
Delegates
- ConfigStepFunc
Delegate for configuring a milling step with additional arguments.
- LocalProjectService.MachiningProjectChangedDelegate
Delegate for machining project changed events.
- MachiningActRunner.MachiningStepBuiltDelegate
Delegate for configuring a step with previous and current step information.