Ejemplo n.º 1
0
        public static List <Line> ReinforcementLayout(this LongitudinalReinforcement reinforcement, double cover, List <ICurve> outerProfileEdges, List <ICurve> innerProfileEdges, double length, TransformMatrix transformation)
        {
            if (reinforcement.IsNull() || outerProfileEdges.Any(x => x.IsNull()) || transformation.IsNull())
            {
                return(null);
            }
            else if (length < Tolerance.MicroDistance)
            {
                Reflection.Compute.RecordError("The length provided is less than or equal to the tolerance.");
                return(null);
            }

            List <Point> planLayout = ReinforcementLayout(reinforcement, cover, outerProfileEdges, innerProfileEdges);

            double start = reinforcement.StartLocation * length;
            double end   = reinforcement.EndLocation * length;

            List <Line> rebarLines = new List <Line>();

            foreach (Point pt in planLayout)
            {
                Point startPoint = new Point {
                    X = pt.X, Y = pt.Y, Z = start
                };
                Point endPoint = new Point {
                    X = pt.X, Y = pt.Y, Z = end
                };
                rebarLines.Add((new Line {
                    Start = startPoint, End = endPoint
                }).Transform(transformation));
            }
            return(rebarLines);
        }
Ejemplo n.º 2
0
        public static List <Point> ReinforcementLayout(this LongitudinalReinforcement reinforcement, double cover, List <ICurve> outerProfileEdges, List <ICurve> innerProfileEdges = null)
        {
            if (reinforcement.IsNull() || outerProfileEdges.Any(x => x.IsNull()))
            {
                return(null);
            }

            innerProfileEdges = innerProfileEdges ?? new List <ICurve>();
            double offset = cover + reinforcement.Diameter / 2;

            IEnumerable <ICurve> outerCurves = outerProfileEdges.Select(x => x.IOffset(offset, -x.INormal())).Where(x => x != null).ToList();
            IEnumerable <ICurve> innerCurves = innerProfileEdges.Select(x => x.IOffset(offset, x.INormal())).Where(x => x != null).ToList();

            if (outerCurves.Count() == 0)
            {
                Reflection.Compute.RecordError("Cover is to large for the section curve. Could not generate layout.");
                return(null);
            }
            return(reinforcement.RebarLayout.IPointLayout(outerCurves, innerCurves));
        }
Ejemplo n.º 3
0
 public static double Area(this LongitudinalReinforcement reinforcement)
 {
     return(reinforcement.IsNull() ? 0 : reinforcement.ReinforcingBarCount() *reinforcement.Diameter *reinforcement.Diameter / 4 *Math.PI);
 }
Ejemplo n.º 4
0
 public static int ReinforcingBarCount(this LongitudinalReinforcement reinforcement)
 {
     return(reinforcement.IsNull() ? 0 : LayoutCount(reinforcement.RebarLayout as dynamic));
 }