Add version processor window
This commit is contained in:
@@ -8,6 +8,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides calculations of ndm primitives for force actions
|
||||
/// </summary>
|
||||
public interface IForceCalculator : ICalculator, IHasActionByResult
|
||||
{
|
||||
IForceCalculatorInputData InputData { get; set; }
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
public interface ILimitCurveCalculator : ICalculator, IHasActionByResult
|
||||
{
|
||||
Action<IResult> ActionToOutputResults { get; set; }
|
||||
SurroundData SurroundData { get; set; }
|
||||
ISurroundData SurroundData { get; set; }
|
||||
int PointCount { get; set; }
|
||||
ISurroundProc SurroundProcLogic { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Models;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
public interface ILimitCurvesCalculator : ISaveable, ICalculator, IHasActionByResult
|
||||
{
|
||||
LimitCurvesCalculatorInputData InputData { get; set; }
|
||||
string Name { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.Parameters;
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
public interface ILimitCurvesCalculatorInputData : IInputData, ICloneable
|
||||
{
|
||||
List<CalcTerms> CalcTerms { get; }
|
||||
List<LimitStates> LimitStates { get; }
|
||||
int PointCount { get; set; }
|
||||
List<PredicateEntry> PredicateEntries { get; }
|
||||
List<NamedCollection<INdmPrimitive>> PrimitiveSeries { get; }
|
||||
ISurroundData SurroundData { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using StructureHelperCommon.Models.Shapes;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
public interface ISurroundData : ICloneable
|
||||
{
|
||||
double ConstZ { get; set; }
|
||||
ConstOneDirectionConverter ConvertLogicEntity { get; set; }
|
||||
double XMax { get; set; }
|
||||
double XMin { get; set; }
|
||||
double YMax { get; set; }
|
||||
double YMin { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
public interface ISurroundProc
|
||||
{
|
||||
SurroundData SurroundData { get; set; }
|
||||
ISurroundData SurroundData { get; set; }
|
||||
int PointCount { get; set; }
|
||||
List<IPoint2D> GetPoints();
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
private ILimitCurveLogic limitCurveLogic;
|
||||
|
||||
public string Name { get; set; }
|
||||
public SurroundData SurroundData { get; set; }
|
||||
public ISurroundData SurroundData { get; set; }
|
||||
public int PointCount { get; set; }
|
||||
public ISurroundProc SurroundProcLogic { get; set; }
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
public LimitCurveCalculator(ILimitCurveLogic limitCurveLogic)
|
||||
{
|
||||
this.limitCurveLogic = limitCurveLogic;
|
||||
SurroundData = new();
|
||||
SurroundData = new SurroundData();
|
||||
SurroundProcLogic = new RectSurroundProc();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Settings;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperCommon.Models.Parameters;
|
||||
using StructureHelperCommon.Models.Shapes;
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
//Copyright (c) 2023 Redikultsev Evgeny, Ekaterinburg, Russia
|
||||
//All rights reserved.
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
public class LimitCurveInputData : IInputData, ICloneable
|
||||
{
|
||||
public List<LimitStates> LimitStates { get; private set; }
|
||||
public List<CalcTerms> CalcTerms { get; private set; }
|
||||
public List<NamedCollection<INdmPrimitive>> PrimitiveSeries {get; private set; }
|
||||
public List<PredicateEntry> PredicateEntries { get; private set; }
|
||||
public SurroundData SurroundData { get; set; }
|
||||
public int PointCount { get; set; }
|
||||
public LimitCurveInputData()
|
||||
{
|
||||
LimitStates = new();
|
||||
CalcTerms = new();
|
||||
PredicateEntries = new();
|
||||
SurroundData = new();
|
||||
PointCount = 80;
|
||||
PrimitiveSeries = new List<NamedCollection<INdmPrimitive>>();
|
||||
}
|
||||
public LimitCurveInputData(IEnumerable<INdmPrimitive> primitives) : this()
|
||||
{
|
||||
PrimitiveSeries.Add
|
||||
(new NamedCollection<INdmPrimitive>()
|
||||
{
|
||||
Name = "V1",
|
||||
Collection = primitives.ToList()
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
var newItem = new LimitCurveInputData()
|
||||
{
|
||||
LimitStates = LimitStates.ToList(),
|
||||
CalcTerms = CalcTerms.ToList(),
|
||||
PredicateEntries = PredicateEntries.ToList(),
|
||||
SurroundData = SurroundData.Clone() as SurroundData,
|
||||
PointCount = PointCount
|
||||
};
|
||||
foreach (var item in PrimitiveSeries)
|
||||
{
|
||||
var collection = item.Collection.ToList();
|
||||
newItem.PrimitiveSeries.Add
|
||||
(
|
||||
new NamedCollection<INdmPrimitive>()
|
||||
{
|
||||
Name = item.Name,
|
||||
Collection = collection
|
||||
}
|
||||
);
|
||||
}
|
||||
return newItem;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ using StructureHelperLogics.Services.NdmPrimitives;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
public class LimitCurvesCalculator : ISaveable, ICalculator, IHasActionByResult
|
||||
public class LimitCurvesCalculator : ILimitCurvesCalculator
|
||||
{
|
||||
private LimitCurvesResult result;
|
||||
private int curvesIterationCount;
|
||||
@@ -21,7 +21,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
|
||||
public Guid Id { get; }
|
||||
public string Name { get; set; }
|
||||
public LimitCurveInputData InputData { get; set; }
|
||||
public LimitCurvesCalculatorInputData InputData { get; set; }
|
||||
public IResult Result => result;
|
||||
|
||||
public Action<IResult> ActionToOutputResults { get; set; }
|
||||
@@ -89,7 +89,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
};
|
||||
var ndms = triangulateLogic.GetNdms();
|
||||
TraceLogger?.AddMessage($"Number of elementary parts N={ndms.Count()} were obtainded successfully");
|
||||
TraceLogger?.AddMessage($"Summary area of elementary parts Asum={ndms.Sum(x=>x.Area * x.StressScale)}", TraceLogStatuses.Debug);
|
||||
TraceLogger?.AddMessage($"Summary area of elementary parts Asum={ndms.Sum(x => x.Area * x.StressScale)}", TraceLogStatuses.Debug);
|
||||
foreach (var predicateEntry in InputData.PredicateEntries)
|
||||
{
|
||||
string calcName = $"{primitiveSeries.Name}_{predicateEntry.Name}_{limitState}_{calcTerm}";
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Infrastructures.Settings;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperCommon.Models.Parameters;
|
||||
using StructureHelperCommon.Models.Shapes;
|
||||
using StructureHelperLogics.NdmCalculations.Analyses.ByForces.LimitCurve;
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
//Copyright (c) 2023 Redikultsev Evgeny, Ekaterinburg, Russia
|
||||
//All rights reserved.
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
public class LimitCurvesCalculatorInputData : ILimitCurvesCalculatorInputData
|
||||
{
|
||||
private ICloneStrategy<ILimitCurvesCalculatorInputData> cloneStrategy = new LimitCurvesCalculatorInputDataCloneStrategy();
|
||||
public List<LimitStates> LimitStates { get; private set; } = new();
|
||||
public List<CalcTerms> CalcTerms { get; private set; } = new();
|
||||
public List<NamedCollection<INdmPrimitive>> PrimitiveSeries { get; private set; } = new();
|
||||
public List<PredicateEntry> PredicateEntries { get; private set; } = new();
|
||||
public ISurroundData SurroundData { get; set; } = new SurroundData();
|
||||
public int PointCount { get; set; } = 80;
|
||||
public LimitCurvesCalculatorInputData()
|
||||
{
|
||||
}
|
||||
public LimitCurvesCalculatorInputData(IEnumerable<INdmPrimitive> primitives)
|
||||
{
|
||||
PrimitiveSeries.Add
|
||||
(new NamedCollection<INdmPrimitive>()
|
||||
{
|
||||
Name = "V1",
|
||||
Collection = primitives.ToList()
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
var newItem = cloneStrategy.GetClone(this);
|
||||
return newItem;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces.LimitCurve
|
||||
{
|
||||
|
||||
public class LimitCurvesCalculatorInputDataCloneStrategy : ICloneStrategy<ILimitCurvesCalculatorInputData>
|
||||
{
|
||||
private IUpdateStrategy<ILimitCurvesCalculatorInputData> updateStrategy;
|
||||
|
||||
public LimitCurvesCalculatorInputDataCloneStrategy(IUpdateStrategy<ILimitCurvesCalculatorInputData> updateStrategy)
|
||||
{
|
||||
this.updateStrategy = updateStrategy;
|
||||
}
|
||||
|
||||
public LimitCurvesCalculatorInputDataCloneStrategy() : this (new LimitCurvesCalculatorInputDataUpdateStrategy())
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public ILimitCurvesCalculatorInputData GetClone(ILimitCurvesCalculatorInputData sourceObject)
|
||||
{
|
||||
LimitCurvesCalculatorInputData newItem = new();
|
||||
updateStrategy.Update(newItem, sourceObject);
|
||||
return newItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Models.Parameters;
|
||||
using StructureHelperCommon.Services;
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces.LimitCurve
|
||||
{
|
||||
public class LimitCurvesCalculatorInputDataUpdateStrategy : IUpdateStrategy<ILimitCurvesCalculatorInputData>
|
||||
{
|
||||
public void Update(ILimitCurvesCalculatorInputData targetObject, ILimitCurvesCalculatorInputData sourceObject)
|
||||
{
|
||||
CheckObject.IsNull(targetObject, sourceObject, "Limit curve calculator input data");
|
||||
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||
targetObject.LimitStates.Clear();
|
||||
targetObject.CalcTerms.Clear();
|
||||
targetObject.PredicateEntries.Clear();
|
||||
targetObject.LimitStates.AddRange(sourceObject.LimitStates);
|
||||
targetObject.CalcTerms.AddRange(sourceObject.CalcTerms);
|
||||
targetObject.PredicateEntries.AddRange(sourceObject.PredicateEntries);
|
||||
targetObject.SurroundData = sourceObject.SurroundData.Clone() as ISurroundData;
|
||||
targetObject.PointCount = sourceObject.PointCount;
|
||||
foreach (var item in sourceObject.PrimitiveSeries)
|
||||
{
|
||||
var collection = item.Collection.ToList();
|
||||
targetObject.PrimitiveSeries.Add
|
||||
(
|
||||
new NamedCollection<INdmPrimitive>()
|
||||
{
|
||||
Name = item.Name,
|
||||
Collection = collection
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
private List<IPoint2D> surroundList;
|
||||
|
||||
public SurroundData SurroundData { get; set; }
|
||||
public ISurroundData SurroundData { get; set; }
|
||||
public int PointCount { get; set; }
|
||||
|
||||
public RectSurroundProc()
|
||||
|
||||
@@ -11,12 +11,12 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
private List<IPoint2D> surroundList;
|
||||
|
||||
public SurroundData SurroundData { get; set; }
|
||||
public ISurroundData SurroundData { get; set; }
|
||||
public int PointCount { get; set; }
|
||||
|
||||
public RoundSurroundProc()
|
||||
{
|
||||
SurroundData = new();
|
||||
SurroundData = new SurroundData();
|
||||
}
|
||||
public List<IPoint2D> GetPoints()
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
/// <summary>
|
||||
/// Limits of coordinates for workplane
|
||||
/// </summary>
|
||||
public class SurroundData : ICloneable
|
||||
public class SurroundData : ISurroundData
|
||||
{
|
||||
public double XMax { get; set; }
|
||||
public double XMin { get; set; }
|
||||
|
||||
@@ -3,10 +3,10 @@ using StructureHelperCommon.Models.Parameters;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces.Logics
|
||||
{
|
||||
internal class LimitCurveInputDataUpdateStrategy : IUpdateStrategy<LimitCurveInputData>
|
||||
internal class LimitCurveInputDataUpdateStrategy : IUpdateStrategy<ILimitCurvesCalculatorInputData>
|
||||
{
|
||||
SurroundDataUpdateStrategy surroundDataUpdateStrategy => new();
|
||||
public void Update(LimitCurveInputData targetObject, LimitCurveInputData sourceObject)
|
||||
IUpdateStrategy<ISurroundData> surroundDataUpdateStrategy = new SurroundDataUpdateStrategy();
|
||||
public void Update(ILimitCurvesCalculatorInputData targetObject, ILimitCurvesCalculatorInputData sourceObject)
|
||||
{
|
||||
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||
targetObject.LimitStates.Clear();
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces.Logics
|
||||
{
|
||||
internal class SurroundDataUpdateStrategy : IUpdateStrategy<SurroundData>
|
||||
internal class SurroundDataUpdateStrategy : IUpdateStrategy<ISurroundData>
|
||||
{
|
||||
public void Update(SurroundData targetObject, SurroundData sourceObject)
|
||||
public void Update(ISurroundData targetObject, ISurroundData sourceObject)
|
||||
{
|
||||
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||
targetObject.XMax = sourceObject.XMax;
|
||||
|
||||
Reference in New Issue
Block a user