Window of interpolation tuple was changed

This commit is contained in:
Evgeny Redikultsev
2023-10-29 17:26:05 +05:00
parent e355f9e29d
commit 78ee3a8b13
37 changed files with 559 additions and 93 deletions

View File

@@ -18,6 +18,8 @@ namespace StructureHelperCommon.Models.Calculators
public IAccuracy Accuracy {get;set;}
public IResult Result => result;
public Action<IResult> ActionToOutputResults { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public FindParameterCalculator()
{
StartValue = 0d;

View File

@@ -1,4 +1,5 @@
using System;
using LoaderCalculator.Data.ResultData;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -19,5 +20,6 @@ namespace StructureHelperCommon.Models.Calculators
/// Result of Calculations
/// </summary>
IResult Result { get; }
Action<IResult> ActionToOutputResults { get; set; }
}
}

View File

@@ -21,6 +21,16 @@ namespace StructureHelperCommon.Models.Forces
/// <inheritdoc/>
public double Mz { get; set; }
public void Clear()
{
Mx = 0d;
My = 0d;
Nz = 0d;
Qx = 0d;
Qy = 0d;
Mz = 0d;
}
/// <inheritdoc/>
public object Clone()
{

View File

@@ -31,5 +31,6 @@ namespace StructureHelperCommon.Models.Forces
/// Twisting moment round about z-axis
/// </summary>
double Mz { get; set; }
void Clear();
}
}

View File

@@ -20,6 +20,16 @@ namespace StructureHelperCommon.Models.Forces
/// <inheritdoc/>
public double Mz { get; set; }
public void Clear()
{
Mx = 0d;
My = 0d;
Nz = 0d;
Qx = 0d;
Qy = 0d;
Mz = 0d;
}
/// <inheritdoc/>
public object Clone()
{

View File

@@ -11,7 +11,7 @@ namespace StructureHelperCommon.Services.Forces
public static void CopyProperties(IForceTuple source, IForceTuple target, double factor = 1d)
{
CheckTuples(source, target);
SumTupleToTarget(source, target, 0);
target.Clear();
SumTupleToTarget(source, target, factor);
}
public static IForceTuple MoveTupleIntoPoint(IForceTuple forceTuple, IPoint2D point2D)
@@ -66,7 +66,7 @@ namespace StructureHelperCommon.Services.Forces
}
return tuples;
}
private static void SumTupleToTarget(IForceTuple source, IForceTuple target, double factor = 1d)
public static void SumTupleToTarget(IForceTuple source, IForceTuple target, double factor = 1d)
{
target.Mx += source.Mx * factor;
target.My += source.My * factor;

View File

@@ -28,7 +28,8 @@ namespace StructureHelperCommon.Services.Units
public static IStringDoublePair DivideIntoStringDoublePair(string s)
{
s = s.Replace(" ", "");
string digitPattern = @"^[-]?[+]?\d+(\.?|\,?)\d*";
//string digitPattern = @"^[-]?[+]?\d+(\.?)|(\,?)\d*";
string digitPattern = @"^[-]?[+]?\d*\.?\,?\d*";
string textPattern = @"[0-9]|\.|\,";
string caracterPattern = "[a-z]+$";
string target = "";