fix SoftNcRunner GM code normalization.

This commit is contained in:
2026-05-06 13:21:19 +08:00
parent 0fe9497552
commit 2f57932000
1238 changed files with 69405 additions and 22511 deletions
@@ -171,6 +171,7 @@ using Hi.MachiningProcs;
using System.IO;
using Hi.HiNcKits;
using Hi.Milling.MillingTools;
using Microsoft.Extensions.Logging;
namespace Sample.Machining;
@@ -296,7 +297,8 @@ public static class DemoBuildMachiningProject
[STAThread]
static void Main()
{
LocalApp.AppBegin();
using var loggerFactory = Microsoft.Extensions.Logging.LoggerFactory.Create(b => b.AddConsole());
LocalApp.AppBegin(loggerFactory.CreateLogger("Hi.Sample"));
LocalProjectService localProjectService = new LocalProjectService();
var projectPath = "C:/HiNC-Projects/NewProject/Main.hincproj";
@@ -305,6 +307,8 @@ public static class DemoBuildMachiningProject
localProjectService.LoadProject(projectPath);
MachiningProject machiningProject = localProjectService.MachiningProject;
IProgress<object> progress = null;
#region ConfigureMachiningToolHouse
localProjectService.MachiningToolHouse = new MachiningToolHouse()
{
@@ -348,16 +352,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);