This commit is contained in:
parent
a2d98bb4d6
commit
1724b98591
29
Class1.cs
29
Class1.cs
|
@ -1,10 +1,10 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using BITFactory.Cutting;
|
||||
using BITKit;
|
||||
using BITKit.CommandPattern;
|
||||
using BITKit.Mod;
|
||||
using System.Linq;
|
||||
using BITFactory.Cutting;
|
||||
|
||||
namespace BITFactory.Cutting.Mod
|
||||
{
|
||||
|
@ -36,27 +36,22 @@ namespace BITFactory.Cutting.Mod
|
|||
var stringBuilder = new System.Text.StringBuilder();
|
||||
var path = Path.Combine(FolderPath, $"export_{DateTime.Now.Ticks}.cfg");
|
||||
stringBuilder.AppendLine($"导出时间: {DateTime.Now}");
|
||||
foreach (var x in commands)
|
||||
foreach (var command in commands)
|
||||
{
|
||||
if(x is CuttingPointCommand pointCommand)
|
||||
switch (command)
|
||||
{
|
||||
case CuttingPointCommand pointCommand:
|
||||
stringBuilder.AppendLine(
|
||||
$"切削点: {pointCommand.PlanePoint.x} {pointCommand.PlanePoint.y} {pointCommand.PlanePoint.z}");
|
||||
break;
|
||||
case CuttingLineCommand lineCommand:
|
||||
stringBuilder.AppendLine($"切削线:{lineCommand.Line.Length}");
|
||||
foreach (var linePos in lineCommand.Line)
|
||||
{
|
||||
stringBuilder.AppendLine($"切削线点: {linePos.x} {linePos.y} {linePos.z}");
|
||||
}
|
||||
break;
|
||||
}
|
||||
// switch (x)
|
||||
// {
|
||||
// case CuttingPointCommand pointCommand:
|
||||
// stringBuilder.AppendLine(
|
||||
// $"切削点: {pointCommand.PlanePoint.x} {pointCommand.PlanePoint.y} {pointCommand.PlanePoint.z}");
|
||||
// break;
|
||||
// case CuttingLineCommand lineCommand:
|
||||
// stringBuilder.AppendLine($"切削线:{lineCommand.Line.Length}");
|
||||
// foreach (var linePos in lineCommand.Line)
|
||||
// {
|
||||
// stringBuilder.AppendLine($"切削线点: {linePos.x} {linePos.y} {linePos.z}");
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
}
|
||||
|
||||
File.WriteAllText(path, stringBuilder.ToString());
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>disable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>8</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
Loading…
Reference in New Issue