Fix Test
This commit is contained in:
Binary file not shown.
BIN
StructureHelper/Libraries/NLog.dll
Normal file
BIN
StructureHelper/Libraries/NLog.dll
Normal file
Binary file not shown.
@@ -40,4 +40,10 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Update="Libraries\NLog.dll">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -63,85 +63,87 @@
|
|||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel>
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||||
<Expander Header="Actions" MinWidth="20" DataContext="{Binding CombinationsLogic}">
|
<StackPanel>
|
||||||
<Expander.ContextMenu>
|
<Expander Header="Actions" MinWidth="20" DataContext="{Binding CombinationsLogic}">
|
||||||
<ContextMenu>
|
<Expander.ContextMenu>
|
||||||
<Button Content="Add Force Combination" Command="{Binding Add}"/>
|
|
||||||
</ContextMenu>
|
|
||||||
</Expander.ContextMenu>
|
|
||||||
<ListBox ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedItem}">
|
|
||||||
<ListBox.ContextMenu>
|
|
||||||
<ContextMenu>
|
<ContextMenu>
|
||||||
<Button Content="Edit" Command="{Binding Edit}"/>
|
<Button Content="Add Force Combination" Command="{Binding Add}"/>
|
||||||
<Button Content="Copy" Command="{Binding Copy}"/>
|
|
||||||
<Button Content="Delete" Command="{Binding Delete}"/>
|
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</ListBox.ContextMenu>
|
</Expander.ContextMenu>
|
||||||
<ListBox.ItemTemplate>
|
<ListBox ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedItem}">
|
||||||
<DataTemplate>
|
<ListBox.ContextMenu>
|
||||||
<Grid>
|
<ContextMenu>
|
||||||
<TextBlock Text="{Binding Name}"/>
|
<Button Content="Edit" Command="{Binding Edit}"/>
|
||||||
</Grid>
|
<Button Content="Copy" Command="{Binding Copy}"/>
|
||||||
</DataTemplate>
|
<Button Content="Delete" Command="{Binding Delete}"/>
|
||||||
</ListBox.ItemTemplate>
|
</ContextMenu>
|
||||||
</ListBox>
|
</ListBox.ContextMenu>
|
||||||
</Expander>
|
<ListBox.ItemTemplate>
|
||||||
<Expander Header="Materials" MinWidth="20">
|
<DataTemplate>
|
||||||
<Expander.ContextMenu>
|
<Grid>
|
||||||
<ContextMenu>
|
<TextBlock Text="{Binding Name}"/>
|
||||||
<Button Content="Materials" Command="{Binding EditHeadMaterialsCommand}"/>
|
</Grid>
|
||||||
</ContextMenu>
|
</DataTemplate>
|
||||||
</Expander.ContextMenu>
|
</ListBox.ItemTemplate>
|
||||||
<ListBox ItemsSource="{Binding HeadMaterials}" ItemTemplate="{StaticResource ColoredItemTemplate}">
|
</ListBox>
|
||||||
</ListBox>
|
</Expander>
|
||||||
</Expander>
|
<Expander Header="Materials" MinWidth="20">
|
||||||
<Expander Header="Geometry" MinWidth="20" DataContext="{Binding PrimitiveLogic}">
|
<Expander.ContextMenu>
|
||||||
<Expander.ContextMenu>
|
|
||||||
<ContextMenu>
|
|
||||||
<MenuItem Header="Add">
|
|
||||||
<Button Content="Add Rectangle" Command="{Binding Add}" CommandParameter="{x:Static enums:PrimitiveType.Rectangle}"/>
|
|
||||||
<Button Content="Add Point" Command="{Binding Add}" CommandParameter="{x:Static enums:PrimitiveType.Point}"/>
|
|
||||||
</MenuItem>
|
|
||||||
</ContextMenu>
|
|
||||||
</Expander.ContextMenu>
|
|
||||||
<ListBox ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedItem}" ItemTemplate="{StaticResource ColoredItemTemplate}">
|
|
||||||
<ListBox.ContextMenu>
|
|
||||||
<ContextMenu>
|
<ContextMenu>
|
||||||
<Button Content="Edit" Command="{Binding Edit}"/>
|
<Button Content="Materials" Command="{Binding EditHeadMaterialsCommand}"/>
|
||||||
<Button Content="Copy" Command="{Binding Copy}"/>
|
|
||||||
<Button Content="Delete" Command="{Binding Delete}"/>
|
|
||||||
<Button Content="To Foreground" Command="{Binding SetToFront}"/>
|
|
||||||
<Button Content="To Background" Command="{Binding SetToBack}"/>
|
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</ListBox.ContextMenu>
|
</Expander.ContextMenu>
|
||||||
</ListBox>
|
<ListBox ItemsSource="{Binding HeadMaterials}" ItemTemplate="{StaticResource ColoredItemTemplate}">
|
||||||
</Expander>
|
</ListBox>
|
||||||
<Expander Header="Analyses" MinWidth="20" DataContext="{Binding CalculatorsLogic}">
|
</Expander>
|
||||||
<Expander.ContextMenu>
|
<Expander Header="Geometry" MinWidth="20" DataContext="{Binding PrimitiveLogic}">
|
||||||
<ContextMenu>
|
<Expander.ContextMenu>
|
||||||
<Button Content="Add Calculator" Command="{Binding Add}"/>
|
|
||||||
</ContextMenu>
|
|
||||||
</Expander.ContextMenu>
|
|
||||||
<ListBox ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedItem}">
|
|
||||||
<ListBox.ContextMenu>
|
|
||||||
<ContextMenu>
|
<ContextMenu>
|
||||||
<Button Content="Run" Command="{Binding Run}"/>
|
<MenuItem Header="Add">
|
||||||
<Button Content="Edit" Command="{Binding Edit}"/>
|
<Button Content="Add Rectangle" Command="{Binding Add}" CommandParameter="{x:Static enums:PrimitiveType.Rectangle}"/>
|
||||||
<Button Content="Copy" Command="{Binding Copy}"/>
|
<Button Content="Add Point" Command="{Binding Add}" CommandParameter="{x:Static enums:PrimitiveType.Point}"/>
|
||||||
<Button Content="Delete" Command="{Binding Delete}"/>
|
</MenuItem>
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</ListBox.ContextMenu>
|
</Expander.ContextMenu>
|
||||||
<ListBox.ItemTemplate>
|
<ListBox ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedItem}" ItemTemplate="{StaticResource ColoredItemTemplate}">
|
||||||
<DataTemplate>
|
<ListBox.ContextMenu>
|
||||||
<Grid>
|
<ContextMenu>
|
||||||
<TextBlock Text="{Binding Name}"/>
|
<Button Content="Edit" Command="{Binding Edit}"/>
|
||||||
</Grid>
|
<Button Content="Copy" Command="{Binding Copy}"/>
|
||||||
</DataTemplate>
|
<Button Content="Delete" Command="{Binding Delete}"/>
|
||||||
</ListBox.ItemTemplate>
|
<Button Content="To Foreground" Command="{Binding SetToFront}"/>
|
||||||
</ListBox>
|
<Button Content="To Background" Command="{Binding SetToBack}"/>
|
||||||
</Expander>
|
</ContextMenu>
|
||||||
</StackPanel>
|
</ListBox.ContextMenu>
|
||||||
|
</ListBox>
|
||||||
|
</Expander>
|
||||||
|
<Expander Header="Analyses" MinWidth="20" DataContext="{Binding CalculatorsLogic}">
|
||||||
|
<Expander.ContextMenu>
|
||||||
|
<ContextMenu>
|
||||||
|
<Button Content="Add Calculator" Command="{Binding Add}"/>
|
||||||
|
</ContextMenu>
|
||||||
|
</Expander.ContextMenu>
|
||||||
|
<ListBox ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedItem}">
|
||||||
|
<ListBox.ContextMenu>
|
||||||
|
<ContextMenu>
|
||||||
|
<Button Content="Run" Command="{Binding Run}"/>
|
||||||
|
<Button Content="Edit" Command="{Binding Edit}"/>
|
||||||
|
<Button Content="Copy" Command="{Binding Copy}"/>
|
||||||
|
<Button Content="Delete" Command="{Binding Delete}"/>
|
||||||
|
</ContextMenu>
|
||||||
|
</ListBox.ContextMenu>
|
||||||
|
<ListBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid>
|
||||||
|
<TextBlock Text="{Binding Name}"/>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.ItemTemplate>
|
||||||
|
</ListBox>
|
||||||
|
</Expander>
|
||||||
|
</StackPanel>
|
||||||
|
</ScrollViewer>
|
||||||
<Border BorderBrush="Black" Background="White" BorderThickness="1" Margin="5" Grid.Column="1">
|
<Border BorderBrush="Black" Background="White" BorderThickness="1" Margin="5" Grid.Column="1">
|
||||||
<i:Interaction.Triggers>
|
<i:Interaction.Triggers>
|
||||||
<i:EventTrigger EventName="PreviewMouseDown">
|
<i:EventTrigger EventName="PreviewMouseDown">
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
|||||||
}
|
}
|
||||||
else point2D = combination.ForcePoint;
|
else point2D = combination.ForcePoint;
|
||||||
var newTuple = ForceTupleService.MoveTupleIntoPoint(tuple.ForceTuple, point2D);
|
var newTuple = ForceTupleService.MoveTupleIntoPoint(tuple.ForceTuple, point2D);
|
||||||
var result = GetPrimitiveStrainMatrix(ndms, newTuple);
|
IForcesTupleResult result = GetPrimitiveStrainMatrix(ndms, newTuple);
|
||||||
if (CompressedMember.Buckling == true)
|
if (CompressedMember.Buckling == true)
|
||||||
{
|
{
|
||||||
IForceTuple longTuple;
|
IForceTuple longTuple;
|
||||||
@@ -85,15 +85,14 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
|||||||
result.Desctription += $"Buckling result:\n{bucklingResult.Desctription}\n";
|
result.Desctription += $"Buckling result:\n{bucklingResult.Desctription}\n";
|
||||||
}
|
}
|
||||||
newTuple = CalculateBuckling(newTuple, bucklingResult);
|
newTuple = CalculateBuckling(newTuple, bucklingResult);
|
||||||
|
result = GetPrimitiveStrainMatrix(ndms, newTuple);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
result.IsValid = false;
|
result.IsValid = false;
|
||||||
result.Desctription = $"Buckling error:\n{ex}\n";
|
result.Desctription = $"Buckling error:\n{ex}\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
result.DesignForceTuple.LimitState = limitState;
|
result.DesignForceTuple.LimitState = limitState;
|
||||||
result.DesignForceTuple.CalcTerm = calcTerm;
|
result.DesignForceTuple.CalcTerm = calcTerm;
|
||||||
result.DesignForceTuple.ForceTuple = newTuple;
|
result.DesignForceTuple.ForceTuple = newTuple;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace StructureHelperTests.UnitTests.Ndms.Triangulations
|
|||||||
//Участок с поворотом на 1 радиан
|
//Участок с поворотом на 1 радиан
|
||||||
[TestCase(0d, 0d, 1.0d, 1.0d, 1d, 0.02d, 1, 50 * 50, 0.14757265268048089d, -0.67706891243125777d)]
|
[TestCase(0d, 0d, 1.0d, 1.0d, 1d, 0.02d, 1, 50 * 50, 0.14757265268048089d, -0.67706891243125777d)]
|
||||||
//Участок со смещением и поворотом на 1 радиан
|
//Участок со смещением и поворотом на 1 радиан
|
||||||
[TestCase(2d, 2d, 1.0d, 1.0d, 1d, 0.02d, 1, 50 * 50, -0.45476470519903267d, 2.0864776689208147d)]
|
[TestCase(2d, 2d, 1.0d, 1.0d, 1d, 0.02d, 1, 50 * 50, -0.45476470519903262d, 2.0864776689208147d)]
|
||||||
public void Run_ShouldPass (double centerX, double centerY, double width, double height, double angle, double ndmMaxSize, int ndmMinDivision, int expectedCount, double expectedFirstCenterX, double expectedFirstCenterY)
|
public void Run_ShouldPass (double centerX, double centerY, double width, double height, double angle, double ndmMaxSize, int ndmMinDivision, int expectedCount, double expectedFirstCenterX, double expectedFirstCenterY)
|
||||||
{
|
{
|
||||||
//Arrange
|
//Arrange
|
||||||
|
|||||||
Reference in New Issue
Block a user