From bf72f6d34715010213761eb80082d82ff2f223af Mon Sep 17 00:00:00 2001 From: Evgeny Redikultsev Date: Sun, 25 Feb 2024 15:31:09 +0500 Subject: [PATCH] Buckling calculator was changed, accidental eccentricity logic was added --- .../ProgressViews/TraceDocumentVM.cs | 21 +- .../ProgressViews/TraceDocumentView.xaml | 10 +- .../AnalysisViewModelLogic.cs | 16 +- .../Models/Loggers/LoggerStrings.cs | 16 ++ .../Models/Sections/CompressedMember.cs | 11 + .../Models/Sections/ICompressedMember.cs | 21 +- .../Logics/AccidentalEccentricityLogic.cs | 85 ++++++ .../Logics/IAccidentalEccentricityLogic.cs | 38 +++ .../CrossSections/CalculatorLogic.cs | 19 +- .../Analyses/ByForces/ForceCalculator.cs | 271 +++++++++++++----- .../Analyses/ByForces/ForceTupleCalculator.cs | 6 +- .../ByForces/Logics/IProcessTupleInputData.cs | 22 ++ .../ByForces/Logics/IProcessTupleLogic.cs | 15 + .../ByForces/Logics/ProcessTupleLogic.cs | 20 ++ .../Buckling/BucklingInputData.cs | 21 ++ .../Buckling/ConcreteBucklingCalculator.cs | 87 +++++- .../Buckling/ConstDeltaELogic.cs | 12 +- .../Buckling/ConstPhiLLogic.cs | 11 +- .../Buckling/CriticalForceSP63Logic.cs | 5 +- .../Buckling/DeltaELogicSP63.cs | 12 + .../Buckling/EilerCriticalForceLogic.cs | 12 +- .../Buckling/IConcreteDeltaELogic.cs | 5 +- .../Buckling/IConcretePhiLLogic.cs | 5 +- .../Buckling/ICriticalBucklingForceLogic.cs | 5 +- .../Buckling/IRCStiffnessLogic.cs | 5 +- .../NdmCalculations/Buckling/PhiLogicSP63.cs | 40 ++- .../Buckling/RCStiffnessLogicSP63.cs | 20 +- .../NdmPrimitives/NdmPrimitivesService.cs | 10 +- 28 files changed, 676 insertions(+), 145 deletions(-) create mode 100644 StructureHelperCommon/Models/Loggers/LoggerStrings.cs create mode 100644 StructureHelperCommon/Models/Sections/Logics/AccidentalEccentricityLogic.cs create mode 100644 StructureHelperCommon/Models/Sections/Logics/IAccidentalEccentricityLogic.cs create mode 100644 StructureHelperLogics/NdmCalculations/Analyses/ByForces/Logics/IProcessTupleInputData.cs create mode 100644 StructureHelperLogics/NdmCalculations/Analyses/ByForces/Logics/IProcessTupleLogic.cs create mode 100644 StructureHelperLogics/NdmCalculations/Analyses/ByForces/Logics/ProcessTupleLogic.cs create mode 100644 StructureHelperLogics/NdmCalculations/Buckling/BucklingInputData.cs diff --git a/StructureHelper/Windows/CalculationWindows/ProgressViews/TraceDocumentVM.cs b/StructureHelper/Windows/CalculationWindows/ProgressViews/TraceDocumentVM.cs index 7fa11e6..cc5339f 100644 --- a/StructureHelper/Windows/CalculationWindows/ProgressViews/TraceDocumentVM.cs +++ b/StructureHelper/Windows/CalculationWindows/ProgressViews/TraceDocumentVM.cs @@ -22,26 +22,29 @@ namespace StructureHelper.Windows.CalculationWindows.ProgressViews private FlowDocument document; private ICommand rebuildCommand; private ICommand printDocumentCommand; - private int maxPriority; + private int priorityLimit; private int tabGap; public FlowDocumentReader DocumentReader { get; set; } - public int MaxPriority + public int PriorityLimit { - get => maxPriority; set + get => priorityLimit; set { - var oldValue = maxPriority; + var oldValue = priorityLimit; try { - maxPriority = Math.Max(value, 0); - OnPropertyChanged(nameof(MaxPriority)); + priorityLimit = Math.Max(value, 0); + OnPropertyChanged(nameof(PriorityLimit)); } catch (Exception) { - maxPriority = oldValue; + priorityLimit = oldValue; } } } + + public int MaxPriority => loggerEntries.Max(x => x.Priority); + public int TabGap { get => tabGap; set @@ -61,7 +64,7 @@ namespace StructureHelper.Windows.CalculationWindows.ProgressViews public TraceDocumentVM(IEnumerable loggerEntries) { this.loggerEntries = loggerEntries; - maxPriority = 350; + priorityLimit = 350; tabGap = 30; } @@ -81,7 +84,7 @@ namespace StructureHelper.Windows.CalculationWindows.ProgressViews public void Prepare() { document = new(); - selectedLoggerEntries = loggerEntries.Where(x => x.Priority <= MaxPriority); + selectedLoggerEntries = loggerEntries.Where(x => x.Priority <= PriorityLimit); var blocks = selectedLoggerEntries.Select(x => GetBlockByEntry(x)); document.Blocks.AddRange(blocks); } diff --git a/StructureHelper/Windows/CalculationWindows/ProgressViews/TraceDocumentView.xaml b/StructureHelper/Windows/CalculationWindows/ProgressViews/TraceDocumentView.xaml index c1c5a39..5d8f958 100644 --- a/StructureHelper/Windows/CalculationWindows/ProgressViews/TraceDocumentView.xaml +++ b/StructureHelper/Windows/CalculationWindows/ProgressViews/TraceDocumentView.xaml @@ -10,7 +10,7 @@ - + @@ -18,7 +18,13 @@ - + + + + + + +