示例#1
0
 public SingleCurvedGlulam(Curve curve, CrossSectionOrientation orientation, GlulamData data) : base()
 {
     Data        = data.Duplicate();
     Orientation = orientation.Duplicate();
     Centreline  = curve.DuplicateCurve();
     //Centreline.Domain.MakeIncreasing();
 }
示例#2
0
 /// <summary>
 /// Duplicate glulam data.
 /// </summary>
 /// <returns></returns>
 public Glulam Duplicate() => CreateGlulam(Centreline.DuplicateCurve(), Orientation.Duplicate(), Data.Duplicate());
示例#3
0
        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);
        }