Example #1
0
        /// <summary>
        /// Create a bounding box and display its edges.
        /// </summary>
        /// <param name="width"></param>
        /// <param name="depth"></param>
        /// <param name="height"></param>
        /// <returns></returns>
        public static List <Autodesk.DesignScript.Geometry.Curve> PrintingBoundaries(double width = 248.92, double depth = 233.68, double height = 162.56)
        {
            // ZMorph 2.0 dimensions
            // in: { 9.8,9.2,6.4}
            // mm: {248.92,487.68,162.56}

            List <Autodesk.DesignScript.Geometry.Curve> curves = new List <Autodesk.DesignScript.Geometry.Curve>();

            Autodesk.DesignScript.Geometry.BoundingBox bb = Autodesk.DesignScript.Geometry.BoundingBox.ByCorners(
                Autodesk.DesignScript.Geometry.Point.ByCoordinates(0, 0, 0),
                Autodesk.DesignScript.Geometry.Point.ByCoordinates(width, depth, height));
            Edge[] edges = bb.ToPolySurface().Edges;
            foreach (Edge edge in edges)
            {
                curves.Add(edge.CurveGeometry);
            }
            return(curves);
        }