tune
This commit is contained in:
@@ -284,7 +284,7 @@ namespace Sample.Common
|
||||
}
|
||||
#region ShowStepPresent
|
||||
internal static void ShowStepPresent(
|
||||
UserEnv userEnv, MachiningStep machiningStep)
|
||||
AppService userEnv, MachiningStep machiningStep)
|
||||
{
|
||||
foreach (var entry in userEnv.DisplayedStepPresentAccessList)
|
||||
{
|
||||
|
||||
+1
-1
@@ -186,7 +186,7 @@ namespace Sample.Machining
|
||||
Console.WriteLine($"Load Project: {projectPath}");
|
||||
MachiningProject machiningProject = MachiningProject.LoadFile(projectPath);
|
||||
|
||||
machiningProject.RuntimeController.MachiningStepSelected += (MachiningStep step) =>
|
||||
machiningProject.RuntimeApi.MachiningStepSelected += (MachiningStep step) =>
|
||||
{
|
||||
var sourceCommand = step.SourceCommand;
|
||||
Console.WriteLine($"Step Selected: MRR = {step.Mrr_mm3ds} At \"{sourceCommand?.FilePath}\" (Line {sourceCommand?.GetLineNo()}) \"{sourceCommand?.Line}\"");
|
||||
|
||||
+7
-7
@@ -197,7 +197,7 @@ namespace Sample.Machining
|
||||
};
|
||||
Console.WriteLine($"Set machining step event.");
|
||||
//show MRR.
|
||||
machiningProject.RuntimeController.MachiningStepBuilt += (preStep, curStep) =>
|
||||
machiningProject.RuntimeApi.MachiningStepBuilt += (preStep, curStep) =>
|
||||
{
|
||||
var sourceCommand = curStep.SourceCommand;
|
||||
if (curStep.Mrr_mm3ds > 500) //show only the step that contains large MRR.
|
||||
@@ -211,13 +211,13 @@ namespace Sample.Machining
|
||||
|
||||
Console.WriteLine($"Session begin.");
|
||||
machiningProject.BeginSession();
|
||||
machiningProject.RuntimeController.MachiningResolution_mm = 1;
|
||||
machiningProject.RuntimeController.EnableCollisionDetection = true;
|
||||
machiningProject.RuntimeController.EnablePauseOnFailure = false;
|
||||
machiningProject.RuntimeController.EnablePhysics = false;
|
||||
machiningProject.RuntimeApi.MachiningResolution_mm = 1;
|
||||
machiningProject.RuntimeApi.EnableCollisionDetection = true;
|
||||
machiningProject.RuntimeApi.EnablePauseOnFailure = false;
|
||||
machiningProject.RuntimeApi.EnablePhysics = false;
|
||||
//the path from Shell-API is relative by project directory.
|
||||
machiningProject.RuntimeController.PlayNcFile("NC/side.ptp");
|
||||
machiningProject.RuntimeController.PlayNcFile("NC/circle.ptp");
|
||||
machiningProject.RuntimeApi.PlayNcFile("NC/side.ptp");
|
||||
machiningProject.RuntimeApi.PlayNcFile("NC/circle.ptp");
|
||||
machiningProject.EndSession();
|
||||
Console.WriteLine($"Session end.");
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user