public SingleCurvedGlulam(Curve curve, CrossSectionOrientation orientation, GlulamData data) : base() { Data = data.Duplicate(); Orientation = orientation.Duplicate(); Centreline = curve.DuplicateCurve(); //Centreline.Domain.MakeIncreasing(); }
/// <summary> /// Duplicate glulam data. /// </summary> /// <returns></returns> public Glulam Duplicate() => CreateGlulam(Centreline.DuplicateCurve(), Orientation.Duplicate(), Data.Duplicate());
static public Glulam CreateGlulam(Curve curve, CrossSectionOrientation orientation, GlulamData data) { Glulam glulam; if (curve.IsLinear(Tolerance)) { glulam = new StraightGlulam { Centreline = curve.DuplicateCurve(), Orientation = orientation, Data = data.Duplicate() }; } else if (curve.IsPlanar(Tolerance)) { /* * if (data.NumHeight < 2) * { * data.Lamellae.ResizeArray(data.NumWidth, 2); * data.LamHeight /= 2; * } */ glulam = new SingleCurvedGlulam { Centreline = curve.DuplicateCurve(), Orientation = orientation, Data = data.Duplicate() }; } else { /* * if (data.NumHeight < 2) * { * data.Lamellae.ResizeArray(data.NumWidth, 2); * data.LamHeight /= 2; * } * * if (data.NumWidth < 2) * { * data.Lamellae.ResizeArray(2, data.NumHeight); * data.LamWidth /= 2; * } */ //glulam = new DoubleCurvedGlulam(curve, orientation, data); glulam = new DoubleCurvedGlulam { Centreline = curve.DuplicateCurve(), Orientation = orientation, Data = data.Duplicate() }; } return(glulam); }