New Icons and Zoom of graph were added
This commit is contained in:
@@ -4,6 +4,7 @@ using StructureHelperCommon.Models.Materials.Libraries;
|
||||
using LMBuilders = LoaderCalculator.Data.Materials.MaterialBuilders;
|
||||
using LMLogic = LoaderCalculator.Data.Materials.MaterialBuilders.MaterialLogics;
|
||||
using LM = LoaderCalculator.Data.Materials;
|
||||
using LoaderCalculator.Data.Materials;
|
||||
|
||||
namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
@@ -40,16 +41,27 @@ namespace StructureHelperLogics.Models.Materials
|
||||
|
||||
public LM.IMaterial GetLoaderMaterial(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
optionLogic = new MaterialCommonOptionLogic(MaterialEntity, limitState, calcTerm);
|
||||
optionLogic.SetMaterialOptions(lmOptions);
|
||||
optionLogic = new ConcreteMaterialOptionLogic(this, limitState);
|
||||
optionLogic.SetMaterialOptions(lmOptions);
|
||||
GetOptions(limitState, calcTerm, false);
|
||||
LMBuilders.IBuilderDirector director = GetMaterial(limitState, calcTerm);
|
||||
return director.BuildMaterial();
|
||||
}
|
||||
|
||||
private LMBuilders.IBuilderDirector GetMaterial(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
var strength = factorLogic.GetTotalFactor(limitState, calcTerm);
|
||||
lmOptions.ExternalFactor.Compressive = strength.Compressive;
|
||||
lmOptions.ExternalFactor.Tensile = strength.Tensile;
|
||||
LMBuilders.IMaterialBuilder builder = new LMBuilders.ConcreteBuilder(lmOptions);
|
||||
LMBuilders.IBuilderDirector director = new LMBuilders.BuilderDirector(builder);
|
||||
return director.BuildMaterial();
|
||||
return director;
|
||||
}
|
||||
|
||||
private void GetOptions(LimitStates limitState, CalcTerms calcTerm, bool isSectionCracked)
|
||||
{
|
||||
optionLogic = new MaterialCommonOptionLogic(MaterialEntity, limitState, calcTerm);
|
||||
optionLogic.SetMaterialOptions(lmOptions);
|
||||
optionLogic = new ConcreteMaterialOptionLogic(this, limitState, isSectionCracked);
|
||||
optionLogic.SetMaterialOptions(lmOptions);
|
||||
}
|
||||
|
||||
public (double Compressive, double Tensile) GetStrength(LimitStates limitState, CalcTerms calcTerm)
|
||||
@@ -68,5 +80,12 @@ namespace StructureHelperLogics.Models.Materials
|
||||
}
|
||||
return (strength.Compressive * compressionFactor, strength.Tensile * tensionFactor);
|
||||
}
|
||||
|
||||
public IMaterial GetCrackedLoaderMaterial(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
GetOptions(limitState, calcTerm, true);
|
||||
LMBuilders.IBuilderDirector director = GetMaterial(limitState, calcTerm);
|
||||
return director.BuildMaterial();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,5 +36,10 @@ namespace StructureHelperLogics.Models.Materials
|
||||
updateStrategy.Update(newItem, this);
|
||||
return newItem;
|
||||
}
|
||||
|
||||
public IMaterial GetCrackedLoaderMaterial(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
return GetLoaderMaterial(limitState, calcTerm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,5 +64,10 @@ namespace StructureHelperLogics.Models.Materials
|
||||
var material = elasticMaterialLogic.GetLoaderMaterial(this, limitState, calcTerm, factor);
|
||||
return material;
|
||||
}
|
||||
|
||||
public IMaterial GetCrackedLoaderMaterial(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
return GetLoaderMaterial(limitState, calcTerm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,5 +61,10 @@ namespace StructureHelper.Models.Materials
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public IMaterial GetCrackedLoaderMaterial(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
return HelperMaterial.GetCrackedLoaderMaterial(limitState, calcTerm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,5 +17,6 @@ namespace StructureHelper.Models.Materials
|
||||
Color Color { get; set; }
|
||||
IHelperMaterial HelperMaterial { get; set; }
|
||||
IMaterial GetLoaderMaterial(LimitStates limitState, CalcTerms calcTerm);
|
||||
IMaterial GetCrackedLoaderMaterial(LimitStates limitState, CalcTerms calcTerm);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,5 +10,6 @@ namespace StructureHelperLogics.Models.Materials
|
||||
public interface IHelperMaterial : ICloneable
|
||||
{
|
||||
IMaterial GetLoaderMaterial(LimitStates limitState, CalcTerms calcTerm);
|
||||
IMaterial GetCrackedLoaderMaterial(LimitStates limitState, CalcTerms calcTerm);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using LoaderCalculator.Data.Materials;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Models.Materials.Libraries;
|
||||
using System.Collections.Generic;
|
||||
@@ -91,5 +92,10 @@ namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public IMaterial GetCrackedLoaderMaterial(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,16 +14,23 @@ namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
private IConcreteLibMaterial material;
|
||||
private LimitStates limitState;
|
||||
public ConcreteMaterialOptionLogic(IConcreteLibMaterial material, LimitStates limitState)
|
||||
bool IsMaterialCracked;
|
||||
public ConcreteMaterialOptionLogic(IConcreteLibMaterial material, LimitStates limitState, bool IsMaterialCracked)
|
||||
{
|
||||
this.material = material;
|
||||
this.limitState = limitState;
|
||||
this.IsMaterialCracked = IsMaterialCracked;
|
||||
}
|
||||
public void SetMaterialOptions(LCMB.IMaterialOptions materialOptions)
|
||||
{
|
||||
Check(materialOptions);
|
||||
var concreteOptions = materialOptions as LCMB.ConcreteOptions;
|
||||
concreteOptions.WorkInTension = false;
|
||||
if (IsMaterialCracked)
|
||||
{
|
||||
concreteOptions.WorkInTension = true;
|
||||
return;
|
||||
}
|
||||
if (limitState == LimitStates.ULS & material.TensionForULS == true)
|
||||
{
|
||||
concreteOptions.WorkInTension = true;
|
||||
|
||||
@@ -8,7 +8,7 @@ using System.Threading.Tasks;
|
||||
using Loadermaterials = LoaderCalculator.Data.Materials;
|
||||
using LMBuilders = LoaderCalculator.Data.Materials.MaterialBuilders;
|
||||
using LoaderMaterialLogics = LoaderCalculator.Data.Materials.MaterialBuilders.MaterialLogics;
|
||||
|
||||
using LoaderCalculator.Data.Materials;
|
||||
|
||||
namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
@@ -76,5 +76,10 @@ namespace StructureHelperLogics.Models.Materials
|
||||
var tensileStrength = strength.Tensile * tensionFactor;
|
||||
return (compressiveStrength, tensileStrength);
|
||||
}
|
||||
|
||||
public IMaterial GetCrackedLoaderMaterial(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
return GetLoaderMaterial(limitState, calcTerm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user