protected virtual void CalculateElements() { List <RebarPoint> RebarPoints = new List <RebarPoint>(); double dx = NodeJ.X - NodeI.X; double dy = NodeJ.Y - NodeI.Y; Vector seg = new Vector(dx, dy); int N = NumberOfSubdivisions; int NumberOfRebarPoints = NumberOfSubdivisions + 1; double segDx; double segDy; double PointArea = A_total / NumberOfRebarPoints; Rebar rebar = new Rebar(PointArea, rebarMaterial); if (setBackCornerBars == false) { segDx = dx / N; segDy = dy / N; RebarCoordinate coord1 = new RebarCoordinate(NodeI.X, NodeI.Y); RebarPoints.Add(new RebarPoint(rebar, coord1)); for (int i = 0; i < NumberOfSubdivisions; i++) { RebarCoordinate Pt = new RebarCoordinate(NodeI.X + (i + 1) * segDx, NodeI.Y + (i + 1) * segDy); RebarPoints.Add(new RebarPoint(rebar, Pt)); } } else { segDx = dx / (N + 1.0); segDy = dy / (N + 1.0); for (int i = 0; i < NumberOfSubdivisions; i++) { RebarCoordinate Pt = new RebarCoordinate(NodeI.X + (i + 1) * segDx, NodeI.Y + (i + 1) * segDy); RebarPoints.Add(new RebarPoint(rebar, Pt)); } } this.rebarPoints = RebarPoints; }
protected virtual void CalculateElements() { List<RebarPoint> RebarPoints = new List<RebarPoint>(); double dx = NodeJ.X - NodeI.X; double dy = NodeJ.Y - NodeI.Y; Vector seg = new Vector(dx, dy); int N = NumberOfSubdivisions; int NumberOfRebarPoints = NumberOfSubdivisions + 1; double segDx; double segDy; double PointArea = A_total / NumberOfRebarPoints; Rebar rebar = new Rebar(PointArea, rebarMaterial); if (setBackCornerBars == false) { segDx = dx / N; segDy = dy / N; RebarCoordinate coord1 = new RebarCoordinate(NodeI.X, NodeI.Y); RebarPoints.Add(new RebarPoint(rebar, coord1)); for (int i = 0; i < NumberOfSubdivisions; i++) { RebarCoordinate Pt = new RebarCoordinate(NodeI.X + (i + 1) * segDx, NodeI.Y + (i + 1) * segDy); RebarPoints.Add(new RebarPoint(rebar, Pt)); } } else { segDx = dx / (N +1.0); segDy = dy / (N +1.0); for (int i = 0; i < NumberOfSubdivisions; i++) { RebarCoordinate Pt = new RebarCoordinate(NodeI.X + (i + 1) * segDx, NodeI.Y + (i + 1) * segDy); RebarPoints.Add(new RebarPoint(rebar, Pt)); } } this.rebarPoints = RebarPoints; }
public RebarPoint(IRebar Rebar, RebarCoordinate Coordinate) { this.Rebar = Rebar; this.Coordinate = Coordinate; }