diff --git a/Libraries/LoaderCalculator.dll b/Libraries/LoaderCalculator.dll index ab9c778..e96c3f0 100644 Binary files a/Libraries/LoaderCalculator.dll and b/Libraries/LoaderCalculator.dll differ diff --git a/StructureHelperCommon/Models/Forces/Factories/DesignForceFactory.cs b/StructureHelperCommon/Models/Forces/Factories/DesignForceFactory.cs new file mode 100644 index 0000000..d113c67 --- /dev/null +++ b/StructureHelperCommon/Models/Forces/Factories/DesignForceFactory.cs @@ -0,0 +1,38 @@ +using StructureHelperCommon.Infrastructures.Enums; +using StructureHelperCommon.Infrastructures.Exceptions; +using StructureHelperCommon.Infrastructures.Strings; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StructureHelperCommon.Models.Forces +{ + public enum ForceType + { + Force_zero, + Force_Mx50My50Nz100, + } + + public static class DesignForceFactory + { + public static IDesignForceTuple GetDesignForce(ForceType forceType, LimitStates limitState, CalcTerms calcTerm) + { + if (forceType == ForceType.Force_zero) + { + return new DesignForceTuple(limitState, calcTerm); + } + else if (forceType == ForceType.Force_Mx50My50Nz100) + { + var tuple = new DesignForceTuple(limitState, calcTerm); + var forceTuple = tuple.ForceTuple; + forceTuple.Mx = -50e3d; + forceTuple.My = -50e3d; + forceTuple.Nz = -100e3d; + return tuple; + } + else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown); + } + } +} diff --git a/StructureHelperCommon/Models/Forces/Factories/ForceCombinationListFactory.cs b/StructureHelperCommon/Models/Forces/Factories/ForceCombinationListFactory.cs new file mode 100644 index 0000000..b98a933 --- /dev/null +++ b/StructureHelperCommon/Models/Forces/Factories/ForceCombinationListFactory.cs @@ -0,0 +1,34 @@ +using StructureHelperCommon.Infrastructures.Enums; +using StructureHelperCommon.Infrastructures.Exceptions; +using StructureHelperCommon.Infrastructures.Strings; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StructureHelperCommon.Models.Forces +{ + public enum DesignForceType + { + Suit_1, + Suit_2 + } + + public static class ForceCombinationListFactory + { + public static List GetDesignForces(DesignForceType forceType) + { + if (forceType == DesignForceType.Suit_1) + { + var designForces = new List(); + designForces.Add(DesignForceFactory.GetDesignForce(ForceType.Force_Mx50My50Nz100, LimitStates.ULS, CalcTerms.ShortTerm)); + designForces.Add(DesignForceFactory.GetDesignForce(ForceType.Force_Mx50My50Nz100, LimitStates.ULS, CalcTerms.LongTerm)); + designForces.Add(DesignForceFactory.GetDesignForce(ForceType.Force_Mx50My50Nz100, LimitStates.SLS, CalcTerms.ShortTerm)); + designForces.Add(DesignForceFactory.GetDesignForce(ForceType.Force_Mx50My50Nz100, LimitStates.SLS, CalcTerms.LongTerm)); + return designForces; + } + else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown); + } + } +} diff --git a/StructureHelperCommon/Services/Forces/TupleService.cs b/StructureHelperCommon/Services/Forces/TupleService.cs new file mode 100644 index 0000000..00f69a6 --- /dev/null +++ b/StructureHelperCommon/Services/Forces/TupleService.cs @@ -0,0 +1,54 @@ +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 StructureHelperCommon.Services.Forces +{ + public 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; + } + + public static IForceTuple InterpolateTuples(IForceTuple startTuple, IForceTuple endTuple, double coefficient) + { + double dMx, dMy, dNz; + dMx = endTuple.Mx - startTuple.Mx; + dMy = endTuple.My - startTuple.My; + dNz = endTuple.Nz - startTuple.Nz; + return new ForceTuple() + { + Mx = startTuple.Mx + dMx * coefficient, + My = startTuple.My + dMy * coefficient, + Nz = startTuple.Nz + dNz * coefficient + }; + } + + public static IForceTuple InterpolateTuples(IForceTuple endTuple, double coefficient) + { + IForceTuple startTuple = new ForceTuple(); + return InterpolateTuples(startTuple, endTuple, coefficient); + } + + public static List InterpolateDesignTuple(IDesignForceTuple endTuple, int stepCount) + { + var tuples =new List(); + double step = 1d / stepCount; + for (int i = 0; i <= stepCount; i++) + { + var currentTuple = InterpolateTuples(endTuple.ForceTuple, i * step); + var currentDesignTuple = new DesignForceTuple() { LimitState = endTuple.LimitState, CalcTerm = endTuple.CalcTerm, ForceTuple = currentTuple }; + tuples.Add(currentDesignTuple); + } + return tuples; + } + } +} diff --git a/StructureHelperCommon/StructureHelperCommon.csproj b/StructureHelperCommon/StructureHelperCommon.csproj index 8e98716..33f49bc 100644 --- a/StructureHelperCommon/StructureHelperCommon.csproj +++ b/StructureHelperCommon/StructureHelperCommon.csproj @@ -59,6 +59,8 @@ + + @@ -85,6 +87,7 @@ + diff --git a/StructureHelperLogics/Models/Templates/CrossSections/CalculatorLogic.cs b/StructureHelperLogics/Models/Templates/CrossSections/CalculatorLogic.cs new file mode 100644 index 0000000..9a2ad9f --- /dev/null +++ b/StructureHelperLogics/Models/Templates/CrossSections/CalculatorLogic.cs @@ -0,0 +1,20 @@ +using StructureHelperLogics.NdmCalculations.Analyses; +using StructureHelperLogics.NdmCalculations.Analyses.ByForces; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StructureHelperLogics.Models.Templates.CrossSections +{ + internal class CalculatorLogic : ICalculatorLogic + { + public IEnumerable GetNdmCalculators() + { + var calculators = new List(); + calculators.Add(new ForceCalculator() { Name = "New Force Calculator"}); + return calculators; + } + } +} diff --git a/StructureHelperLogics/Models/Templates/CrossSections/ForceLogic.cs b/StructureHelperLogics/Models/Templates/CrossSections/ForceLogic.cs new file mode 100644 index 0000000..9d078da --- /dev/null +++ b/StructureHelperLogics/Models/Templates/CrossSections/ForceLogic.cs @@ -0,0 +1,22 @@ +using StructureHelperCommon.Models.Forces; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StructureHelperLogics.Models.Templates.CrossSections +{ + internal class ForceLogic : IForceLogic + { + public IEnumerable GetCombinationList() + { + var combinations = new List(); + var combination = new ForceCombinationList() { Name = "New Force Action"}; + combination.DesignForces.Clear(); + combination.DesignForces.AddRange(ForceCombinationListFactory.GetDesignForces(DesignForceType.Suit_1)); + combinations.Add(combination); + return combinations; + } + } +} diff --git a/StructureHelperLogics/Models/Templates/CrossSections/ISectionGeometryLogic.cs b/StructureHelperLogics/Models/Templates/CrossSections/ISectionGeometryLogic.cs index aabbdd9..1a8c150 100644 --- a/StructureHelperLogics/Models/Templates/CrossSections/ISectionGeometryLogic.cs +++ b/StructureHelperLogics/Models/Templates/CrossSections/ISectionGeometryLogic.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; namespace StructureHelperLogics.Models.Templates.CrossSections { - internal interface ISectionGeometryLogic + public interface ISectionGeometryLogic { IEnumerable GetNdmPrimitives(); } diff --git a/StructureHelperLogics/Models/Templates/CrossSections/RCs/IRCGeometryLogic.cs b/StructureHelperLogics/Models/Templates/CrossSections/RCs/IRCGeometryLogic.cs new file mode 100644 index 0000000..687afd8 --- /dev/null +++ b/StructureHelperLogics/Models/Templates/CrossSections/RCs/IRCGeometryLogic.cs @@ -0,0 +1,14 @@ +using StructureHelper.Models.Materials; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StructureHelperLogics.Models.Templates.CrossSections.RCs +{ + public interface IRCGeometryLogic : ISectionGeometryLogic + { + IEnumerable HeadMaterials { get; set; } + } +} diff --git a/StructureHelperLogics/Models/Templates/CrossSections/RCs/MaterialLogic.cs b/StructureHelperLogics/Models/Templates/CrossSections/RCs/MaterialLogic.cs new file mode 100644 index 0000000..cd76681 --- /dev/null +++ b/StructureHelperLogics/Models/Templates/CrossSections/RCs/MaterialLogic.cs @@ -0,0 +1,26 @@ +using StructureHelper.Models.Materials; +using StructureHelperCommon.Infrastructures.Settings; +using StructureHelperLogics.Models.Materials; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StructureHelperLogics.Models.Templates.CrossSections.RCs +{ + internal class MaterialLogic : IMaterialLogic + { + public IEnumerable GetHeadMaterials() + { + var result = new List(); + var concrete = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, ProgramSetting.CodeType); + concrete.Name = "Concrete"; + result.Add(concrete); + var reinforcement = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Reinforecement400, ProgramSetting.CodeType); + reinforcement.Name = "Reinforcement"; + result.Add(reinforcement); + return result; + } + } +} diff --git a/StructureHelperLogics/Models/Templates/CrossSections/RCs/RectGeometryLogic.cs b/StructureHelperLogics/Models/Templates/CrossSections/RCs/RectGeometryLogic.cs new file mode 100644 index 0000000..2910820 --- /dev/null +++ b/StructureHelperLogics/Models/Templates/CrossSections/RCs/RectGeometryLogic.cs @@ -0,0 +1,106 @@ +using StructureHelper.Models.Materials; +using StructureHelperCommon.Models.Shapes; +using StructureHelperLogics.Models.Primitives; +using StructureHelperLogics.Models.Templates.RCs; +using StructureHelperLogics.NdmCalculations.Primitives; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StructureHelperLogics.Models.Templates.CrossSections.RCs +{ + public class RectGeometryLogic : IRCGeometryLogic + { + RectangleBeamTemplate template; + IHeadMaterial concrete => HeadMaterials.ToList()[0]; + IHeadMaterial reinforcement => HeadMaterials.ToList()[1]; + + RectangleShape rect => template.Shape as RectangleShape; + double width => rect.Width; + double height => rect.Height; + double area1 => Math.PI * template.BottomDiameter * template.BottomDiameter / 4d; + double area2 => Math.PI * template.TopDiameter * template.TopDiameter / 4d; + double gap => template.CoverGap; + + public IEnumerable HeadMaterials { get; set; } + + public RectGeometryLogic(RectangleBeamTemplate template) + { + this.template = template; + } + + public IEnumerable GetNdmPrimitives() + { + List primitives = new List(); + primitives.AddRange(GetConcretePrimitives()); + primitives.AddRange(GetCornerReinfrocementPrimitives()); + if (template.WidthCount > 2 || template.HeightCount > 2) + { + primitives.AddRange(GetMiddleReinfrocementPrimitives()); + } + return primitives; + } + + private IEnumerable GetConcretePrimitives() + { + List primitives = new List(); + var rectangle = new RectanglePrimitive(concrete) { Width = width, Height = height, Name = "Concrete block" }; + primitives.Add(rectangle); + return primitives; + } + + private IEnumerable GetCornerReinfrocementPrimitives() + { + double[] xs = new double[] { -width / 2 + gap, width / 2 - gap }; + double[] ys = new double[] { -height / 2 + gap, height / 2 - gap }; + + List primitives = new List(); + var point = new PointPrimitive(reinforcement) { CenterX = xs[0], CenterY = ys[0], Area = area1, Name = "Left bottom point" }; + primitives.Add(point); + point = new PointPrimitive(reinforcement) { CenterX = xs[1], CenterY = ys[0], Area = area1, Name = "Right bottom point" }; + primitives.Add(point); + point = new PointPrimitive(reinforcement) { CenterX = xs[0], CenterY = ys[1], Area = area2, Name = "Left top point" }; + primitives.Add(point); + point = new PointPrimitive(reinforcement) { CenterX = xs[1], CenterY = ys[1], Area = area2, Name = "Right top point" }; + primitives.Add(point); + return primitives; + } + + private IEnumerable GetMiddleReinfrocementPrimitives() + { + double[] xs = new double[] { -width / 2 + gap, width / 2 - gap }; + double[] ys = new double[] { -height / 2 + gap, height / 2 - gap }; + + List primitives = new List(); + IPointPrimitive point; + if (template.WidthCount > 2) + { + int count = template.WidthCount - 1; + double dist = (xs[1] - xs[0]) / count; + for (int i = 1; i < count; i++) + { + point = new PointPrimitive(reinforcement) { CenterX = xs[0] + dist * i, CenterY = ys[0], Area = area1, Name = $"Bottom point {i}" }; + primitives.Add(point); + point = new PointPrimitive(reinforcement) { CenterX = xs[0] + dist * i, CenterY = ys[1], Area = area2, Name = $"Top point {i}" }; + primitives.Add(point); + } + } + if (template.HeightCount > 2) + { + int count = template.HeightCount - 1; + double dist = (ys[1] - ys[0]) / count; + for (int i = 1; i < count; i++) + { + point = new PointPrimitive(reinforcement) { CenterX = xs[0], CenterY = ys[0] + dist * i, Area = area1, Name = $"Left point {i}" }; + primitives.Add(point); + point = new PointPrimitive(reinforcement) { CenterX = xs[1], CenterY = ys[0] + dist * i, Area = area1, Name = $"Right point {i}" }; + primitives.Add(point); + } + } + return primitives; + } + } +} diff --git a/StructureHelperLogics/Models/Templates/CrossSections/RCs/RCSectionTemplate.cs b/StructureHelperLogics/Models/Templates/CrossSections/RCs/SectionTemplate.cs similarity index 73% rename from StructureHelperLogics/Models/Templates/CrossSections/RCs/RCSectionTemplate.cs rename to StructureHelperLogics/Models/Templates/CrossSections/RCs/SectionTemplate.cs index 92b2070..9553bdb 100644 --- a/StructureHelperLogics/Models/Templates/CrossSections/RCs/RCSectionTemplate.cs +++ b/StructureHelperLogics/Models/Templates/CrossSections/RCs/SectionTemplate.cs @@ -1,6 +1,7 @@ using StructureHelperCommon.Infrastructures.Interfaces; using StructureHelperCommon.Models.Forces; using StructureHelperLogics.Models.CrossSections; +using StructureHelperLogics.Models.Templates.RCs; using StructureHelperLogics.NdmCalculations.Analyses; using StructureHelperLogics.NdmCalculations.Primitives; using System; @@ -9,36 +10,45 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace StructureHelperLogics.Models.Templates.CrossSections +namespace StructureHelperLogics.Models.Templates.CrossSections.RCs { - public class RCSectionTemplate : ICrossSectionTemplate + public class SectionTemplate : ICrossSectionTemplate { IForceLogic forceLogic; IMaterialLogic materialLogic; - ISectionGeometryLogic geometryLogic; + IRCGeometryLogic geometryLogic; ICalculatorLogic calculatorLogic; IEnumerable primitives; IEnumerable combinations; IEnumerable calculators; + public SectionTemplate(IRCGeometryLogic geometryLogic) + { + this.geometryLogic = geometryLogic; + materialLogic = new MaterialLogic(); + forceLogic = new ForceLogic(); + calculatorLogic = new CalculatorLogic(); + } + public ICrossSection GetCrossSection() { ICrossSection section = new CrossSection(); var repository = section.SectionRepository; var materials = materialLogic.GetHeadMaterials(); + geometryLogic.HeadMaterials = materials; primitives = geometryLogic.GetNdmPrimitives(); repository.HeadMaterials.AddRange(materials); repository.Primitives.AddRange(primitives); combinations = forceLogic.GetCombinationList(); repository.ForceCombinationLists.AddRange(combinations); calculators = calculatorLogic.GetNdmCalculators(); - ProcessCalculatorsSetForce(); - ProcessCalculatorsSetPrimitives(); + AddAllForcesToCalculators(); + AddAllPrimitivesToCalculator(); repository.CalculatorsList.AddRange(calculators); return section; } - private void ProcessCalculatorsSetForce() + private void AddAllForcesToCalculators() { foreach (var calculator in calculators) { @@ -49,7 +59,7 @@ namespace StructureHelperLogics.Models.Templates.CrossSections } } } - private void ProcessCalculatorsSetPrimitives() + private void AddAllPrimitivesToCalculator() { foreach (var calculator in calculators) { diff --git a/StructureHelperLogics/NdmCalculations/Analyses/ByForces/ForceCalculator.cs b/StructureHelperLogics/NdmCalculations/Analyses/ByForces/ForceCalculator.cs index 7488383..a8aaa7f 100644 --- a/StructureHelperLogics/NdmCalculations/Analyses/ByForces/ForceCalculator.cs +++ b/StructureHelperLogics/NdmCalculations/Analyses/ByForces/ForceCalculator.cs @@ -1,20 +1,16 @@ -using LoaderCalculator.Data.Matrix; +using LoaderCalculator; +using LoaderCalculator.Data.Matrix; using LoaderCalculator.Data.Ndms; using LoaderCalculator.Data.SourceData; -using LoaderCalculator; using StructureHelperCommon.Infrastructures.Enums; using StructureHelperCommon.Models.Forces; -using StructureHelperLogics.Models.Calculations.CalculationProperties; +using StructureHelperCommon.Models.Shapes; +using StructureHelperCommon.Services.Forces; using StructureHelperLogics.NdmCalculations.Primitives; -using StructureHelperLogics.NdmCalculations.Triangulations; using StructureHelperLogics.Services.NdmPrimitives; using System; using System.Collections.Generic; -using System.Linq; using System.Threading; -using System.Text; -using StructureHelperCommon.Models.Shapes; -using StructureHelperLogics.Services.Forces; namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces { @@ -126,12 +122,25 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces catch (Exception ex) { var result = new ForcesResult() { IsValid = false }; - if (ex.Message == "") { result.Desctription = "Stiffness matrix is equal to zero"; } + if (ex.Message == "Calculation result is not valid: stiffness matrix is equal to zero") { result.Desctription = "Stiffness matrix is equal to zero \nProbably section was collapsed"; } else { result.Desctription = $"Error is appeared due to analysis. Error: {ex}"; } return result; } } + public object Clone() + { + IForceCalculator calculator = new ForceCalculator(); + calculator.LimitStatesList.Clear(); + calculator.LimitStatesList.AddRange(LimitStatesList); + calculator.CalcTermsList.Clear(); + calculator.CalcTermsList.AddRange(CalcTermsList); + calculator.IterationAccuracy = IterationAccuracy; + calculator.MaxIterationCount = MaxIterationCount; + calculator.Primitives.AddRange(Primitives); + calculator.ForceCombinationLists.AddRange(ForceCombinationLists); + return calculator; + } } } diff --git a/StructureHelperLogics/NdmCalculations/Analyses/ByForces/IForceCalculator.cs b/StructureHelperLogics/NdmCalculations/Analyses/ByForces/IForceCalculator.cs index fa2348c..b627f0a 100644 --- a/StructureHelperLogics/NdmCalculations/Analyses/ByForces/IForceCalculator.cs +++ b/StructureHelperLogics/NdmCalculations/Analyses/ByForces/IForceCalculator.cs @@ -2,11 +2,12 @@ using StructureHelperCommon.Infrastructures.Interfaces; using StructureHelperCommon.Models.Forces; using StructureHelperLogics.NdmCalculations.Primitives; +using System; using System.Collections.Generic; namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces { - public interface IForceCalculator : INdmCalculator, IHasPrimitives, IHasForceCombinations + public interface IForceCalculator : INdmCalculator, IHasPrimitives, IHasForceCombinations, ICloneable { List CalcTermsList { get; } double IterationAccuracy { get; set; } diff --git a/StructureHelperLogics/NdmCalculations/Analyses/IExportResultLogic.cs b/StructureHelperLogics/NdmCalculations/Analyses/IExportResultLogic.cs new file mode 100644 index 0000000..6599e39 --- /dev/null +++ b/StructureHelperLogics/NdmCalculations/Analyses/IExportResultLogic.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StructureHelperLogics.NdmCalculations.Analyses +{ + internal interface IExportResultLogic + { + void Export(INdmResult ndmResult); + } +} diff --git a/StructureHelperLogics/Services/Forces/TupleService.cs b/StructureHelperLogics/Services/Forces/TupleService.cs deleted file mode 100644 index c47d064..0000000 --- a/StructureHelperLogics/Services/Forces/TupleService.cs +++ /dev/null @@ -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; - } - } -} diff --git a/StructureHelperLogics/Services/NdmCalculations/InterpolateService.cs b/StructureHelperLogics/Services/NdmCalculations/InterpolateService.cs new file mode 100644 index 0000000..4584d1c --- /dev/null +++ b/StructureHelperLogics/Services/NdmCalculations/InterpolateService.cs @@ -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; + } + } +} diff --git a/StructureHelperLogics/StructureHelperLogics.csproj b/StructureHelperLogics/StructureHelperLogics.csproj index 94ed563..ef0f54a 100644 --- a/StructureHelperLogics/StructureHelperLogics.csproj +++ b/StructureHelperLogics/StructureHelperLogics.csproj @@ -19,6 +19,8 @@ + + \ No newline at end of file diff --git a/Windows/CalculationWindows/CalculatorsViews/ForceCalculatorViews/ForcesResultsView.xaml b/Windows/CalculationWindows/CalculatorsViews/ForceCalculatorViews/ForcesResultsView.xaml index 58e2304..d840d9c 100644 --- a/Windows/CalculationWindows/CalculatorsViews/ForceCalculatorViews/ForcesResultsView.xaml +++ b/Windows/CalculationWindows/CalculatorsViews/ForceCalculatorViews/ForcesResultsView.xaml @@ -7,7 +7,7 @@ xmlns:vm="clr-namespace:StructureHelper.Windows.ViewModels.Calculations.Calculators" d:DataContext="{d:DesignInstance vm:ForcesResultsViewModel}" mc:Ignorable="d" - Title="ForceResultsView" Height="350" Width="650" MinHeight="300" MinWidth="400"> + Title="ForceResultsView" Height="350" Width="650" MinHeight="300" MinWidth="400" WindowStartupLocation="CenterScreen"> @@ -40,7 +40,8 @@