Interpolation of results was added
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperCommon.Models.Shapes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.Services.Forces
|
||||
{
|
||||
internal static class TupleService
|
||||
{
|
||||
public static IForceTuple MoveTupleIntoPoint(IForceTuple forceTuple, IPoint2D point2D)
|
||||
{
|
||||
var newTuple = forceTuple.Clone() as IForceTuple;
|
||||
newTuple.Mx += newTuple.Nz * point2D.Y;
|
||||
newTuple.My -= newTuple.Nz * point2D.X;
|
||||
return newTuple;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperCommon.Services.Forces;
|
||||
using StructureHelperLogics.Models.Primitives;
|
||||
using StructureHelperLogics.NdmCalculations.Analyses.ByForces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.Services.NdmCalculations
|
||||
{
|
||||
public static class InterpolateService
|
||||
{
|
||||
public static IForceCalculator InterpolateForceCalculator(IForceCalculator source, IDesignForceTuple sourceTuple, int stepCount)
|
||||
{
|
||||
IForceCalculator calculator = new ForceCalculator();
|
||||
calculator.LimitStatesList.Clear();
|
||||
calculator.LimitStatesList.Add(sourceTuple.LimitState);
|
||||
calculator.CalcTermsList.Clear();
|
||||
calculator.CalcTermsList.Add(sourceTuple.CalcTerm);
|
||||
calculator.IterationAccuracy = source.IterationAccuracy;
|
||||
calculator.MaxIterationCount = source.MaxIterationCount;
|
||||
calculator.Primitives.AddRange(source.Primitives);
|
||||
calculator.ForceCombinationLists.Clear();
|
||||
var combination = new ForceCombinationList()
|
||||
{
|
||||
Name = "New combination",
|
||||
SetInGravityCenter = false
|
||||
};
|
||||
combination.DesignForces.Clear();
|
||||
combination.DesignForces.AddRange(TupleService.InterpolateDesignTuple(sourceTuple, stepCount));
|
||||
combination.ForcePoint.X = 0;
|
||||
combination.ForcePoint.Y = 0;
|
||||
calculator.ForceCombinationLists.Add(combination);
|
||||
return calculator;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user