/// <summary> /// Copy constructor /// </summary> /// <param name="source">The element set to copy</param> public ElementSet(IElementSet source) { _description = source.Description; _id = source.ID; _elementType = source.ElementType; _spatialReference = source.SpatialReference; for (int i = 0; i < source.ElementCount; i++) { Element element = new Element(source.GetElementID(i)); for (int j = 0; j < source.GetVertexCount(i); j++) { double x = source.GetXCoordinate(i, j); double y = source.GetYCoordinate(i, j); double z = source.GetZCoordinate(i, j); element.AddVertex(new Vertex(x, y, z)); } _elements.Add(element); } }
/// <summary> /// Copy constructor /// </summary> /// <param name="source">The element set to copy</param> public ElementSet(IElementSet source) { _description = source.Description; _id = source.ID; _elementType = source.ElementType; _spatialReference = source.SpatialReference; for (int i=0;i<source.ElementCount;i++) { Element element = new Element(source.GetElementID(i)); for (int j=0;j<source.GetVertexCount(i);j++) { double x = source.GetXCoordinate(i,j); double y = source.GetYCoordinate(i,j); double z = source.GetZCoordinate(i,j); element.AddVertex(new Vertex(x,y,z)); } _elements.Add(element); } }