View primitives was fixed

This commit is contained in:
Evgeny Redikultsev
2022-11-22 21:03:48 +05:00
parent b566373f16
commit f849ee024a
40 changed files with 689 additions and 601 deletions

View File

@@ -0,0 +1,61 @@
using StructureHelperLogics.Models.Materials;
using StructureHelperCommon.Models.Shapes;
using StructureHelper.Models.Materials;
using System.Collections.Generic;
using LoaderCalculator.Data.Ndms;
using LoaderCalculator.Data.Materials;
using StructureHelperCommon.Infrastructures.Interfaces;
using System;
using StructureHelperLogics.NdmCalculations.Primitives;
using StructureHelperLogics.NdmCalculations.Triangulations;
using StructureHelperLogics.Services.NdmPrimitives;
namespace StructureHelperLogics.Models.Primitives
{
public class PointPrimitive : IPointPrimitive
{
public int Id { get; set; }
public string Name { get; set; }
public double CenterX { get; set; }
public double CenterY { get; set; }
public IHeadMaterial HeadMaterial { get; set; }
public double NdmMaxSize { get; set; }
public int NdmMinDivision { get; set; }
public double PrestrainKx { get; set; }
public double PrestrainKy { get; set; }
public double PrestrainEpsZ { get; set; }
public double Area { get; set; }
public PointPrimitive()
{
Name = "New Point";
Area = 0.0005d;
}
public PointPrimitive(IHeadMaterial material)
{
HeadMaterial = material;
}
public IEnumerable<INdm> GetNdms(IMaterial material)
{
var options = new PointTriangulationLogicOptions(this);
IPointTriangulationLogic logic = new PointTriangulationLogic(options);
return logic.GetNdmCollection(material);
}
public void Save()
{
throw new NotImplementedException();
}
public object Clone()
{
var primitive = new PointPrimitive();
NdmPrimitivesService.CopyNdmProperties(this, primitive);
primitive.Area = Area;
return primitive;
}
}
}