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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user