Esempio n. 1
0
 public override void IfcParse(int propIndex, IPropertyValue value)
 {
     switch (propIndex)
     {
         case 0:
         case 1:
         case 2:
         case 3:
             base.IfcParse(propIndex, value);
             break;
         case 4:
             _relatedSpace = (IfcSpace) value.EntityVal;
             break;
         case 5:
             _relatedCoverings.Add((IfcCovering) value.EntityVal);
             break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }
Esempio n. 2
0
        //private IfcSpace _ifcSpace;

        public SpaceType(IfcSpace ifcSpace, CoBieLiteHelper helper)
            : this()
        {
           // _ifcSpace = ifcSpace;
            externalEntityName = helper.ExternalEntityName(ifcSpace);
            externalID = helper.ExternalEntityIdentity(ifcSpace);
            externalSystemName = helper.ExternalSystemName(ifcSpace);
            SpaceName = ifcSpace.Name;
            SpaceCategory = helper.GetClassification(ifcSpace);
            SpaceDescription = ifcSpace.Description;
            SpaceSignageName = helper.GetCoBieAttribute<StringValueType>("SpaceSignageName", ifcSpace).StringValue;
            SpaceUsableHeightValue = helper.GetCoBieAttribute<DecimalValueType>("SpaceUsableHeightValue", ifcSpace);
            SpaceGrossAreaValue = helper.GetCoBieAttribute<DecimalValueType>("SpaceGrossAreaValue", ifcSpace);
            SpaceNetAreaValue = helper.GetCoBieAttribute<DecimalValueType>("SpaceNetAreaValue", ifcSpace);

            //Zone Assignment
            var zones = helper.GetZones(ifcSpace);
            if (zones != null)
            {
                var ifcZones = zones.ToArray();
                SpaceZoneAssignments = new ZoneAssignmentCollectionType { ZoneAssignment = new List<ZoneKeyType>(ifcZones.Length) };
                for (int i = 0; i < ifcZones.Length; i++)
                {
                    var zoneAssignment = new ZoneKeyType();
                    zoneAssignment.ZoneCategory = helper.GetClassification(ifcZones[i]);
                    zoneAssignment.ZoneName = ifcZones[i].Name;
                    zoneAssignment.externalIDReference = helper.ExternalEntityIdentity(ifcZones[i]);
                    SpaceZoneAssignments.Add(zoneAssignment);
                }
            }
            //Attributes
            var ifcAttributes = helper.GetAttributes(ifcSpace);
            if (ifcAttributes != null && ifcAttributes.Any())
                SpaceAttributes = new AttributeCollectionType { Attribute = ifcAttributes };
    
            //TODO:
            //Space Issues
            //Space Documents
        }
Esempio n. 3
0
 internal XbimSpaceQuantities(IfcSpace space)
     : base(space, "SpaceQuantities")
 {
 }
Esempio n. 4
0
 /// <summary>
 /// Add space to the building story(Floor)
 /// </summary>
 /// <param name="row"></param>
 /// <param name="ifcSpace"></param>
 private void AddSpaceToBuildingStory(string floorName, IfcSpace ifcSpace)
 {
     if (ValidateString(floorName))
     {
         IfcBuildingStorey spaceBuildingStory = null;
         if (Floors.ContainsKey(floorName))
         {
             spaceBuildingStory = Floors[floorName];
         }
         else
         {
             spaceBuildingStory = Model.Instances.OfType<IfcBuildingStorey>().Where(bs => bs.Name.ToString().ToLower().Trim() == floorName.ToLower().Trim()).FirstOrDefault();
             if (spaceBuildingStory != null)
                 Floors.Add(floorName, spaceBuildingStory);
         }
         if (spaceBuildingStory != null)
             spaceBuildingStory.AddToSpatialDecomposition(ifcSpace);
     }
 }
 public override void IfcParse(int propIndex, IPropertyValue value)
 {
     switch (propIndex)
     {
         case 0:
         case 1:
         case 2:
         case 3:
             base.IfcParse(propIndex, value);
             break;
         case 4:
             _relatingSpace = (IfcSpace) value.EntityVal;
             break;
         case 5:
             _relatedBuildingElement = (IfcElement) value.EntityVal;
             break;
         case 6:
             _connectionGeometry = (IfcConnectionGeometry) value.EntityVal;
             break;
         case 7:
             _physicalOrVirtualBoundary =
                 (IfcPhysicalOrVirtualEnum) Enum.Parse(typeof (IfcPhysicalOrVirtualEnum), value.EnumVal, true);
             break;
         case 8:
             _internalOrExternalBoundary =
                 (IfcInternalOrExternalEnum) Enum.Parse(typeof (IfcInternalOrExternalEnum), value.EnumVal, true);
             break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }
Esempio n. 6
0
        /// <summary>
        /// Add Usable Height to the IfcSpace
        /// </summary>
        /// <param name="ifcSpace">IfcSpace Object</param>
        /// <param name="usableHeight">Height value as string</param>
        private void AddUsableHeight(IfcSpace ifcSpace, string usableHeight)
        {
            if (ValidateString(usableHeight))
            {
                double? height = GetDoubleFromString(usableHeight);
                if (height != null)
                {
                    AddPropertySingleValue(ifcSpace, "Pset_SpaceCommon", null, "UsableHeight", "Space Usable Height", new IfcLengthMeasure((double)height));
                }

            }
        }
Esempio n. 7
0
        /// <summary>
        /// Add Gross Floor Area
        /// </summary>
        /// <param name="ifcSpace">IfcSpace Object</param>
        /// <param name="areaValue">Area value as string</param>
        private void AddGrossArea(IfcSpace ifcSpace, string areaValue)
        {
            if (ValidateString(areaValue)) //ifcSpace.AddQuantity()
            {
                double? area = GetDoubleFromString(areaValue);
                if (area != null)
                {
                    IfcQuantityArea ifcQuantityArea = Model.Instances.New<IfcQuantityArea>(qa => { qa.Name = "GrossFloorArea"; qa.Description = "Gross Floor Area"; qa.AreaValue = new IfcAreaMeasure((double)area); });
                    string appname = "";
                    if (ifcSpace.OwnerHistory.OwningApplication != null)
                        appname = ifcSpace.OwnerHistory.OwningApplication.ApplicationFullName.ToString();
                    

                    ifcSpace.AddQuantity("BaseQuantities", ifcQuantityArea, appname);
                }
            }
        }
Esempio n. 8
0
 //internal constructor for creation from XbimDocument (parsing data into the document)
 internal XbimSpace(XbimDocument document, IfcSpace space) : base(document, space) { }
Esempio n. 9
0
 public SpaceKeyType(IfcSpace ifcSpace, CoBieLiteHelper helper)
     : this()
 {
     FloorName = helper.SpaceFloorLookup[ifcSpace].Name;
     SpaceName = ifcSpace.Name;
 }
 internal XbimSpaceCommonProperties(IfcSpace space) : base(space, "Pset_SpaceCommon") { }