/// <summary> /// Appends a copy of another mesh to this one. /// </summary> /// <param name="other">Mesh to append to this one.</param> public void Append(Mesh other) { Mesh dup = other.Duplicate(); Vertices.AddRange(dup.Vertices); foreach (Halfedge edge in dup.Halfedges) { Halfedges.Add(edge); } foreach (Face face in dup.Faces) { Faces.Add(face); } }
/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { Mesh mesh = null; if (!DA.GetData(0, ref mesh)) { return; } mesh = mesh.Duplicate(); List <Point3f> hp = new List <Point3f>(); foreach (Halfedge h in mesh.Halfedges) { if (h.Pair.Pair == h) { hp.Add(h.Midpoint); } } DA.SetData(0, mesh); DA.SetDataList(1, hp); }