public static Well Read(BinaryReader reader) { byte version = reader.ReadByte(); switch (version) { case Version0: { string title = reader.ReadString(); int pcount = reader.ReadInt32(); List <InclPoint> ps = new List <InclPoint>(); for (int p = 0; p < pcount; ++p) { ps.Add(InclPoint.Read(reader)); } int ecount = reader.ReadInt32(); List <WellEvent> es = new List <WellEvent>(); for (int e = 0; e < ecount; ++e) { es.Add(WellEvent.Read(reader)); } bool check = reader.ReadBoolean(); return(new Well(title, ps, es, check)); } default: return(new Well()); } }
public Point2D XY(double tvd) { for (int i = 1; i < Points.Count(); ++i) { if (Points[i].TVD >= tvd) { InclPoint t = Points[i - 1]; InclPoint b = Points[i]; Pillar pillar = new Pillar(t.X, t.Y, t.TVD, b.X, b.Y, b.TVD); return(pillar.Point2D(tvd)); } } return(new Point2D()); }