Add extended force tuple result
This commit is contained in:
15
StructureHelperCommon/Models/Shapes/IPoint2DRange.cs
Normal file
15
StructureHelperCommon/Models/Shapes/IPoint2DRange.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Shapes
|
||||
{
|
||||
public interface IPoint2DRange : ISaveable
|
||||
{
|
||||
IPoint2D StartPoint { get; set; }
|
||||
IPoint2D EndPoint { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -74,7 +74,7 @@ namespace StructureHelperCommon.Models.Shapes
|
||||
// compute angle from each criterion
|
||||
double byAngle = options.AngleStepRadians;
|
||||
double byCount = arcAngle / options.SegmentCount;
|
||||
double byLength = 2 * Math.Asin(options.MaxSegmentLength / (2 * radius));
|
||||
double byLength = 2 * Math.Asin(options.MaxSegmentLength * metresToMillimeters / (2 * radius));
|
||||
|
||||
return options.Mode switch
|
||||
{
|
||||
|
||||
20
StructureHelperCommon/Models/Shapes/Point2DRange.cs
Normal file
20
StructureHelperCommon/Models/Shapes/Point2DRange.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Shapes
|
||||
{
|
||||
public class Point2DRange : IPoint2DRange
|
||||
{
|
||||
public Guid Id { get; }
|
||||
public IPoint2D StartPoint { get; set; } = new Point2D();
|
||||
public IPoint2D EndPoint { get; set; } = new Point2D();
|
||||
|
||||
public Point2DRange(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
}
|
||||
}
|
||||
13
StructureHelperCommon/Models/States/IStateCalcTermPair.cs
Normal file
13
StructureHelperCommon/Models/States/IStateCalcTermPair.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
|
||||
namespace StructureHelperCommon.Models.States
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements pair of limit state and calculeation term
|
||||
/// </summary>
|
||||
public interface IStateCalcTermPair
|
||||
{
|
||||
LimitStates LimitState { get; set; }
|
||||
CalcTerms CalcTerm { get; set; }
|
||||
}
|
||||
}
|
||||
13
StructureHelperCommon/Models/States/StateCalcTermPair.cs
Normal file
13
StructureHelperCommon/Models/States/StateCalcTermPair.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
|
||||
namespace StructureHelperCommon.Models.States
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public class StateCalcTermPair : IStateCalcTermPair
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public LimitStates LimitState { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public CalcTerms CalcTerm { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.States
|
||||
{
|
||||
public class StateCalcTermPairUpdateStrategy : IUpdateStrategy<IStateCalcTermPair>
|
||||
{
|
||||
public void Update(IStateCalcTermPair targetObject, IStateCalcTermPair sourceObject)
|
||||
{
|
||||
CheckObject.IsNull(targetObject);
|
||||
CheckObject.IsNull(sourceObject);
|
||||
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||
targetObject.LimitState = sourceObject.LimitState;
|
||||
targetObject.CalcTerm = sourceObject.CalcTerm;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user