refactor(Sample): adapt demos to XFactory IProgress<object> signature
Made-with: Cursor
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using Hi.Milling.Apts;
|
||||
using Hi.Common.XmlUtils;
|
||||
using Hi.Geom;
|
||||
@@ -152,6 +152,8 @@ public static class DemoBuildMachiningProject
|
||||
localProjectService.LoadProject(projectPath);
|
||||
MachiningProject machiningProject = localProjectService.MachiningProject;
|
||||
|
||||
IProgress<object> progress = null;
|
||||
|
||||
#region ConfigureMachiningToolHouse
|
||||
localProjectService.MachiningToolHouse = new MachiningToolHouse()
|
||||
{
|
||||
@@ -195,16 +197,16 @@ public static class DemoBuildMachiningProject
|
||||
IdealGeom = null,
|
||||
WorkpieceGeomToFixtureBuckleTransformer = new StaticTranslation(new Vec3d(0, 0, 0)),
|
||||
CuttingPara = XFactory.GenByFile<ICuttingPara>(
|
||||
"Resource/CuttingParameter", "Al6061T6.mp", GenMode.Default),
|
||||
"Resource/CuttingParameter", "Al6061T6.mp", progress),
|
||||
WorkpieceMaterial = XFactory.GenByFile<WorkpieceMaterial>(
|
||||
"Resource/WorkpieceMaterial", "Al6061T6.WorkpieceMaterial", GenMode.Default),
|
||||
"Resource/WorkpieceMaterial", "Al6061T6.WorkpieceMaterial", progress),
|
||||
};
|
||||
#endregion
|
||||
|
||||
#region ConfigureMachineChain
|
||||
localProjectService.MachiningChain
|
||||
= XFactory.GenByFile<CodeXyzabcMachineTool>(
|
||||
"Resource", "MachineTool/PMC-B1/PMC-B1.mt", GenMode.Default);
|
||||
"Resource", "MachineTool/PMC-B1/PMC-B1.mt", progress);
|
||||
#endregion
|
||||
|
||||
machiningProject.MakeXmlSourceToFile(projectPath);
|
||||
|
||||
Reference in New Issue
Block a user