public IfcGrid(IfcSpatialElement host, IfcAxis2Placement3D placement, List <IfcGridAxis> uAxes, List <IfcGridAxis> vAxes) : base(new IfcLocalPlacement(host.ObjectPlacement, placement), getRepresentation(uAxes, vAxes, null)) { host.addGrid(this); UAxes.AddRange(uAxes); VAxes.AddRange(vAxes); }
internal override void parseJObject(JObject obj) { base.parseJObject(obj); UAxes.AddRange(mDatabase.extractJArray <IfcGridAxis>(obj.GetValue("UAxes", StringComparison.InvariantCultureIgnoreCase) as JArray)); VAxes.AddRange(mDatabase.extractJArray <IfcGridAxis>(obj.GetValue("VAxes", StringComparison.InvariantCultureIgnoreCase) as JArray)); WAxes.AddRange(mDatabase.extractJArray <IfcGridAxis>(obj.GetValue("WAxes", StringComparison.InvariantCultureIgnoreCase) as JArray)); }
internal IfcGrid(DatabaseIfc db, IfcGrid g, DuplicateOptions options) : base(db, g, options) { UAxes.AddRange(g.UAxes.ConvertAll(x => db.Factory.Duplicate(x) as IfcGridAxis)); VAxes.AddRange(g.VAxes.ConvertAll(x => db.Factory.Duplicate(x) as IfcGridAxis)); WAxes.AddRange(g.WAxes.ConvertAll(x => db.Factory.Duplicate(x) as IfcGridAxis)); mPredefinedType = g.mPredefinedType; }
internal IfcGrid(DatabaseIfc db, IfcGrid g, IfcOwnerHistory ownerHistory, bool downStream) : base(db, g, ownerHistory, downStream) { UAxes.AddRange(g.UAxes.ConvertAll(x => db.Factory.Duplicate(x) as IfcGridAxis)); VAxes.AddRange(g.VAxes.ConvertAll(x => db.Factory.Duplicate(x) as IfcGridAxis)); WAxes.AddRange(g.WAxes.ConvertAll(x => db.Factory.Duplicate(x) as IfcGridAxis)); mPredefinedType = g.mPredefinedType; }
protected override void setJSON(JObject obj, BaseClassIfc host, SetJsonOptions options) { base.setJSON(obj, host, options); obj["UAxes"] = new JArray(UAxes.ConvertAll(x => x.getJson(this, options))); obj["VAxes"] = new JArray(VAxes.ConvertAll(x => x.getJson(this, options))); if (WAxes.Count > 0) { obj["WAxes"] = new JArray(WAxes.ConvertAll(x => x.getJson(this, options))); } }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary) { base.parse(str, ref pos, release, len, dictionary); UAxes.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x => dictionary[x] as IfcGridAxis)); VAxes.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x => dictionary[x] as IfcGridAxis)); WAxes.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x => dictionary[x] as IfcGridAxis)); if (release != ReleaseVersion.IFC2x3) { string s = ParserSTEP.StripField(str, ref pos, len); if (s[0] == '.') { Enum.TryParse <IfcGridTypeEnum>(s.Replace(".", ""), true, out mPredefinedType); } } }
public override string GetStepParameters() { var parameters = new List <string>(); parameters.Add(GlobalId != null ? GlobalId.ToStepValue() : "$"); parameters.Add(OwnerHistory != null ? OwnerHistory.ToStepValue() : "$"); parameters.Add(Name != null ? Name.ToStepValue() : "$"); parameters.Add(Description != null ? Description.ToStepValue() : "$"); parameters.Add(ObjectType != null ? ObjectType.ToStepValue() : "$"); parameters.Add(ObjectPlacement != null ? ObjectPlacement.ToStepValue() : "$"); parameters.Add(Representation != null ? Representation.ToStepValue() : "$"); parameters.Add(UAxes != null ? UAxes.ToStepValue() : "$"); parameters.Add(VAxes != null ? VAxes.ToStepValue() : "$"); parameters.Add(WAxes != null ? WAxes.ToStepValue() : "$"); parameters.Add(PredefinedType.ToStepValue()); return(string.Join(", ", parameters.ToArray())); }
internal override void ParseXml(XmlElement xml) { base.ParseXml(xml); foreach (XmlNode child in xml.ChildNodes) { string name = child.Name; if (string.Compare(name, "UAxes") == 0) { extractAxes(child).ForEach(x => UAxes.Add(x)); } else if (string.Compare(name, "VAxes") == 0) { extractAxes(child).ForEach(x => VAxes.Add(x)); } else if (string.Compare(name, "WAxes") == 0) { extractAxes(child).ForEach(x => WAxes.Add(x)); } } }