Inheritance: GeometryGym.Ifc.IfcMaterialDefinition
Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
 public IfcBeamType(string name, IfcMaterialProfile mp, IfcBeamTypeEnum type) : this(name, new IfcMaterialProfileSet(name, mp), type)
 {
 }
Esempio n. 3
0
        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);
            }
        }
Esempio n. 4
0
		internal static IfcMaterialProfile Parse(string strDef) { IfcMaterialProfile m = new IfcMaterialProfile(); int ipos = 0; parseFields(m, ParserSTEP.SplitLineFields(strDef), ref ipos); return m; }
Esempio n. 5
0
		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);
		}
Esempio n. 6
0
		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("'", "");
		}
Esempio n. 7
0
		internal IfcMaterialProfile(IfcMaterialProfile p) : base(p) { mName = p.mName; mDescription = p.mDescription; mMaterial = p.mMaterial; mProfile = p.mProfile; mPriority = p.mPriority; mCategory = p.mCategory; }
Esempio n. 8
0
		public IfcMemberType(string name, IfcMaterialProfile mp, IfcMemberTypeEnum type) : base(mp.mDatabase) { Name = name; mPredefinedType = type; MaterialSelect = mp; }
Esempio n. 9
0
		public IfcColumnType(string name, IfcMaterialProfile ps, IfcColumnTypeEnum type) : this(name,new IfcMaterialProfileSet(ps.Name, ps), type) { }
Esempio n. 10
0
		public IfcBeamType(string name, IfcMaterialProfile mp, IfcBeamTypeEnum type) : this(name, new IfcMaterialProfileSet(name, mp), type) { }