using StructureHelperCommon.Models.Forces; using StructureHelperCommon.Models.Shapes; using StructureHelperLogics.NdmCalculations.Primitives; namespace StructureHelperLogics.NdmCalculations.Triangulations { /// public class RectangleTriangulationLogicOptions : IRectangleTriangulationLogicOptions { /// public IPoint2D Center { get; } /// public IRectangleShape Rectangle { get; } /// public double NdmMaxSize { get; } /// public int NdmMinDivision { get; } /// public StrainTuple Prestrain { get; set; } public RectangleTriangulationLogicOptions(IPoint2D center, IRectangleShape rectangle, double ndmMaxSize, int ndmMinDivision) { Center = center; Rectangle = rectangle; NdmMaxSize = ndmMaxSize; NdmMinDivision = ndmMinDivision; Prestrain = new StrainTuple(); } public RectangleTriangulationLogicOptions(IRectanglePrimitive primitive) { Center = new Point2D() { X = primitive.CenterX, Y = primitive.CenterY }; Rectangle = primitive; NdmMaxSize = primitive.NdmMaxSize; NdmMinDivision = primitive.NdmMinDivision; Prestrain = new StrainTuple { Mx = primitive.UsersPrestrain.Mx + primitive.AutoPrestrain.Mx, My = primitive.UsersPrestrain.My + primitive.AutoPrestrain.My, Nz = primitive.UsersPrestrain.Nz + primitive.AutoPrestrain.Nz }; } } }