public void SetStirrupZoneIO(IXEP_StirrupZoneIO zoneIO, bool insertShapeInAfterAndBefore) { if (m_zone4Work == null) { throw new InvalidOperationException("Zone4Work was not created, please call 'PrepareZones' "); } m_zone4Work.CreateFrom(zoneIO, m_sectionPos, m_baseMat, m_zoneBeg, m_zoneEnd, m_zone4Work.ZoneID); XEP_BaseEmdFile.RemoveElements(m_reinf4Stirrups, XEP_EmdNames.s_KeyStirrupZone); if (zoneIO.IsValid()) { foreach (var zone in m_zonesBefore) { m_reinf4Stirrups.Elements.Add(zone); } m_reinf4Stirrups.Elements.Add(m_zone4Work.CreateEmdElement()); foreach (var zone in m_zonesAfter) { m_reinf4Stirrups.Elements.Add(zone); } if (insertShapeInAfterAndBefore) { foreach (var zone in m_zonesBefore) { XEP_BaseEmdFile.RemoveElements(zone, XEP_EmdNames.s_KeyStirrupZoneShape); zone.Elements.Add(m_zone4Work.ZoneShape.CreateEmdElement()); } foreach (var zone in m_zonesAfter) { XEP_BaseEmdFile.RemoveElements(zone, XEP_EmdNames.s_KeyStirrupZoneShape); zone.Elements.Add(m_zone4Work.ZoneShape.CreateEmdElement()); } } } }
private List <IXEP_EmdElement> PrepareCurrentZoneCandidates() { List <IXEP_EmdElement> domStirrupZones = XEP_BaseEmdFile.GetElements(m_reinf4Stirrups, XEP_EmdNames.s_KeyStirrupZone); if (domStirrupZones == null || domStirrupZones.Count == 0) { return(null); } List <IXEP_EmdElement> currentZoneCandidates = new List <IXEP_EmdElement>(); XEP_BaseEmdFile.RemoveElements(m_reinf4Stirrups, XEP_EmdNames.s_KeyStirrupZone); SortZones(domStirrupZones, currentZoneCandidates); return(currentZoneCandidates); }