feat(demos): author the CL demo's equipment on the setup face

Equipment split: the demo installs the CL device through the service
facade (setup face + follow) and authors the workpiece geometry on the
setup face before the session — a runtime-face write would be wiped by
the session-boundary re-materialise. The execution displayee fork reads
the runtime face with scoped collision red, matching the other apps.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-27 17:31:30 +08:00
co-authored by Claude Fable 5
parent 139aac9198
commit 7acf47e02b
2 changed files with 44 additions and 27 deletions
+9 -3
View File
@@ -51,13 +51,19 @@ namespace Sample.Machining
var projectDisplayee = new MachiningProjectDisplayee(localProjectService);
var device = new ClMillingDevice();
localProjectService.MachiningEquipment.MachiningChain = device;
//authored face (equipment split): the facade setter installs the
//chain on SetupEquipment and the runtime face follows by rebuild
localProjectService.MachiningChain = device;
localProjectService.ClStrip.IsShowDot = true;
double resolution_mm = 0.5;
var projectDir = Path.GetDirectoryName(projectPath);
localProjectService.WorkpieceService.InitGeom = new StlFile(stlFile_CylinderR20, projectDir);
localProjectService.WorkpieceService.IdealGeom = new StlFile(stlFile_CylinderR19, projectDir);
//author the workpiece on the setup face, then let the runtime
//face follow — a runtime-face write would be wiped by the
//session-boundary re-materialise
localProjectService.Workpiece.InitGeom = new StlFile(stlFile_CylinderR20, projectDir);
localProjectService.Workpiece.IdealGeom = new StlFile(stlFile_CylinderR19, projectDir);
localProjectService.Workpiece.InitResolution = resolution_mm;
localProjectService.NotifySetupEquipmentEdited();
SessionShell runtimeApi = localProjectService.SessionShell;
runtimeApi.SetNcResolutionFixed(9999, 15);