/// <summary> /// Processes IfcRelAssignsToGroup. /// </summary> /// <param name="isGroupedBy">The IfcRelAssignsToGroup handle.</param> void ProcessIFCRelAssignsToGroup(IFCAnyHandle isGroupedBy) { m_RelatedObjectType = ProcessIFCRelation.ProcessRelatedObjectType(isGroupedBy); // We will not process the related objects here, as that could cause infinite loops of partially processed items. // Instead, items will add themselves to their groups as they are processed. m_IFCRelatedObjects = new HashSet <IFCObjectDefinition>(); // ProcessIFCRelation.ProcessRelatedObjects(isGroupedBy); }
/// <summary> /// Finds all related objects in IfcRelDecomposes. /// </summary> /// <param name="ifcRelDecomposes">The IfcRelDecomposes handle.</param> void ProcessIFCRelDecomposes(IFCAnyHandle ifcRelDecomposes) { ICollection <IFCObjectDefinition> relatedObjects = ProcessIFCRelation.ProcessRelatedObjects(this, ifcRelDecomposes); if (relatedObjects != null) { ComposedObjectDefinitions.UnionWith(relatedObjects); } }
/// <summary> /// Finds all related objects in ifcRelAssigns. /// </summary> /// <param name="ifcRelAssigns">The IfcRelAssigns handle.</param> void ProcessIFCRelAssigns(IFCAnyHandle ifcRelAssigns) { if (IFCAnyHandleUtil.IsSubTypeOf(ifcRelAssigns, IFCEntityType.IfcRelAssignsToGroup)) { IFCGroup group = ProcessIFCRelation.ProcessRelatingGroup(ifcRelAssigns); group.RelatedObjects.Add(this); AssignmentGroups.Add(group); } // LOG: ERROR: #: Unknown assocation of type ifcRelAssigns.GetEntityType(); }
/// <summary> /// Processes IfcObject attributes. /// </summary> /// <param name="ifcObject">The IfcObject handle.</param> protected override void Process(IFCAnyHandle ifcObject) { base.Process(ifcObject); ObjectType = IFCAnyHandleUtil.GetStringAttribute(ifcObject, "ObjectType"); HashSet <IFCAnyHandle> isDefinedByHandles = IFCAnyHandleUtil.GetAggregateInstanceAttribute <HashSet <IFCAnyHandle> >(ifcObject, "IsDefinedBy"); // IFC4 adds "IsDeclaredBy" and "IsTypedBy" inverse attributes. We'll read in "IsTypedBy" and // group this wih "IsDefinedBy" together, although we may later decide to split them up for performance reasons. // Note that IcProject in IFC4 inherits from IfcContext, not IfcObject (as it did in IFC2x3). Currently, the // only difference between the two is that IfcObject supports "IsDeclaredBy" and "IsTypedBy", and that IfcContext // contains the attributes of IfcProject from IFC2x3. We'll keep the attributes at the IfcProject level for now // and protect against reading "IsTypedBy" here. if (IFCImportFile.TheFile.SchemaVersion >= IFCSchemaVersion.IFC4 && !IFCAnyHandleUtil.IsSubTypeOf(ifcObject, IFCEntityType.IfcProject)) { HashSet <IFCAnyHandle> isTypedBy = IFCAnyHandleUtil.GetAggregateInstanceAttribute <HashSet <IFCAnyHandle> >(ifcObject, "IsTypedBy"); if (isTypedBy != null) { isDefinedByHandles.UnionWith(isTypedBy); } } if (isDefinedByHandles != null) { IFCPropertySetDefinition.ResetCounters(); foreach (IFCAnyHandle isDefinedByHandle in isDefinedByHandles) { if (IFCAnyHandleUtil.IsSubTypeOf(isDefinedByHandle, IFCEntityType.IfcRelDefinesByProperties)) { ProcessIFCRelation.ProcessIFCRelDefinesByProperties(isDefinedByHandle, PropertySets); } else if (IFCAnyHandleUtil.IsSubTypeOf(isDefinedByHandle, IFCEntityType.IfcRelDefinesByType)) { ProcessIFCRelDefinesByType(isDefinedByHandle); } else { Importer.TheLog.LogUnhandledSubTypeError(isDefinedByHandle, IFCEntityType.IfcRelDefines, false); } } } }
/// <summary> /// Processes IfcRelAssignsToGroup. /// </summary> /// <param name="isGroupedBy">The IfcRelAssignsToGroup handle.</param> void ProcessIFCRelAssignsToGroup(IFCAnyHandle isGroupedBy) { RelatedObjectType = ProcessIFCRelation.ProcessRelatedObjectType(isGroupedBy); RelatedObjects = ProcessIFCRelation.ProcessRelatedObjects(this, isGroupedBy); }
/// <summary> /// Finds all related objects in IfcRelDecomposes. /// </summary> /// <param name="ifcRelDecomposes">The IfcRelDecomposes handle.</param> void ProcessIFCRelDecomposes(IFCAnyHandle ifcRelDecomposes) { ComposedObjectDefinitions.UnionWith(ProcessIFCRelation.ProcessRelatedObjects(ifcRelDecomposes)); }