internal override void parseJObject(JObject obj) { base.parseJObject(obj); Name = extractString(obj.GetValue("Name", StringComparison.InvariantCultureIgnoreCase)); Description = extractString(obj.GetValue("Description", StringComparison.InvariantCultureIgnoreCase)); JArray array = obj.GetValue("MaterialProfiles") as JArray; if (array != null) { foreach (JObject o in array) { IfcMaterialProfile mp = mDatabase.ParseJObject <IfcMaterialProfile>(o); if (mp != null) { MaterialProfiles.Add(mp); } } } JObject jobj = obj.GetValue("CompositeProfile", StringComparison.InvariantCultureIgnoreCase) as JObject; if (jobj != null) { CompositeProfile = mDatabase.ParseJObject <IfcCompositeProfileDef>(jobj); } }
public IfcBeamType(string name, IfcMaterialProfile mp, IfcBeamTypeEnum type) : this(name, new IfcMaterialProfileSet(name, mp), type) { }
internal void setMaterial(IfcMaterialSelect material) { IfcMaterialSelect m = material; if (mDatabase.mRelease == ReleaseVersion.IFC2x3) { IfcMaterialProfile profile = material as IfcMaterialProfile; if (profile != null) { m = profile.Material; mMaterialSelectIFC4 = profile; IfcProfileDef pd = profile.Profile; if (pd != null) { if (pd.mHasProperties.Count == 0) { IfcProfileProperties pp = new IfcProfileProperties(pd.Name, pd); pp.mAssociates.addRelated(this); } else { pd.mHasProperties[0].mAssociates.addRelated(this); } } } else { IfcMaterialProfileSet profileSet = material as IfcMaterialProfileSet; if (profileSet == null) { IfcMaterialProfileSetUsage profileSetUsage = material as IfcMaterialProfileSetUsage; if (profileSetUsage != null) { profileSet = profileSetUsage.ForProfileSet; } } if (profileSet != null) { m = profileSet.PrimaryMaterial; mMaterialSelectIFC4 = profileSet; foreach (IfcMaterialProfile matp in profileSet.MaterialProfiles) { IfcProfileDef pd = matp.Profile; if (pd != null) { if (pd.mHasProperties.Count == 0) { IfcProfileProperties pp = new IfcProfileProperties(pd.Name, null, pd); } pd.mHasProperties[0].mAssociates.addRelated(this); } } } else { //constituentset.... } } } for (int icounter = 0; icounter < mHasAssociations.Count; icounter++) { IfcRelAssociatesMaterial rm = mHasAssociations[icounter] as IfcRelAssociatesMaterial; if (rm != null) { rm.unassign(this); } } if (m != null) { m.Associates.addRelated(this); } }
internal static IfcMaterialProfile Parse(string strDef) { IfcMaterialProfile m = new IfcMaterialProfile(); int ipos = 0; parseFields(m, ParserSTEP.SplitLineFields(strDef), ref ipos); return m; }
internal IfcMaterialProfileSet(string name, IfcMaterialProfile profile) : base(profile.mDatabase) { Name = name; if (profile.ToMaterialProfileSet == null) profile.ToMaterialProfileSet = this; else throw new Exception("Material Profile can be assigned to only a single profile set"); mMaterialProfiles.Add(profile.mIndex); }
protected static void parseFields(IfcMaterialProfile l, List<string> arrFields, ref int ipos) { IfcMaterialDefinition.parseFields(l, arrFields, ref ipos); l.mName = arrFields[ipos++].Replace("'", ""); l.mDescription = arrFields[ipos++].Replace("'", ""); l.mMaterial = ParserSTEP.ParseLink(arrFields[ipos++]); l.mProfile = ParserSTEP.ParseLink(arrFields[ipos++]); l.mPriority = ParserSTEP.ParseDouble(arrFields[ipos++]); l.mCategory = arrFields[ipos++].Replace("'", ""); }
internal IfcMaterialProfile(IfcMaterialProfile p) : base(p) { mName = p.mName; mDescription = p.mDescription; mMaterial = p.mMaterial; mProfile = p.mProfile; mPriority = p.mPriority; mCategory = p.mCategory; }
public IfcMemberType(string name, IfcMaterialProfile mp, IfcMemberTypeEnum type) : base(mp.mDatabase) { Name = name; mPredefinedType = type; MaterialSelect = mp; }
public IfcColumnType(string name, IfcMaterialProfile ps, IfcColumnTypeEnum type) : this(name,new IfcMaterialProfileSet(ps.Name, ps), type) { }