Crack Calculator was added

This commit is contained in:
Evgeny Redikultsev
2023-07-16 17:21:28 +05:00
parent 3e0e51d0c9
commit d7a4b1f0a7
108 changed files with 1523 additions and 565 deletions

View File

@@ -16,10 +16,10 @@ namespace StructureHelperLogics.Models.Primitives
{
public class PointPrimitive : IPointPrimitive
{
static readonly PointUpdateStrategy updateStrategy = new();
public Guid Id { get; }
public string? Name { get; set; }
public double CenterX { get; set; }
public double CenterY { get; set; }
public IPoint2D Center { get; private set; }
public IHeadMaterial HeadMaterial { get; set; }
//public double NdmMaxSize { get; set; }
//public int NdmMinDivision { get; set; }
@@ -31,11 +31,13 @@ namespace StructureHelperLogics.Models.Primitives
public bool Triangulate { get; set; }
public ICrossSection? CrossSection { get; set; }
public PointPrimitive(Guid id)
{
Id = id;
Name = "New Point";
Area = 0.0005d;
Center = new Point2D();
VisualProperty = new VisualProperty();
UsersPrestrain = new StrainTuple();
AutoPrestrain = new StrainTuple();
@@ -52,16 +54,10 @@ namespace StructureHelperLogics.Models.Primitives
return logic.GetNdmCollection(material);
}
public void Save()
{
throw new NotImplementedException();
}
public object Clone()
{
var primitive = new PointPrimitive();
NdmPrimitivesService.CopyNdmProperties(this, primitive);
primitive.Area = Area;
updateStrategy.Update(primitive, this);
return primitive;
}
}