/***************************************************/ // Constructors - format conforming to CalculiX convention. public Support(List <GeometryBase> geometry, SupportType support_Type, string name) { this._name = name; this._geometry = geometry; this._supportType = support_Type; this._nodes = new HashSet <Node>(); }
/***************************************************/ // Clone. public override GuanacoObject Clone(bool newID = false) { SupportType st = this.ShallowClone(newID) as SupportType; st.SetDOFs(new List <int>(this._dofs), this._physical); return(st); }
protected override void CollectVolatileData_Custom() { List <GH_ValueListItem> .Enumerator enumerator = new List <GH_ValueListItem> .Enumerator(); this.m_data.Clear(); try { List <int> DOFs = new List <int>(); bool physical = false; enumerator = this.SelectedItems.GetEnumerator(); while (enumerator.MoveNext()) { GH_ValueListItem item = enumerator.Current; int DOF; item.Value.CastTo <int>(out DOF); DOFs.Add(DOF); if (DOF == 100) { physical = true; DOFs = new List <int> { 1, 2, 3 }; break; } } Guanaco.SupportType supportType = new SupportType(DOFs, physical); this.m_data.Append(GH_Convert.ToGoo(supportType), new GH_Path(0)); } finally { enumerator.Dispose(); } }