Создал опции триангуляции для точки и сделал тест для железобетона

This commit is contained in:
Evgeny Redikultsev
2022-06-23 20:34:22 +05:00
parent 6d0f2136e3
commit 5f9d2d4baf
11 changed files with 184 additions and 15 deletions

View File

@@ -0,0 +1,38 @@
using StructureHelperLogics.Data.Shapes;
using StructureHelperLogics.NdmCalculations.Entities;
using System;
using System.Collections.Generic;
using System.Text;
namespace StructureHelperLogics.NdmCalculations.Triangulations
{
/// <inheritdoc />
public class RectangleTriangulationLogicOptions : IRectangleTriangulationLogicOptions
{
/// <inheritdoc />
public ICenter Center { get; }
/// <inheritdoc />
public IRectangle Rectangle { get; }
/// <inheritdoc />
public double NdmMaxSize { get; }
/// <inheritdoc />
public int NdmMinDivision { get; }
public RectangleTriangulationLogicOptions(ICenter center, IRectangle rectangle, double ndmMaxSize, int ndmMinDivision)
{
Center = center;
Rectangle = rectangle;
NdmMaxSize = ndmMaxSize;
NdmMinDivision = ndmMinDivision;
}
public RectangleTriangulationLogicOptions(INdmPrimitive primitive)
{
if (! (primitive.Shape is IRectangle)) { throw new Exception("Shape type is not valid"); }
Center = primitive.Center;
Rectangle = primitive.Shape as IRectangle;
NdmMaxSize = primitive.NdmMaxSize;
NdmMinDivision = primitive.NdmMinDivision;
}
}
}