This commit is contained in:
parent
1724b98591
commit
ce89c7e38d
37
Class1.cs
37
Class1.cs
|
@ -38,20 +38,33 @@ namespace BITFactory.Cutting.Mod
|
||||||
stringBuilder.AppendLine($"导出时间: {DateTime.Now}");
|
stringBuilder.AppendLine($"导出时间: {DateTime.Now}");
|
||||||
foreach (var command in commands)
|
foreach (var command in commands)
|
||||||
{
|
{
|
||||||
switch (command)
|
if(command is CuttingPointCommand pointCommand)
|
||||||
{
|
{
|
||||||
case CuttingPointCommand pointCommand:
|
stringBuilder.AppendLine(
|
||||||
stringBuilder.AppendLine(
|
$"切削点: {pointCommand.PlanePoint.x} {pointCommand.PlanePoint.y} {pointCommand.PlanePoint.z}");
|
||||||
$"切削点: {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;
|
|
||||||
}
|
}
|
||||||
|
else if(command is CuttingLineCommand lineCommand)
|
||||||
|
{
|
||||||
|
stringBuilder.AppendLine($"切削线:{lineCommand.Line.Length}");
|
||||||
|
foreach (var linePos in lineCommand.Line)
|
||||||
|
{
|
||||||
|
stringBuilder.AppendLine($"切削线点: {linePos.x} {linePos.y} {linePos.z}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 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;
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
File.WriteAllText(path, stringBuilder.ToString());
|
File.WriteAllText(path, stringBuilder.ToString());
|
||||||
|
|
Loading…
Reference in New Issue