internal static void parseFields(IfcGeneralProfileProperties gp, List <string> arrFields, ref int ipos, ReleaseVersion schema) { IfcProfileProperties.parseFields(gp, arrFields, ref ipos, schema); gp.mPhysicalWeight = ParserSTEP.ParseDouble(arrFields[ipos++]); gp.mPerimeter = ParserSTEP.ParseDouble(arrFields[ipos++]); gp.mMinimumPlateThickness = ParserSTEP.ParseDouble(arrFields[ipos++]); gp.mMaximumPlateThickness = ParserSTEP.ParseDouble(arrFields[ipos++]); gp.mCrossSectionArea = ParserSTEP.ParseDouble(arrFields[ipos++]); }
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 IfcRelAssociatesProfileProperties(IfcProfileProperties pp) : base(pp.mDatabase) { if (pp.mDatabase.mSchema != Schema.IFC2x3) throw new Exception(KeyWord + " Deleted in IFC4"); mRelatingProfileProperties = pp.mIndex; }
internal static void parseFields(IfcProfileProperties p, List<string> arrFields, ref int ipos, Schema schema) { if (schema == Schema.IFC2x3) { p.mName = arrFields[ipos++].Replace("'", ""); p.mProfileDefinition = ParserSTEP.ParseLink(arrFields[ipos++]); } else { IfcExtendedProperties.parseFields(p, arrFields, ref ipos,schema); p.mProfileDefinition = ParserSTEP.ParseLink(arrFields[ipos++]); } }
internal static IfcProfileProperties Parse(string strDef, Schema schema) { IfcProfileProperties p = new IfcProfileProperties(); int ipos = 0; parseFields(p, ParserSTEP.SplitLineFields(strDef), ref ipos, schema); return p; }
internal IfcProfileProperties(IfcProfileProperties p) : base() { mProfileDefinition = p.mProfileDefinition; }
internal void setMaterial(IfcMaterialSelect material) { IfcMaterialSelect m = material; if (mDatabase.mSchema == Schema.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, null, pd); } pd.mHasProperties[0].mAssociates.addAssociation(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.addAssociation(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.addAssociation(this); }