View primitives was fixed
This commit is contained in:
@@ -5,6 +5,7 @@ using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Models.Shapes;
|
||||
using StructureHelperCommon.Services.ShapeServices;
|
||||
using StructureHelperLogics.Models.Primitives;
|
||||
using StructureHelperLogics.NdmCalculations.Triangulations;
|
||||
using StructureHelperLogics.Services.NdmPrimitives;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -14,27 +15,34 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||
{
|
||||
public class RectanglePrimitive : INdmPrimitive, IRectangleShape, IHasDivisionSize, ISaveable, ICloneable
|
||||
public class RectanglePrimitive : IRectanglePrimitive
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public ICenter Center { get; set; }
|
||||
public IShape Shape { get; set; }
|
||||
public double CenterX { get; set; }
|
||||
public double CenterY { get; set; }
|
||||
public IHeadMaterial HeadMaterial { get; set; }
|
||||
public double PrestrainKx { get; set; }
|
||||
public double PrestrainKy { get; set; }
|
||||
public double PrestrainEpsZ { get; set; }
|
||||
public double NdmMaxSize { get; set; }
|
||||
public int NdmMinDivision { get; set; }
|
||||
public int Id { get; set; }
|
||||
|
||||
public double Width { get; set; }
|
||||
public double Height { get; set; }
|
||||
public double Angle { get; set; }
|
||||
|
||||
public RectanglePrimitive()
|
||||
{
|
||||
Name = "New Rectangle";
|
||||
Width = 0.4d;
|
||||
Height = 0.6d;
|
||||
NdmMaxSize = 0.01d;
|
||||
NdmMinDivision = 10;
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
RectanglePrimitive primitive = new RectanglePrimitive();
|
||||
NdmPrimitivesService.CopyNdmProperties(this, primitive);
|
||||
NdmPrimitivesService.CopyDivisionProperties(this, primitive);
|
||||
ShapeService.CopyRectangleProperties(this, primitive);
|
||||
return primitive;
|
||||
@@ -42,7 +50,11 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||
|
||||
public IEnumerable<INdm> GetNdms(IMaterial material)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
List<INdm> ndms = new List<INdm>();
|
||||
var options = new RectangleTriangulationLogicOptions(this);
|
||||
ITriangulationLogic logic = new RectangleTriangulationLogic(options);
|
||||
ndms.AddRange(logic.GetNdmCollection(material));
|
||||
return ndms;
|
||||
}
|
||||
|
||||
public void Save()
|
||||
|
||||
Reference in New Issue
Block a user