Table of Contents

Class SetupController

Namespace
Hi.MachiningProcs
Assembly
HiNc.dll

Controller for setup operations of machining projects.

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

Remarks

Project-level surface: every action but LoadProject(string) writes through members that are null until a project is open. Without the filter those writes do not throw — the serialization helpers are extension methods and the setup-face setters return early on a null SetupEquipment — so the caller got HTTP 200 for a save that saved nothing. The filter turns that silent false-success into an honest HTTP 409 + ApiActionResult.

Constructors

SetupController(LocalProjectService, ILogger<SetupController>)

Initializes a new instance.

public SetupController(LocalProjectService projectService, ILogger<SetupController> logger)

Parameters

projectService LocalProjectService
logger ILogger<SetupController>

Properties

InitResolution_mm

InitResolution_mm.

public double InitResolution_mm { get; set; }

Property Value

double

Methods

ApplyClMillingDevice()

Applies a CL milling device to the machining equipment.

[HttpPost]
public void ApplyClMillingDevice()

LoadFixture(string)

Loads a fixture from the specified XML file path.

[HttpPost]
public void LoadFixture(string fixtureXmlFilePath)

Parameters

fixtureXmlFilePath string

The XML file path of the fixture to load.

LoadProject(string)

Loads a machining project from the specified file path.

[HttpPost]
public void LoadProject(string filePath)

Parameters

filePath string

The file path to load the project from.

Remarks

This is how a project comes into being, so it runs before one exists.

SaveProject()

Saves the current machining project.

[HttpPost]
public void SaveProject()