fix bug of wpf mission initialization.
This commit is contained in:
parent
6c111a7553
commit
103092e10b
@ -134,7 +134,7 @@ namespace Sample.Common
|
||||
}
|
||||
#region ShowStepPresent
|
||||
internal static void ShowStepPresent(
|
||||
UserService userEnv, MachiningStep machiningStep)
|
||||
AppService userEnv, MachiningStep machiningStep)
|
||||
{
|
||||
foreach (var entry in userEnv.DisplayedStepPresentAccessList)
|
||||
{
|
||||
|
@ -43,7 +43,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.
|
||||
@ -57,13 +57,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
|
||||
|
Loading…
x
Reference in New Issue
Block a user