From f2f6840ffb83ada626d4d675c2f6b71559fc195a Mon Sep 17 00:00:00 2001 From: Evgeny Redikultsev Date: Sat, 16 Mar 2024 21:46:24 +0500 Subject: [PATCH] Value point graph was added --- .../Services/ColorServices/ColorOperations.cs | 7 +- .../UI/Resources/ItemEditPanels.xaml | 11 +- .../Libraries/LoaderCalculator.dll | Bin 86016 -> 86016 bytes .../PublishProfiles/FolderProfile.pubxml.user | 2 +- .../Services/ResultViewers/IResultFunc.cs | 1 + .../Services/ResultViewers/ResultFunc.cs | 1 + .../ResultViewers/ResultFuncFactory.cs | 19 ++-- .../ForceResultLogic/DiagramFactory.cs | 60 +++++++++++ .../ForceResultLogic/ShowDiagramLogic.cs | 41 ++----- .../ForceResultLogic/ShowProgressLogic.cs | 4 +- .../ShowValuePointDiagramLogic.cs | 101 +++++++++++++++++- .../ForcesResultsViewModel.cs | 29 +++-- .../Windows/Forces/PrimitiveValuePoints.cs | 5 +- .../Windows/Forces/ValueDelegatesLogic.cs | 3 +- .../Forces/ValuePointsInterpolateView.xaml.cs | 17 +-- .../Forces/ValuePointsInterpolateViewModel.cs | 1 + .../Exceptions/StructureHelperException.cs | 4 + .../Models/Parameters/ArrayParameter.cs | 57 ++++++++++ .../Analyses/ByForces/ForceCalculator.cs | 2 +- .../CrackWidthLogicInputDataFactory.cs | 2 +- .../Cracking/TensileAreaLogicSP63.cs | 2 +- .../Primitives/CirclePrimitive.cs | 39 ++++++- .../Primitives/INamedAreaPoint.cs | 11 ++ .../Primitives/INdmPrimitive.cs | 2 +- .../Primitives/NamedAreaPoint.cs | 17 +++ .../Primitives/PointPrimitive.cs | 10 +- .../Primitives/RebarPrimitive.cs | 10 +- .../Primitives/RectanglePrimitive.cs | 32 ++++-- 28 files changed, 383 insertions(+), 107 deletions(-) create mode 100644 StructureHelper/Windows/CalculationWindows/CalculatorsViews/ForceCalculatorViews/ForceResultLogic/DiagramFactory.cs create mode 100644 StructureHelperLogics/NdmCalculations/Primitives/INamedAreaPoint.cs create mode 100644 StructureHelperLogics/NdmCalculations/Primitives/NamedAreaPoint.cs diff --git a/FieldVisualizer/Services/ColorServices/ColorOperations.cs b/FieldVisualizer/Services/ColorServices/ColorOperations.cs index 9b3148d..d436432 100644 --- a/FieldVisualizer/Services/ColorServices/ColorOperations.cs +++ b/FieldVisualizer/Services/ColorServices/ColorOperations.cs @@ -85,11 +85,16 @@ namespace FieldVisualizer.Services.ColorServices return map.Colors[^1]; } double colorPerc = 1d / (map.Colors.Count - 1d); // % of each block of color. the last is the "100% Color" - double blockOfColor = valPerc / colorPerc;// the integer part repersents how many block to skip + double blockOfColor = valPerc / colorPerc;// the integer part represents how many block to skip int blockIdx = (int)Math.Truncate(blockOfColor);// Idx of double valPercResidual = valPerc - (blockIdx * colorPerc);//remove the part represented of block double percOfColor = valPercResidual / colorPerc;// % of color of this block that will be filled + //in some cases due to accuracy of double type percent of color may be less than zero + if (percOfColor <= 0d) + { + return map.Colors[blockIdx]; + } Color c = GetColorByColorMap(map, blockIdx, percOfColor); return c; } diff --git a/StructureHelper/Infrastructure/UI/Resources/ItemEditPanels.xaml b/StructureHelper/Infrastructure/UI/Resources/ItemEditPanels.xaml index 7c7acb2..502aeed 100644 --- a/StructureHelper/Infrastructure/UI/Resources/ItemEditPanels.xaml +++ b/StructureHelper/Infrastructure/UI/Resources/ItemEditPanels.xaml @@ -23,7 +23,8 @@ + ItemTemplate="{Binding ItemDataDemplate}" + > @@ -41,8 +42,9 @@