Surrounding property was added
This commit is contained in:
@@ -16,7 +16,7 @@ namespace StructureHelperCommon.Models.Forces
|
||||
public string Name { get; set; }
|
||||
public bool SetInGravityCenter { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public IPoint2D ForcePoint { get; private set; }
|
||||
public IPoint2D ForcePoint { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public IForceTuple FullSLSForces { get; private set; }
|
||||
/// <inheritdoc/>
|
||||
@@ -29,10 +29,15 @@ namespace StructureHelperCommon.Models.Forces
|
||||
SetInGravityCenter = true;
|
||||
ForcePoint = new Point2D();
|
||||
FullSLSForces = new ForceTuple();
|
||||
LongTermFactor = 1d;
|
||||
ULSFactor = 1.2d;
|
||||
}
|
||||
public List<IDesignForceTuple> GetCombination()
|
||||
public IForceCombinationList GetCombinations()
|
||||
{
|
||||
var result = new List<IDesignForceTuple>();
|
||||
var result = new ForceCombinationList();
|
||||
result.SetInGravityCenter = this.SetInGravityCenter;
|
||||
result.ForcePoint = this.ForcePoint;
|
||||
result.DesignForces.Clear();
|
||||
var limitStates = new List<LimitStates>() { LimitStates.ULS, LimitStates.SLS };
|
||||
var calcTerms = new List<CalcTerms>() { CalcTerms.ShortTerm, CalcTerms.LongTerm };
|
||||
foreach (var limitState in limitStates)
|
||||
@@ -42,11 +47,21 @@ namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
var termFactor = calcTerm is CalcTerms.ShortTerm ? 1d : LongTermFactor;
|
||||
var designForceTuple = new DesignForceTuple() { LimitState = limitState, CalcTerm = calcTerm };
|
||||
designForceTuple.ForceTuple = ForceTupleService.MultiplyTuples(designForceTuple.ForceTuple, stateFactor * termFactor);
|
||||
result.Add(designForceTuple);
|
||||
designForceTuple.ForceTuple = ForceTupleService.MultiplyTuples(FullSLSForces, stateFactor * termFactor);
|
||||
result.DesignForces.Add(designForceTuple);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
var newItem = new ForceCombinationByFactor();
|
||||
ForceActionService.CopyActionProps(this, newItem);
|
||||
newItem.FullSLSForces = FullSLSForces.Clone() as IForceTuple;
|
||||
newItem.LongTermFactor = LongTermFactor;
|
||||
newItem.ULSFactor = ULSFactor;
|
||||
return newItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace StructureHelperCommon.Models.Forces
|
||||
/// <inheritdoc/>
|
||||
public bool SetInGravityCenter { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public IPoint2D ForcePoint { get; private set; }
|
||||
public IPoint2D ForcePoint { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public List<IDesignForceTuple> DesignForces { get; private set; }
|
||||
|
||||
@@ -35,10 +35,7 @@ namespace StructureHelperCommon.Models.Forces
|
||||
public object Clone()
|
||||
{
|
||||
var newItem = new ForceCombinationList();
|
||||
newItem.Name = Name + " copy";
|
||||
newItem.SetInGravityCenter = SetInGravityCenter;
|
||||
newItem.ForcePoint.X = ForcePoint.X;
|
||||
newItem.ForcePoint.Y = ForcePoint.Y;
|
||||
ForceActionService.CopyActionProps(this, newItem);
|
||||
newItem.DesignForces.Clear();
|
||||
foreach (var item in DesignForces)
|
||||
{
|
||||
@@ -48,9 +45,10 @@ namespace StructureHelperCommon.Models.Forces
|
||||
return newItem;
|
||||
}
|
||||
/// <inheritdoc/>
|
||||
public List<IDesignForceTuple> GetCombination()
|
||||
public IForceCombinationList GetCombinations()
|
||||
{
|
||||
var result = new List<IDesignForceTuple>();
|
||||
var result = Clone() as IForceCombinationList;
|
||||
result.DesignForces.Clear();
|
||||
var limitStates = new List<LimitStates>() { LimitStates.ULS, LimitStates.SLS };
|
||||
var calcTerms = new List<CalcTerms>() { CalcTerms.ShortTerm, CalcTerms.LongTerm };
|
||||
foreach (var limitState in limitStates)
|
||||
@@ -63,7 +61,7 @@ namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
designForceTuple.ForceTuple = ForceTupleService.SumTuples(designForceTuple.ForceTuple, item.ForceTuple);
|
||||
}
|
||||
result.Add(designForceTuple);
|
||||
result.DesignForces.Add(designForceTuple);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -7,10 +7,10 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
public interface IForceAction : IAction
|
||||
public interface IForceAction : IAction, ICloneable
|
||||
{
|
||||
bool SetInGravityCenter { get; set; }
|
||||
IPoint2D ForcePoint { get; }
|
||||
List<IDesignForceTuple> GetCombination();
|
||||
IPoint2D ForcePoint { get; set; }
|
||||
IForceCombinationList GetCombinations();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ using StructureHelperCommon.Models.Shapes;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
public interface IForceCombinationList : IForceAction, ICloneable
|
||||
public interface IForceCombinationList : IForceAction
|
||||
{
|
||||
List<IDesignForceTuple> DesignForces { get; }
|
||||
List<IDesignForceTuple> DesignForces { get;}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user