update ISO coordinate rendering for 3+2axis machine.
This commit is contained in:
+61
-62
@@ -165,85 +165,84 @@ using Hi.Machining;
|
||||
using Hi.HiNcKits;
|
||||
using Hi.Milling.MillingTools;
|
||||
|
||||
namespace Sample.Machining
|
||||
namespace Sample.Machining;
|
||||
|
||||
/// <remarks>
|
||||
/// ### Source Code
|
||||
/// [!code-csharp[SampleCode](~/../Hi.Sample/Machining/DemoBuildGeomOnlyMachiningProject.cs)]
|
||||
/// </remarks>
|
||||
public static class DemoBuildGeomOnlyMachiningProject
|
||||
{
|
||||
/// <remarks>
|
||||
/// ### Source Code
|
||||
/// [!code-csharp[SampleCode](~/../Hi.Sample/Machining/DemoBuildGeomOnlyMachiningProject.cs)]
|
||||
/// </remarks>
|
||||
public static class DemoBuildGeomOnlyMachiningProject
|
||||
internal static MillingCutter CreateGeomOnlyMillingCutter()
|
||||
{
|
||||
internal static MillingCutter CreateGeomOnlyMillingCutter()
|
||||
MillingCutter millingCutter = new MillingCutter()
|
||||
{
|
||||
MillingCutter millingCutter = new MillingCutter()
|
||||
UpperBeamGeom = new Cylindroid(
|
||||
[new PairZr(40, 6), new PairZr(90, 6)]),
|
||||
ShaperProfile = new AptProfile(
|
||||
new ColumnApt()
|
||||
{
|
||||
UpperBeamGeom = new Cylindroid(
|
||||
[new PairZr(40,6), new PairZr(90,6)]),
|
||||
ShaperProfile = new AptProfile(
|
||||
new ColumnApt()
|
||||
{
|
||||
Diameter_mm = 12,
|
||||
FluteHeight_mm = 40
|
||||
})
|
||||
};
|
||||
Diameter_mm = 12,
|
||||
FluteHeight_mm = 40
|
||||
})
|
||||
};
|
||||
|
||||
return millingCutter;
|
||||
}
|
||||
return millingCutter;
|
||||
}
|
||||
|
||||
static void Main()
|
||||
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}");
|
||||
localProjectService.LoadProject(projectPath);
|
||||
MachiningProject machiningProject = localProjectService.MachiningProject;
|
||||
|
||||
CylindroidHolder cylindroidHolder = new CylindroidHolder()
|
||||
{
|
||||
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}");
|
||||
localProjectService.LoadProject(projectPath);
|
||||
MachiningProject machiningProject = localProjectService.MachiningProject;
|
||||
|
||||
CylindroidHolder cylindroidHolder = new CylindroidHolder()
|
||||
{
|
||||
Note = "BT40",
|
||||
Cylindroid = new Cylindroid([ new PairZr(0,12),new PairZr(20,12),
|
||||
Note = "BT40",
|
||||
Cylindroid = new Cylindroid([ new PairZr(0,12),new PairZr(20,12),
|
||||
new PairZr(20,16),new PairZr(30,16)])
|
||||
};
|
||||
localProjectService.MachiningToolHouse = new MachiningToolHouse()
|
||||
};
|
||||
localProjectService.MachiningToolHouse = new MachiningToolHouse()
|
||||
{
|
||||
[1] = new MillingTool()
|
||||
{
|
||||
[1] = new MillingTool()
|
||||
{
|
||||
Note = "T1",
|
||||
PreservedDistanceBetweenFluteAndSpindleNose_mm = 8,
|
||||
Holder = cylindroidHolder,
|
||||
Cutter = CreateGeomOnlyMillingCutter()
|
||||
},
|
||||
};
|
||||
Note = "T1",
|
||||
PreservedDistanceBetweenFluteAndSpindleNose_mm = 8,
|
||||
Holder = cylindroidHolder,
|
||||
Cutter = CreateGeomOnlyMillingCutter()
|
||||
},
|
||||
};
|
||||
|
||||
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)),
|
||||
};
|
||||
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)),
|
||||
};
|
||||
|
||||
localProjectService.Workpiece = new Workpiece()
|
||||
{
|
||||
InitResolution = 0.25,
|
||||
InitGeom = new Box3d(0, 0, -50, 70, 50, 0),
|
||||
IdealGeom = null,
|
||||
WorkpieceGeomToFixtureBuckleTransformer = new StaticTranslation(new Vec3d(0, 0, 0)),
|
||||
};
|
||||
localProjectService.Workpiece = new Workpiece()
|
||||
{
|
||||
InitResolution = 0.25,
|
||||
InitGeom = new Box3d(0, 0, -50, 70, 50, 0),
|
||||
IdealGeom = null,
|
||||
WorkpieceGeomToFixtureBuckleTransformer = new StaticTranslation(new Vec3d(0, 0, 0)),
|
||||
};
|
||||
|
||||
localProjectService.MachiningChain
|
||||
localProjectService.MachiningChain
|
||||
= XFactory.GenByFile<CodeXyzabcMachineTool>(
|
||||
"Resource", "MachineTool/PMC-B1/PMC-B1.mt", GenMode.Default);
|
||||
localProjectService.MachiningChainFile = "PMC-B1/PMC-B1.mt";
|
||||
localProjectService.MachiningChainFile = "PMC-B1/PMC-B1.mt";
|
||||
|
||||
localProjectService.SaveProject();
|
||||
|
||||
machiningProject.Dispose();
|
||||
LocalApp.AppEnd();
|
||||
}
|
||||
localProjectService.SaveProject();
|
||||
|
||||
machiningProject.Dispose();
|
||||
LocalApp.AppEnd();
|
||||
}
|
||||
|
||||
}
|
||||
</code></pre></div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user