Esempio n. 1
0
 public void AddBoundingElement(Guid guid, XbimPhysicalOrVirtualEnum type, XbimInternalOrExternalEnum external)
 {
     IfcGloballyUniqueId gid = new IfcGloballyUniqueId(guid);
     IfcElement element = _document.Model.Instances.Where<IfcBuildingElement>(elem => elem.GlobalId == gid).FirstOrDefault();
     if (element == null) return;
     Space.AddBoundingElement(_document.Model, element, GetIfcPhysicalOrVirtualEnum(type), GetIfcInternalOrExternalEnum(external));
 }
 void IBimSpatialStructureElement.AddBoundingElementToSpace(IBimSpatialStructureElement space, Guid elementGuid, XbimPhysicalOrVirtualEnum type, XbimInternalOrExternalEnum external)
 {
     XbimSpace xSpace = space as XbimSpace;
     if (xSpace == null ) throw new ArgumentException();
     xSpace.AddBoundingElement(elementGuid, type, external);
 }
 void IBimSpatialStructureElement.AddBoundingElementToSpace(IBimSpatialStructureElement space, IBimBuildingElement element, XbimPhysicalOrVirtualEnum type, XbimInternalOrExternalEnum external)
 {
     XbimSpace xSpace = space as XbimSpace;
     XbimBuildingElement xElement = element as XbimBuildingElement;
     if (xSpace == null || xElement == null) throw new ArgumentException();
     xSpace.AddBoundingElement(xElement, type, external);
 }
Esempio n. 4
0
 private IfcPhysicalOrVirtualEnum GetIfcPhysicalOrVirtualEnum(XbimPhysicalOrVirtualEnum type)
 {
     switch (type)
     {
         case XbimPhysicalOrVirtualEnum.NOTDEFINED: return IfcPhysicalOrVirtualEnum.NOTDEFINED;
         case XbimPhysicalOrVirtualEnum.PHYSICAL: return IfcPhysicalOrVirtualEnum.PHYSICAL;
         case XbimPhysicalOrVirtualEnum.VIRTUAL: return IfcPhysicalOrVirtualEnum.VIRTUAL;
     }
     throw new Exception("Not defined");
 }
Esempio n. 5
0
 public void AddBoundingElement(XbimBuildingElement element, XbimPhysicalOrVirtualEnum type, XbimInternalOrExternalEnum external)
 {
     IfcElement el = element.IfcBuildingElement;
     if (el == null) return;
     Space.AddBoundingElement(_document.Model, el, GetIfcPhysicalOrVirtualEnum(type), GetIfcInternalOrExternalEnum(external));
 }