This commit is contained in:
2025-12-22 23:35:40 +08:00
parent 32ff8b45e3
commit 4556281c0a
77 changed files with 9248 additions and 3996 deletions
@@ -297,14 +297,16 @@ namespace Sample.Machining
static void Main()
{
LocalApp.AppBegin();
LocalProjectService localProjectService = new LocalProjectService();
var projectPath = "C:/HiNC-Projects/NewProject/Main.hincproj";
var projectDirectory = Path.GetDirectoryName(projectPath);
Console.WriteLine($"Directory of the New Project: {projectDirectory}");
MachiningProject machiningProject = new MachiningProject(projectDirectory);
localProjectService.LoadProject(projectPath);
MachiningProject machiningProject = localProjectService.MachiningProject;
#region ConfigureMachiningToolHouse
machiningProject.MachiningToolHouse = new MachiningToolHouse()
localProjectService.MachiningToolHouse = new MachiningToolHouse()
{
[1] = new MillingTool()
{
@@ -331,7 +333,7 @@ namespace Sample.Machining
#endregion
#region ConfigureFixture
machiningProject.MachiningEquipment.Fixture = new Fixture()
localProjectService.Fixture = new Fixture()
{
Geom = new Box3d(new Vec3d(-40, -40, 0), new Vec3d(40, 40, 10)),
GeomToWorkpieceTransformer = new StaticTranslation(new Vec3d(0, 0, 10)),
@@ -339,7 +341,7 @@ namespace Sample.Machining
#endregion
#region ConfigureWorkpiece
machiningProject.MachiningEquipment.Workpiece = new Workpiece()
localProjectService.Workpiece = new Workpiece()
{
InitResolution = 0.25,
InitGeom = new Box3d(0, 0, -50, 70, 50, 0),
@@ -353,7 +355,7 @@ namespace Sample.Machining
#endregion
#region ConfigureMachineChain
machiningProject.MachiningEquipment.MachiningChain
localProjectService.MachiningChain
= XFactory.GenByFile<CodeXyzabcMachineTool>(
"Resource", "MachineTool/PMC-B1/PMC-B1.mt", GenMode.Default);
#endregion