public static List <ICurve> ReinforcementLayout(this TransverseReinforcement reinforcement, double cover, List <ICurve> outerProfileEdges, List <ICurve> innerProfileEdges, double length, TransformMatrix transformation) { List <ICurve> rebarLines = new List <ICurve>(); List <ICurve> stirrupOutline = reinforcement.ReinforcementLayout(cover, outerProfileEdges, innerProfileEdges); Vector dir = Vector.ZAxis.Transform(transformation); double stirrupRange = (reinforcement.EndLocation - reinforcement.StartLocation) * length - (2 * cover + reinforcement.Diameter); int count; double spacing = reinforcement.Spacing; if (reinforcement.AdjustSpacingToFit) { count = (int)Math.Ceiling(stirrupRange / reinforcement.Spacing); spacing = stirrupRange / count; } else { count = (int)Math.Floor(stirrupRange / reinforcement.Spacing); } if (stirrupOutline.Count != 0) { for (int k = 0; k < stirrupOutline.Count; k++) { rebarLines.Add(stirrupOutline[k].ITransform(transformation).ITranslate(dir * (reinforcement.StartLocation * length + cover + reinforcement.Diameter / 2))); for (int i = 0; i < count; i++) { rebarLines.Add(rebarLines.Last().ITranslate(dir * spacing)); } } } return(rebarLines); }
public static List <ICurve> ReinforcementLayout(this TransverseReinforcement reinforcement, double cover, List <ICurve> outerProfileEdges, List <ICurve> innerProfileEdges = null) { if (reinforcement.IsNull() || outerProfileEdges.Any(x => x.IsNull())) { return(null); } return(reinforcement.CenterlineLayout.ICurveLayout(outerProfileEdges, innerProfileEdges, cover)); }
public static List <ICurve> ReinforcementLayout(this TransverseReinforcement 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 <ICurve> rebarLines = new List <ICurve>(); List <ICurve> stirrupOutline = reinforcement.ReinforcementLayout(cover, outerProfileEdges, innerProfileEdges); Vector dir = Vector.ZAxis.Transform(transformation); double stirrupRange = (reinforcement.EndLocation - reinforcement.StartLocation) * length - (2 * cover + reinforcement.Diameter); int count; double spacing = reinforcement.Spacing; if (reinforcement.AdjustSpacingToFit) { count = (int)Math.Ceiling(stirrupRange / reinforcement.Spacing); spacing = stirrupRange / count; } else { count = (int)Math.Floor(stirrupRange / reinforcement.Spacing); } if (stirrupOutline.Count != 0) { for (int k = 0; k < stirrupOutline.Count; k++) { rebarLines.Add(stirrupOutline[k].ITransform(transformation).ITranslate(dir * (reinforcement.StartLocation * length + cover + reinforcement.Diameter / 2))); for (int i = 0; i < count; i++) { rebarLines.Add(rebarLines.Last().ITranslate(dir * spacing)); } } } return(rebarLines); }