Exemplo n.º 1
0
        public static bool HasBoundingElement(this IfcSpace space, IModel model, IfcElement element)
        {
            IfcRelSpaceBoundary relation =
                model.Instances.Where <IfcRelSpaceBoundary>(
                    rel => rel.RelatingSpace == space && rel.RelatedBuildingElement == element).FirstOrDefault();

            return(relation != null);
        }
Exemplo n.º 2
0
        public static void AddBoundingElement(this IfcSpace space, IModel model, IfcElement element,
                                              IfcPhysicalOrVirtualEnum physicalOrVirtualBoundary,
                                              IfcInternalOrExternalEnum internalOrExternalBoundary)
        {
            //avoid adding element which is already defined as bounding element
            if (space.HasBoundingElement(model, element))
            {
                return;
            }

            IfcRelSpaceBoundary relation = model.Instances.New <IfcRelSpaceBoundary>(rel =>
            {
                rel.RelatingSpace = space;
                rel.InternalOrExternalBoundary =
                    internalOrExternalBoundary;
                rel.RelatedBuildingElement    = element;
                rel.PhysicalOrVirtualBoundary =
                    physicalOrVirtualBoundary;
            });
        }