Add Force DTOs

This commit is contained in:
Evgeny Redikultsev
2024-10-12 21:30:21 +05:00
parent 2c5c5db43a
commit 7e54aa0407
64 changed files with 1237 additions and 216 deletions

View File

@@ -1,5 +1,6 @@
using StructureHelperCommon.Infrastructures.Interfaces;
using StructureHelperCommon.Services.Forces;
using System;
using System.ComponentModel.DataAnnotations;
namespace StructureHelperCommon.Models.Forces
@@ -9,6 +10,8 @@ namespace StructureHelperCommon.Models.Forces
{
private readonly IUpdateStrategy<IForceTuple> updateStrategy = new ForceTupleUpdateStrategy();
/// <inheritdoc/>
public Guid Id { get; }
/// <inheritdoc/>
public double Mx { get; set; }
/// <inheritdoc/>
public double My { get; set; }
@@ -21,6 +24,16 @@ namespace StructureHelperCommon.Models.Forces
/// <inheritdoc/>
public double Mz { get; set; }
public ForceTuple(Guid id)
{
Id = id;
}
public ForceTuple() : this (Guid.NewGuid())
{
}
public void Clear()
{
Mx = 0d;