Icons for calculators were changed
This commit is contained in:
@@ -10,6 +10,7 @@ namespace StructureHelper.Infrastructure.Enums
|
|||||||
{
|
{
|
||||||
ForceCalculator,
|
ForceCalculator,
|
||||||
LimitCurveCalculator,
|
LimitCurveCalculator,
|
||||||
|
CrackCalculator,
|
||||||
FireCalculator
|
FireCalculator
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
|
||||||
<Style TargetType="Button" x:Key="ButtonBase">
|
<Style TargetType="Button" x:Key="ButtonBase">
|
||||||
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style TargetType="Button" x:Key="CommandButton" BasedOn="{StaticResource ButtonBase}">
|
<Style TargetType="Button" x:Key="CommandButton" BasedOn="{StaticResource ButtonBase}">
|
||||||
<Style.Setters>
|
<Style.Setters>
|
||||||
@@ -64,6 +64,19 @@
|
|||||||
</Trigger>
|
</Trigger>
|
||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style TargetType="Viewbox">
|
||||||
|
<Setter Property="Margin" Value="-2"/>
|
||||||
|
<Setter Property="Width" Value="32"/>
|
||||||
|
<Setter Property="Height" Value="32"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Stretch" Value="UniformToFill"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Opacity" Value="0.25"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
</Style.Resources>
|
</Style.Resources>
|
||||||
<Setter Property="Width" Value="32"/>
|
<Setter Property="Width" Value="32"/>
|
||||||
<Setter Property="Height" Value="32"/>
|
<Setter Property="Height" Value="32"/>
|
||||||
@@ -81,12 +94,87 @@
|
|||||||
<Setter Property="Width" Value="32"/>
|
<Setter Property="Width" Value="32"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Color x:Key="ButtonLight" A="255" B="255" G="255" R="255"/>
|
||||||
|
<Color x:Key="CalculatorColor" A="255" B="149" G="149" R="211"/>
|
||||||
|
<Color x:Key="CalculatorFrameColor" A="255" B="109" G="109" R="166"/>
|
||||||
|
<SolidColorBrush x:Key="CalculatorCanvas" Color="{DynamicResource CalculatorColor}"/>
|
||||||
|
<SolidColorBrush x:Key="CalculatorFrame" Color="{DynamicResource CalculatorFrameColor}"/>
|
||||||
|
|
||||||
|
<Style x:Key="ButtonCanvas" TargetType="Canvas">
|
||||||
|
<Setter Property="Width" Value="32"/>
|
||||||
|
<Setter Property="Height" Value="32"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ButtonCalculatorCanvas" TargetType="Canvas" BasedOn="{StaticResource ButtonCanvas}">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource CalculatorCanvas}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ButtonRect" TargetType="Rectangle">
|
||||||
|
<Setter Property="Margin" Value="3"/>
|
||||||
|
<Setter Property="Width" Value="26"/>
|
||||||
|
<Setter Property="Height" Value="26"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="StrokeThickness" Value="1"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
|
||||||
<DataTemplate x:Key="OkCancelButtons">
|
<DataTemplate x:Key="OkCancelButtons">
|
||||||
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right">
|
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||||
<Button Style="{StaticResource CancelButton}" Command="{Binding CancelCommand}"/>
|
<Button Style="{StaticResource CancelButton}" Command="{Binding CancelCommand}"/>
|
||||||
<Button Style="{StaticResource OkButton}" Command="{Binding OkCommand}"/>
|
<Button Style="{StaticResource OkButton}" Command="{Binding OkCommand}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
|
<DataTemplate x:Key="ButtonCalculatorRectangle">
|
||||||
|
<Rectangle Style="{DynamicResource ButtonRect}" Stroke="{DynamicResource CalculatorFrame}">
|
||||||
|
<Rectangle.Fill>
|
||||||
|
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
||||||
|
<GradientStop Color="{DynamicResource ButtonLight}" Offset="0.2"/>
|
||||||
|
<GradientStop Color="{DynamicResource CalculatorColor}" Offset="1"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Rectangle.Fill>
|
||||||
|
</Rectangle>
|
||||||
|
</DataTemplate>
|
||||||
|
|
||||||
|
<DataTemplate x:Key="DiagramCalculator">
|
||||||
|
<Canvas Style="{DynamicResource ButtonCalculatorCanvas}">
|
||||||
|
<Canvas.Children>
|
||||||
|
<ContentControl ContentTemplate="{DynamicResource ButtonCalculatorRectangle}"/>
|
||||||
|
<Line Margin="4" X1="0" Y1="20" X2="25" Y2="20" StrokeThickness="1.5" Stroke="{DynamicResource CalculatorFrame}"/>
|
||||||
|
<Line Margin="4" X1="4" Y1="0" X2="4" Y2="25" StrokeThickness="1.5" Stroke="{DynamicResource CalculatorFrame}"/>
|
||||||
|
<Path Margin="4" Data="M 0 5 l 4 -4 l 7 4 l 7 6 l 2 4 l -2 7 l -2 2 " Stroke="{DynamicResource CalculatorFrame}"/>
|
||||||
|
<TextBlock Margin="4,2,0,0" Text="M-N" Foreground="Black" FontSize="10" HorizontalAlignment="Stretch" FontWeight="Bold" />
|
||||||
|
</Canvas.Children>
|
||||||
|
</Canvas>
|
||||||
|
</DataTemplate>
|
||||||
|
|
||||||
|
<DataTemplate x:Key="CrackCalculator">
|
||||||
|
<Canvas Style="{DynamicResource ButtonCalculatorCanvas}">
|
||||||
|
<Canvas.Children>
|
||||||
|
<ContentControl ContentTemplate="{DynamicResource ButtonCalculatorRectangle}"/>
|
||||||
|
<Path Margin="4" Data="M 0 0 l 25 0 l 0 20
|
||||||
|
l -4 0
|
||||||
|
l -1 -5 l 1 -5 l -2 5 l -2 5
|
||||||
|
l -3 0
|
||||||
|
l 0 -5 l 0 -10 l -2 10 l -2 5
|
||||||
|
l -3 0
|
||||||
|
l -1 -5 l 1 -5 l -2 5 l -2 5
|
||||||
|
l -4 0" Fill="{DynamicResource CalculatorFrame}"/>
|
||||||
|
<TextBlock Margin="4,2,0,0" Text="Crc" Foreground="White" FontSize="10" HorizontalAlignment="Stretch" FontWeight="Bold" />
|
||||||
|
</Canvas.Children>
|
||||||
|
</Canvas>
|
||||||
|
</DataTemplate>
|
||||||
|
|
||||||
|
<DataTemplate x:Key="CalculatorRun">
|
||||||
|
<Canvas Style="{DynamicResource ButtonCalculatorCanvas}">
|
||||||
|
<Canvas.Children>
|
||||||
|
<ContentControl ContentTemplate="{DynamicResource ButtonCalculatorRectangle}"/>
|
||||||
|
<Path Margin="4" Data="M 4 2 l 12 10 l -12 10 l 0 -20" Fill="{DynamicResource CalculatorFrame}"/>
|
||||||
|
</Canvas.Children>
|
||||||
|
</Canvas>
|
||||||
|
</DataTemplate>
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@@ -21,9 +21,9 @@ namespace StructureHelper.Windows.CalculationWindows.CalculatorsViews.ForceCalcu
|
|||||||
{
|
{
|
||||||
var inputData = new CrackWidthCalculatorInputData()
|
var inputData = new CrackWidthCalculatorInputData()
|
||||||
{
|
{
|
||||||
LimitState = LimitState,
|
//LimitState = LimitState,
|
||||||
CalcTerm = CalcTerm,
|
//CalcTerm = CalcTerm,
|
||||||
ForceTuple = ForceTuple,
|
LongTermTuple = ForceTuple,
|
||||||
NdmPrimitives = ndmPrimitives
|
NdmPrimitives = ndmPrimitives
|
||||||
};
|
};
|
||||||
var calculator = new CrackWidthCalculator() { InputData = inputData };
|
var calculator = new CrackWidthCalculator() { InputData = inputData };
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ namespace StructureHelper.Windows.CalculationWindows.CalculatorsViews.ForceCalcu
|
|||||||
var material = valuePoint.ndmPrimitive.HeadMaterial.GetLoaderMaterial(limitState, calcTerm);
|
var material = valuePoint.ndmPrimitive.HeadMaterial.GetLoaderMaterial(limitState, calcTerm);
|
||||||
var userPrestrain = valuePoint.ndmPrimitive.UsersPrestrain;
|
var userPrestrain = valuePoint.ndmPrimitive.UsersPrestrain;
|
||||||
var autoPrestrain = valuePoint.ndmPrimitive.AutoPrestrain;
|
var autoPrestrain = valuePoint.ndmPrimitive.AutoPrestrain;
|
||||||
var ndm = new RebarNdm()
|
var ndm = new Ndm()
|
||||||
{
|
{
|
||||||
Area = valuePoint.areaPoint.Area,
|
Area = valuePoint.areaPoint.Area,
|
||||||
CenterX = valuePoint.areaPoint.Point.X,
|
CenterX = valuePoint.areaPoint.Point.X,
|
||||||
|
|||||||
@@ -65,7 +65,6 @@
|
|||||||
<Button Margin="3" Content="Set Prestrain" ToolTip="Set strains as auto prestrain" Command="{Binding SetPrestrainCommand}"/>
|
<Button Margin="3" Content="Set Prestrain" ToolTip="Set strains as auto prestrain" Command="{Binding SetPrestrainCommand}"/>
|
||||||
<Button Margin="3" Content="Anchorage" ToolTip="Set strains as auto prestrain" Command="{Binding ShowAnchorageCommand}"/>
|
<Button Margin="3" Content="Anchorage" ToolTip="Set strains as auto prestrain" Command="{Binding ShowAnchorageCommand}"/>
|
||||||
<Button Margin="3" Content="Geometry" ToolTip="Show Geometry Properties" Command="{Binding ShowGeometryResultCommand}"/>
|
<Button Margin="3" Content="Geometry" ToolTip="Show Geometry Properties" Command="{Binding ShowGeometryResultCommand}"/>
|
||||||
<Button Margin="3" Content="Acrc" ToolTip="Show crack width" Command="{Binding ShowCrackWidthResultCommand}"/>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ namespace StructureHelper.Windows.CalculationWindows.CalculatorsViews.ForceCalcu
|
|||||||
private ShowProgressLogic showProgressLogic;
|
private ShowProgressLogic showProgressLogic;
|
||||||
private InteractionDiagramLogic interactionDiagramLogic;
|
private InteractionDiagramLogic interactionDiagramLogic;
|
||||||
private static readonly ShowCrackResultLogic showCrackResultLogic = new();
|
private static readonly ShowCrackResultLogic showCrackResultLogic = new();
|
||||||
private static readonly ShowCrackWidthLogic showCrackWidthLogic = new();
|
//private static readonly ShowCrackWidthLogic showCrackWidthLogic = new();
|
||||||
private IForcesResults forcesResults;
|
private IForcesResults forcesResults;
|
||||||
private IEnumerable<INdmPrimitive> ndmPrimitives;
|
private IEnumerable<INdmPrimitive> ndmPrimitives;
|
||||||
private IEnumerable<INdmPrimitive> selectedNdmPrimitives;
|
private IEnumerable<INdmPrimitive> selectedNdmPrimitives;
|
||||||
@@ -225,22 +225,22 @@ namespace StructureHelper.Windows.CalculationWindows.CalculatorsViews.ForceCalcu
|
|||||||
showCrackResultLogic.Show(SelectedResult.DesignForceTuple.Clone() as IDesignForceTuple);
|
showCrackResultLogic.Show(SelectedResult.DesignForceTuple.Clone() as IDesignForceTuple);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICommand ShowCrackWidthResultCommand
|
//public ICommand ShowCrackWidthResultCommand
|
||||||
{
|
//{
|
||||||
get => showCrackWidthResult ??= new RelayCommand(o =>
|
// get => showCrackWidthResult ??= new RelayCommand(o =>
|
||||||
{
|
// {
|
||||||
SafetyProcessor.RunSafeProcess(ShowCrackWidthResult);
|
// SafetyProcessor.RunSafeProcess(ShowCrackWidthResult);
|
||||||
}, o => SelectedResult != null && SelectedResult.IsValid);
|
// }, o => SelectedResult != null && SelectedResult.IsValid);
|
||||||
}
|
//}
|
||||||
|
|
||||||
private void ShowCrackWidthResult()
|
//private void ShowCrackWidthResult()
|
||||||
{
|
//{
|
||||||
showCrackWidthLogic.LimitState = SelectedResult.DesignForceTuple.LimitState;
|
// showCrackWidthLogic.LimitState = SelectedResult.DesignForceTuple.LimitState;
|
||||||
showCrackWidthLogic.CalcTerm = SelectedResult.DesignForceTuple.CalcTerm;
|
// showCrackWidthLogic.CalcTerm = SelectedResult.DesignForceTuple.CalcTerm;
|
||||||
showCrackWidthLogic.ForceTuple = SelectedResult.DesignForceTuple.ForceTuple;
|
// showCrackWidthLogic.ForceTuple = SelectedResult.DesignForceTuple.ForceTuple;
|
||||||
showCrackWidthLogic.ndmPrimitives = ndmPrimitives.ToList();
|
// showCrackWidthLogic.ndmPrimitives = ndmPrimitives.ToList();
|
||||||
showCrackWidthLogic.Show();
|
// showCrackWidthLogic.Show();
|
||||||
}
|
//}
|
||||||
public ICommand InterpolateCommand
|
public ICommand InterpolateCommand
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|||||||
@@ -79,7 +79,9 @@
|
|||||||
<ContextMenu x:Key="AnalisesCRUD">
|
<ContextMenu x:Key="AnalisesCRUD">
|
||||||
<MenuItem Header="Run" Command="{Binding Run}">
|
<MenuItem Header="Run" Command="{Binding Run}">
|
||||||
<MenuItem.Icon>
|
<MenuItem.Icon>
|
||||||
<Image Width="16" Height="16" Source="/Windows/MainWindow/Run.png" />
|
<Viewbox Width="16" Height="16">
|
||||||
|
<ContentControl ContentTemplate="{DynamicResource CalculatorRun}"/>
|
||||||
|
</Viewbox>
|
||||||
</MenuItem.Icon>
|
</MenuItem.Icon>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<Separator/>
|
<Separator/>
|
||||||
@@ -194,11 +196,20 @@
|
|||||||
<Button Style="{StaticResource ToolButton}" Command="{Binding Add}" CommandParameter="{x:Static enums:CalculatorTypes.ForceCalculator}" ToolTip="Add Force Calculator">
|
<Button Style="{StaticResource ToolButton}" Command="{Binding Add}" CommandParameter="{x:Static enums:CalculatorTypes.ForceCalculator}" ToolTip="Add Force Calculator">
|
||||||
<Image Source="/Windows/MainWindow/Calculator32.png"/>
|
<Image Source="/Windows/MainWindow/Calculator32.png"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Style="{StaticResource ToolButton}" Command="{Binding Add}" CommandParameter="{x:Static enums:CalculatorTypes.LimitCurveCalculator}" ToolTip="Add Interaction Diagram Calculator">
|
<Button Style="{DynamicResource ToolButton}" Command="{Binding Add}" CommandParameter="{x:Static enums:CalculatorTypes.LimitCurveCalculator}" ToolTip="Add Interaction Diagram Calculator">
|
||||||
<Image Source="/Windows/MainWindow/Calculator32.png"/>
|
<Viewbox>
|
||||||
|
<ContentControl ContentTemplate="{DynamicResource DiagramCalculator}"/>
|
||||||
|
</Viewbox>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Style="{StaticResource ToolButton}" Command="{Binding Run}" ToolTip="Run Calculations">
|
<Button Visibility="Hidden" Style="{DynamicResource ToolButton}" Command="{Binding Add}" CommandParameter="{x:Static enums:CalculatorTypes.CrackCalculator}" ToolTip="Add Interaction Diagram Calculator">
|
||||||
<Image Source="/Windows/MainWindow/Analysis32.png"/>
|
<Viewbox>
|
||||||
|
<ContentControl ContentTemplate="{DynamicResource CrackCalculator}"/>
|
||||||
|
</Viewbox>
|
||||||
|
</Button>
|
||||||
|
<Button Style="{DynamicResource ToolButton}" Command="{Binding Run}" ToolTip="Run Calculations">
|
||||||
|
<Viewbox>
|
||||||
|
<ContentControl ContentTemplate="{DynamicResource CalculatorRun}"/>
|
||||||
|
</Viewbox>
|
||||||
</Button>
|
</Button>
|
||||||
</ToolBar>
|
</ToolBar>
|
||||||
<ToolBar ToolTip="Tools">
|
<ToolBar ToolTip="Tools">
|
||||||
@@ -341,7 +352,16 @@
|
|||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem Header="Add Interaction Diagram Calculator" Command="{Binding Add}" CommandParameter="{x:Static enums:CalculatorTypes.LimitCurveCalculator}">
|
<MenuItem Header="Add Interaction Diagram Calculator" Command="{Binding Add}" CommandParameter="{x:Static enums:CalculatorTypes.LimitCurveCalculator}">
|
||||||
<MenuItem.Icon>
|
<MenuItem.Icon>
|
||||||
<Image Width="16" Height="16" Source="/Windows/MainWindow/Calculator32.png" />
|
<Viewbox Width="16" Height="16">
|
||||||
|
<ContentControl ContentTemplate="{DynamicResource DiagramCalculator}"/>
|
||||||
|
</Viewbox>
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Visibility="Hidden" Header="Add Crack Calculator" Command="{Binding Add}" CommandParameter="{x:Static enums:CalculatorTypes.CrackCalculator}">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<Viewbox Width="16" Height="16">
|
||||||
|
<ContentControl ContentTemplate="{DynamicResource CrackCalculator}"/>
|
||||||
|
</Viewbox>
|
||||||
</MenuItem.Icon>
|
</MenuItem.Icon>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
|||||||
@@ -44,12 +44,21 @@ namespace StructureHelper.Windows.ViewModels.NdmCrossSections
|
|||||||
{
|
{
|
||||||
AddLimitCurveCalculator();
|
AddLimitCurveCalculator();
|
||||||
}
|
}
|
||||||
|
else if (parameterType == CalculatorTypes.CrackCalculator)
|
||||||
|
{
|
||||||
|
AddCrackCalculator();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(parameterType));
|
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(parameterType));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void AddCrackCalculator()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
private void AddLimitCurveCalculator()
|
private void AddLimitCurveCalculator()
|
||||||
{
|
{
|
||||||
var inputData = new LimitCurveInputData(repository.Primitives);
|
var inputData = new LimitCurveInputData(repository.Primitives);
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using LoaderCalculator.Data.Ndms;
|
using LoaderCalculator.Data.Ndms;
|
||||||
|
using StructureHelperCommon.Infrastructures.Enums;
|
||||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||||
using StructureHelperCommon.Models;
|
using StructureHelperCommon.Models;
|
||||||
using StructureHelperCommon.Models.Calculators;
|
using StructureHelperCommon.Models.Calculators;
|
||||||
@@ -12,8 +13,8 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
{
|
{
|
||||||
public class CrackWidthCalculator : ICalculator
|
public class CrackWidthCalculator : ICalculator
|
||||||
{
|
{
|
||||||
static readonly ILengthBetweenCracksLogic lengthLogic = new LengthBetweenCracksLogicSP63();
|
private static readonly ILengthBetweenCracksLogic lengthLogic = new LengthBetweenCracksLogicSP63();
|
||||||
CrackWidthCalculatorResult result;
|
private CrackWidthCalculatorResult result;
|
||||||
private IEnumerable<INdmPrimitive> ndmPrimitives;
|
private IEnumerable<INdmPrimitive> ndmPrimitives;
|
||||||
private List<RebarPrimitive>? rebarPrimitives;
|
private List<RebarPrimitive>? rebarPrimitives;
|
||||||
private IEnumerable<INdm> ndmCollection;
|
private IEnumerable<INdm> ndmCollection;
|
||||||
@@ -24,7 +25,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
public CrackWidthCalculatorInputData InputData { get; set; }
|
public CrackWidthCalculatorInputData InputData { get; set; }
|
||||||
public IResult Result => result;
|
public IResult Result => result;
|
||||||
|
|
||||||
public IShiftTraceLogger? TraceLogger { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||||
|
|
||||||
public void Run()
|
public void Run()
|
||||||
{
|
{
|
||||||
@@ -54,17 +55,17 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
crackInputData.RebarPrimitive = item;
|
crackInputData.RebarPrimitive = item;
|
||||||
calculator.Run();
|
calculator.Run();
|
||||||
var rebarResult = calculator.Result as CrackWidthSimpleCalculatorResult;
|
var rebarResult = calculator.Result as CrackWidthSimpleCalculatorResult;
|
||||||
if (crackForceResult.IsSectionCracked == false)
|
//if (crackForceResult.IsSectionCracked == false)
|
||||||
{
|
//{
|
||||||
rebarResult.CrackWidth = 0d;
|
// rebarResult.CrackWidth = 0d;
|
||||||
}
|
//}
|
||||||
result.RebarResults.Add(rebarResult);
|
result.RebarResults.Add(rebarResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CalcStrainMatrix()
|
private void CalcStrainMatrix()
|
||||||
{
|
{
|
||||||
IForceTupleInputData inputData = new ForceTupleInputData() { NdmCollection = ndmCollection, Tuple = InputData.ForceTuple};
|
IForceTupleInputData inputData = new ForceTupleInputData() { NdmCollection = ndmCollection, Tuple = InputData.LongTermTuple};
|
||||||
IForceTupleCalculator calculator = new ForceTupleCalculator() { InputData = inputData };
|
IForceTupleCalculator calculator = new ForceTupleCalculator() { InputData = inputData };
|
||||||
calculator.Run();
|
calculator.Run();
|
||||||
var forceResult = calculator.Result as IForcesTupleResult;
|
var forceResult = calculator.Result as IForcesTupleResult;
|
||||||
@@ -80,7 +81,6 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
{
|
{
|
||||||
PsiSFactor = crackForceResult.PsiS,
|
PsiSFactor = crackForceResult.PsiS,
|
||||||
Length = length,
|
Length = length,
|
||||||
LimitState = InputData.LimitState,
|
|
||||||
StrainTuple = strainTuple
|
StrainTuple = strainTuple
|
||||||
};
|
};
|
||||||
return crackInputData;
|
return crackInputData;
|
||||||
@@ -97,13 +97,13 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
rebarPrimitives.Add(item as RebarPrimitive);
|
rebarPrimitives.Add(item as RebarPrimitive);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ndmCollection = NdmPrimitivesService.GetNdms(ndmPrimitives, InputData.LimitState, InputData.CalcTerm);
|
ndmCollection = NdmPrimitivesService.GetNdms(ndmPrimitives, LimitStates.SLS, CalcTerms.ShortTerm);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CalcCrackForce()
|
private void CalcCrackForce()
|
||||||
{
|
{
|
||||||
var calculator = new CrackForceCalculator();
|
var calculator = new CrackForceCalculator();
|
||||||
calculator.EndTuple = InputData.ForceTuple;
|
calculator.EndTuple = InputData.LongTermTuple;
|
||||||
calculator.NdmCollection = ndmCollection;
|
calculator.NdmCollection = ndmCollection;
|
||||||
calculator.Run();
|
calculator.Run();
|
||||||
crackForceResult = calculator.Result as CrackForceResult;
|
crackForceResult = calculator.Result as CrackForceResult;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using StructureHelperCommon.Infrastructures.Enums;
|
using StructureHelperCommon.Infrastructures.Enums;
|
||||||
|
using StructureHelperCommon.Models.Calculators;
|
||||||
using StructureHelperCommon.Models.Forces;
|
using StructureHelperCommon.Models.Forces;
|
||||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||||
using System;
|
using System;
|
||||||
@@ -9,11 +10,10 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace StructureHelperLogics.NdmCalculations.Cracking
|
namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||||
{
|
{
|
||||||
public class CrackWidthCalculatorInputData
|
public class CrackWidthCalculatorInputData : IInputData
|
||||||
{
|
{
|
||||||
public LimitStates LimitState { get; set; }
|
public IForceTuple LongTermTuple { get; set; }
|
||||||
public CalcTerms CalcTerm { get; set; }
|
public IForceTuple ShortTermTuple { get; set; }
|
||||||
public IForceTuple ForceTuple { get; set; }
|
|
||||||
public List<INdmPrimitive> NdmPrimitives {get;set;}
|
public List<INdmPrimitive> NdmPrimitives {get;set;}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using StructureHelperCommon.Models.Calculators;
|
using StructureHelperCommon.Models.Calculators;
|
||||||
|
using StructureHelperCommon.Models.Forces;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -11,7 +12,12 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
{
|
{
|
||||||
public bool IsValid { get; set; }
|
public bool IsValid { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
|
public IForceTuple LongTermTuple { get; set; }
|
||||||
|
public IForceTuple ShortTermTuple { get; set; }
|
||||||
|
public bool IsCracked { get; set; }
|
||||||
public List<CrackWidthSimpleCalculatorResult> RebarResults { get; set; }
|
public List<CrackWidthSimpleCalculatorResult> RebarResults { get; set; }
|
||||||
|
public double MaxLongTermCrackWidth => IsCracked? RebarResults.Select(x => x.LongTermResult.CrackWidth).Max() : 0d;
|
||||||
|
public double MaxShortTermCrackWidth => IsCracked? RebarResults.Select(x => x.ShortTermResult.CrackWidth).Max() : 0d;
|
||||||
|
|
||||||
public CrackWidthCalculatorResult()
|
public CrackWidthCalculatorResult()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
public ICrackWidthSimpleCalculatorInputData InputData { get; set; }
|
public ICrackWidthSimpleCalculatorInputData InputData { get; set; }
|
||||||
public IResult Result => result;
|
public IResult Result => result;
|
||||||
|
|
||||||
public Action<IResult> ActionToOutputResults { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
public Action<IResult> ActionToOutputResults { get; set; }
|
||||||
public IShiftTraceLogger? TraceLogger { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||||
|
|
||||||
public void Run()
|
public void Run()
|
||||||
{
|
{
|
||||||
@@ -31,9 +31,9 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
result.Description += "\n" + ex;
|
result.Description += "\n" + ex;
|
||||||
}
|
}
|
||||||
result.RebarPrimitive = InputData.RebarPrimitive;
|
result.RebarPrimitive = InputData.RebarPrimitive;
|
||||||
result.CrackWidth = crackWidth;
|
//result.CrackWidth = crackWidth;
|
||||||
result.RebarStrain = logicInputData.RebarStrain;
|
//result.RebarStrain = logicInputData.RebarStrain;
|
||||||
result.ConcreteStrain = logicInputData.ConcreteStrain;
|
//result.ConcreteStrain = logicInputData.ConcreteStrain;
|
||||||
}
|
}
|
||||||
public object Clone()
|
public object Clone()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
{
|
{
|
||||||
public class CrackWidthSimpleCalculatorInputData : ICrackWidthSimpleCalculatorInputData
|
public class CrackWidthSimpleCalculatorInputData : ICrackWidthSimpleCalculatorInputData
|
||||||
{
|
{
|
||||||
public LimitStates LimitState { get; set; }
|
|
||||||
public CalcTerms CalcTerm { get; set; }
|
public CalcTerms CalcTerm { get; set; }
|
||||||
public StrainTuple StrainTuple { get; set; }
|
public StrainTuple StrainTuple { get; set; }
|
||||||
public double PsiSFactor { get; set; }
|
public double PsiSFactor { get; set; }
|
||||||
|
|||||||
@@ -13,8 +13,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
public bool IsValid { get; set; }
|
public bool IsValid { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
public RebarPrimitive RebarPrimitive { get; set; }
|
public RebarPrimitive RebarPrimitive { get; set; }
|
||||||
public double CrackWidth { get; set; }
|
public CrackWidthTupleResult LongTermResult { get; set; }
|
||||||
public double RebarStrain { get; set; }
|
public CrackWidthTupleResult ShortTermResult { get; set; }
|
||||||
public double ConcreteStrain { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
using StructureHelperCommon.Models.Forces;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||||
|
{
|
||||||
|
public class CrackWidthTupleResult
|
||||||
|
{
|
||||||
|
public IForceTuple? ForceTuple { get; set; }
|
||||||
|
public double CrackWidth { get; set; }
|
||||||
|
public double RebarStrain { get; set; }
|
||||||
|
public double ConcreteStrain { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -41,7 +41,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
private static void ProcessBaseProps(ICrackWidthSimpleCalculatorInputData inputData, ICrackWidthLogicInputData data)
|
private static void ProcessBaseProps(ICrackWidthSimpleCalculatorInputData inputData, ICrackWidthLogicInputData data)
|
||||||
{
|
{
|
||||||
var strainMatrix = TupleConverter.ConvertToLoaderStrainMatrix(inputData.StrainTuple);
|
var strainMatrix = TupleConverter.ConvertToLoaderStrainMatrix(inputData.StrainTuple);
|
||||||
var triangulationOptions = new TriangulationOptions { LimiteState = inputData.LimitState, CalcTerm = inputData.CalcTerm };
|
var triangulationOptions = new TriangulationOptions { LimiteState = LimitStates.SLS, CalcTerm = inputData.CalcTerm };
|
||||||
var ndms = inputData.RebarPrimitive.GetNdms(triangulationOptions).ToArray();
|
var ndms = inputData.RebarPrimitive.GetNdms(triangulationOptions).ToArray();
|
||||||
var concreteNdm = ndms[0];
|
var concreteNdm = ndms[0];
|
||||||
var rebarNdm = ndms[1];
|
var rebarNdm = ndms[1];
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
{
|
{
|
||||||
public interface ICrackWidthSimpleCalculatorInputData
|
public interface ICrackWidthSimpleCalculatorInputData
|
||||||
{
|
{
|
||||||
LimitStates LimitState { get; set; }
|
|
||||||
CalcTerms CalcTerm { get; set; }
|
CalcTerms CalcTerm { get; set; }
|
||||||
StrainTuple StrainTuple { get; set; }
|
StrainTuple StrainTuple { get; set; }
|
||||||
double PsiSFactor { get; set; }
|
double PsiSFactor { get; set; }
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using LoaderCalculator.Data.Matrix;
|
using LoaderCalculator.Data.Matrix;
|
||||||
using LoaderCalculator.Data.Ndms;
|
using LoaderCalculator.Data.Ndms;
|
||||||
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -8,7 +9,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace StructureHelperLogics.NdmCalculations.Cracking
|
namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||||
{
|
{
|
||||||
public interface ILengthBetweenCracksLogic
|
public interface ILengthBetweenCracksLogic : ILogic
|
||||||
{
|
{
|
||||||
IEnumerable<INdm> NdmCollection { get; set; }
|
IEnumerable<INdm> NdmCollection { get; set; }
|
||||||
IStrainMatrix StrainMatrix { get; set; }
|
IStrainMatrix StrainMatrix { get; set; }
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using LoaderCalculator.Data.Matrix;
|
using LoaderCalculator.Data.Matrix;
|
||||||
using LoaderCalculator.Data.Ndms;
|
using LoaderCalculator.Data.Ndms;
|
||||||
|
using StructureHelperCommon.Models;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -19,6 +20,8 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
readonly ITensileAreaLogic tensileAreaLogic;
|
readonly ITensileAreaLogic tensileAreaLogic;
|
||||||
public IEnumerable<INdm> NdmCollection { get; set; }
|
public IEnumerable<INdm> NdmCollection { get; set; }
|
||||||
public IStrainMatrix StrainMatrix { get; set; }
|
public IStrainMatrix StrainMatrix { get; set; }
|
||||||
|
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||||
|
|
||||||
public LengthBetweenCracksLogicSP63(IAverageDiameterLogic diameterLogic, ITensileAreaLogic tensileAreaLogic)
|
public LengthBetweenCracksLogicSP63(IAverageDiameterLogic diameterLogic, ITensileAreaLogic tensileAreaLogic)
|
||||||
{
|
{
|
||||||
this.diameterLogic = diameterLogic;
|
this.diameterLogic = diameterLogic;
|
||||||
|
|||||||
Reference in New Issue
Block a user