Beispiel #1
0
        /// <summary>
        /// Creates a new StairsRectangleLandingConfiguration.
        /// </summary>
        /// <param name="stairsRunBoundary1">The end curve of the lower stair run.</param>
        /// <param name="stairsRunBoundary2">The start curve of the higher stair run.</param>
        /// <param name="runDirection">A vector representing the direction of the lower stair run.</param>
        /// <param name="elevation">The elevation of the landing.</param>
        /// <param name="width">The width of the landing.</param>
        public StairsRectangleLandingComponent(Line stairsRunBoundary1, Line stairsRunBoundary2, XYZ runDirection, double elevation, double width)
        {
            // offset to base elevation
            m_stairsRunBoundary1 = LandingComponentUtils.ProjectCurveToElevation(stairsRunBoundary1, elevation) as Line;
            m_stairsRunBoundary2 = LandingComponentUtils.ProjectCurveToElevation(stairsRunBoundary2, elevation) as Line;

            m_runDirection = runDirection;
            m_width        = width;
            m_elevation    = elevation;
        }
Beispiel #2
0
        /// <summary>
        /// Implements the interface method.
        /// </summary>
        public Autodesk.Revit.DB.CurveLoop GetLandingBoundary()
        {
            // TODO : What if not collinear
            Line boundaryLine = LandingComponentUtils.FindLongestEndpointConnection(m_stairsRunBoundary1, m_stairsRunBoundary2);

            // offset by 1/2 of width
            Curve centerCurve = boundaryLine.CreateTransformed(Transform.CreateTranslation(m_runDirection * (m_width / 2.0)));

            // Create by Thicken
            CurveLoop curveLoop = CurveLoop.CreateViaThicken(centerCurve, m_width, XYZ.BasisZ);

            return(curveLoop);
        }