Compare commits
No commits in common. "58f3a19232216e180d44b50848864b4512eed1d9" and "bb10b6e34d1d090a9bf85e793e2a2267bf961edc" have entirely different histories.
58f3a19232
...
bb10b6e34d
@ -26,8 +26,7 @@ public static class DemoUtil
|
||||
/// <param name="displayee">The object that implements IDisplayee to be rendered</param>
|
||||
public static void RunApplication(string title, IDisplayee displayee)
|
||||
{
|
||||
using var loggerFactory = Microsoft.Extensions.Logging.LoggerFactory.Create(b => b.AddConsole());
|
||||
LocalApp.AppBegin(loggerFactory.CreateLogger("Hi.Sample.Wpf"));
|
||||
LocalApp.AppBegin();
|
||||
Application app = new Application();
|
||||
app.Exit += (o, e) =>
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using Hi.Common.Messages;
|
||||
using Hi.Common;
|
||||
using Hi.Disp;
|
||||
using Hi.Geom;
|
||||
using Hi.Geom.Resolution;
|
||||
@ -34,8 +34,7 @@ namespace Sample.Machining
|
||||
new Cylindroid(new PairZr(-h, 18), new PairZr(0, 18))
|
||||
.GenStl(new PolarResolution2d(1, MathUtil.ToRad(15))).WriteBin(stlFile_CylinderR18);
|
||||
|
||||
using var loggerFactory = Microsoft.Extensions.Logging.LoggerFactory.Create(b => b.AddConsole());
|
||||
LocalApp.AppBegin(loggerFactory.CreateLogger("Hi.Sample.Wpf"));
|
||||
LocalApp.AppBegin();
|
||||
|
||||
LocalProjectService localProjectService = new LocalProjectService();
|
||||
|
||||
@ -53,8 +52,8 @@ namespace Sample.Machining
|
||||
localProjectService.ClStrip.IsShowDot = true;
|
||||
double resolution_mm = 0.5;
|
||||
var projectDir = Path.GetDirectoryName(projectPath);
|
||||
localProjectService.WorkpieceService.InitGeom = new StlFile(stlFile_CylinderR20, projectDir);
|
||||
localProjectService.WorkpieceService.IdealGeom = new StlFile(stlFile_CylinderR19, projectDir);
|
||||
localProjectService.Workpiece.InitGeom = new StlFile(stlFile_CylinderR20, projectDir);
|
||||
localProjectService.Workpiece.IdealGeom = new StlFile(stlFile_CylinderR19, projectDir);
|
||||
localProjectService.Workpiece.InitResolution = resolution_mm;
|
||||
|
||||
RuntimeApi runtimeApi = localProjectService.RuntimeApi;
|
||||
@ -87,7 +86,7 @@ namespace Sample.Machining
|
||||
{
|
||||
RunSession(projectService, resolution_mm);
|
||||
Console.WriteLine($"task done.");
|
||||
}).CatchExceptions(ex => Console.WriteLine(ex));
|
||||
}).ShowIfCatched(null);
|
||||
|
||||
#region Create and Run WPF Application
|
||||
Application app = new Application
|
||||
@ -135,7 +134,7 @@ namespace Sample.Machining
|
||||
}
|
||||
static bool IsDifferenceAceptable(LocalProjectService localProjectService, double diffLimit)
|
||||
{
|
||||
foreach (var attachment in localProjectService.WorkpieceService.DiffAttachmentBag)
|
||||
foreach (var attachment in localProjectService.Workpiece.DiffAttachmentBag)
|
||||
{
|
||||
if (double.IsNaN(attachment.Diff) || Math.Abs(attachment.Diff) > diffLimit)
|
||||
{
|
||||
|
||||
@ -22,8 +22,7 @@ namespace Sample.Machining
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
using var loggerFactory = Microsoft.Extensions.Logging.LoggerFactory.Create(b => b.AddConsole());
|
||||
LocalApp.AppBegin(loggerFactory.CreateLogger("Hi.Sample.Wpf"));
|
||||
LocalApp.AppBegin();
|
||||
LocalProjectService localProjectService = new LocalProjectService();
|
||||
|
||||
#region Load Machining Project
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user