refactor(Hi.Sample): the two coordinate-entry displayees place their markers through TryGetIsoCoordinatePosition and TryGetMachinePositionAtTableMountZero -- follows HiMech

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
2026-09-23 00:21:35 +08:00
co-authored by Claude Fable 5.1
parent 2cf5d31bf6
commit f4ec31806b
2 changed files with 14 additions and 23 deletions
+6 -6
View File
@@ -60,9 +60,9 @@ namespace Sample.Disp
return;
////Console.WriteLine($"B: {CoordinateIndex}; {coordinateMove}");
Vec3d mcXyz_AttacherAtTableMountZero = MillingEquipmentFunc?.Invoke()
?.GetMachinePositionAtTableMountZero();
if (mcXyz_AttacherAtTableMountZero == null)
IMachiningEquipment equipment = MillingEquipmentFunc?.Invoke();
if (equipment == null
|| !equipment.TryGetMachinePositionAtTableMountZero(out Vec3d mcXyz_AttacherAtTableMountZero))
return;
Vec3d coordinateMove;
@@ -96,9 +96,9 @@ namespace Sample.Disp
if (ncEnv == null || NcEnv.CncBrand != CncBrand.Heidenhain)
return;
Vec3d mcXyz_AttacherAtTableMountZero = MillingEquipmentFunc?.Invoke()
?.GetMachinePositionAtTableMountZero();
if (mcXyz_AttacherAtTableMountZero == null)
IMachiningEquipment equipment = MillingEquipmentFunc?.Invoke();
if (equipment == null
|| !equipment.TryGetMachinePositionAtTableMountZero(out Vec3d mcXyz_AttacherAtTableMountZero))
return;
Vec3d coordinateMove;
if (HeidenhainCycleDef247Q339 == 0 && HeidenhainCycleDef7Arg == null)