/// <summary> /// Parses the layer stack information /// </summary> /// <param name="rd"></param> private void ParseLayerStack(StringReader rd) { string line; line = rd.ReadLine(); while ((line = rd.ReadLine()) != null) { Layer l = new Layer(); Dictionary<string, string> d = ParseSubsection(line, ' '); l.Height = HypToMils(d["T"]); l.Name = d["L"]; if (d.ContainsKey("SIGNAL")) l.Type = Layer.LayerType.Signal; else if (d.ContainsKey("PLANE")) l.Type = Layer.LayerType.Plane; else if (d.ContainsKey("DIELECTRIC")) l.Type = Layer.LayerType.Dielectric; else throw new ParseException("Unknown layer type: " + line); Stackup.AddLayer(l); } }
public void AddLayer(Layer l) { l.Index = Layers.Count; Layers.Add(l); }