fix SoftNcRunner GM code normalization.
This commit is contained in:
@@ -208,7 +208,7 @@ namespace Sample.Machining
|
||||
localProjectService.WorkpieceService.IdealGeom = new StlFile(stlFile_CylinderR19, projectDir);
|
||||
localProjectService.Workpiece.InitResolution = resolution_mm;
|
||||
|
||||
RuntimeApi runtimeApi = localProjectService.RuntimeApi;
|
||||
SessionShell runtimeApi = localProjectService.SessionShell;
|
||||
runtimeApi.SetNcResolutionFixed(9999, 15);
|
||||
runtimeApi.EnableCollisionDetection = false;
|
||||
runtimeApi.EnablePhysics = false;
|
||||
@@ -261,7 +261,7 @@ namespace Sample.Machining
|
||||
static void RunSession(LocalProjectService localProjectService, double resolution_mm)
|
||||
{
|
||||
var project=localProjectService.MachiningProject;
|
||||
RuntimeApi runtimeApi = localProjectService.RuntimeApi;
|
||||
SessionShell runtimeApi = localProjectService.SessionShell;
|
||||
|
||||
localProjectService.BeginSession();
|
||||
double radius = 20;
|
||||
|
||||
+1
-1
@@ -186,7 +186,7 @@ namespace Sample.Machining
|
||||
localProjectService.LoadProject(projectPath);
|
||||
MachiningProject machiningProject = localProjectService.MachiningProject;
|
||||
|
||||
localProjectService.RuntimeApi.SessionStepSelected += (MachiningStep step) =>
|
||||
localProjectService.SessionShell.SessionStepSelected += (MachiningStep step) =>
|
||||
{
|
||||
var sourceCommand = step.SourceCommand;
|
||||
var indexedFileLine = sourceCommand.GetSentence().FirstIndexedFileLine;
|
||||
|
||||
@@ -204,7 +204,7 @@ public static class DemoUseMachiningProject
|
||||
};
|
||||
Console.WriteLine($"Set machining step event.");
|
||||
//show MRR.
|
||||
localProjectService.RuntimeApi.SessionStepBuilt += (preStep, curStep) =>
|
||||
localProjectService.SessionShell.SessionStepBuilt += (preStep, curStep) =>
|
||||
{
|
||||
var sourceCommand = curStep.SourceCommand;
|
||||
var indexedFileLine=sourceCommand?.GetSentence()?.FirstIndexedFileLine;
|
||||
@@ -219,13 +219,13 @@ public static class DemoUseMachiningProject
|
||||
|
||||
Console.WriteLine($"Session begin.");
|
||||
localProjectService.BeginSession();
|
||||
localProjectService.RuntimeApi.MachiningResolution_mm = 1;
|
||||
localProjectService.RuntimeApi.EnableCollisionDetection = true;
|
||||
localProjectService.RuntimeApi.EnablePauseOnFailure = false;
|
||||
localProjectService.RuntimeApi.EnablePhysics = false;
|
||||
localProjectService.SessionShell.MachiningResolution_mm = 1;
|
||||
localProjectService.SessionShell.EnableCollisionDetection = true;
|
||||
localProjectService.SessionShell.EnablePauseOnFailure = false;
|
||||
localProjectService.SessionShell.EnablePhysics = false;
|
||||
//the path from Shell-API is relative by project directory.
|
||||
localProjectService.RuntimeApi.PlayNcFile("NC/side.ptp");
|
||||
localProjectService.RuntimeApi.PlayNcFile("NC/circle.ptp");
|
||||
localProjectService.SessionShell.PlayNcFile("NC/side.ptp");
|
||||
localProjectService.SessionShell.PlayNcFile("NC/circle.ptp");
|
||||
localProjectService.EndSession();
|
||||
Console.WriteLine($"Session end.");
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user