private void ContainedEnditiesToGeometryDef() { // reset this.outer_polygon_index = -1; this.polygon = null; this.holes = null; // convert the contained entities into a list of coordinates float level_height = 0f; List <List <Point3D> > coordinates = new List <List <Point3D> >(); foreach (Entity e in this.ContainedEntities) { ZonedPolygon zp = e as ZonedPolygon; if (zp != null && zp.Polygon_Coords.Count > 0) { level_height = Math.Max(level_height, zp.Height); coordinates.Add(zp.Polygon_Coords); } } this.Height = level_height; MeshesCustom.ToPolygonWithHoles(coordinates, Orientation.XZ, out this.outer_polygon_index, out this.polygon, out this.holes); }