Table of Contents

Class LocalProjectServiceController

Namespace
Hi.MachiningProcs
Assembly
HiNc.dll

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.

[ApiController]
[Route("api/[controller]/[action]")]
[ProducesResponseType(typeof(ApiActionResult), 409)]
public class LocalProjectServiceController : ControllerBase
Inheritance
LocalProjectServiceController
Inherited Members
Extension Methods

Remarks

This controller also demonstrates the per-request message-return pattern: each mutating action injects a fresh MessageCollector into the have-both project-level function (one taking IProgress<IMessage> messageProgress) and returns the collected IMessage items in its HTTP response. A REST / AI caller therefore sees the progress / success / error notifications inline in the response, rather than only out-of-band via the SignalR broadcast. The shared ApiActionResult envelope is also used by the session-scoped surface: RequireActiveSessionAttribute returns it (with HTTP 409) to answer a “no active session” call, rather than throwing a null-reference 500.

Constructors

LocalProjectServiceController(LocalProjectService)

Initializes a new instance. Hi.MachiningProcs.LocalProjectServiceController.LocalProjectService is a DI singleton.

public LocalProjectServiceController(LocalProjectService projectService)

Parameters

projectService LocalProjectService

Methods

EnableCollisionDetection(bool)

Enables or disables collision detection and returns the messages reported during the call (e.g. the “preparing collision items” progress / done notifications).

[HttpPost]
public ApiActionResult EnableCollisionDetection(bool value)

Parameters

value bool

Whether collision detection should be enabled.

Returns

ApiActionResult

IsCollisionDetectionEnabled()

Gets whether collision detection is currently enabled (project-level read; no session needed).

[HttpGet]
public bool IsCollisionDetectionEnabled()

Returns

bool

SetMachiningResolution_mm(double)

Sets the machining resolution (mm) and returns the messages reported during the call.

[HttpPost]
public ApiActionResult SetMachiningResolution_mm(double value)

Parameters

value double

The machining resolution in millimeters.

Returns

ApiActionResult