Add copy to clipboard command for material

This commit is contained in:
Evgeny Redikultsev
2024-12-21 22:26:29 +05:00
parent a7dd63ccd4
commit fb017af47d
17 changed files with 451 additions and 186 deletions

View File

@@ -0,0 +1,54 @@
using StructureHelperLogics.NdmCalculations.Analyses.ByForces;
using System.Text;
namespace StructureHelperLogics.NdmCalculations.Analyses
{
public class ExportForcesResultToCSVLogic : ExportToCSVLogicBase
{
IForcesResults results;
public ExportForcesResultToCSVLogic(IForcesResults results)
{
this.results = results;
}
public override void ExportHeadings()
{
string[] headings =
{
"Limit State",
"Calc duration",
"Mx",
"My",
"Nz",
"kx",
"ky",
"epsz"
};
output.AppendLine(string.Join(separator, headings));
}
public override void ExportBoby()
{
foreach (var item in results.ForcesResultList)
{
if (item.IsValid == true)
{
var tuple = item.DesignForceTuple.ForceTuple;
var strainMatrix = item.LoaderResults.StrainMatrix;
string[] newLine =
{
item.DesignForceTuple.LimitState.ToString(),
item.DesignForceTuple.CalcTerm.ToString(),
tuple.Mx.ToString(),
tuple.My.ToString(),
tuple.Nz.ToString(),
strainMatrix.Kx.ToString(),
strainMatrix.Ky.ToString(),
strainMatrix.EpsZ.ToString()
};
output.AppendLine(string.Join(separator, newLine));
}
}
}
}
}