CompressedProperty was added
This commit is contained in:
14
StructureHelperCommon/Models/Calculators/Accuracy.cs
Normal file
14
StructureHelperCommon/Models/Calculators/Accuracy.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Calculators
|
||||
{
|
||||
public class Accuracy : IAccuracy
|
||||
{
|
||||
public double IterationAccuracy { get; set; }
|
||||
public int MaxIterationCount { get; set; }
|
||||
}
|
||||
}
|
||||
14
StructureHelperCommon/Models/Calculators/IAccuracy.cs
Normal file
14
StructureHelperCommon/Models/Calculators/IAccuracy.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Calculators
|
||||
{
|
||||
public interface IAccuracy
|
||||
{
|
||||
double IterationAccuracy { get; set; }
|
||||
int MaxIterationCount { get; set; }
|
||||
}
|
||||
}
|
||||
37
StructureHelperCommon/Models/Sections/CompressedMember.cs
Normal file
37
StructureHelperCommon/Models/Sections/CompressedMember.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using StructureHelperCommon.Services.Sections;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Sections
|
||||
{
|
||||
public class CompressedMember : ICompressedMember
|
||||
{
|
||||
public bool Buckling { get; set; }
|
||||
public double GeometryLength { get; set; }
|
||||
public double LengthFactorX { get; set; }
|
||||
public double DiagramFactorX { get; set; }
|
||||
public double LengthFactorY { get; set; }
|
||||
public double DiagramFactorY { get; set; }
|
||||
|
||||
|
||||
public CompressedMember()
|
||||
{
|
||||
Buckling = true;
|
||||
GeometryLength = 3d;
|
||||
LengthFactorX = 1d;
|
||||
DiagramFactorX = 1d;
|
||||
LengthFactorY = 1d;
|
||||
DiagramFactorY = 1d;
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
var target = new CompressedMember();
|
||||
CompressedMemberServices.CopyProperties(this, target);
|
||||
return target;
|
||||
}
|
||||
}
|
||||
}
|
||||
18
StructureHelperCommon/Models/Sections/ICompressedMember.cs
Normal file
18
StructureHelperCommon/Models/Sections/ICompressedMember.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Sections
|
||||
{
|
||||
public interface ICompressedMember : ICloneable
|
||||
{
|
||||
bool Buckling { get; set; }
|
||||
double GeometryLength { get; set; }
|
||||
double LengthFactorX { get; set; }
|
||||
double DiagramFactorX { get; set; }
|
||||
double LengthFactorY { get; set; }
|
||||
double DiagramFactorY { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using LoaderCalculator;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Services.Calculations
|
||||
{
|
||||
public static class AccuracyService
|
||||
{
|
||||
public static void CopyProperties(IAccuracy source, IAccuracy target)
|
||||
{
|
||||
target.IterationAccuracy = source.IterationAccuracy;
|
||||
target.MaxIterationCount = source.MaxIterationCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using StructureHelperCommon.Models.Sections;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Services.Sections
|
||||
{
|
||||
public static class CompressedMemberServices
|
||||
{
|
||||
public static void CopyProperties(ICompressedMember source, ICompressedMember target)
|
||||
{
|
||||
target.Buckling = source.Buckling;
|
||||
target.GeometryLength = source.GeometryLength;
|
||||
target.LengthFactorX = source.LengthFactorX;
|
||||
target.DiagramFactorX = source.DiagramFactorX;
|
||||
target.LengthFactorY = source.LengthFactorY;
|
||||
target.DiagramFactorY = source.DiagramFactorY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -61,6 +61,8 @@
|
||||
<Compile Include="Infrastructures\Settings\ProgramSetting.cs" />
|
||||
<Compile Include="Infrastructures\Strings\ErrorString.cs" />
|
||||
<Compile Include="Infrastructures\Enums\MaterialTypes.cs" />
|
||||
<Compile Include="Models\Calculators\Accuracy.cs" />
|
||||
<Compile Include="Models\Calculators\IAccuracy.cs" />
|
||||
<Compile Include="Models\Calculators\IHelperCalculator.cs" />
|
||||
<Compile Include="Models\Forces\DesignForceTuple.cs" />
|
||||
<Compile Include="Models\Forces\Factories\DesignForceFactory.cs" />
|
||||
@@ -86,6 +88,8 @@
|
||||
<Compile Include="Models\Materials\Libraries\MaterialPartialFactor.cs" />
|
||||
<Compile Include="Models\Materials\Libraries\MaterialSafetyFactor.cs" />
|
||||
<Compile Include="Models\Materials\Libraries\ReinforcementMaterialEntity.cs" />
|
||||
<Compile Include="Models\Sections\CompressedMember.cs" />
|
||||
<Compile Include="Models\Sections\ICompressedMember.cs" />
|
||||
<Compile Include="Models\Shapes\Point2D.cs" />
|
||||
<Compile Include="Models\Shapes\IPoint2D.cs" />
|
||||
<Compile Include="Models\Shapes\ICenterShape.cs" />
|
||||
@@ -98,9 +102,11 @@
|
||||
<Compile Include="Models\Shapes\PointShape.cs" />
|
||||
<Compile Include="Models\Shapes\RectangleShape.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Services\Calculations\AccuracyService.cs" />
|
||||
<Compile Include="Services\ColorServices\ColorProcessor.cs" />
|
||||
<Compile Include="Services\Forces\ForceTupleService.cs" />
|
||||
<Compile Include="Services\Forces\StrainTupleService.cs" />
|
||||
<Compile Include="Services\Sections\CompressedMemberServices.cs" />
|
||||
<Compile Include="Services\ShapeServices\ShapeService.cs" />
|
||||
<Compile Include="Services\Units\IUnit.cs" />
|
||||
<Compile Include="Services\Units\Unit.cs" />
|
||||
|
||||
Reference in New Issue
Block a user