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);
}