GetDownDirection() public méthode

Get the down direction, which stand for the top hook direction
public GetDownDirection ( ) : Autodesk.Revit.DB.XYZ
Résultat Autodesk.Revit.DB.XYZ
        /// <summary>
        /// Get the hook orient of the top rebar
        /// </summary>
        /// <param name="geomInfo">the rebar geometry support information</param>
        /// <param name="location">the location of top rebar</param>
        /// <returns>the hook orient of the top hook</returns>
        private RebarHookOrientation GetTopHookOrient(RebarGeometry geomInfo, TopRebarLocation location)
        {
            // Top center rebar doesn't need hook.
            if (TopRebarLocation.Center == location)
            {
                throw new Exception("Center top rebar doesn't have any hook.");
            }

            // Get the hook direction, rebar normal and rebar line
            Autodesk.Revit.DB.XYZ hookVec = m_geometry.GetDownDirection();
            Autodesk.Revit.DB.XYZ normal  = geomInfo.Normal;
            Line rebarLine = geomInfo.Curves[0] as Line;

            // get the top start hook orient
            if (TopRebarLocation.Start == location)
            {
                Autodesk.Revit.DB.XYZ curveVec = GeomUtil.SubXYZ(rebarLine.get_EndPoint(1), rebarLine.get_EndPoint(0));
                return(GeomUtil.GetHookOrient(curveVec, normal, hookVec));
            }
            else // get the top end hook orient
            {
                Autodesk.Revit.DB.XYZ curveVec = GeomUtil.SubXYZ(rebarLine.get_EndPoint(0), rebarLine.get_EndPoint(1));
                return(GeomUtil.GetHookOrient(curveVec, normal, hookVec));
            }
        }