public static bool IsNull(this IBarReinforcement reinforcement, string msg = "", [CallerMemberName] string methodName = "Method") { if (reinforcement == null) { ErrorMessage(methodName, "BarReinforcement", msg); return(true); } return(false); }
public static List <ICurve> IReinforcementLayout(this IBarReinforcement 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); } return(new List <ICurve>(ReinforcementLayout(reinforcement as dynamic, cover, outerProfileEdges, innerProfileEdges, length, transformation))); }
public static List <ICurve> IReinforcementLayout(this IBarReinforcement reinforcement, double cover, List <ICurve> outerProfileEdges, List <ICurve> innerProfileEdges, double length, TransformMatrix transformation) { return(new List <ICurve>(ReinforcementLayout(reinforcement as dynamic, cover, outerProfileEdges, innerProfileEdges, length, transformation))); }