Inheritance: IfcRoot, IfcDefinitionSelect
 internal override void ParseXml(XmlElement xml)
 {
     base.ParseXml(xml);
     foreach (XmlNode child in xml.ChildNodes)
     {
         string name = child.Name;
         if (string.Compare(name, "RelatedObjects") == 0)
         {
             foreach (XmlNode node in child.ChildNodes)
             {
                 IfcObjectDefinition od = mDatabase.ParseXml <IfcObjectDefinition>(node as XmlElement);
                 if (od != null)
                 {
                     RelatedObjects.Add(od);
                 }
             }
         }
     }
     if (xml.HasAttribute("RelatedObjectsType"))
     {
         if (!Enum.TryParse <IfcObjectTypeEnum>(xml.Attributes["GlobalId"].Value, true, out mRelatedObjectsType))
         {
             mRelatedObjectsType = IfcObjectTypeEnum.NOTDEFINED;
         }
     }
 }
Beispiel #2
0
 internal override void ParseXml(XmlElement xml)
 {
     base.ParseXml(xml);
     foreach (XmlNode child in xml.ChildNodes)
     {
         string name = child.Name;
         if (string.Compare(name, "RelatedObjects") == 0)
         {
             List <IfcObjectDefinition> objects = new List <IfcObjectDefinition>();
             foreach (XmlNode cn in child.ChildNodes)
             {
                 IfcObjectDefinition od = mDatabase.ParseXml <IfcObjectDefinition>(cn as XmlElement);
                 if (od != null)
                 {
                     objects.Add(od);
                 }
             }
             RelatedObjects = objects;
         }
         else if (string.Compare(name, "RelatingObject") == 0)
         {
             RelatingObject = mDatabase.ParseXml <IfcObjectDefinition>(child as XmlElement);
         }
     }
 }
Beispiel #3
0
 protected IfcObjectDefinition(DatabaseIfc db, IfcObjectDefinition o, bool downStream) : base(db, o)
 {
     foreach (IfcRelAssigns assigns in o.mHasAssignments)
     {
         IfcRelAssigns dup = db.Factory.Duplicate(assigns, false) as IfcRelAssigns;
         dup.AddRelated(this);
     }
     if (o.mDecomposes != null)
     {
         (db.Factory.Duplicate(o.mDecomposes, false) as IfcRelAggregates).addObject(this);
     }
     foreach (IfcRelAssociates associates in o.mHasAssociations)
     {
         IfcRelAssociates dup = db.Factory.Duplicate(associates) as IfcRelAssociates;
         dup.addRelated(this);
     }
     if (mHasContext != null)
     {
         (db.Factory.Duplicate(mHasContext, false) as IfcRelDeclares).AddRelated(this);
     }
     if (downStream)
     {
         foreach (IfcRelAggregates rag in o.mIsDecomposedBy)
         {
             mDatabase.Factory.Duplicate(rag, true);
         }
         foreach (IfcRelNests rn in o.mIsNestedBy)
         {
             mDatabase.Factory.Duplicate(rn, true);
         }
     }
 }
Beispiel #4
0
 public IfcGeographicElement(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductRepresentation representation) : base(host, placement, representation)
 {
     if (mDatabase.mRelease == ReleaseVersion.IFC2x3)
     {
         throw new Exception(KeyWord + " only supported in IFC4!");
     }
 }
            internal void updateReferences()
            {
                IfcObjectDefinition objectDefinition = mObject as IfcObjectDefinition;

                if (objectDefinition != null)
                {
                    foreach (IfcRelDefinesByProperties isDefinedBy in mIsDefinedBy)
                    {
                        isDefinedBy.RelatedObjects.Add(objectDefinition);
                    }

                    if (mDecomposes != null)
                    {
                        mDecomposes.RelatedObjects.Add(objectDefinition);
                    }
                    if (mNests != null)
                    {
                        mNests.RelatedObjects.Add(objectDefinition);
                    }

                    IfcObject obj = mObject as IfcObject;
                    if (obj != null)
                    {
                        IfcProduct product = objectDefinition as IfcProduct;
                        if (product != null)
                        {
                            if (mContainedIn != null)
                            {
                                mContainedIn.RelatedElements.Add(product);
                            }
                        }
                    }
                }
            }
Beispiel #6
0
 public IfcGeographicElement(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation) : base(host, placement, representation)
 {
     if (mDatabase.mRelease < ReleaseVersion.IFC4)
     {
         throw new Exception(StepClassName + " only supported in IFC4!");
     }
 }
Beispiel #7
0
 protected IfcGeotechnicalStratum(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation)
     : base(host.Database)
 {
     host.AddNested(this);
     ObjectPlacement = placement;
     Representation  = representation;
 }
Beispiel #8
0
		public void AddAggregated(IfcObjectDefinition o)
		{
			if (mIsDecomposedBy.Count == 0)
			{
				new IfcRelAggregates(this, o);
			}
			else
				mIsDecomposedBy[0].addObject(o); }
Beispiel #9
0
		public void AddNested(IfcObjectDefinition o)
		{
			if (mIsNestedBy.Count == 0)
			{
				IfcRelNests rn = new IfcRelNests(this, o);
			}
			else mIsNestedBy[0].addObject(o);
		}
Beispiel #10
0
 protected IfcObjectDefinition(IfcObjectDefinition basis) : base(basis)
 {
     mHasAssignments  = basis.mHasAssignments;
     mNests           = basis.mNests;
     mIsNestedBy      = basis.mIsNestedBy;
     mHasContext      = basis.mHasContext;
     mIsDecomposedBy  = basis.mIsDecomposedBy;
     mDecomposes      = basis.mDecomposes;
     mHasAssociations = basis.mHasAssociations;
 }
Beispiel #11
0
 public void AddAggregated(IfcObjectDefinition o)
 {
     if (mDecomposes == null)
     {
         mDecomposes = new IfcRelAggregates(this, o);
     }
     else
     {
         mDecomposes.addObject(o);
     }
 }
Beispiel #12
0
 public void AddRelated(IfcObjectDefinition related)
 {
     if (mIsGroupedBy.Count == 0)
     {
         new IfcRelAssignsToGroup(related, this);
     }
     else
     {
         mIsGroupedBy.First().RelatedObjects.Add(related);
     }
 }
        protected void ChangeGlobalId(string newGlobalId, string oldGlobalId)
        {
            IfcObjectDefinition objectDefinition = this as IfcObjectDefinition;

            if (objectDefinition != null)
            {
                List <IfcRelDefinesByProperties> isDefinedBy = objectDefinition.mIsDefinedBy.ToList();
                foreach (IfcRelDefinesByProperties definedBy in isDefinedBy)
                {
                    definedBy.RelatedObjects.Remove(objectDefinition);
                }
            }
        }
        protected void Adopt(BaseClassIfc master)
        {
            IfcRoot thisRoot = this as IfcRoot, masterRoot = master as IfcRoot;

            if (thisRoot != null && masterRoot != null)
            {
                thisRoot.Name        = masterRoot.Name;
                thisRoot.Description = masterRoot.Description;
                IfcObjectDefinition thisObjectDefinition = this as IfcObjectDefinition, masterObjectDefinition = master as IfcObjectDefinition;
                if (thisObjectDefinition != null && masterObjectDefinition != null)
                {
                    foreach (IfcRelAssigns assigns in masterObjectDefinition.HasAssignments)
                    {
                        assigns.RelatedObjects.Add(thisObjectDefinition);
                    }
                    foreach (IfcRelAssociates associates in masterObjectDefinition.HasAssociations)
                    {
                        associates.RelatedObjects.Add(thisObjectDefinition);
                    }
                    if (masterObjectDefinition.HasContext != null)
                    {
                        masterObjectDefinition.HasContext.RelatedDefinitions.Add(thisObjectDefinition);
                    }
                    IfcObject thisObject = this as IfcObject, masterObject = master as IfcObject;
                    if (thisObject != null && masterObject != null)
                    {
                        if (string.IsNullOrEmpty(thisObject.ObjectType))
                        {
                            thisObject.ObjectType = masterObject.ObjectType;
                        }
                    }
                    else
                    {
                        IfcTypeObject thisTypeObject = this as IfcTypeObject, masterTypeObject = master as IfcTypeObject;
                        if (thisTypeObject != null && masterTypeObject != null)
                        {
                            IfcTypeProduct thisTypeProduct = this as IfcTypeProduct, masterTypeProduct = master as IfcTypeProduct;
                            if (thisTypeProduct != null && masterTypeProduct != null)
                            {
                                thisTypeProduct.Tag = masterTypeProduct.Tag;
                                IfcElementType thisElementType = this as IfcElementType, masterElementType = master as IfcElementType;
                                if (thisElementType != null && masterElementType != null)
                                {
                                    thisElementType.ElementType = masterElementType.ElementType;
                                }
                            }
                        }
                    }
                }
            }
        }
Beispiel #15
0
        public IfcGeotechnicalStratum(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation)
            : base(host.Database)
        {
            IfcSpatialElement spatialElement = host as IfcSpatialElement;

            if (spatialElement != null)
            {
                spatialElement.AddElement(this);
            }
            else
            {
                host.AddNested(this);
            }
            ObjectPlacement = placement;
            Representation  = representation;
        }
Beispiel #16
0
		protected IfcObjectDefinition(DatabaseIfc db, IfcObjectDefinition o) : base (db, o)//, bool downStream) : base(db, o)
		{
			foreach(IfcRelAssigns assigns in o.mHasAssignments)
			{
				IfcRelAssigns dup = db.Factory.Duplicate(assigns) as IfcRelAssigns;
				dup.AddRelated(this);
			}
			if (o.mDecomposes != null)
				(db.Factory.Duplicate(o.mDecomposes, false) as IfcRelAggregates).addObject(this);
			foreach (IfcRelAssociates associates in o.mHasAssociations)
			{
				IfcRelAssociates dup = db.Factory.Duplicate(associates) as IfcRelAssociates;
				dup.addAssociation(this);
			}
			if (mHasContext != null)
				(db.Factory.Duplicate(mHasContext, false) as IfcRelDeclares).AddRelated(this);	
		}
Beispiel #17
0
 internal override void ParseXml(XmlElement xml)
 {
     base.ParseXml(xml);
     foreach (XmlNode child in xml.ChildNodes)
     {
         string name = child.Name;
         if (string.Compare(name, "RelatedObjects") == 0)
         {
             foreach (XmlNode node in child.ChildNodes)
             {
                 IfcObjectDefinition od = mDatabase.ParseXml <IfcObjectDefinition>(node as XmlElement);
                 if (od != null)
                 {
                     AddRelated(od);
                 }
             }
         }
     }
 }
            internal GlobalIdChangeManager(BaseClassIfc obj)
            {
                mObject = obj;
                IfcObjectDefinition objectDefinition = obj as IfcObjectDefinition;

                if (objectDefinition != null)
                {
                    mIsDefinedBy.AddRange(objectDefinition.mIsDefinedBy);
                    foreach (IfcRelDefinesByProperties rdp in mIsDefinedBy)
                    {
                        rdp.RelatedObjects.Remove(objectDefinition);
                    }

                    mDecomposes = objectDefinition.mDecomposes;
                    if (mDecomposes != null)
                    {
                        mDecomposes.RelatedObjects.Remove(objectDefinition);
                    }
                    mNests = objectDefinition.mNests;
                    if (mNests != null)
                    {
                        mNests.RelatedObjects.Remove(objectDefinition);
                    }

                    IfcObject o = mObject as IfcObject;
                    if (o != null)
                    {
                        IfcProduct product = objectDefinition as IfcProduct;
                        if (product != null)
                        {
                            mContainedIn = product.mContainedInStructure;
                            if (mContainedIn != null)
                            {
                                mContainedIn.RelatedElements.Remove(product);
                            }
                        }
                    }
                }
            }
Beispiel #19
0
 internal override void ParseXml(XmlElement xml)
 {
     base.ParseXml(xml);
     foreach (XmlNode child in xml.ChildNodes)
     {
         string name = child.Name;
         if (string.Compare(name, "RelatedObjects") == 0)
         {
             foreach (XmlNode cn in child.ChildNodes)
             {
                 IfcObjectDefinition od = mDatabase.ParseXml <IfcObjectDefinition>(cn as XmlElement);
                 if (od != null)
                 {
                     RelatedObjects.Add(od);
                 }
             }
         }
         else if (string.Compare(name, "RelatingPropertyDefinition") == 0)
         {
             RelatingPropertyDefinition = mDatabase.ParseXml <IfcPropertySetDefinition>(child as XmlElement);
         }
     }
 }
Beispiel #20
0
 public IfcWall(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductRepresentation representation) : base(host, placement, representation)
 {
 }
Beispiel #21
0
 internal IfcUnitaryControlElement(IfcObjectDefinition host, IfcObjectPlacement p, IfcProductRepresentation r, IfcDistributionSystem system)
     : base(host,p,r, system)
 {
 }
Beispiel #22
0
        internal IfcWasteTerminalTypeEnum mPredefinedType = IfcWasteTerminalTypeEnum.NOTDEFINED; // OPTIONAL : IfcWasteTerminalTypeEnum;

        #endregion Fields

        #region Constructors

        public IfcWasteTerminal(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductRepresentation representation, IfcDistributionSystem system)
            : base(host, placement, representation, system)
        {
        }
Beispiel #23
0
		public IfcRelNests(IfcObjectDefinition relatingObject) : base(relatingObject.mDatabase)
		{
			mRelatingObject = relatingObject.mIndex;
			relatingObject.mIsNestedBy.Add(this);
		}
Beispiel #24
0
		public void Assign(IfcObjectDefinition o) { if (mControls.Count == 0) mControls.Add(new IfcRelAssignsToControl(this, o)); else mControls[0].assign(o); }
Beispiel #25
0
 protected IfcFeatureElement(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductRepresentation representation)
     : base(host, placement, representation)
 {
 }
Beispiel #26
0
 public IfcGeoslice(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation) : base(host, placement, representation)
 {
 }
Beispiel #27
0
		internal IfcRelAggregates(IfcObjectDefinition relObject, List<IfcObjectDefinition> relatedObjects) : this(relObject)
		{
			for (int icounter = 0; icounter < relatedObjects.Count; icounter++)
			{
				mRelatedObjects.Add(relatedObjects[icounter].mIndex);
				relatedObjects[icounter].mDecomposes = this;
			}
		}
Beispiel #28
0
		internal IfcRelAggregates(IfcObjectDefinition relObject, IfcObjectDefinition relatedObject) : this(relObject, new List<IfcObjectDefinition>() { relatedObject }) { }
Beispiel #29
0
		internal IfcRelAggregates(IfcObjectDefinition relObject) : base(relObject.mDatabase)
		{
			mRelatingObject = relObject.mIndex;
			relObject.mIsDecomposedBy.Add(this);
		}
Beispiel #30
0
		internal void addObject(IfcObjectDefinition o)
		{
			o.mNests = this;
			if (!mRelatedObjects.Contains(o.mIndex))
				mRelatedObjects.Add(o.mIndex);
		}
Beispiel #31
0
		internal IfcRelNests(IfcObjectDefinition relatingObject, List<IfcObjectDefinition> relatedObjects) : base(relatingObject.mDatabase)
		{
			mRelatingObject = relatingObject.mIndex;
			relatingObject.mIsNestedBy.Add(this);
			for (int icounter = 0; icounter < relatedObjects.Count; icounter++)
			{
				mRelatedObjects.Add(relatedObjects[icounter].mIndex);
				relatedObjects[icounter].mNests = this;
			}
		}
Beispiel #32
0
		internal IfcRelNests(IfcObjectDefinition relatingObject, IfcObjectDefinition ro, IfcObjectDefinition ro2) : this(relatingObject, ro) { mRelatedObjects.Add(ro2.mIndex); ro2.mNests = this; ; }
Beispiel #33
0
		internal IfcRelNests(IfcObjectDefinition relatingObject, IfcObjectDefinition relatedObject) : base(relatingObject.mDatabase)
		{
			mRelatingObject = relatingObject.mIndex;
			mRelatedObjects.Add(relatedObject.mIndex);
			relatingObject.mIsNestedBy.Add(this);
			relatedObject.mNests = this;
		}
Beispiel #34
0
 internal IfcUnitaryControlElement(IfcObjectDefinition host, IfcObjectPlacement p, IfcProductRepresentation r, IfcDistributionSystem system) : base(host, p, r, system)
 {
 }
Beispiel #35
0
 public IfcHeatExchanger(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductRepresentation representation, IfcDistributionSystem system) : base(host, placement, representation, system)
 {
 }
Beispiel #36
0
		internal IfcRelAggregates(DatabaseIfc m, string container, string part, IfcObjectDefinition relObject, IfcObjectDefinition relatedObject)
			: this(relObject, relatedObject) { Name = container + " Container"; Description = container + " Container for " + part + "s"; }
Beispiel #37
0
 public IfcInterceptor(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductRepresentation representation, IfcDistributionSystem system)
     : base(host, placement, representation, system)
 {
 }
Beispiel #38
0
		internal IfcRelAggregates(string container, string part, IfcObjectDefinition relObject, List<IfcObjectDefinition> relatedObjects)
			: this(relObject, relatedObjects) { Name = container + " Container"; Description = container + " Container for " + part + "s"; }
Beispiel #39
0
		internal void assign(IfcObjectDefinition o) { mIsGroupedBy[0].assign(o); }
Beispiel #40
0
 public IfcWasteTerminal(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation, IfcDistributionSystem system) : base(host, placement, representation, system)
 {
 }
Beispiel #41
0
		internal bool addObject(IfcObjectDefinition o)
		{
			if (mRelatedObjects.Contains(o.mIndex))
				return false;
			mRelatedObjects.Add(o.mIndex);
			o.mDecomposes = this;
			return true;
		}
Beispiel #42
0
		internal IfcRelAssignsToResource(IfcResource relResource, IfcObjectDefinition relObject) : base(relObject) { mRelatingResource = relResource.mIndex; }
Beispiel #43
0
 public IfcVirtualElement(IfcObjectDefinition host, IfcObjectPlacement p, IfcProductRepresentation r) : base(host, p, r)
 {
 }
Beispiel #44
0
 internal IfcFastener(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductRepresentation representation)
     : base(host, placement, representation)
 {
 }
Beispiel #45
0
 public IfcWaterStratum(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation) : base(host, placement, representation)
 {
 }
Beispiel #46
0
		internal void assign(IfcObjectDefinition o) { mRelatedObjects.Add(o.mIndex); o.mHasAssignments.Add(this); }
Beispiel #47
0
        internal string mUserDefinedPartitioningType = "$"; //:	OPTIONAL IfcLabel;

        #endregion Fields

        #region Constructors

        public IfcWindow(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductRepresentation representation)
            : base(host, placement, representation)
        {
        }
Beispiel #48
0
		internal IfcRelAssignsToActor(IfcActor relActor, IfcObjectDefinition relObject, IfcActorRole r) : base(relObject) { mRelatingActor = relActor.mIndex; if (r != null) mActingRole = r.mIndex; }
        protected void ReplaceDatabase(BaseClassIfc revised)
        {
            IfcRoot thisRoot = this as IfcRoot, revisedRoot = revised as IfcRoot;

            if (thisRoot != null && revisedRoot != null)
            {
                revisedRoot.GlobalId     = thisRoot.GlobalId;
                revisedRoot.OwnerHistory = thisRoot.OwnerHistory;
                revisedRoot.Name         = thisRoot.Name;
                revisedRoot.Description  = thisRoot.Description;
                IfcObjectDefinition thisObjectDefinition = this as IfcObjectDefinition, revisedObjectDefinition = revised as IfcObjectDefinition;
                if (thisObjectDefinition != null && revisedObjectDefinition != null)
                {
                    foreach (IfcRelAggregates rel in thisObjectDefinition.IsDecomposedBy.ToList())
                    {
                        rel.RelatingObject = revisedObjectDefinition;
                    }
                    foreach (IfcRelNests rel in thisObjectDefinition.IsNestedBy.ToList())
                    {
                        rel.RelatingObject = revisedObjectDefinition;
                    }

                    IfcRelAggregates relAggregates = thisObjectDefinition.Decomposes;
                    if (relAggregates != null)
                    {
                        relAggregates.RelatedObjects.Remove(thisObjectDefinition);
                        relAggregates.RelatedObjects.Add(revisedObjectDefinition);
                    }
                    IfcRelNests relNests = thisObjectDefinition.Nests;
                    if (relNests != null)
                    {
                        relNests.RelatedObjects.Remove(thisObjectDefinition);
                        relNests.RelatedObjects.Add(thisObjectDefinition);
                    }

                    foreach (IfcRelDefinesByProperties relDefinesByProperties in thisObjectDefinition.mIsDefinedBy.ToList())
                    {
                        relDefinesByProperties.RelatedObjects.Remove(thisObjectDefinition);
                        relDefinesByProperties.RelatedObjects.Add(revisedObjectDefinition);
                    }

                    foreach (IfcRelAssigns assigns in thisObjectDefinition.HasAssignments.ToList())
                    {
                        assigns.RelatedObjects.Remove(thisObjectDefinition);
                        assigns.RelatedObjects.Add(revisedObjectDefinition);
                    }
                    IfcRelDeclares relDeclares = thisObjectDefinition.HasContext;
                    if (relDeclares != null)
                    {
                        relDeclares.RelatedDefinitions.Remove(thisObjectDefinition);
                        relDeclares.RelatedDefinitions.Add(revisedObjectDefinition);
                    }
                    foreach (IfcRelAssociates associates in thisObjectDefinition.HasAssociations.ToList())
                    {
                        associates.RelatedObjects.Remove(thisObjectDefinition);
                        associates.RelatedObjects.Add(revisedObjectDefinition);
                    }
                    IfcObject thisObject = this as IfcObject, revisedObject = revised as IfcObject;
                    if (thisObject != null && revisedObject != null)
                    {
                        if (!string.IsNullOrEmpty(thisObject.ObjectType))
                        {
                            revisedObject.ObjectType = thisObject.ObjectType;
                        }

                        if (thisObject.mIsTypedBy != null)
                        {
                            thisObject.mIsTypedBy.mRelatedObjects.Remove(thisObject);
                        }
                        IfcProduct thisProduct = this as IfcProduct, revisedProduct = revised as IfcProduct;
                        if (thisProduct != null && revisedProduct != null)
                        {
                            IfcRelContainedInSpatialStructure containedInSpatialStructure = thisProduct.mContainedInStructure;
                            if (containedInSpatialStructure != null)
                            {
                                containedInSpatialStructure.RelatedElements.Remove(thisProduct);
                                containedInSpatialStructure.RelatedElements.Add(revisedProduct);
                            }
                            IfcElement thisElement = this as IfcElement, revisedElement = revised as IfcElement;
                            if (thisElement != null && revisedElement != null)
                            {
                                revisedElement.Tag = thisElement.Tag;
                                List <IfcRelVoidsElement> voids = thisElement.HasOpenings.ToList();
                                foreach (var relVoids in voids)
                                {
                                    relVoids.RelatingBuildingElement = revisedElement;
                                }
                            }
                            IfcSpatialElement thisSpatial = this as IfcSpatialElement, revisedSpatial = revised as IfcSpatialElement;
                            if (thisSpatial != null && revisedSpatial != null)
                            {
                                foreach (IfcRelContainedInSpatialStructure contained in thisSpatial.ContainsElements.ToList())
                                {
                                    contained.RelatingStructure = revisedSpatial;
                                }
                            }
                            else if (revisedSpatial != null && thisElement != null)
                            {
                                if (containedInSpatialStructure != null)
                                {
                                    containedInSpatialStructure.RelatedElements.Remove(revisedProduct);
                                    containedInSpatialStructure.RelatingStructure.AddAggregated(revisedProduct);
                                }
                                List <IfcProduct> subProducts = thisObjectDefinition.IsDecomposedBy.SelectMany(x => x.RelatedObjects).OfType <IfcProduct>().ToList();
                                if (subProducts.Count > 0)
                                {
                                    new IfcRelContainedInSpatialStructure(subProducts, revisedSpatial);
                                }
                                foreach (IfcRelAssociatesMaterial associates in revisedSpatial.HasAssociations.OfType <IfcRelAssociatesMaterial>().ToList())
                                {
                                    associates.RelatedObjects.Remove(revisedSpatial);
                                }

                                IfcFacilityPart facilityPart = revisedSpatial as IfcFacilityPart;
                                if (facilityPart != null)
                                {
                                    IfcFacility facility = revisedSpatial.FindHost <IfcFacility>();
                                    if (facility != null)
                                    {
                                        facility.AddAggregated(revisedSpatial);
                                    }
                                }
                            }
                        }
                    }
                    else
                    {
                        IfcTypeObject thisTypeObject = this as IfcTypeObject, revisedTypeObject = revised as IfcTypeObject;
                        if (thisTypeObject != null && revisedTypeObject != null)
                        {
                            IfcTypeProduct thisTypeProduct = this as IfcTypeProduct, revisedTypeProduct = revised as IfcTypeProduct;
                            if (thisTypeProduct != null && revisedTypeProduct != null)
                            {
                                revisedTypeProduct.Tag = thisTypeProduct.Tag;
                                IfcElementType thisElementType = this as IfcElementType, revisedElementType = revised as IfcElementType;
                                if (thisElementType != null && revisedElementType != null)
                                {
                                    revisedElementType.ElementType = thisElementType.ElementType;
                                }
                            }
                        }
                    }
                }
            }
            else
            {
                IfcRepresentationItem representationItem = this as IfcRepresentationItem, revisedItem = revised as IfcRepresentationItem;
                if (representationItem != null && revisedItem != null)
                {
                    IfcStyledItem styledItem = representationItem.StyledByItem;
                    if (styledItem != null)
                    {
                        styledItem.Item = revisedItem;
                    }

                    foreach (IfcShapeModel shapeModel in representationItem.Represents.ToList())
                    {
                        shapeModel.Items.Remove(representationItem);
                        shapeModel.Items.Add(revisedItem);
                    }
                    IfcPresentationLayerAssignment layerAssignment = representationItem.mLayerAssignment;
                    if (layerAssignment != null)
                    {
                        layerAssignment.AssignedItems.Remove(representationItem);
                        layerAssignment.AssignedItems.Add(revisedItem);
                    }
                }
            }
            mDatabase[revised.mStepId] = null;
            revised.mStepId            = StepId;
            mDatabase[StepId]          = revised;
        }
Beispiel #50
0
		internal IfcRelAssignsToControl(IfcControl relControl, IfcObjectDefinition relObject) : base(relObject) { mRelatingControl = relControl.mIndex; relControl.mControls.Add(this); }
Beispiel #51
0
 public IfcUnitaryEquipment(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductRepresentation representation, IfcDistributionSystem system) : base(host, placement, representation, system)
 {
 }
Beispiel #52
0
		internal IfcRelAssignsToProcess(IfcProcess relProcess, IfcObjectDefinition relObject)
			: base(relObject) { mRelatingProcess = relProcess.mIndex; }
Beispiel #53
0
 public IfcJunctionBox(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductRepresentation representation, IfcDistributionSystem system) : base(host, placement, representation, system)
 {
 }
Beispiel #54
0
		public IfcRelAssignsToProduct(IfcObjectDefinition relObject, IfcProductSelect relProduct)
			: base(relObject) { mRelatingProduct = relProduct.Index; relProduct.ReferencedBy.Add(this); }
Beispiel #55
0
        internal IfcUnitaryEquipmentTypeEnum mPredefinedType = IfcUnitaryEquipmentTypeEnum.NOTDEFINED; // OPTIONAL : IfcUnitaryEquipmentTypeEnum;

        #endregion Fields

        #region Constructors

        public IfcUnitaryEquipment(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductRepresentation representation, IfcDistributionSystem system)
            : base(host, placement, representation, system)
        {
        }
Beispiel #56
0
 internal IfcFurnishingElement(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductRepresentation representation)
     : base(host, placement, representation)
 {
 }
Beispiel #57
0
 protected IfcGeotechnicalElement(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation) : base(host, placement, representation)
 {
 }
Beispiel #58
0
 public IfcFlowFitting(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductRepresentation representation, IfcDistributionSystem system)
     : base(host, placement, representation, system)
 {
 }
Beispiel #59
0
		protected IfcRelAssigns(IfcObjectDefinition related) : this(new List<IfcObjectDefinition>() { related }) { }
Beispiel #60
0
 internal IfcFilter(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductRepresentation representation, IfcDistributionSystem system)
     : base(host, placement, representation, system)
 {
 }