Add beam shear converting to DTO

This commit is contained in:
Evgeny Redikultsev
2025-06-08 15:49:17 +05:00
parent 3dab65e3bd
commit 0d7f47653b
150 changed files with 710 additions and 259 deletions

View File

@@ -0,0 +1,33 @@
using Newtonsoft.Json;
using StructureHelperCommon.Models.Forces;
namespace DataAccess.DTOs
{
public class ConcentratedForceDTO : IConcentratedForce
{
[JsonProperty("Id")]
public Guid Id { get; }
[JsonProperty("Name")]
public string Name { get; set; } = string.Empty;
[JsonProperty("ForceValue")]
public IForceTuple ForceValue { get; set; } = new ForceTupleDTO(Guid.Empty);
[JsonProperty("ForceCoordinate")]
public double ForceCoordinate { get; set; }
[JsonProperty("RelativeLoadLevel")]
public double RelativeLoadLevel { get; set; }
[JsonProperty("LoadRatio")]
public double LoadRatio { get; set; }
[JsonProperty("CombinationProperty")]
public IFactoredCombinationProperty CombinationProperty { get; set; } = new FactoredCombinationPropertyDTO(Guid.Empty);
public ConcentratedForceDTO(Guid id)
{
Id = id;
}
public object Clone()
{
return this;
}
}
}

View File

@@ -0,0 +1,34 @@
using Newtonsoft.Json;
using StructureHelperCommon.Models.Forces;
namespace DataAccess.DTOs
{
public class DistributedLoadDTO : IDistributedLoad
{
[JsonProperty("Id")]
public Guid Id { get; }
[JsonProperty("Name")]
public string Name { get; set; } = string.Empty;
[JsonProperty("LoadValue")]
public IForceTuple LoadValue { get; set; }
[JsonProperty("StartCoordinate")]
public double StartCoordinate { get; set; }
[JsonProperty("EndCoordinate")]
public double EndCoordinate { get; set; }
[JsonProperty("RelativeLoadLevel")]
public double RelativeLoadLevel { get; set; }
[JsonProperty("LoadRatio")]
public double LoadRatio { get; set; }
[JsonProperty("CombinationProperty")]
public IFactoredCombinationProperty CombinationProperty { get; set; } = new FactoredCombinationPropertyDTO(Guid.Empty);
public DistributedLoadDTO(Guid id)
{
Id = id;
}
public object Clone()
{
return this;
}
}
}

View File

@@ -0,0 +1,29 @@
using Newtonsoft.Json;
using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Models.Forces;
namespace DataAccess.DTOs
{
public class FactoredCombinationPropertyDTO : IFactoredCombinationProperty
{
[JsonProperty("Id")]
public Guid Id { get; }
[JsonProperty("CalctTerm")]
public CalcTerms CalcTerm { get; set; }
[JsonProperty("LimitState")]
public LimitStates LimitState { get; set; }
[JsonProperty("LongTermFactor")]
public double LongTermFactor { get; set; }
[JsonProperty("ULSFactor")]
public double ULSFactor { get; set; }
public FactoredCombinationPropertyDTO(Guid id)
{
Id = id;
}
public object Clone()
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,25 @@
using Newtonsoft.Json;
using StructureHelperCommon.Models.Forces;
namespace DataAccess.DTOs
{
public class FactoredForceTupleDTO : IFactoredForceTuple
{
[JsonProperty("Id")]
public Guid Id { get; }
[JsonProperty("ForceTuple")]
public IForceTuple ForceTuple { get; set; }
[JsonProperty("CombinationProperty")]
public IFactoredCombinationProperty CombinationProperty { get; set; }
public FactoredForceTupleDTO(Guid id)
{
Id = id;
}
public object Clone()
{
return this;
}
}
}

View File

@@ -0,0 +1,37 @@
using Newtonsoft.Json;
using StructureHelperCommon.Models.Forces;
using StructureHelperCommon.Models.Shapes;
namespace DataAccess.DTOs
{
public class ForceCombinationFromFileDTO : IForceCombinationFromFile
{
[JsonProperty("Id")]
public Guid Id { get; }
[JsonProperty("Name")]
public string Name { get; set; }
[JsonProperty("ForceFiles")]
public List<IColumnedFileProperty> ForceFiles { get; set; } = new();
[JsonProperty("CombinationProperty")]
public IFactoredCombinationProperty CombinationProperty { get; set; } = new FactoredCombinationPropertyDTO(Guid.NewGuid());
[JsonProperty("SetInGravityCenter")]
public bool SetInGravityCenter { get; set; }
[JsonProperty("ForcePoint")]
public IPoint2D ForcePoint { get; set; } = new Point2DDTO();
public ForceCombinationFromFileDTO(Guid id)
{
Id = id;
}
public object Clone()
{
return this;
}
public List<IForceCombinationList> GetCombinations()
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,40 @@
using Newtonsoft.Json;
using StructureHelperCommon.Models.Forces;
using StructureHelperCommon.Models.Shapes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DataAccess.DTOs
{
public class ForceCombinationListDTO : IForceCombinationList
{
[JsonProperty("Id")]
public Guid Id { get; set; }
[JsonProperty("Name")]
public string Name { get; set; }
[JsonProperty("SetInGravityCenter")]
public bool SetInGravityCenter { get; set; }
[JsonProperty("ForcePoint")]
public IPoint2D ForcePoint { get; set; } = new Point2DDTO();
[JsonProperty("DesignForces")]
public List<IDesignForceTuple> DesignForces { get; set; } = new();
public object Clone()
{
throw new NotImplementedException();
}
public IForceCombinationList GetCombination()
{
throw new NotImplementedException();
}
public List<IForceCombinationList> GetCombinations()
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,48 @@
using Newtonsoft.Json;
using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Models.Forces;
using StructureHelperCommon.Models.Shapes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DataAccess.DTOs
{
public class ForceFactoredListDTO : IForceFactoredList
{
[JsonProperty("Id")]
public Guid Id { get;}
[JsonProperty("Name")]
public string Name { get; set; }
[JsonProperty("ForceTuples")]
public List<IForceTuple> ForceTuples { get; } = new();
[JsonProperty("SetInGravityCenter")]
public bool SetInGravityCenter { get; set; }
[JsonProperty("ForcePoint")]
public IPoint2D ForcePoint { get; set; } = new Point2DDTO();
[JsonProperty("CombinationProperty")]
public IFactoredCombinationProperty CombinationProperty { get; set; } = new FactoredCombinationPropertyDTO(Guid.NewGuid());
public ForceFactoredListDTO(Guid id)
{
Id = id;
}
public object Clone()
{
throw new NotImplementedException();
}
public IForceCombinationList GetCombination()
{
throw new NotImplementedException();
}
public List<IForceCombinationList> GetCombinations()
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,43 @@
using Newtonsoft.Json;
using StructureHelperCommon.Models.Forces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DataAccess.DTOs
{
public class ForceTupleDTO : IForceTuple
{
[JsonProperty("Id")]
public Guid Id { get; set; }
[JsonProperty("Mx")]
public double Mx { get; set; }
[JsonProperty("My")]
public double My { get; set; }
[JsonProperty("Nz")]
public double Nz { get; set; }
[JsonProperty("Qx")]
public double Qx { get; set; }
[JsonProperty("Qy")]
public double Qy { get; set; }
[JsonProperty("Mz")]
public double Mz { get; set; }
public ForceTupleDTO(Guid id)
{
Id = id;
}
public void Clear()
{
throw new NotImplementedException();
}
public object Clone()
{
throw new NotImplementedException();
}
}
}