Exemplo n.º 1
0
        /// <summary>
        /// Add profile to the loft form
        /// </summary>
        /// <param name="form">The loft form to be added edge</param>
        /// <returns>Index of the added profile</returns>
        private int AddProfile(Form form)
        {
            // Get a connecting edge from the form
            Autodesk.Revit.DB.XYZ startOfTop    = new Autodesk.Revit.DB.XYZ(-1 * m_topLength / 2, -1 * m_topWidth / 2, m_topHeight);
            Autodesk.Revit.DB.XYZ startOfBottom = new Autodesk.Revit.DB.XYZ(-1 * m_bottomLength / 2, -1 * m_bottomWidth / 2, m_bottomHeight);
            Edge connectingEdge = GetEdgeByEndPoints(form, startOfTop, startOfBottom);

            // Add an profile with specific parameters
            double param = 0.5;

            return(form.AddProfile(connectingEdge.Reference, param));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Add profile to the loft form
        /// </summary>
        /// <param name="form">The loft form to be added edge</param>
        /// <returns>Index of the added profile</returns>
        private int AddProfile(Form form)
        {
            // Get a connecting edge from the form
             Autodesk.Revit.DB.XYZ startOfTop = new Autodesk.Revit.DB.XYZ (-1 * m_topLength / 2, -1 * m_topWidth / 2, m_topHeight);
             Autodesk.Revit.DB.XYZ startOfBottom = new Autodesk.Revit.DB.XYZ (-1 * m_bottomLength / 2, -1 * m_bottomWidth / 2, m_bottomHeight);
             Edge connectingEdge = GetEdgeByEndPoints(form, startOfTop, startOfBottom);

             // Add an profile with specific parameters
             double param = 0.5;
             return form.AddProfile(connectingEdge.Reference, param);
        }