Files
wg_cpso/CPSO/Commands/0000_File/CExportPartsAsGmshMesh.cs
2026-03-25 18:20:24 +08:00

45 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CPSO;
using CaeModel;
using CaeMesh;
using CaeGlobals;
namespace CPSO.Commands
{
[Serializable]
class CExportPartsAsGmshMesh : PreprocessCommand, IExportFileCommand
{
// Variables
private string _fileName;
// Properties
public string FileName { get { return _fileName; } set { _fileName = value; } }
// Constructor
public CExportPartsAsGmshMesh(string fileName)
:base("Export geometry parts to Gmsh .msh file")
{
_fileName = Tools.GetLocalPath(fileName);
}
// Methods
public override bool Execute(Controller receiver)
{
receiver.ExportPartsAsGmshMesh(Tools.GetGlobalPath(_fileName));
return true;
}
public override string GetCommandString()
{
return base.GetCommandString() + _fileName;
}
}
}