protected override void Process(IFCAnyHandle ifcMaterial)
        {
            base.Process(ifcMaterial);

            Name = IFCImportHandleUtil.GetRequiredStringAttribute(ifcMaterial, "Name", true);

            List<IFCAnyHandle> hasRepresentation = null;
            if (IFCImportFile.TheFile.SchemaVersion >= IFCSchemaVersion.IFC2x3)
                hasRepresentation = IFCAnyHandleUtil.GetAggregateInstanceAttribute<List<IFCAnyHandle>>(ifcMaterial, "HasRepresentation");

            if (hasRepresentation != null && hasRepresentation.Count == 1)
            {
                if (!IFCAnyHandleUtil.IsSubTypeOf(hasRepresentation[0], IFCEntityType.IfcMaterialDefinitionRepresentation))
                    Importer.TheLog.LogUnexpectedTypeError(hasRepresentation[0], IFCEntityType.IfcMaterialDefinitionRepresentation, false);
                else
                    MaterialDefinitionRepresentation = IFCProductRepresentation.ProcessIFCProductRepresentation(hasRepresentation[0]);
            }

            Importer.TheLog.AddToElementCount();
        }
Exemple #2
0
        /// <summary>
        /// Cleans out the IFCEntity to save memory.
        /// </summary>
        public override void CleanEntity()
        {
            base.CleanEntity();

            ObjectLocation = null;

            m_ProductRepresentation = null;

            m_Solids = null;

            m_Voids = null;
        }