diff --git a/GluLamb/Structure/Connection.cs b/GluLamb/Structure/Connection.cs index 74badbc..1588115 100644 --- a/GluLamb/Structure/Connection.cs +++ b/GluLamb/Structure/Connection.cs @@ -31,6 +31,12 @@ public Connection(Element eleA, Element eleB, double positionA, double positionB Name = name; } + public static void Disconnect(Connection conn) + { + conn.ElementA.Connections.Remove(conn); + conn.ElementB.Connections.Remove(conn); + } + public Line Discretize() { return new Line( diff --git a/GluLamb/Structure/Element.cs b/GluLamb/Structure/Element.cs index 22c348a..f1da46e 100644 --- a/GluLamb/Structure/Element.cs +++ b/GluLamb/Structure/Element.cs @@ -12,12 +12,14 @@ public class Element public string Name; public List Connections; protected Plane m_plane; + public GeometryBase Geometry; public Element(string name = "") { Connections = new List(); Name = name; m_plane = Plane.WorldXY; + Geometry = null; } public Element(Plane handle, string name = "") @@ -66,7 +68,6 @@ public Element GetConnected(int index) if (conn.ElementA == this) return conn.ElementB; return conn.ElementA; - } } diff --git a/GluLamb/Structure/ElementGroup.cs b/GluLamb/Structure/ElementGroup.cs index e5a46a5..420f1c8 100644 --- a/GluLamb/Structure/ElementGroup.cs +++ b/GluLamb/Structure/ElementGroup.cs @@ -6,15 +6,20 @@ namespace GluLamb { - public class ElementGroup + public class ElementGroup: List { public string Name; - private List m_elements; + //private List m_elements; public ElementGroup(string name = "ElementGroup") { Name = name; - m_elements = new List(); + //m_elements = new List(); + } + /* + public int Count + { + get { return m_elements.Count; } } public Element this[int key] @@ -38,5 +43,6 @@ public void Clear() { m_elements.Clear(); } + */ } } diff --git a/GluLamb/Structure/Structure.cs b/GluLamb/Structure/Structure.cs index b2349cd..baabe72 100644 --- a/GluLamb/Structure/Structure.cs +++ b/GluLamb/Structure/Structure.cs @@ -10,11 +10,13 @@ public class Structure { public List Connections; public List Elements; + public Dictionary> Groups; public Structure() { Connections = new List(); Elements = new List(); + Groups = new Dictionary>(); } public static Structure FromBeamElements(List elements, double searchDistance, double overlapDistance)