Z-Index was added

This commit is contained in:
Evgeny Redikultsev
2022-11-10 22:06:27 +05:00
parent 5d19958fd7
commit 1d7a97f4fd
28 changed files with 93 additions and 147 deletions

View File

@@ -2,15 +2,24 @@
using StructureHelper.Infrastructure.Enums;
using StructureHelper.UnitSystem.Systems;
using StructureHelper.Windows.MainWindow;
using StructureHelperCommon.Models.Entities;
using StructureHelperCommon.Models.Materials;
using StructureHelperLogics.Models.Primitives;
using StructureHelperLogics.Models.Materials;
using StructureHelperCommon.Models.Shapes;
namespace StructureHelper.Infrastructure.UI.DataContexts
{
public class Point : PrimitiveBase
{
public double Area { get; set; }
private double area;
public double Area
{ get => area;
set
{
area = value;
OnPropertyChanged(nameof(Area));
OnPropertyChanged(nameof(Diameter));
}
}
public Point(double area, double x, double y, MainViewModel ownerVm) : base(PrimitiveType.Point, x, y, ownerVm)
{
Name = "New point";
@@ -37,7 +46,7 @@ namespace StructureHelper.Infrastructure.UI.DataContexts
CenterY = y;
}
public double Diameter { get => Math.Sqrt(Area / Math.PI) * 2; }
public double Diameter { get => Math.Sqrt(area / Math.PI) * 2; }
public override INdmPrimitive GetNdmPrimitive(IUnitSystem unitSystem)
{

View File

@@ -13,9 +13,9 @@ using StructureHelper.Windows.MainWindow;
using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Infrastructures.Exceptions;
using StructureHelperCommon.Infrastructures.Strings;
using StructureHelperCommon.Models.Entities;
using StructureHelperCommon.Models.Materials;
using StructureHelperLogics.Models.Materials;
using StructureHelperCommon.Services.ColorServices;
using StructureHelperLogics.Models.Primitives;
namespace StructureHelper.Infrastructure.UI.DataContexts
{
@@ -37,6 +37,8 @@ namespace StructureHelper.Infrastructure.UI.DataContexts
private double prestrainKx, prestrainKy, prestrainEpsZ;
private double opacity = 1, showedOpacity = 0, x, y, xY1, yX1, primitiveWidth, primitiveHeight, showedX, showedY;
protected double delta = 0.5;
private double stressValue;
private double strainValue;
private int showedZIndex = 1, zIndex;
#endregion
@@ -249,6 +251,22 @@ namespace StructureHelper.Infrastructure.UI.DataContexts
get => primitiveHeight;
set => OnPropertyChanged(value, ref primitiveHeight);
}
public double StressValue
{
get { return stressValue; }
set
{
OnPropertyChanged(value, ref stressValue);
}
}
public double StrainValue
{
get { return strainValue; }
set
{
OnPropertyChanged(value, ref strainValue);
}
}
public double ShowedX
{
get => showedX;

View File

@@ -1,10 +1,10 @@
using StructureHelper.Infrastructure.Enums;
using StructureHelper.UnitSystem.Systems;
using StructureHelper.Windows.MainWindow;
using StructureHelperCommon.Models.Entities;
using StructureHelperCommon.Models.Materials;
using StructureHelperLogics.Models.Materials;
using StructureHelperCommon.Models.Shapes;
using System;
using StructureHelperLogics.Models.Primitives;
namespace StructureHelper.Infrastructure.UI.DataContexts
{