TellmePdmsPluging/Commands/SimplifyModelCommand.cs
sladro bf35d98365 实现模型轻量化接口,支持保留外壳删除内部元件
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2025-11-28 14:42:08 +08:00

41 lines
949 B
C#

using System;
using TellmePdmsPluging.Core;
using TellmePdmsPluging.Models;
namespace TellmePdmsPluging.Commands
{
public class SimplifyModelCommand : ICommand
{
public SimplifyModelCommand(SimplifyModelRequest request)
{
Request = request ?? new SimplifyModelRequest();
CommandId = Guid.NewGuid().ToString("N");
}
public string CommandId { get; }
public string CommandType
{
get { return "SimplifyModel"; }
}
public bool CanCancel
{
get { return false; }
}
public SimplifyModelRequest Request { get; }
public object Execute()
{
Request.ApplyDefaults();
return PdmsManager.Instance.SimplifyModel(Request);
}
public void Cancel()
{
throw new NotSupportedException("SimplifyModelCommand 不支持取消");
}
}
}