Surrounding property was added
This commit is contained in:
@@ -17,6 +17,7 @@ namespace StructureHelperLogics.Models.Templates.CrossSections.RCs
|
||||
IRectangleBeamTemplate template;
|
||||
IHeadMaterial concrete => HeadMaterials.ToList()[0];
|
||||
IHeadMaterial reinforcement => HeadMaterials.ToList()[1];
|
||||
RectanglePrimitive concreteBlock;
|
||||
|
||||
RectangleShape rect => template.Shape as RectangleShape;
|
||||
double width => rect.Width;
|
||||
@@ -47,8 +48,8 @@ namespace StructureHelperLogics.Models.Templates.CrossSections.RCs
|
||||
private IEnumerable<INdmPrimitive> GetConcretePrimitives()
|
||||
{
|
||||
var primitives = new List<INdmPrimitive>();
|
||||
var rectangle = new RectanglePrimitive(concrete) { Width = width, Height = height, Name = "Concrete block" };
|
||||
primitives.Add(rectangle);
|
||||
concreteBlock = new RectanglePrimitive(concrete) { Width = width, Height = height, Name = "Concrete block" };
|
||||
primitives.Add(concreteBlock);
|
||||
return primitives;
|
||||
}
|
||||
|
||||
@@ -58,13 +59,13 @@ namespace StructureHelperLogics.Models.Templates.CrossSections.RCs
|
||||
double[] ys = new double[] { -height / 2 + gap, height / 2 - gap };
|
||||
|
||||
List<INdmPrimitive> primitives = new List<INdmPrimitive>();
|
||||
var point = new PointPrimitive(reinforcement) { CenterX = xs[0], CenterY = ys[0], Area = area1, Name = "Left bottom point" };
|
||||
var point = new ReinforcementPrimitive() { CenterX = xs[0], CenterY = ys[0], Area = area1, Name = "Left bottom point", HeadMaterial = reinforcement, SurroundingPrimitive=concreteBlock };
|
||||
primitives.Add(point);
|
||||
point = new PointPrimitive(reinforcement) { CenterX = xs[1], CenterY = ys[0], Area = area1, Name = "Right bottom point" };
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[1], CenterY = ys[0], Area = area1, Name = "Right bottom point", HeadMaterial = reinforcement, SurroundingPrimitive = concreteBlock };
|
||||
primitives.Add(point);
|
||||
point = new PointPrimitive(reinforcement) { CenterX = xs[0], CenterY = ys[1], Area = area2, Name = "Left top point" };
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[0], CenterY = ys[1], Area = area2, Name = "Left top point", HeadMaterial = reinforcement, SurroundingPrimitive = concreteBlock };
|
||||
primitives.Add(point);
|
||||
point = new PointPrimitive(reinforcement) { CenterX = xs[1], CenterY = ys[1], Area = area2, Name = "Right top point" };
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[1], CenterY = ys[1], Area = area2, Name = "Right top point", HeadMaterial = reinforcement, SurroundingPrimitive = concreteBlock };
|
||||
primitives.Add(point);
|
||||
return primitives;
|
||||
}
|
||||
@@ -82,9 +83,9 @@ namespace StructureHelperLogics.Models.Templates.CrossSections.RCs
|
||||
double dist = (xs[1] - xs[0]) / count;
|
||||
for (int i = 1; i < count; i++)
|
||||
{
|
||||
point = new PointPrimitive(reinforcement) { CenterX = xs[0] + dist * i, CenterY = ys[0], Area = area1, Name = $"Bottom point {i}" };
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[0] + dist * i, CenterY = ys[0], Area = area1, Name = $"Bottom point {i}", HeadMaterial = reinforcement, SurroundingPrimitive = concreteBlock };
|
||||
primitives.Add(point);
|
||||
point = new PointPrimitive(reinforcement) { CenterX = xs[0] + dist * i, CenterY = ys[1], Area = area2, Name = $"Top point {i}" };
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[0] + dist * i, CenterY = ys[1], Area = area2, Name = $"Top point {i}", HeadMaterial = reinforcement, SurroundingPrimitive = concreteBlock };
|
||||
primitives.Add(point);
|
||||
}
|
||||
}
|
||||
@@ -94,9 +95,9 @@ namespace StructureHelperLogics.Models.Templates.CrossSections.RCs
|
||||
double dist = (ys[1] - ys[0]) / count;
|
||||
for (int i = 1; i < count; i++)
|
||||
{
|
||||
point = new PointPrimitive(reinforcement) { CenterX = xs[0], CenterY = ys[0] + dist * i, Area = area1, Name = $"Left point {i}" };
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[0], CenterY = ys[0] + dist * i, Area = area1, Name = $"Left point {i}", HeadMaterial = reinforcement, SurroundingPrimitive = concreteBlock };
|
||||
primitives.Add(point);
|
||||
point = new PointPrimitive(reinforcement) { CenterX = xs[1], CenterY = ys[0] + dist * i, Area = area1, Name = $"Right point {i}" };
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[1], CenterY = ys[0] + dist * i, Area = area1, Name = $"Right point {i}", HeadMaterial = reinforcement, SurroundingPrimitive = concreteBlock };
|
||||
primitives.Add(point);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user