Add primitive visual property
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
using StructureHelperCommon.Models;
|
using StructureHelperCommon.Models;
|
||||||
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
using StructureHelperCommon.Services;
|
using StructureHelperCommon.Services;
|
||||||
using StructureHelperLogics.Models.BeamShears;
|
using StructureHelperLogics.Models.BeamShears;
|
||||||
|
|
||||||
@@ -10,6 +11,7 @@ namespace DataAccess.DTOs
|
|||||||
{
|
{
|
||||||
private Dictionary<(Guid id, Type type), ISaveable> referenceDictionary;
|
private Dictionary<(Guid id, Type type), ISaveable> referenceDictionary;
|
||||||
private IShiftTraceLogger traceLogger;
|
private IShiftTraceLogger traceLogger;
|
||||||
|
private IUpdateStrategy<IHasVisualProperty> visualUpdateStrategy;
|
||||||
|
|
||||||
public HasStirrupsFromDTOUpdateStrategy(Dictionary<(Guid id, Type type), ISaveable> referenceDictionary, IShiftTraceLogger traceLogger)
|
public HasStirrupsFromDTOUpdateStrategy(Dictionary<(Guid id, Type type), ISaveable> referenceDictionary, IShiftTraceLogger traceLogger)
|
||||||
{
|
{
|
||||||
@@ -63,7 +65,8 @@ namespace DataAccess.DTOs
|
|||||||
{
|
{
|
||||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(stirrup));
|
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(stirrup));
|
||||||
}
|
}
|
||||||
|
visualUpdateStrategy = new HasVisualPropertyFromDTOUpdateStrategy(referenceDictionary, traceLogger);
|
||||||
|
visualUpdateStrategy.Update(newItem, stirrup);
|
||||||
return newItem;
|
return newItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
using StructureHelperCommon.Models;
|
using StructureHelperCommon.Models;
|
||||||
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
using StructureHelperCommon.Services;
|
using StructureHelperCommon.Services;
|
||||||
using StructureHelperLogics.Models.BeamShears;
|
using StructureHelperLogics.Models.BeamShears;
|
||||||
|
|
||||||
@@ -10,6 +11,7 @@ namespace DataAccess.DTOs
|
|||||||
{
|
{
|
||||||
private Dictionary<(Guid id, Type type), ISaveable> referenceDictionary;
|
private Dictionary<(Guid id, Type type), ISaveable> referenceDictionary;
|
||||||
private IShiftTraceLogger traceLogger;
|
private IShiftTraceLogger traceLogger;
|
||||||
|
private IUpdateStrategy<IHasVisualProperty> visualUpdateStrategy;
|
||||||
|
|
||||||
public HasStirrupsToDTOUpdateStrategy(Dictionary<(Guid id, Type type), ISaveable> referenceDictionary, IShiftTraceLogger traceLogger)
|
public HasStirrupsToDTOUpdateStrategy(Dictionary<(Guid id, Type type), ISaveable> referenceDictionary, IShiftTraceLogger traceLogger)
|
||||||
{
|
{
|
||||||
@@ -64,6 +66,8 @@ namespace DataAccess.DTOs
|
|||||||
{
|
{
|
||||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(stirrup));
|
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(stirrup));
|
||||||
}
|
}
|
||||||
|
visualUpdateStrategy = new HasVisualPropertyToDTOUpdateStrategy(referenceDictionary, traceLogger);
|
||||||
|
visualUpdateStrategy.Update(newItem, stirrup);
|
||||||
return newItem;
|
return newItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
using StructureHelperCommon.Models;
|
using StructureHelperCommon.Models;
|
||||||
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
using StructureHelperLogics.Models.BeamShears;
|
using StructureHelperLogics.Models.BeamShears;
|
||||||
using StructureHelperLogics.Models.Materials;
|
using StructureHelperLogics.Models.Materials;
|
||||||
using System;
|
using System;
|
||||||
@@ -14,6 +15,7 @@ namespace DataAccess.DTOs
|
|||||||
{
|
{
|
||||||
private IUpdateStrategy<IStirrupByInclinedRebar> updateStrategy;
|
private IUpdateStrategy<IStirrupByInclinedRebar> updateStrategy;
|
||||||
private IConvertStrategy<RebarSectionDTO, IRebarSection> rebarConvertStrategy;
|
private IConvertStrategy<RebarSectionDTO, IRebarSection> rebarConvertStrategy;
|
||||||
|
|
||||||
|
|
||||||
public StirrupByInclinedRebarToDTOConvertStrategy(Dictionary<(Guid id, Type type), ISaveable> referenceDictionary, IShiftTraceLogger traceLogger) : base(referenceDictionary, traceLogger)
|
public StirrupByInclinedRebarToDTOConvertStrategy(Dictionary<(Guid id, Type type), ISaveable> referenceDictionary, IShiftTraceLogger traceLogger) : base(referenceDictionary, traceLogger)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
using StructureHelperCommon.Models;
|
using StructureHelperCommon.Models;
|
||||||
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
using StructureHelperLogics.Models.BeamShears;
|
using StructureHelperLogics.Models.BeamShears;
|
||||||
using StructureHelperLogics.Models.BeamShears.Logics;
|
using StructureHelperLogics.Models.BeamShears.Logics;
|
||||||
using System;
|
using System;
|
||||||
@@ -15,6 +16,7 @@ namespace DataAccess.DTOs
|
|||||||
private IUpdateStrategy<IStirrupGroup> updateStrategy;
|
private IUpdateStrategy<IStirrupGroup> updateStrategy;
|
||||||
private IUpdateStrategy<IHasStirrups> stirrupUpdateStrategy;
|
private IUpdateStrategy<IHasStirrups> stirrupUpdateStrategy;
|
||||||
|
|
||||||
|
|
||||||
public StirrupGroupToDTOConvertStrategy(
|
public StirrupGroupToDTOConvertStrategy(
|
||||||
Dictionary<(Guid id, Type type), ISaveable> referenceDictionary,
|
Dictionary<(Guid id, Type type), ISaveable> referenceDictionary,
|
||||||
IShiftTraceLogger traceLogger)
|
IShiftTraceLogger traceLogger)
|
||||||
@@ -34,7 +36,7 @@ namespace DataAccess.DTOs
|
|||||||
|
|
||||||
private void InitializeStrategies()
|
private void InitializeStrategies()
|
||||||
{
|
{
|
||||||
updateStrategy ??= new StirrupGroupUpdateStrategy();
|
updateStrategy ??= new StirrupGroupUpdateStrategy() { UpdateChildren = false};
|
||||||
stirrupUpdateStrategy ??= new HasStirrupsToDTOUpdateStrategy(ReferenceDictionary, TraceLogger);
|
stirrupUpdateStrategy ??= new HasStirrupsToDTOUpdateStrategy(ReferenceDictionary, TraceLogger);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||||
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
|
using StructureHelperCommon.Models;
|
||||||
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
|
using StructureHelperCommon.Services;
|
||||||
|
|
||||||
|
namespace DataAccess.DTOs
|
||||||
|
{
|
||||||
|
public class HasVisualPropertyFromDTOUpdateStrategy : IUpdateStrategy<IHasVisualProperty>
|
||||||
|
{
|
||||||
|
private Dictionary<(Guid id, Type type), ISaveable> referenceDictionary;
|
||||||
|
private IShiftTraceLogger traceLogger;
|
||||||
|
private IConvertStrategy<PrimitiveVisualProperty, PrimitiveVisualPropertyDTO> convertStrategy;
|
||||||
|
|
||||||
|
public HasVisualPropertyFromDTOUpdateStrategy(Dictionary<(Guid id, Type type), ISaveable> referenceDictionary, IShiftTraceLogger traceLogger)
|
||||||
|
{
|
||||||
|
this.referenceDictionary = referenceDictionary;
|
||||||
|
this.traceLogger = traceLogger;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Update(IHasVisualProperty targetObject, IHasVisualProperty sourceObject)
|
||||||
|
{
|
||||||
|
CheckObject.IsNull(targetObject);
|
||||||
|
CheckObject.IsNull(sourceObject);
|
||||||
|
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||||
|
convertStrategy = new DictionaryConvertStrategy<PrimitiveVisualProperty, PrimitiveVisualPropertyDTO>(
|
||||||
|
referenceDictionary,
|
||||||
|
traceLogger,
|
||||||
|
new PrimitiveVisualPropertyFromDTOConvertStrategy(referenceDictionary, traceLogger));
|
||||||
|
if (sourceObject.VisualProperty is not PrimitiveVisualPropertyDTO visualProperty)
|
||||||
|
{
|
||||||
|
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(sourceObject.VisualProperty));
|
||||||
|
}
|
||||||
|
targetObject.VisualProperty = convertStrategy.Convert(visualProperty);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
|
using StructureHelperCommon.Models;
|
||||||
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
|
using StructureHelperCommon.Services;
|
||||||
|
|
||||||
|
namespace DataAccess.DTOs
|
||||||
|
{
|
||||||
|
public class HasVisualPropertyToDTOUpdateStrategy : IUpdateStrategy<IHasVisualProperty>
|
||||||
|
{
|
||||||
|
private Dictionary<(Guid id, Type type), ISaveable> referenceDictionary;
|
||||||
|
private IShiftTraceLogger traceLogger;
|
||||||
|
private IConvertStrategy<PrimitiveVisualPropertyDTO, IPrimitiveVisualProperty> convertStrategy;
|
||||||
|
|
||||||
|
public HasVisualPropertyToDTOUpdateStrategy(Dictionary<(Guid id, Type type), ISaveable> referenceDictionary, IShiftTraceLogger traceLogger)
|
||||||
|
{
|
||||||
|
this.referenceDictionary = referenceDictionary;
|
||||||
|
this.traceLogger = traceLogger;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Update(IHasVisualProperty targetObject, IHasVisualProperty sourceObject)
|
||||||
|
{
|
||||||
|
CheckObject.IsNull(targetObject);
|
||||||
|
CheckObject.IsNull(sourceObject);
|
||||||
|
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||||
|
convertStrategy = new DictionaryConvertStrategy<PrimitiveVisualPropertyDTO, IPrimitiveVisualProperty>(
|
||||||
|
referenceDictionary,
|
||||||
|
traceLogger,
|
||||||
|
new PrimitiveVisualPropertyToDTOConvertStrategy(referenceDictionary, traceLogger));
|
||||||
|
targetObject.VisualProperty = convertStrategy.Convert(sourceObject.VisualProperty);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
|
using StructureHelperCommon.Models;
|
||||||
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
|
|
||||||
|
namespace DataAccess.DTOs
|
||||||
|
{
|
||||||
|
internal class PrimitiveVisualPropertyFromDTOConvertStrategy : ConvertStrategy<PrimitiveVisualProperty, PrimitiveVisualPropertyDTO>
|
||||||
|
{
|
||||||
|
private IUpdateStrategy<IPrimitiveVisualProperty> _updateStrategy;
|
||||||
|
|
||||||
|
public PrimitiveVisualPropertyFromDTOConvertStrategy(Dictionary<(Guid id, Type type), ISaveable> referenceDictionary, IShiftTraceLogger traceLogger) : base(referenceDictionary, traceLogger)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override PrimitiveVisualProperty GetNewItem(PrimitiveVisualPropertyDTO source)
|
||||||
|
{
|
||||||
|
_updateStrategy ??= new PrimitiveVisualPropertyUpdateStrategy();
|
||||||
|
ChildClass = this;
|
||||||
|
NewItem = new(source.Id);
|
||||||
|
return NewItem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
|
using StructureHelperCommon.Models;
|
||||||
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
|
|
||||||
|
namespace DataAccess.DTOs
|
||||||
|
{
|
||||||
|
public class PrimitiveVisualPropertyToDTOConvertStrategy : ConvertStrategy<PrimitiveVisualPropertyDTO, IPrimitiveVisualProperty>
|
||||||
|
{
|
||||||
|
private IUpdateStrategy<IPrimitiveVisualProperty> _updateStrategy;
|
||||||
|
|
||||||
|
public PrimitiveVisualPropertyToDTOConvertStrategy(
|
||||||
|
Dictionary<(Guid id, Type type), ISaveable> referenceDictionary,
|
||||||
|
IShiftTraceLogger traceLogger) : base(referenceDictionary, traceLogger)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override PrimitiveVisualPropertyDTO GetNewItem(IPrimitiveVisualProperty source)
|
||||||
|
{
|
||||||
|
_updateStrategy ??= new PrimitiveVisualPropertyUpdateStrategy();
|
||||||
|
ChildClass = this;
|
||||||
|
NewItem = new(source.Id);
|
||||||
|
return NewItem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -22,7 +22,7 @@ namespace DataAccess.DTOs
|
|||||||
(this, new RectangleShapeFromDTOConvertStrategy(this));
|
(this, new RectangleShapeFromDTOConvertStrategy(this));
|
||||||
NewItem = rectangleConvertStrategy.Convert(rectangleShapeDTO);
|
NewItem = rectangleConvertStrategy.Convert(rectangleShapeDTO);
|
||||||
}
|
}
|
||||||
if (source is CircleShapeDTO circleShapeDTO)
|
else if (source is CircleShapeDTO circleShapeDTO)
|
||||||
{
|
{
|
||||||
circleConvertStrategy ??= new DictionaryConvertStrategy<CircleShape, CircleShapeDTO>
|
circleConvertStrategy ??= new DictionaryConvertStrategy<CircleShape, CircleShapeDTO>
|
||||||
(this, new CircleShapeFromDTOConvertStrategy(this));
|
(this, new CircleShapeFromDTOConvertStrategy(this));
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
using StructureHelperLogics.Models.BeamShears;
|
using StructureHelperLogics.Models.BeamShears;
|
||||||
|
using System.Windows.Media;
|
||||||
|
|
||||||
namespace DataAccess.DTOs
|
namespace DataAccess.DTOs
|
||||||
{
|
{
|
||||||
@@ -10,13 +12,23 @@ namespace DataAccess.DTOs
|
|||||||
[JsonProperty("Name")]
|
[JsonProperty("Name")]
|
||||||
public string? Name { get; set; } = string.Empty;
|
public string? Name { get; set; } = string.Empty;
|
||||||
[JsonProperty("StirrupDensity")]
|
[JsonProperty("StirrupDensity")]
|
||||||
public double StirrupDensity { get; set; }
|
public double StirrupDensity { get; set; } = 30000;
|
||||||
[JsonProperty("CompressedGap")]
|
[JsonProperty("CompressedGap")]
|
||||||
public double CompressedGap { get; set; }
|
public double CompressedGap { get; set; } = 0;
|
||||||
|
[JsonProperty("StartCoordinate")]
|
||||||
|
public double StartCoordinate { get; set; } = 0;
|
||||||
|
[JsonProperty("EndCoordinate")]
|
||||||
|
public double EndCoordinate { get; set; } = 100;
|
||||||
|
[JsonProperty("VisualProperty")]
|
||||||
|
public IPrimitiveVisualProperty VisualProperty { get; set; }
|
||||||
|
|
||||||
public StirrupByDensityDTO(Guid id)
|
public StirrupByDensityDTO(Guid id)
|
||||||
{
|
{
|
||||||
Id = id;
|
Id = id;
|
||||||
|
VisualProperty = new PrimitiveVisualPropertyDTO(Guid.NewGuid())
|
||||||
|
{
|
||||||
|
Color = (Color)ColorConverter.ConvertFromString("Black")
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public object Clone()
|
public object Clone()
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
using StructureHelperLogics.Models.BeamShears;
|
using StructureHelperLogics.Models.BeamShears;
|
||||||
using StructureHelperLogics.Models.Materials;
|
using StructureHelperLogics.Models.Materials;
|
||||||
|
using System.Windows.Media;
|
||||||
|
|
||||||
namespace DataAccess.DTOs
|
namespace DataAccess.DTOs
|
||||||
{
|
{
|
||||||
@@ -22,11 +24,16 @@ namespace DataAccess.DTOs
|
|||||||
public double LegCount { get; set; }
|
public double LegCount { get; set; }
|
||||||
[JsonProperty("RebarSection")]
|
[JsonProperty("RebarSection")]
|
||||||
public IRebarSection RebarSection { get; set; }
|
public IRebarSection RebarSection { get; set; }
|
||||||
|
[JsonProperty("VisualProperty")]
|
||||||
|
public IPrimitiveVisualProperty VisualProperty { get; set; }
|
||||||
|
|
||||||
public StirrupByInclinedRebarDTO(Guid id)
|
public StirrupByInclinedRebarDTO(Guid id)
|
||||||
{
|
{
|
||||||
Id = id;
|
Id = id;
|
||||||
|
VisualProperty = new PrimitiveVisualPropertyDTO(Guid.NewGuid())
|
||||||
|
{
|
||||||
|
Color = (Color)ColorConverter.ConvertFromString("Black")
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public object Clone()
|
public object Clone()
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
using StructureHelperLogics.Models.BeamShears;
|
using StructureHelperLogics.Models.BeamShears;
|
||||||
using StructureHelperLogics.Models.Materials;
|
using StructureHelperLogics.Models.Materials;
|
||||||
|
using System.Windows.Media;
|
||||||
|
|
||||||
namespace DataAccess.DTOs
|
namespace DataAccess.DTOs
|
||||||
{
|
{
|
||||||
@@ -9,23 +11,33 @@ namespace DataAccess.DTOs
|
|||||||
[JsonProperty("Id")]
|
[JsonProperty("Id")]
|
||||||
public Guid Id { get; }
|
public Guid Id { get; }
|
||||||
[JsonProperty("Name")]
|
[JsonProperty("Name")]
|
||||||
public string? Name { get; set; }
|
public string? Name { get; set; } = string.Empty;
|
||||||
[JsonProperty("LegCount")]
|
[JsonProperty("LegCount")]
|
||||||
public double LegCount { get; set; }
|
public double LegCount { get; set; } = 2;
|
||||||
[JsonProperty("Diameter")]
|
[JsonProperty("Diameter")]
|
||||||
public double Diameter { get; set; }
|
public double Diameter { get; set; } = 0.008;
|
||||||
[JsonProperty("Material")]
|
[JsonProperty("Material")]
|
||||||
public IReinforcementLibMaterial Material { get; set; }
|
public IReinforcementLibMaterial Material { get; set; }
|
||||||
[JsonProperty("Spacing")]
|
[JsonProperty("Spacing")]
|
||||||
public double Spacing { get; set; }
|
public double Spacing { get; set; } = 0.1;
|
||||||
[JsonProperty("CompressedGap")]
|
[JsonProperty("CompressedGap")]
|
||||||
public double CompressedGap { get; set; }
|
public double CompressedGap { get; set; } = 0;
|
||||||
[JsonProperty("IsSpiral")]
|
[JsonProperty("IsSpiral")]
|
||||||
public bool IsSpiral { get; set; } = false;
|
public bool IsSpiral { get; set; } = false;
|
||||||
|
[JsonProperty("StartCoordinate")]
|
||||||
|
public double StartCoordinate { get; set; } = 0;
|
||||||
|
[JsonProperty("EndCoordinate")]
|
||||||
|
public double EndCoordinate { get; set; } = 100;
|
||||||
|
[JsonProperty("VisualProperty")]
|
||||||
|
public IPrimitiveVisualProperty VisualProperty { get; set; }
|
||||||
|
|
||||||
public StirrupByRebarDTO(Guid id)
|
public StirrupByRebarDTO(Guid id)
|
||||||
{
|
{
|
||||||
Id = id;
|
Id = id;
|
||||||
|
VisualProperty = new PrimitiveVisualPropertyDTO(Guid.NewGuid())
|
||||||
|
{
|
||||||
|
Color = (Color)ColorConverter.ConvertFromString("Black")
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public object Clone()
|
public object Clone()
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
using StructureHelperLogics.Models.BeamShears;
|
using StructureHelperLogics.Models.BeamShears;
|
||||||
|
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||||
|
using System.Windows.Media;
|
||||||
|
|
||||||
namespace DataAccess.DTOs
|
namespace DataAccess.DTOs
|
||||||
{
|
{
|
||||||
@@ -8,20 +11,27 @@ namespace DataAccess.DTOs
|
|||||||
[JsonProperty("Id")]
|
[JsonProperty("Id")]
|
||||||
public Guid Id { get; }
|
public Guid Id { get; }
|
||||||
[JsonProperty("Name")]
|
[JsonProperty("Name")]
|
||||||
public string? Name { get; set; }
|
public string? Name { get; set; } = string.Empty;
|
||||||
[JsonProperty("CompressedGap")]
|
[JsonProperty("CompressedGap")]
|
||||||
public double CompressedGap { get; set; }
|
public double CompressedGap { get; set; } = 0;
|
||||||
[JsonProperty("Stirrups")]
|
[JsonProperty("Stirrups")]
|
||||||
public List<IStirrup> Stirrups { get; } = new();
|
public List<IStirrup> Stirrups { get; } = new();
|
||||||
|
[JsonProperty("VisualProperty")]
|
||||||
|
public IPrimitiveVisualProperty VisualProperty { get; set; }
|
||||||
|
|
||||||
public StirrupGroupDTO(Guid id)
|
public StirrupGroupDTO(Guid id)
|
||||||
{
|
{
|
||||||
Id = id;
|
Id = id;
|
||||||
|
VisualProperty = new PrimitiveVisualPropertyDTO(Guid.NewGuid())
|
||||||
|
{
|
||||||
|
Color = (Color)ColorConverter.ConvertFromString("Black")
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public object Clone()
|
public object Clone()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
32
DataAccess/DTOs/DTOEntities/PrimitiveVisualPropertyDTO.cs
Normal file
32
DataAccess/DTOs/DTOEntities/PrimitiveVisualPropertyDTO.cs
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
|
using StructureHelperCommon.Services.ColorServices;
|
||||||
|
using System.Windows.Media;
|
||||||
|
|
||||||
|
namespace DataAccess.DTOs
|
||||||
|
{
|
||||||
|
public class PrimitiveVisualPropertyDTO : IPrimitiveVisualProperty
|
||||||
|
{
|
||||||
|
[JsonProperty("Id")]
|
||||||
|
public Guid Id { get; }
|
||||||
|
[JsonProperty("IsVisible")]
|
||||||
|
public bool IsVisible { get; set; } = true;
|
||||||
|
[JsonProperty("Color")]
|
||||||
|
public Color Color { get; set; } = ColorProcessor.GetRandomColor();
|
||||||
|
[JsonProperty("Zindex")]
|
||||||
|
public int ZIndex { get; set; } = 0;
|
||||||
|
[JsonProperty("Opacity")]
|
||||||
|
public double Opacity { get; set; } = 1;
|
||||||
|
|
||||||
|
|
||||||
|
public PrimitiveVisualPropertyDTO(Guid id)
|
||||||
|
{
|
||||||
|
Id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Clone()
|
||||||
|
{
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -74,6 +74,7 @@ namespace DataAccess.DTOs
|
|||||||
{ (typeof(List<IVisualAnalysis>), "ListOfIVisualAnalysis") },
|
{ (typeof(List<IVisualAnalysis>), "ListOfIVisualAnalysis") },
|
||||||
{ (typeof(Point2DDTO), "Point2D") },
|
{ (typeof(Point2DDTO), "Point2D") },
|
||||||
{ (typeof(PointNdmPrimitiveDTO), "PointNdmPrimitive") },
|
{ (typeof(PointNdmPrimitiveDTO), "PointNdmPrimitive") },
|
||||||
|
{ (typeof(PrimitiveVisualPropertyDTO), "PrimitiveVisualProperty") },
|
||||||
{ (typeof(ProjectDTO), "Project") },
|
{ (typeof(ProjectDTO), "Project") },
|
||||||
{ (typeof(RebarNdmPrimitiveDTO), "RebarNdmPrimitive") },
|
{ (typeof(RebarNdmPrimitiveDTO), "RebarNdmPrimitive") },
|
||||||
{ (typeof(RebarSectionDTO), "RebarSection") },
|
{ (typeof(RebarSectionDTO), "RebarSection") },
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
|
||||||
namespace DataAccess.DTOs
|
namespace DataAccess.DTOs
|
||||||
@@ -24,5 +19,9 @@ namespace DataAccess.DTOs
|
|||||||
[JsonProperty("Opacity")]
|
[JsonProperty("Opacity")]
|
||||||
public double Opacity { get; set; }
|
public double Opacity { get; set; }
|
||||||
|
|
||||||
|
public object Clone()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -49,5 +49,5 @@ using System.Windows;
|
|||||||
// Можно задать все значения или принять номера сборки и редакции по умолчанию
|
// Можно задать все значения или принять номера сборки и редакции по умолчанию
|
||||||
// используя "*", как показано ниже:
|
// используя "*", как показано ниже:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2025.06.23.01")]
|
[assembly: AssemblyVersion("2025.07.23.01")]
|
||||||
[assembly: AssemblyFileVersion("2025.06.23.01")]
|
[assembly: AssemblyFileVersion("2025.07.23.01")]
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
|||||||
-->
|
-->
|
||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<History>True|2025-01-27T09:32:31.9770658Z||;True|2024-12-29T20:48:11.7280613+05:00||;True|2024-12-27T13:24:44.0055462+05:00||;True|2024-11-13T09:16:22.8894163+05:00||;True|2024-08-13T14:00:35.8311260+05:00||;True|2024-08-12T12:59:16.1785759+05:00||;True|2024-03-11T20:33:14.1457807+05:00||;True|2024-03-10T19:11:27.6834663+05:00||;True|2024-02-02T12:22:50.1454015+05:00||;True|2023-02-25T13:37:39.2738786+05:00||;False|2023-02-25T13:37:24.0284261+05:00||;True|2023-02-25T13:34:01.6858860+05:00||;True|2023-02-25T13:31:18.8295711+05:00||;False|2023-02-25T13:25:21.5807199+05:00||;False|2023-02-25T13:24:41.7164398+05:00||;</History>
|
<History>True|2025-07-21T06:22:35.9564230Z||;True|2025-01-27T14:32:31.9770658+05:00||;True|2024-12-29T20:48:11.7280613+05:00||;True|2024-12-27T13:24:44.0055462+05:00||;True|2024-11-13T09:16:22.8894163+05:00||;True|2024-08-13T14:00:35.8311260+05:00||;True|2024-08-12T12:59:16.1785759+05:00||;True|2024-03-11T20:33:14.1457807+05:00||;True|2024-03-10T19:11:27.6834663+05:00||;True|2024-02-02T12:22:50.1454015+05:00||;True|2023-02-25T13:37:39.2738786+05:00||;False|2023-02-25T13:37:24.0284261+05:00||;True|2023-02-25T13:34:01.6858860+05:00||;True|2023-02-25T13:31:18.8295711+05:00||;False|2023-02-25T13:25:21.5807199+05:00||;False|2023-02-25T13:24:41.7164398+05:00||;</History>
|
||||||
<LastFailureDetails />
|
<LastFailureDetails />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
<UseWPF>true</UseWPF>
|
<UseWPF>true</UseWPF>
|
||||||
<ImplicitUsings>disable</ImplicitUsings>
|
<ImplicitUsings>disable</ImplicitUsings>
|
||||||
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
|
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
|
||||||
<ApplicationIcon>Infrastructure\UI\Icons\SH_лого_16.ico</ApplicationIcon>
|
<ApplicationIcon>Infrastructure\UI\Icons\SH_лого_16.ico</ApplicationIcon>
|
||||||
<AssemblyVersion></AssemblyVersion>
|
<AssemblyVersion></AssemblyVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_LastSelectedProfileId>D:\Repos\StructureHelper\StructureHelper\Properties\PublishProfiles\FolderProfile.pubxml</_LastSelectedProfileId>
|
<_LastSelectedProfileId>C:\Repos\StructureHelper\StructureHelper\Properties\PublishProfiles\FolderProfile.pubxml</_LastSelectedProfileId>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ApplicationDefinition Update="App.xaml">
|
<ApplicationDefinition Update="App.xaml">
|
||||||
|
|||||||
@@ -51,9 +51,7 @@
|
|||||||
</Button>
|
</Button>
|
||||||
</ToolBar>
|
</ToolBar>
|
||||||
<ToolBar ToolTip="Stirrups" DataContext="{Binding Stirrups}">
|
<ToolBar ToolTip="Stirrups" DataContext="{Binding Stirrups}">
|
||||||
<Button Style="{StaticResource ToolButton}"
|
<Button Style="{StaticResource ToolButton}" Command="{Binding Add}" CommandParameter="{x:Static enums:StirrupTypes.GroupOfStirrups}">
|
||||||
Command="{Binding Add}"
|
|
||||||
CommandParameter="{x:Static enums:StirrupTypes.GroupOfStirrups}">
|
|
||||||
<Button.ToolTip>
|
<Button.ToolTip>
|
||||||
<uc:ButtonToolTipEh HeaderText="Add group of stirrup"
|
<uc:ButtonToolTipEh HeaderText="Add group of stirrup"
|
||||||
IconContent="{StaticResource TreeGroup}"
|
IconContent="{StaticResource TreeGroup}"
|
||||||
@@ -152,7 +150,15 @@ CommandParameter="{x:Static enums:StirrupTypes.GroupOfStirrups}">
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<ScrollViewer>
|
<ScrollViewer>
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<Expander Header="Actions" DataContext="{Binding Actions}">
|
<Expander DataContext="{Binding Actions}">
|
||||||
|
<Expander.Header>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<Viewbox Height="16" Width="16">
|
||||||
|
<ContentControl ContentTemplate="{DynamicResource DistributedLoad}"/>
|
||||||
|
</Viewbox>
|
||||||
|
<TextBlock Text="Actions"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Expander.Header>
|
||||||
<Expander.ContextMenu>
|
<Expander.ContextMenu>
|
||||||
<ContextMenu>
|
<ContextMenu>
|
||||||
<MenuItem Header="Add" Command="{Binding Add}"/>
|
<MenuItem Header="Add" Command="{Binding Add}"/>
|
||||||
@@ -168,32 +174,29 @@ CommandParameter="{x:Static enums:StirrupTypes.GroupOfStirrups}">
|
|||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
</Expander>
|
</Expander>
|
||||||
<Expander Header="Cross-Sections" DataContext="{Binding Sections}">
|
<Expander DataContext="{Binding Sections}">
|
||||||
<ListBox ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedItem}" ContextMenu="{StaticResource EditCopyDelete}">
|
<Expander.Header>
|
||||||
<ListBox.ItemTemplate>
|
<StackPanel Orientation="Horizontal">
|
||||||
<DataTemplate>
|
<Viewbox Height="16" Width="16">
|
||||||
<Grid>
|
<ContentControl ContentTemplate="{DynamicResource ShearRectangleSection}"/>
|
||||||
<TextBlock Text="{Binding Name}"/>
|
</Viewbox>
|
||||||
</Grid>
|
<TextBlock Text="Cross-sections"/>
|
||||||
</DataTemplate>
|
</StackPanel>
|
||||||
</ListBox.ItemTemplate>
|
</Expander.Header>
|
||||||
</ListBox>
|
|
||||||
</Expander>
|
|
||||||
<Expander Header="Stirrups" DataContext="{Binding Stirrups}">
|
|
||||||
<Expander.ContextMenu>
|
<Expander.ContextMenu>
|
||||||
<ContextMenu>
|
<ContextMenu>
|
||||||
<MenuItem Header="Add">
|
<MenuItem Header="Add">
|
||||||
<MenuItem Header="Uniformly distributed density" Command="{Binding Add}" CommandParameter="{x:Static enums:StirrupTypes.Density}">
|
<MenuItem Header="Rectangle section" Command="{Binding Add}" CommandParameter="{x:Static enums:PrimitiveType.Rectangle}">
|
||||||
<MenuItem.Icon>
|
<MenuItem.Icon>
|
||||||
<Viewbox Height="24" Width="24">
|
<Viewbox Height="16" Width="16">
|
||||||
<ContentControl ContentTemplate="{DynamicResource StirrupDensity}"/>
|
<ContentControl ContentTemplate="{DynamicResource ShearRectangleSection}"/>
|
||||||
</Viewbox>
|
</Viewbox>
|
||||||
</MenuItem.Icon>
|
</MenuItem.Icon>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem Header="Uniformly distributed rebars" Command="{Binding Add}" CommandParameter="{x:Static enums:StirrupTypes.UniformRebar}">
|
<MenuItem Header="Circle section" Command="{Binding Add}" CommandParameter="{x:Static enums:PrimitiveType.Circle}">
|
||||||
<MenuItem.Icon>
|
<MenuItem.Icon>
|
||||||
<Viewbox Height="24" Width="24">
|
<Viewbox Height="16" Width="16">
|
||||||
<ContentControl ContentTemplate="{DynamicResource StirrupRebars}"/>
|
<ContentControl ContentTemplate="{DynamicResource ShearCircleSection}"/>
|
||||||
</Viewbox>
|
</Viewbox>
|
||||||
</MenuItem.Icon>
|
</MenuItem.Icon>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
@@ -210,7 +213,68 @@ CommandParameter="{x:Static enums:StirrupTypes.GroupOfStirrups}">
|
|||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
</Expander>
|
</Expander>
|
||||||
<Expander Header="Calculators" DataContext="{Binding Calculators}">
|
<Expander DataContext="{Binding Stirrups}">
|
||||||
|
<Expander.Header>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<Viewbox Height="16" Width="16">
|
||||||
|
<ContentControl ContentTemplate="{DynamicResource StirrupRebars}"/>
|
||||||
|
</Viewbox>
|
||||||
|
<TextBlock Text="Stirrups"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Expander.Header>
|
||||||
|
<Expander.ContextMenu>
|
||||||
|
<ContextMenu>
|
||||||
|
<MenuItem Header="Add">
|
||||||
|
<MenuItem Header="Group of stirrup" Command="{Binding Add}" CommandParameter="{x:Static enums:StirrupTypes.GroupOfStirrups}">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<Viewbox Height="16" Width="16">
|
||||||
|
<ContentControl ContentTemplate="{DynamicResource TreeGroup}"/>
|
||||||
|
</Viewbox>
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Uniformly distributed density" Command="{Binding Add}" CommandParameter="{x:Static enums:StirrupTypes.Density}">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<Viewbox Height="16" Width="16">
|
||||||
|
<ContentControl ContentTemplate="{DynamicResource StirrupDensity}"/>
|
||||||
|
</Viewbox>
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Uniformly distributed rebars" Command="{Binding Add}" CommandParameter="{x:Static enums:StirrupTypes.UniformRebar}">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<Viewbox Height="16" Width="16">
|
||||||
|
<ContentControl ContentTemplate="{DynamicResource StirrupRebars}"/>
|
||||||
|
</Viewbox>
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Inclined rebar" Command="{Binding Add}" CommandParameter="{x:Static enums:StirrupTypes.Density}">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<Viewbox Height="16" Width="16">
|
||||||
|
<ContentControl ContentTemplate="{DynamicResource StirrupInclinedRebar}"/>
|
||||||
|
</Viewbox>
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
</MenuItem>
|
||||||
|
</ContextMenu>
|
||||||
|
</Expander.ContextMenu>
|
||||||
|
<ListBox ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedItem}" ContextMenu="{StaticResource EditCopyDelete}">
|
||||||
|
<ListBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid>
|
||||||
|
<TextBlock Text="{Binding Name}"/>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.ItemTemplate>
|
||||||
|
</ListBox>
|
||||||
|
</Expander>
|
||||||
|
<Expander DataContext="{Binding Calculators}">
|
||||||
|
<Expander.Header>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<Viewbox Height="16" Width="16">
|
||||||
|
<ContentControl ContentTemplate="{DynamicResource ShearCalculator}"/>
|
||||||
|
</Viewbox>
|
||||||
|
<TextBlock Text="Calculators"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Expander.Header>
|
||||||
<Expander.ContextMenu>
|
<Expander.ContextMenu>
|
||||||
<ContextMenu>
|
<ContextMenu>
|
||||||
<MenuItem Header="Add">
|
<MenuItem Header="Add">
|
||||||
|
|||||||
@@ -12,21 +12,42 @@
|
|||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
<RowDefinition Height="40"/>
|
<RowDefinition Height="40"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid>
|
<TabControl>
|
||||||
<Grid.ColumnDefinitions>
|
<TabItem Header="Main">
|
||||||
<ColumnDefinition/>
|
<Grid>
|
||||||
<ColumnDefinition/>
|
<Grid.ColumnDefinitions>
|
||||||
</Grid.ColumnDefinitions>
|
<ColumnDefinition/>
|
||||||
<Grid.RowDefinitions>
|
<ColumnDefinition/>
|
||||||
<RowDefinition Height="25"/>
|
</Grid.ColumnDefinitions>
|
||||||
<RowDefinition Height="25"/>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition/>
|
<RowDefinition Height="25"/>
|
||||||
</Grid.RowDefinitions>
|
<RowDefinition Height="25"/>
|
||||||
<TextBlock Text="Name"/>
|
<RowDefinition/>
|
||||||
<TextBox Grid.Column="1" Text="{Binding Name}"/>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock Grid.Row="1" Text="Density"/>
|
<TextBlock Text="Name"/>
|
||||||
<TextBox Grid.Row="1" Grid.Column="1" Style="{StaticResource ValidatedError}" Text="{Binding Density, Converter={StaticResource DistributedLoadConverter}, ValidatesOnDataErrors=True}"/>
|
<TextBox Grid.Column="1" Text="{Binding Name}"/>
|
||||||
</Grid>
|
<TextBlock Grid.Row="1" Text="Density"/>
|
||||||
|
<TextBox Grid.Row="1" Grid.Column="1" Style="{StaticResource ValidatedError}" Text="{Binding Density, Converter={StaticResource DistributedLoadConverter}, ValidatesOnDataErrors=True}"/>
|
||||||
|
</Grid>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Misc.">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="25"/>
|
||||||
|
<RowDefinition Height="25"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Grid.Row="0" Text="Start coordinate"/>
|
||||||
|
<TextBox Grid.Row="0" Grid.Column="1" Style="{StaticResource ValidatedError}" Text="{Binding StartCoordinate, Converter={StaticResource LengthConverter},ValidatesOnDataErrors=True}"/>
|
||||||
|
<TextBlock Grid.Row="1" Text="End coordinate"/>
|
||||||
|
<TextBox Grid.Row="1" Grid.Column="1" Style="{StaticResource ValidatedError}" Text="{Binding EndCoordinate, Converter={StaticResource LengthConverter},ValidatesOnDataErrors=True}"/>
|
||||||
|
</Grid>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
<ContentControl Grid.Row="1" ContentTemplate="{StaticResource OkCancelButtons}" Content="{Binding}"/>
|
<ContentControl Grid.Row="1" ContentTemplate="{StaticResource OkCancelButtons}" Content="{Binding}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -28,6 +28,28 @@ namespace StructureHelper.Windows.BeamShears
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public double StartCoordinate
|
||||||
|
{
|
||||||
|
get => stirrupByDensity.StartCoordinate;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value < 0) { value = 0; }
|
||||||
|
stirrupByDensity.StartCoordinate = value;
|
||||||
|
OnPropertyChanged(nameof(StartCoordinate));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public double EndCoordinate
|
||||||
|
{
|
||||||
|
get => stirrupByDensity.EndCoordinate;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value < 0) { value = 0; }
|
||||||
|
stirrupByDensity.EndCoordinate = value;
|
||||||
|
OnPropertyChanged(nameof(EndCoordinate));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public string Error => null;
|
public string Error => null;
|
||||||
|
|
||||||
public string this[string columnName]
|
public string this[string columnName]
|
||||||
|
|||||||
@@ -44,6 +44,23 @@
|
|||||||
<TabItem Header="Material" DataContext="{Binding Material}">
|
<TabItem Header="Material" DataContext="{Binding Material}">
|
||||||
<ContentControl ContentTemplate="{StaticResource ReinforcementMaterial}" Content="{Binding}"/>
|
<ContentControl ContentTemplate="{StaticResource ReinforcementMaterial}" Content="{Binding}"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
<TabItem Header="Misc.">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="25"/>
|
||||||
|
<RowDefinition Height="25"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Grid.Row="0" Text="Start coordinate"/>
|
||||||
|
<TextBox Grid.Row="0" Grid.Column="1" Style="{StaticResource ValidatedError}" Text="{Binding StartCoordinate, Converter={StaticResource LengthConverter},ValidatesOnDataErrors=True}"/>
|
||||||
|
<TextBlock Grid.Row="1" Text="End coordinate"/>
|
||||||
|
<TextBox Grid.Row="1" Grid.Column="1" Style="{StaticResource ValidatedError}" Text="{Binding EndCoordinate, Converter={StaticResource LengthConverter},ValidatesOnDataErrors=True}"/>
|
||||||
|
</Grid>
|
||||||
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
<ContentControl Grid.Row="1" ContentTemplate="{StaticResource OkCancelButtons}" Content="{Binding}"/>
|
<ContentControl Grid.Row="1" ContentTemplate="{StaticResource OkCancelButtons}" Content="{Binding}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -60,6 +60,28 @@ namespace StructureHelper.Windows.BeamShears
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public double StartCoordinate
|
||||||
|
{
|
||||||
|
get => stirrupByRebar.StartCoordinate;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value < 0) { value = 0;}
|
||||||
|
stirrupByRebar.StartCoordinate = value;
|
||||||
|
OnPropertyChanged(nameof(StartCoordinate));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public double EndCoordinate
|
||||||
|
{
|
||||||
|
get => stirrupByRebar.EndCoordinate;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value < 0) { value = 0; }
|
||||||
|
stirrupByRebar.EndCoordinate = value;
|
||||||
|
OnPropertyChanged(nameof(EndCoordinate));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public bool IsSpiral
|
public bool IsSpiral
|
||||||
{
|
{
|
||||||
get => stirrupByRebar.IsSpiral;
|
get => stirrupByRebar.IsSpiral;
|
||||||
@@ -104,7 +126,21 @@ namespace StructureHelper.Windows.BeamShears
|
|||||||
{
|
{
|
||||||
if (Spacing < MinSpacing)
|
if (Spacing < MinSpacing)
|
||||||
{
|
{
|
||||||
result = $"Spacing of stirrups must not be less than {MinSpacing}";
|
result = $"Spacing of stirrups must not be less than {MinSpacing}(m)";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (columnName == nameof(StartCoordinate))
|
||||||
|
{
|
||||||
|
if (StartCoordinate < 0)
|
||||||
|
{
|
||||||
|
result = $"Start coordinate must not be less than zero";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (columnName == nameof(EndCoordinate))
|
||||||
|
{
|
||||||
|
if (EndCoordinate < StartCoordinate)
|
||||||
|
{
|
||||||
|
result = $"End coordinate must not be greate than start coordinate {StartCoordinate}(m)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
xmlns:vm="clr-namespace:StructureHelper.Windows.ViewModels.Help"
|
xmlns:vm="clr-namespace:StructureHelper.Windows.ViewModels.Help"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DataContext="{d:DesignInstance vm:AboutViewModel}"
|
d:DataContext="{d:DesignInstance vm:AboutViewModel}"
|
||||||
Title="Structure Helper" Height="250" Width="400" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
|
Title="Structure Helper" Height="300" Width="400" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="22"/>
|
<RowDefinition Height="22"/>
|
||||||
@@ -17,6 +17,8 @@
|
|||||||
<RowDefinition Height="22"/>
|
<RowDefinition Height="22"/>
|
||||||
<RowDefinition Height="22"/>
|
<RowDefinition Height="22"/>
|
||||||
<RowDefinition Height="22"/>
|
<RowDefinition Height="22"/>
|
||||||
|
<RowDefinition Height="22"/>
|
||||||
|
<RowDefinition Height="22"/>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
<RowDefinition Height="40"/>
|
<RowDefinition Height="40"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
@@ -24,11 +26,13 @@
|
|||||||
<TextBlock Grid.Row="1" Text="{Binding Authors}"/>
|
<TextBlock Grid.Row="1" Text="{Binding Authors}"/>
|
||||||
<TextBlock Grid.Row="2" Text="Version"/>
|
<TextBlock Grid.Row="2" Text="Version"/>
|
||||||
<TextBlock Grid.Row="3" Text="{Binding Version}"/>
|
<TextBlock Grid.Row="3" Text="{Binding Version}"/>
|
||||||
<TextBlock Grid.Row="4" Text="Copy Right (c) Redikultsev Evgeny"/>
|
<TextBlock Grid.Row="4" Text="Assembly"/>
|
||||||
<TextBlock Grid.Row="5" Text="www.structurehelper.ru"/>
|
<TextBlock Grid.Row="5" Text="{Binding Assembly}"/>
|
||||||
<TextBlock Grid.Row="6" Text="https://vk.com/structurehelper"/>
|
<TextBlock Grid.Row="6" Text="Copy Right (c) Redikultsev Evgeny"/>
|
||||||
<TextBlock Grid.Row="7" Text="https://t.me/StructureHelper"/>
|
<TextBlock Grid.Row="7" Text="www.structurehelper.ru"/>
|
||||||
|
<TextBlock Grid.Row="8" Text="https://vk.com/structurehelper"/>
|
||||||
|
<TextBlock Grid.Row="9" Text="https://t.me/StructureHelper"/>
|
||||||
|
|
||||||
<Button Grid.Row="8" Style="{StaticResource OkButton}" Click="Button_Click"/>
|
<Button Grid.Row="10" Style="{StaticResource OkButton}" Click="Button_Click"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
using StructureHelper.Infrastructure;
|
using StructureHelper.Infrastructure;
|
||||||
|
using StructureHelperCommon.Infrastructures.Settings;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
@@ -11,15 +14,26 @@ namespace StructureHelper.Windows.ViewModels.Help
|
|||||||
{
|
{
|
||||||
internal class AboutViewModel : OkCancelViewModelBase
|
internal class AboutViewModel : OkCancelViewModelBase
|
||||||
{
|
{
|
||||||
public string Authors => "Redikultsev Evgeny";
|
public string Authors => "Redikultsev Evgeny, Redikultseva Svetlana";
|
||||||
public string Version
|
public string Assembly
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
string version;
|
string version;
|
||||||
version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string version1;
|
||||||
|
|
||||||
|
public string Version
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var fileVersion = ProgramSetting.GetCurrentFileVersion();
|
||||||
|
return $"{fileVersion.VersionNumber}.{fileVersion.SubVersionNumber}";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperCommon.Models.VisualProperties
|
||||||
|
{
|
||||||
|
public interface IHasVisualProperty
|
||||||
|
{
|
||||||
|
IPrimitiveVisualProperty VisualProperty { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Media;
|
||||||
|
|
||||||
|
namespace StructureHelperCommon.Models.VisualProperties
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Implements visual settings for graphical primetives
|
||||||
|
/// </summary>
|
||||||
|
public interface IPrimitiveVisualProperty : ISaveable, ICloneable
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Flag of visibility
|
||||||
|
/// </summary>
|
||||||
|
bool IsVisible { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Color of primitive
|
||||||
|
/// </summary>
|
||||||
|
Color Color { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Index by z-coordinate
|
||||||
|
/// </summary>
|
||||||
|
int ZIndex { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Opacity of filling
|
||||||
|
/// </summary>
|
||||||
|
double Opacity { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
using StructureHelperCommon.Services.ColorServices;
|
||||||
|
using System;
|
||||||
|
using System.Windows.Media;
|
||||||
|
|
||||||
|
namespace StructureHelperCommon.Models.VisualProperties
|
||||||
|
{
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public class PrimitiveVisualProperty : IPrimitiveVisualProperty
|
||||||
|
{
|
||||||
|
private double opacity = 0;
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public Guid Id { get; }
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public bool IsVisible { get; set; } = true;
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public Color Color { get; set; } = ColorProcessor.GetRandomColor();
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public int ZIndex { get; set; } = 0;
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public double Opacity
|
||||||
|
{
|
||||||
|
get => opacity;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value < 0)
|
||||||
|
{
|
||||||
|
opacity = 1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (value > 1)
|
||||||
|
{
|
||||||
|
opacity = 1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
opacity = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public PrimitiveVisualProperty(Guid id)
|
||||||
|
{
|
||||||
|
Id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Clone()
|
||||||
|
{
|
||||||
|
var logic = new PrimitiveVisualPropertyUpdateStrategy();
|
||||||
|
PrimitiveVisualProperty newItem = new(Guid.NewGuid());
|
||||||
|
logic.Update(newItem, this);
|
||||||
|
return newItem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||||
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
|
using StructureHelperCommon.Services;
|
||||||
|
|
||||||
|
namespace StructureHelperCommon.Models.VisualProperties
|
||||||
|
{
|
||||||
|
public class PrimitiveVisualPropertyUpdateStrategy : IUpdateStrategy<IPrimitiveVisualProperty>
|
||||||
|
{
|
||||||
|
public void Update(IPrimitiveVisualProperty targetObject, IPrimitiveVisualProperty sourceObject)
|
||||||
|
{
|
||||||
|
CheckObject.IsNull(sourceObject, ErrorStrings.SourceObject);
|
||||||
|
CheckObject.IsNull(targetObject, ErrorStrings.TargetObject);
|
||||||
|
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||||
|
targetObject.IsVisible = sourceObject.IsVisible;
|
||||||
|
targetObject.Color = sourceObject.Color;
|
||||||
|
targetObject.Opacity = sourceObject.Opacity;
|
||||||
|
targetObject.ZIndex = sourceObject.ZIndex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
namespace StructureHelperLogics.Models.BeamShears
|
||||||
|
{
|
||||||
|
public interface IHasStartEndCoordinate
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Coordinate of start of zone of stirrups
|
||||||
|
/// </summary>
|
||||||
|
double StartCoordinate { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Coordinate of end of zone of stirrups
|
||||||
|
/// </summary>
|
||||||
|
double EndCoordinate { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
|
|
||||||
//Copyright (c) 2025 Redikultsev Evgeny, Ekaterinburg, Russia
|
//Copyright (c) 2025 Redikultsev Evgeny, Ekaterinburg, Russia
|
||||||
//All rights reserved.
|
//All rights reserved.
|
||||||
@@ -8,12 +9,13 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Implement properties of stirrups
|
/// Implement properties of stirrups
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IStirrup : ISaveable, ICloneable
|
public interface IStirrup : ISaveable, ICloneable, IHasVisualProperty
|
||||||
{
|
{
|
||||||
string? Name { get; set; }
|
string? Name { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Distance from axis of comressed rebar to edge of comressed zone, m
|
/// Distance from axis of comressed rebar to edge of comressed zone, m
|
||||||
/// </summary>
|
/// </summary>
|
||||||
double CompressedGap { get; set; }
|
double CompressedGap { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Implement logic for calculation of bearing capacity of stirrups by value of their density
|
/// Implement logic for calculation of bearing capacity of stirrups by value of their density
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IStirrupByDensity : IStirrup
|
public interface IStirrupByDensity : IStirrup, IHasStartEndCoordinate
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Direct density of stirrups, N/m
|
/// Direct density of stirrups, N/m
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Implement properties for uniformly distributed stirrups
|
/// Implement properties for uniformly distributed stirrups
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IStirrupByRebar : IStirrup
|
public interface IStirrupByRebar : IStirrup, IHasStartEndCoordinate
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Material of stirrups
|
/// Material of stirrups
|
||||||
|
|||||||
@@ -37,16 +37,31 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (Entity.StirrupDensity < minDensity)
|
CheckEntity();
|
||||||
{
|
|
||||||
result = false;
|
|
||||||
TraceMessage($"\nStirrup {Entity.Name} density d = {Entity.StirrupDensity} must not be less than dmin = {minDensity}");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void CheckEntity()
|
||||||
|
{
|
||||||
|
if (Entity.StirrupDensity < minDensity)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
TraceMessage($"\nStirrup {Entity.Name} density d = {Entity.StirrupDensity} must not be less than dmin = {minDensity}");
|
||||||
|
}
|
||||||
|
if (Entity.StartCoordinate < 0)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
TraceMessage($"\nStirrup {Entity.Name} start coordinate must not be less than zero, but was {Entity.StartCoordinate}");
|
||||||
|
}
|
||||||
|
if (Entity.EndCoordinate <= Entity.StartCoordinate)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
TraceMessage($"\nStirrup {Entity.Name} start coordinate must be less than end coordinte, but was Xstart = {Entity.StartCoordinate}(m), Xend = {Entity.EndCoordinate}(m)");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void TraceMessage(string errorString)
|
private void TraceMessage(string errorString)
|
||||||
{
|
{
|
||||||
checkResult += errorString;
|
checkResult += errorString;
|
||||||
|
|||||||
@@ -41,34 +41,50 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (Entity.Diameter < minDiameter)
|
CheckEntity();
|
||||||
{
|
|
||||||
result = false;
|
|
||||||
TraceMessage($"\nStirrup {Entity.Name} diameter d = {Entity.Diameter} must not be less than dmin = {minDiameter}");
|
|
||||||
}
|
|
||||||
if (Entity.Diameter > maxDiameter)
|
|
||||||
{
|
|
||||||
result = false;
|
|
||||||
TraceMessage($"\nStirrup {Entity.Name} diameter d = {Entity.Diameter} must be less or equal than dmax = {maxDiameter}");
|
|
||||||
}
|
|
||||||
if (Entity.Spacing < minSpacing)
|
|
||||||
{
|
|
||||||
result = false;
|
|
||||||
TraceMessage($"\nStirrup {Entity.Name} spacing s = {Entity.Spacing} must not be less than smin = {minSpacing}");
|
|
||||||
}
|
|
||||||
if (Entity.Spacing > maxSpacing)
|
|
||||||
{
|
|
||||||
result = false;
|
|
||||||
TraceMessage($"\nStirrup {Entity.Name} spacing s = {Entity.Spacing} must be less or equal than smax = {maxSpacing}");
|
|
||||||
}
|
|
||||||
if (Entity.LegCount < minLegCount)
|
|
||||||
{
|
|
||||||
result = false;
|
|
||||||
TraceMessage($"\nStirrup {Entity.Name} leg count n = {Entity.LegCount} must not be less than nmin = {minLegCount}");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void CheckEntity()
|
||||||
|
{
|
||||||
|
if (Entity.Diameter < minDiameter)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
TraceMessage($"\nStirrup {Entity.Name} diameter d = {Entity.Diameter} must not be less than dmin = {minDiameter}");
|
||||||
|
}
|
||||||
|
if (Entity.Diameter > maxDiameter)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
TraceMessage($"\nStirrup {Entity.Name} diameter d = {Entity.Diameter} must be less or equal than dmax = {maxDiameter}");
|
||||||
|
}
|
||||||
|
if (Entity.Spacing < minSpacing)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
TraceMessage($"\nStirrup {Entity.Name} spacing s = {Entity.Spacing} must not be less than smin = {minSpacing}");
|
||||||
|
}
|
||||||
|
if (Entity.Spacing > maxSpacing)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
TraceMessage($"\nStirrup {Entity.Name} spacing s = {Entity.Spacing} must be less or equal than smax = {maxSpacing}");
|
||||||
|
}
|
||||||
|
if (Entity.LegCount < minLegCount)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
TraceMessage($"\nStirrup {Entity.Name} leg count n = {Entity.LegCount} must not be less than nmin = {minLegCount}");
|
||||||
|
}
|
||||||
|
if (Entity.StartCoordinate < 0)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
TraceMessage($"\nStirrup {Entity.Name} start coordinate must not be less than zero, but was {Entity.StartCoordinate}");
|
||||||
|
}
|
||||||
|
if (Entity.EndCoordinate <= Entity.StartCoordinate)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
TraceMessage($"\nStirrup {Entity.Name} start coordinate must be less than end coordinte, but was Xstart = {Entity.StartCoordinate}(m), Xend = {Entity.EndCoordinate}(m)");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void TraceMessage(string errorString)
|
private void TraceMessage(string errorString)
|
||||||
{
|
{
|
||||||
checkResult += errorString;
|
checkResult += errorString;
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
using StructureHelperCommon.Models;
|
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||||
|
using StructureHelperCommon.Models;
|
||||||
using StructureHelperCommon.Models.Loggers;
|
using StructureHelperCommon.Models.Loggers;
|
||||||
|
using StructureHelperCommon.Models.Shapes;
|
||||||
|
|
||||||
namespace StructureHelperLogics.Models.BeamShears
|
namespace StructureHelperLogics.Models.BeamShears
|
||||||
{
|
{
|
||||||
@@ -91,7 +93,18 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
private void GetAreas()
|
private void GetAreas()
|
||||||
{
|
{
|
||||||
reducingFactor = reinforcementModulus / concreteModulus;
|
reducingFactor = reinforcementModulus / concreteModulus;
|
||||||
concreteArea = inclinedSection.WebWidth * inclinedSection.FullDepth;
|
if (inclinedSection.BeamShearSection.Shape is IRectangleShape)
|
||||||
|
{
|
||||||
|
concreteArea = inclinedSection.WebWidth * inclinedSection.FullDepth;
|
||||||
|
}
|
||||||
|
else if (inclinedSection.BeamShearSection.Shape is ICircleShape)
|
||||||
|
{
|
||||||
|
concreteArea = inclinedSection.WebWidth * inclinedSection.FullDepth * 0.785398; // * 0.785398 = PI/4
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(inclinedSection.BeamShearSection.Shape));
|
||||||
|
}
|
||||||
TraceLogger?.AddMessage($"Concrete area Ac = {concreteArea}(m^2)");
|
TraceLogger?.AddMessage($"Concrete area Ac = {concreteArea}(m^2)");
|
||||||
reinforcementArea = inclinedSection.BeamShearSection.ReinforcementArea;
|
reinforcementArea = inclinedSection.BeamShearSection.ReinforcementArea;
|
||||||
TraceLogger?.AddMessage($"Reinforcement area As = {reinforcementArea}(m^2)");
|
TraceLogger?.AddMessage($"Reinforcement area As = {reinforcementArea}(m^2)");
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
using StructureHelperCommon.Services;
|
using StructureHelperCommon.Services;
|
||||||
|
|
||||||
namespace StructureHelperLogics.Models.BeamShears
|
namespace StructureHelperLogics.Models.BeamShears
|
||||||
{
|
{
|
||||||
public class StirrupBaseUpdateStrategy : IUpdateStrategy<IStirrup>
|
public class StirrupBaseUpdateStrategy : IParentUpdateStrategy<IStirrup>
|
||||||
{
|
{
|
||||||
|
private IUpdateStrategy<IPrimitiveVisualProperty> visualUpdateStrategy;
|
||||||
|
public bool UpdateChildren { get; set; } = true;
|
||||||
|
|
||||||
public void Update(IStirrup targetObject, IStirrup sourceObject)
|
public void Update(IStirrup targetObject, IStirrup sourceObject)
|
||||||
{
|
{
|
||||||
CheckObject.IsNull(targetObject);
|
CheckObject.IsNull(targetObject);
|
||||||
@@ -12,6 +16,18 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||||
targetObject.Name = sourceObject.Name;
|
targetObject.Name = sourceObject.Name;
|
||||||
targetObject.CompressedGap = sourceObject.CompressedGap;
|
targetObject.CompressedGap = sourceObject.CompressedGap;
|
||||||
|
if (UpdateChildren == true)
|
||||||
|
{
|
||||||
|
UpdateTargetChildren(targetObject, sourceObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateTargetChildren(IStirrup targetObject, IStirrup sourceObject)
|
||||||
|
{
|
||||||
|
CheckObject.IsNull(sourceObject.VisualProperty);
|
||||||
|
CheckObject.IsNull(targetObject.VisualProperty);
|
||||||
|
visualUpdateStrategy ??= new PrimitiveVisualPropertyUpdateStrategy();
|
||||||
|
visualUpdateStrategy.Update(targetObject.VisualProperty, sourceObject.VisualProperty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,10 +38,14 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
TraceLogger?.AddMessage("Calculation has been started", TraceLogStatuses.Debug);
|
TraceLogger?.AddMessage("Calculation has been started", TraceLogStatuses.Debug);
|
||||||
double crackLength = inclinedSection.EndCoord - inclinedSection.StartCoord;
|
double crackLength = inclinedSection.EndCoord - inclinedSection.StartCoord;
|
||||||
TraceLogger?.AddMessage($"Length of crack = {inclinedSection.EndCoord} - {inclinedSection.StartCoord} = {crackLength}(m)");
|
TraceLogger?.AddMessage($"Length of crack = {inclinedSection.EndCoord} - {inclinedSection.StartCoord} = {crackLength}(m)");
|
||||||
|
double crackEndCoord = Math.Min(stirrupByDensity.EndCoordinate, inclinedSection.EndCoord);
|
||||||
|
double crackStartCoord = Math.Max(stirrupByDensity.StartCoordinate, inclinedSection.StartCoord);
|
||||||
|
double crackLengthViaStirrup = crackEndCoord - crackStartCoord;
|
||||||
|
TraceLogger?.AddMessage($"Length of crack via stirrup = {crackEndCoord} - {crackStartCoord} = {crackLengthViaStirrup}(m)");
|
||||||
double maxCrackLength = stirrupEffectiveness.MaxCrackLengthRatio * inclinedSection.EffectiveDepth;
|
double maxCrackLength = stirrupEffectiveness.MaxCrackLengthRatio * inclinedSection.EffectiveDepth;
|
||||||
TraceLogger?.AddMessage($"Max length of crack = {stirrupEffectiveness.MaxCrackLengthRatio} * {inclinedSection.EffectiveDepth} = {maxCrackLength}(m)");
|
TraceLogger?.AddMessage($"Max length of crack = {stirrupEffectiveness.MaxCrackLengthRatio} * {inclinedSection.EffectiveDepth} = {maxCrackLength}(m)");
|
||||||
double finalCrackLength = Math.Min(crackLength, maxCrackLength);
|
double finalCrackLength = Math.Min(crackLengthViaStirrup, maxCrackLength);
|
||||||
TraceLogger?.AddMessage($"Length of crack = Min({crackLength}, {maxCrackLength}) = {finalCrackLength}(m)");
|
TraceLogger?.AddMessage($"Length of crack = Min({crackLengthViaStirrup}, {maxCrackLength}) = {finalCrackLength}(m)");
|
||||||
double finalDensity = stirrupEffectiveness.StirrupShapeFactor * stirrupEffectiveness.StirrupPlacementFactor * stirrupByDensity.StirrupDensity;
|
double finalDensity = stirrupEffectiveness.StirrupShapeFactor * stirrupEffectiveness.StirrupPlacementFactor * stirrupByDensity.StirrupDensity;
|
||||||
TraceLogger?.AddMessage($"Stirrups design density qsw = {stirrupEffectiveness.StirrupShapeFactor} * {stirrupEffectiveness.StirrupPlacementFactor} * {stirrupByDensity.StirrupDensity} = {finalDensity}(N/m)");
|
TraceLogger?.AddMessage($"Stirrups design density qsw = {stirrupEffectiveness.StirrupShapeFactor} * {stirrupEffectiveness.StirrupPlacementFactor} * {stirrupByDensity.StirrupDensity} = {finalDensity}(N/m)");
|
||||||
double concreteDensity = inclinedSection.WebWidth * inclinedSection.ConcreteTensionStrength;
|
double concreteDensity = inclinedSection.WebWidth * inclinedSection.ConcreteTensionStrength;
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
baseUpdateStrategy ??= new StirrupBaseUpdateStrategy();
|
baseUpdateStrategy ??= new StirrupBaseUpdateStrategy();
|
||||||
baseUpdateStrategy.Update(targetObject, sourceObject);
|
baseUpdateStrategy.Update(targetObject, sourceObject);
|
||||||
targetObject.StirrupDensity = sourceObject.StirrupDensity;
|
targetObject.StirrupDensity = sourceObject.StirrupDensity;
|
||||||
|
targetObject.StartCoordinate = sourceObject.StartCoordinate;
|
||||||
|
targetObject.EndCoordinate = sourceObject.EndCoordinate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
StirrupByDensity stirrupByDensity = new(Guid.NewGuid());
|
StirrupByDensity stirrupByDensity = new(Guid.NewGuid());
|
||||||
updateStrategy.Update(stirrupByDensity, source);
|
updateStrategy.Update(stirrupByDensity, source);
|
||||||
stirrupByDensity.StirrupDensity = GetStirrupDensity(source);
|
stirrupByDensity.StirrupDensity = GetStirrupDensity(source);
|
||||||
|
stirrupByDensity.StartCoordinate = source.StartCoordinate;
|
||||||
|
stirrupByDensity.EndCoordinate = source.EndCoordinate;
|
||||||
return stirrupByDensity;
|
return stirrupByDensity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
targetObject.LegCount = sourceObject.LegCount;
|
targetObject.LegCount = sourceObject.LegCount;
|
||||||
targetObject.Spacing = sourceObject.Spacing;
|
targetObject.Spacing = sourceObject.Spacing;
|
||||||
targetObject.IsSpiral = sourceObject.IsSpiral;
|
targetObject.IsSpiral = sourceObject.IsSpiral;
|
||||||
|
targetObject.StartCoordinate = sourceObject.StartCoordinate;
|
||||||
|
targetObject.EndCoordinate = sourceObject.EndCoordinate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
|
|
||||||
public double GetShearStrength()
|
public double GetShearStrength()
|
||||||
{
|
{
|
||||||
double parameter = GetInclinedCrackRatio();
|
double parameter = GetCrackLengthRatio();
|
||||||
BeamShearSectionLogicInputData newInputData = GetNewInputDataByCrackLengthRatio(parameter);
|
BeamShearSectionLogicInputData newInputData = GetNewInputDataByCrackLengthRatio(parameter);
|
||||||
TraceLogger?.AddMessage($"New value of dangerous inclinated crack has been obtained: start point Xstart = {newInputData.InclinedSection.StartCoord}(m), end point Xend = {newInputData.InclinedSection.EndCoord}(m)");
|
TraceLogger?.AddMessage($"New value of dangerous inclinated crack has been obtained: start point Xstart = {newInputData.InclinedSection.StartCoord}(m), end point Xend = {newInputData.InclinedSection.EndCoord}(m)");
|
||||||
stirrupLogic = new(newInputData, TraceLogger);
|
stirrupLogic = new(newInputData, TraceLogger);
|
||||||
@@ -31,7 +31,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
/// <exception cref="StructureHelperException"></exception>
|
/// <exception cref="StructureHelperException"></exception>
|
||||||
private double GetInclinedCrackRatio()
|
private double GetCrackLengthRatio()
|
||||||
{
|
{
|
||||||
var parameterCalculator = new FindParameterCalculator();
|
var parameterCalculator = new FindParameterCalculator();
|
||||||
parameterCalculator.InputData.Predicate = GetPredicate;
|
parameterCalculator.InputData.Predicate = GetPredicate;
|
||||||
@@ -48,6 +48,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
{
|
{
|
||||||
crackLengthRatio += 0.0001;
|
crackLengthRatio += 0.0001;
|
||||||
}
|
}
|
||||||
|
crackLengthRatio = Math.Max(crackLengthRatio, 0);
|
||||||
return crackLengthRatio;
|
return crackLengthRatio;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -16,7 +16,10 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
CheckObject.IsNull(sourceObject, ErrorStrings.SourceObject);
|
CheckObject.IsNull(sourceObject, ErrorStrings.SourceObject);
|
||||||
CheckObject.IsNull(targetObject, ErrorStrings.TargetObject);
|
CheckObject.IsNull(targetObject, ErrorStrings.TargetObject);
|
||||||
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||||
baseUpdateStrategy ??= new StirrupBaseUpdateStrategy();
|
baseUpdateStrategy ??= new StirrupBaseUpdateStrategy()
|
||||||
|
{
|
||||||
|
UpdateChildren = this.UpdateChildren
|
||||||
|
};
|
||||||
baseUpdateStrategy.Update(targetObject, sourceObject);
|
baseUpdateStrategy.Update(targetObject, sourceObject);
|
||||||
if (UpdateChildren == true)
|
if (UpdateChildren == true)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
|
using System.Windows.Media;
|
||||||
|
|
||||||
|
|
||||||
namespace StructureHelperLogics.Models.BeamShears
|
namespace StructureHelperLogics.Models.BeamShears
|
||||||
{
|
{
|
||||||
@@ -9,10 +12,17 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
public string Name { get; set; } = string.Empty;
|
public string Name { get; set; } = string.Empty;
|
||||||
public double StirrupDensity { get; set; }
|
public double StirrupDensity { get; set; }
|
||||||
public double CompressedGap { get; set; }
|
public double CompressedGap { get; set; }
|
||||||
|
public IPrimitiveVisualProperty VisualProperty { get; set; }
|
||||||
|
public double StartCoordinate { get; set; } = 0;
|
||||||
|
public double EndCoordinate { get; set; } = 100;
|
||||||
|
|
||||||
public StirrupByDensity(Guid id)
|
public StirrupByDensity(Guid id)
|
||||||
{
|
{
|
||||||
Id = id;
|
Id = id;
|
||||||
|
VisualProperty = new PrimitiveVisualProperty(Guid.NewGuid())
|
||||||
|
{
|
||||||
|
Color = (Color)ColorConverter.ConvertFromString("Black")
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public object Clone()
|
public object Clone()
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||||
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
using StructureHelperLogics.Models.Materials;
|
using StructureHelperLogics.Models.Materials;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Media;
|
||||||
|
|
||||||
namespace StructureHelperLogics.Models.BeamShears
|
namespace StructureHelperLogics.Models.BeamShears
|
||||||
{
|
{
|
||||||
@@ -64,10 +66,15 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
public IRebarSection RebarSection { get; set; } = new RebarSection(Guid.NewGuid());
|
public IRebarSection RebarSection { get; set; } = new RebarSection(Guid.NewGuid());
|
||||||
/// <inheritdoc>
|
/// <inheritdoc>
|
||||||
public double LegCount { get; set; } = 2;
|
public double LegCount { get; set; } = 2;
|
||||||
|
public IPrimitiveVisualProperty VisualProperty { get; set; }
|
||||||
|
|
||||||
public StirrupByInclinedRebar(Guid id)
|
public StirrupByInclinedRebar(Guid id)
|
||||||
{
|
{
|
||||||
Id = id;
|
Id = id;
|
||||||
|
VisualProperty = new PrimitiveVisualProperty(Guid.NewGuid())
|
||||||
|
{
|
||||||
|
Color = (Color)ColorConverter.ConvertFromString("Black")
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public object Clone()
|
public object Clone()
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
using StructureHelperLogics.Models.Materials;
|
using StructureHelperLogics.Models.Materials;
|
||||||
|
using System.Windows.Media;
|
||||||
|
|
||||||
namespace StructureHelperLogics.Models.BeamShears
|
namespace StructureHelperLogics.Models.BeamShears
|
||||||
{
|
{
|
||||||
@@ -62,11 +64,18 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
public double CompressedGap { get; set; } = 0;
|
public double CompressedGap { get; set; } = 0;
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public bool IsSpiral { get; set; } = false;
|
public bool IsSpiral { get; set; } = false;
|
||||||
|
public double StartCoordinate { get; set; } = 0;
|
||||||
|
public double EndCoordinate { get; set; } = 100;
|
||||||
|
public IPrimitiveVisualProperty VisualProperty { get; set; }
|
||||||
|
|
||||||
public StirrupByRebar(Guid id)
|
public StirrupByRebar(Guid id)
|
||||||
{
|
{
|
||||||
Id = id;
|
Id = id;
|
||||||
Material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Reinforcement400).HelperMaterial as IReinforcementLibMaterial;
|
Material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Reinforcement400).HelperMaterial as IReinforcementLibMaterial;
|
||||||
|
VisualProperty = new PrimitiveVisualProperty(Guid.NewGuid())
|
||||||
|
{
|
||||||
|
Color = (Color)ColorConverter.ConvertFromString("Black")
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public object Clone()
|
public object Clone()
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
using System;
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
using System.Collections.Generic;
|
using System.Windows.Media;
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace StructureHelperLogics.Models.BeamShears
|
namespace StructureHelperLogics.Models.BeamShears
|
||||||
{
|
{
|
||||||
@@ -13,10 +9,15 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
public string Name { get; set; } = string.Empty;
|
public string Name { get; set; } = string.Empty;
|
||||||
public List<IStirrup> Stirrups { get; } = new();
|
public List<IStirrup> Stirrups { get; } = new();
|
||||||
public double CompressedGap { get; set; }
|
public double CompressedGap { get; set; }
|
||||||
|
public IPrimitiveVisualProperty VisualProperty { get; set; }
|
||||||
|
|
||||||
public StirrupGroup(Guid id)
|
public StirrupGroup(Guid id)
|
||||||
{
|
{
|
||||||
Id = id;
|
Id = id;
|
||||||
|
VisualProperty = new PrimitiveVisualProperty(Guid.NewGuid())
|
||||||
|
{
|
||||||
|
Color = (Color)ColorConverter.ConvertFromString("Black")
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public object Clone()
|
public object Clone()
|
||||||
|
|||||||
@@ -1,31 +1,14 @@
|
|||||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
using System;
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
|
||||||
namespace StructureHelperLogics.NdmCalculations.Primitives
|
namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||||
{
|
{
|
||||||
public interface IVisualProperty : ISaveable
|
public interface IVisualProperty : IPrimitiveVisualProperty
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Flag of visibility
|
|
||||||
/// </summary>
|
|
||||||
bool IsVisible { get; set; }
|
|
||||||
Color Color { get; set; }
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Flag of assigning of color from material or from primitive's settings
|
/// Flag of assigning of color from material or from primitive's settings
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool SetMaterialColor { get; set; }
|
bool SetMaterialColor { get; set; }
|
||||||
/// <summary>
|
|
||||||
/// Index by z-coordinate
|
|
||||||
/// </summary>
|
|
||||||
int ZIndex { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Opacity of filling
|
|
||||||
/// </summary>
|
|
||||||
double Opacity { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,5 +41,10 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public object Clone()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user