GetTopRebar() public méthode

Get the geometry information for top rebar
public GetTopRebar ( TopRebarLocation location ) : RebarGeometry
location TopRebarLocation indicate where top rebar is placed
Résultat RebarGeometry
        /// <summary>
        /// Create the rebar at the top of beam, according to the top rebar location
        /// </summary>
        /// <param name="location">location of rebar which need to be created</param>
        /// <returns>the created rebar, return null if the creation is unsuccessful</returns>
        private Rebar FillTopBar(TopRebarLocation location)
        {
            //get the geometry information of the rebar
            RebarGeometry geomInfo = m_geometry.GetTopRebar(location);

            RebarHookType        startHookType = null;                       //the start hook type of the rebar
            RebarHookType        endHookType   = null;                       // the end hook type of the rebar
            RebarBarType         rebarType     = null;                       // the rebar type
            RebarHookOrientation startOrient   = RebarHookOrientation.Right; // the start hook orient
            RebarHookOrientation endOrient     = RebarHookOrientation.Left;  // the end hook orient

            // decide the rebar type, hook type and hook orient according to location
            switch (location)
            {
            case TopRebarLocation.Start:
                startHookType = m_topHookType;                        // start hook type
                rebarType     = m_topEndType;                         // rebar type
                startOrient   = GetTopHookOrient(geomInfo, location); // start hook orient
                break;

            case TopRebarLocation.Center:
                rebarType = m_topCenterType;   // rebar type
                break;

            case TopRebarLocation.End:
                endHookType = m_topHookType;                        // end hook type
                rebarType   = m_topEndType;                         // rebar type
                endOrient   = GetTopHookOrient(geomInfo, location); // end hook orient
                break;
            }

            // create the rebar
            return(PlaceRebars(rebarType, startHookType, endHookType,
                               geomInfo, startOrient, endOrient));
        }