Revit.SDK.Samples.Reinforcement.CS.BeamFramReinMaker.FillTransverseBar C# (CSharp) Method

FillTransverseBar() public method

Create the transverse rebars, according to the location of transverse rebars
public FillTransverseBar ( TransverseRebarLocation location ) : Rebar
location TransverseRebarLocation location of rebar which need to be created
return Rebar
        public Rebar FillTransverseBar(TransverseRebarLocation location)
        {
            // Get the geometry information which support rebar creation
             RebarGeometry geomInfo = new RebarGeometry();
             switch (location)
             {
            case TransverseRebarLocation.Start: // start transverse rebar
            case TransverseRebarLocation.End:   // end transverse rebar
               geomInfo = m_geometry.GetTransverseRebar(location, m_transverseEndSpacing);
               break;
            case TransverseRebarLocation.Center:// center transverse rebar
               geomInfo = m_geometry.GetTransverseRebar(location, m_transverseCenterSpacing);
               break;
             }

             RebarHookOrientation startHook = RebarHookOrientation.Right;
             RebarHookOrientation endHook = RebarHookOrientation.Left;
             if (!GeomUtil.IsInRightDir(geomInfo.Normal))
              {
              startHook = RebarHookOrientation.Left;
              endHook = RebarHookOrientation.Right;
              }

             // create the rebar
             return PlaceRebars(m_transverseType, m_transverseHookType, m_transverseHookType,
                                         geomInfo, startHook, endHook);
        }