public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex)
        {
            switch (propIndex)
            {
            case 0:
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
            case 6:
                base.Parse(propIndex, value, nestedIndex);
                return;

            case 7:
                _longName = value.StringVal;
                return;

            case 8:
                _compositionType = (IfcElementCompositionEnum)System.Enum.Parse(typeof(IfcElementCompositionEnum), value.EnumVal, true);
                return;

            default:
                throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper()));
            }
        }
Exemplo n.º 2
0
        /// <summary>
        ///  Erzeugt Site in Project
        /// </summary>
        /// <param name="model">           Projct </param>
        /// <param name="name">            Bezeichnung der Site </param>
        /// <param name="placement">       Ursprung </param>
        /// <param name="refLatitude">     Breitengrad </param>
        /// <param name="refLongitude">    Längengrad </param>
        /// <param name="refElevation">    Höhe </param>
        /// <param name="compositionType"> Bei einer Site nicht ändern </param>
        /// <returns>  </returns>
        private static IfcSite createSite(IfcStore model,
                                          string name,
                                          Axis2Placement3D placement = null,
                                          double?refLatitude         = null,
                                          double?refLongitude        = null,
                                          double?refElevation        = null,
                                          IfcElementCompositionEnum compositionType = IfcElementCompositionEnum.ELEMENT)
        {
            using (var txn = model.BeginTransaction("Create Site"))
            {
                var site = model.Instances.New <IfcSite>(s =>
                {
                    s.Name            = name;
                    s.CompositionType = compositionType;
                    if (refLatitude.HasValue)
                    {
                        s.RefLatitude = IfcCompoundPlaneAngleMeasure.FromDouble(refLatitude.Value);
                    }
                    if (refLongitude.HasValue)
                    {
                        s.RefLongitude = IfcCompoundPlaneAngleMeasure.FromDouble(refLongitude.Value);
                    }
                    s.RefElevation = refElevation;

                    placement         = placement ?? Axis2Placement3D.Standard;
                    s.ObjectPlacement = createLocalPlacement(model, placement);
                });

                txn.Commit();
                return(site);
            }
        }
        public Building(IfcStore model, string name, LocalPlacement localPlacement, IfcElementCompositionEnum compositionType, PostalAddress postalAdress)
        {
            ifcBuilding = model.Instances.New <IfcBuilding>(p =>
            {
                p.Name            = name;
                p.ObjectPlacement = localPlacement.IfcLocalPlacement;
                p.CompositionType = compositionType;
                p.BuildingAddress = postalAdress.IfcPostalAdress;
            });

            this.name            = name;
            this.localPlacement  = localPlacement;
            this.compositionType = compositionType;
            this.postalAdress    = postalAdress;
        }
Exemplo n.º 4
0
        public Site(IfcStore model, string name, LocalPlacement localPlacement, IfcElementCompositionEnum compositionType, double relativeElevation)
        {
            ifcSite = model.Instances.New <IfcSite>(p =>
            {
                p.Name            = name;
                p.ObjectPlacement = localPlacement.IfcLocalPlacement;
                p.CompositionType = compositionType;
                p.RefElevation    = relativeElevation;
            });

            //this.ownerHistory = ownerHistory;
            this.name              = name;
            this.localPlacement    = localPlacement;
            this.compositionType   = compositionType;
            this.relativeElevation = relativeElevation;
        }
        public BuildingStorey(IfcStore model, string name, LocalPlacement localPlacement, IfcElementCompositionEnum compositionType, double elevation)
        {
            this.Model = model;

            ifcBuildingStorey = model.Instances.New <IfcBuildingStorey>(p =>
            {
                p.Name            = name;
                p.ObjectPlacement = localPlacement.IfcLocalPlacement;
                p.CompositionType = compositionType;
                p.Elevation       = elevation;
            });

            this.name            = name;
            this.localPlacement  = localPlacement;
            this.compositionType = compositionType;
            this.elevation       = elevation;
        }
Exemplo n.º 6
0
        /// <summary>
        ///  Erzeugt Site in Project
        /// </summary>
        /// <param name="model">           Projct </param>
        /// <param name="name">            Bezeichnung der Site </param>
        /// <param name="placement">       Ursprung </param>
        /// <param name="refLatitude">     Breitengrad </param>
        /// <param name="refLongitude">    Längengrad </param>
        /// <param name="refElevation">    Höhe </param>
        /// <param name="compositionType"> Bei einer Site nicht ändern </param>
        /// <returns>  </returns>
        private static IfcSite createSite(IfcStore model,
                                          string name,
                                          Axis2Placement3D placement = null,
                                          double?refLatitude         = null,
                                          double?refLongitude        = null,
                                          double?refElevation        = null,
                                          IfcElementCompositionEnum compositionType = IfcElementCompositionEnum.ELEMENT)
        {
            //Serilog.Log.Logger = new LoggerConfiguration()
            //   .MinimumLevel.Debug()
            //   .WriteTo.File(System.Configuration.ConfigurationManager.AppSettings["LogFilePath"])
            //   .CreateLogger();
            using (var txn = model.BeginTransaction("Create Site"))
            {
                var site = model.Instances.New <IfcSite>(s =>
                {
                    s.Name            = name;
                    s.CompositionType = compositionType;
                    if (refLatitude.HasValue)
                    {
                        s.RefLatitude = IfcCompoundPlaneAngleMeasure.FromDouble(refLatitude.Value);
                    }
                    if (refLongitude.HasValue)
                    {
                        s.RefLongitude = IfcCompoundPlaneAngleMeasure.FromDouble(refLongitude.Value);
                    }
                    s.RefElevation = refElevation;

                    placement         = placement ?? Axis2Placement3D.Standard;
                    s.ObjectPlacement = createLocalPlacement(model, placement);
                });
                txn.Commit();
                //Log.Information("IfcSite created");
                return(site);
            }
        }
Exemplo n.º 7
0
 public IfcBuilding(IfcGloballyUniqueId globalId, IfcOwnerHistory ownerHistory, IfcLabel name, IfcText description, IfcLabel objectType, IfcObjectPlacement objectPlacement, IfcProductRepresentation representation, IfcLabel longName, IfcElementCompositionEnum compositionType, IfcLengthMeasure elevationOfRefHeight, IfcLengthMeasure elevationOfTerrain, IfcPostalAddress buildingAddress) : base(globalId, ownerHistory, name, description, objectType, objectPlacement, representation, longName, compositionType)
 {
     ElevationOfRefHeight = elevationOfRefHeight;
     ElevationOfTerrain   = elevationOfTerrain;
     BuildingAddress      = buildingAddress;
 }
Exemplo n.º 8
0
        public IfcSpace(IfcGloballyUniqueId globalId, IfcOwnerHistory ownerHistory, IfcLabel name, IfcText description, IfcLabel objectType, IfcObjectPlacement objectPlacement, IfcProductRepresentation representation, IfcLabel longName, IfcElementCompositionEnum compositionType, IfcSpaceTypeEnum predefinedType, IfcLengthMeasure elevationWithFlooring) : base(globalId, ownerHistory, name, description, objectType, objectPlacement, representation, longName, compositionType)
        {
            HasCoverings = new List <IfcRelCoversSpaces>();
            BoundedBy    = new List <IfcRelSpaceBoundary>();

            PredefinedType        = predefinedType;
            ElevationWithFlooring = elevationWithFlooring;
        }
 public IfcSpatialStructureElement(IfcGloballyUniqueId globalId, IfcOwnerHistory ownerHistory, IfcLabel name, IfcText description, IfcLabel objectType, IfcObjectPlacement objectPlacement, IfcProductRepresentation representation, IfcLabel longName, IfcElementCompositionEnum compositionType) : base(globalId, ownerHistory, name, description, objectType, objectPlacement, representation, longName)
 {
     CompositionType = compositionType;
 }
Exemplo n.º 10
0
 public IfcSpace(IfcGloballyUniqueId __GlobalId, IfcOwnerHistory __OwnerHistory, IfcLabel?__Name, IfcText?__Description, IfcLabel?__ObjectType, IfcObjectPlacement __ObjectPlacement, IfcProductRepresentation __Representation, IfcLabel?__LongName, IfcElementCompositionEnum __CompositionType, IfcInternalOrExternalEnum __InteriorOrExteriorSpace, IfcLengthMeasure?__ElevationWithFlooring)
     : base(__GlobalId, __OwnerHistory, __Name, __Description, __ObjectType, __ObjectPlacement, __Representation, __LongName, __CompositionType)
 {
     this._InteriorOrExteriorSpace = __InteriorOrExteriorSpace;
     this._ElevationWithFlooring   = __ElevationWithFlooring;
 }
Exemplo n.º 11
0
		protected IfcSpatialStructureElement(DatabaseIfc m) : base(m) { if (m.mSchema == Schema.IFC2x3) mCompositionType = IfcElementCompositionEnum.ELEMENT; }
Exemplo n.º 12
0
 public IfcSite(IfcGloballyUniqueId globalId, IfcOwnerHistory ownerHistory, IfcLabel name, IfcText description, IfcLabel objectType, IfcObjectPlacement objectPlacement, IfcProductRepresentation representation, IfcLabel longName, IfcElementCompositionEnum compositionType, IfcCompoundPlaneAngleMeasure refLatitude, IfcCompoundPlaneAngleMeasure refLongitude, IfcLengthMeasure refElevation, IfcLabel landTitleNumber, IfcPostalAddress siteAddress) : base(globalId, ownerHistory, name, description, objectType, objectPlacement, representation, longName, compositionType)
 {
     RefLatitude     = refLatitude;
     RefLongitude    = refLongitude;
     RefElevation    = refElevation;
     LandTitleNumber = landTitleNumber;
     SiteAddress     = siteAddress;
 }
Exemplo n.º 13
0
 public IfcSite(IfcGloballyUniqueId __GlobalId, IfcOwnerHistory __OwnerHistory, IfcLabel?__Name, IfcText?__Description, IfcLabel?__ObjectType, IfcObjectPlacement __ObjectPlacement, IfcProductRepresentation __Representation, IfcLabel?__LongName, IfcElementCompositionEnum __CompositionType, IfcCompoundPlaneAngleMeasure?__RefLatitude, IfcCompoundPlaneAngleMeasure?__RefLongitude, IfcLengthMeasure?__RefElevation, IfcLabel?__LandTitleNumber, IfcPostalAddress __SiteAddress)
     : base(__GlobalId, __OwnerHistory, __Name, __Description, __ObjectType, __ObjectPlacement, __Representation, __LongName, __CompositionType)
 {
     this._RefLatitude     = __RefLatitude;
     this._RefLongitude    = __RefLongitude;
     this._RefElevation    = __RefElevation;
     this._LandTitleNumber = __LandTitleNumber;
     this._SiteAddress     = __SiteAddress;
 }
Exemplo n.º 14
0
		protected IfcSpatialStructureElement(IfcSpatialStructureElement host,string name) : base(host,name) { if (mDatabase.mSchema == Schema.IFC2x3) mCompositionType = IfcElementCompositionEnum.ELEMENT; }
Exemplo n.º 15
0
 public IfcBuildingStorey(IfcGloballyUniqueId __GlobalId, IfcOwnerHistory __OwnerHistory, IfcLabel?__Name, IfcText?__Description, IfcLabel?__ObjectType, IfcObjectPlacement __ObjectPlacement, IfcProductRepresentation __Representation, IfcLabel?__LongName, IfcElementCompositionEnum __CompositionType, IfcLengthMeasure?__Elevation)
     : base(__GlobalId, __OwnerHistory, __Name, __Description, __ObjectType, __ObjectPlacement, __Representation, __LongName, __CompositionType)
 {
     this._Elevation = __Elevation;
 }
Exemplo n.º 16
0
 public IfcSpatialStructureElement(IfcGloballyUniqueId __GlobalId, IfcOwnerHistory __OwnerHistory, IfcLabel?__Name, IfcText?__Description, IfcLabel?__ObjectType, IfcObjectPlacement __ObjectPlacement, IfcProductRepresentation __Representation, IfcLabel?__LongName, IfcElementCompositionEnum __CompositionType)
     : base(__GlobalId, __OwnerHistory, __Name, __Description, __ObjectType, __ObjectPlacement, __Representation)
 {
     this._LongName        = __LongName;
     this._CompositionType = __CompositionType;
 }
Exemplo n.º 17
0
 public IfcBuilding(IfcGloballyUniqueId __GlobalId, IfcOwnerHistory __OwnerHistory, IfcLabel?__Name, IfcText?__Description, IfcLabel?__ObjectType, IfcObjectPlacement __ObjectPlacement, IfcProductRepresentation __Representation, IfcLabel?__LongName, IfcElementCompositionEnum __CompositionType, IfcLengthMeasure?__ElevationOfRefHeight, IfcLengthMeasure?__ElevationOfTerrain, IfcPostalAddress __BuildingAddress)
     : base(__GlobalId, __OwnerHistory, __Name, __Description, __ObjectType, __ObjectPlacement, __Representation, __LongName, __CompositionType)
 {
     this._ElevationOfRefHeight = __ElevationOfRefHeight;
     this._ElevationOfTerrain   = __ElevationOfTerrain;
     this._BuildingAddress      = __BuildingAddress;
 }
Exemplo n.º 18
0
 public IfcBuildingStorey(IfcGloballyUniqueId globalId, IfcOwnerHistory ownerHistory, IfcLabel name, IfcText description, IfcLabel objectType, IfcObjectPlacement objectPlacement, IfcProductRepresentation representation, IfcLabel longName, IfcElementCompositionEnum compositionType, IfcLengthMeasure elevation) : base(globalId, ownerHistory, name, description, objectType, objectPlacement, representation, longName, compositionType)
 {
     Elevation = elevation;
 }
Exemplo n.º 19
0
		protected IfcSpatialStructureElement(IfcSpatialStructureElement p) : base(p) { mCompositionType = p.mCompositionType; }