LinePrimitive and RectanglePrimitive was added

This commit is contained in:
Evgeny Redikultsev
2022-11-19 21:12:55 +05:00
parent 667b91cbfa
commit b566373f16
37 changed files with 544 additions and 69 deletions

View File

@@ -0,0 +1,27 @@
using StructureHelper.Infrastructure.Enums;
using StructureHelper.Services.Primitives;
using StructureHelper.UnitSystem.Systems;
using StructureHelper.Windows.MainWindow;
using StructureHelperCommon.Models.Shapes;
using StructureHelperLogics.Models.Primitives;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelper.Infrastructure.UI.DataContexts
{
internal class LinePrimitive : PrimitiveBase
{
private ILineShape lineShape;
public LinePrimitive(PrimitiveType type, double x, double y, MainViewModel ownerVM) : base(type, x, y, ownerVM)
{
}
public override INdmPrimitive GetNdmPrimitive(IUnitSystem unitSystem)
{
throw new NotImplementedException();
}
}
}

View File

@@ -52,7 +52,7 @@ namespace StructureHelper.Infrastructure.UI.DataContexts
{
string materialName = MaterialName;
ICenter center = new Center { X = CenterX, Y = CenterY };
IShape shape = new StructureHelperCommon.Models.Shapes.Point { Area = this.Area };
IShape shape = new StructureHelperCommon.Models.Shapes.PointShape { Area = this.Area };
INdmPrimitive ndmPrimitive = new NdmPrimitive(HeadMaterial)
{ Center = center, Shape = shape,
PrestrainKx = PrestrainKx,

View File

@@ -48,7 +48,7 @@ namespace StructureHelper.Infrastructure.UI.DataContexts
double centerX = CenterX;
double centerY = CenterY;
ICenter center = new Center { X = centerX, Y = centerY };
IShape shape = new StructureHelperCommon.Models.Shapes.Rectangle { Height = height, Width = width, Angle = 0 };
IShape shape = new StructureHelperCommon.Models.Shapes.RectangleShape { Height = height, Width = width, Angle = 0 };
INdmPrimitive ndmPrimitive = new NdmPrimitive(HeadMaterial)
{ Center = center, Shape = shape,
NdmMaxSize = MaxElementSize, NdmMinDivision = MinElementDivision,