Esempio n. 1
0
        protected override void GenerateInstance(IfcBuilding building)
        {
            DatabaseIfc      db                     = building.Database;
            IfcMaterial      masonryFinish          = new IfcMaterial(db, "Masonry - Brick - Brown");
            IfcMaterial      masonry                = new IfcMaterial(db, "Masonry");
            IfcMaterialLayer layerFinish            = new IfcMaterialLayer(masonryFinish, 110, "Finish");
            IfcMaterialLayer airInfiltrationBarrier = new IfcMaterialLayer(db, 50, "Air Infiltration Barrier")
            {
                IsVentilated = IfcLogicalEnum.TRUE
            };
            IfcMaterialLayer    structure        = new IfcMaterialLayer(masonry, 110, "Core");
            string              name             = "Double Brick - 270";
            IfcMaterialLayerSet materialLayerSet = new IfcMaterialLayerSet(new List <IfcMaterialLayer>()
            {
                layerFinish, airInfiltrationBarrier, structure
            }, name);

            db.NextObjectRecord = 300;
            IfcWallType wallType = new IfcWallType(name, materialLayerSet, IfcWallTypeEnum.NOTDEFINED);
            IfcMaterialLayerSetUsage layerSetUsage    = new IfcMaterialLayerSetUsage(materialLayerSet, IfcLayerSetDirectionEnum.AXIS2, IfcDirectionSenseEnum.POSITIVE, -materialLayerSet.MaterialLayers.Sum(x => x.LayerThickness) / 2.0);
            IfcWallStandardCase      wallStandardCase = new IfcWallStandardCase(building, layerSetUsage, new IfcAxis2Placement3D(new IfcCartesianPoint(db, 0, 0, 0)), 5000, 2000);

            db.Context.AddDeclared(wallType);

            //Unique ids assigned to generate constant IfcScript  sample files, remove otherwise
            wallType.GlobalId                    = "2aG1gZj7PD2PztLOx2$IVX";
            wallStandardCase.GlobalId            = "0DWgwt6o1FOx7466fPk$jl";
            materialLayerSet.Associates.GlobalId = "36U74BIPDD89cYkx9bkV$Y";
            wallStandardCase.MaterialSelect.Associates.GlobalId = "1BYoVhjtLADPUZYzipA826";
        }
Esempio n. 2
0
        protected override void GenerateData(STPModelData md, IfcBuilding building)
        {
            IfcMaterial         masonryFinish          = new IfcMaterial(md, "Masonry - Brick - Brown", "", "");
            IfcMaterial         masonry                = new IfcMaterial(md, "Masonry", "", "");
            IfcMaterialLayer    layerFinish            = new IfcMaterialLayer(md, masonryFinish, 110, false, "Finish", "", "", 0);
            IfcMaterialLayer    airInfiltrationBarrier = new IfcMaterialLayer(md, null, 50, true, "Air Infiltration Barrier", "", "", 0);
            IfcMaterialLayer    structure              = new IfcMaterialLayer(md, masonry, 110, false, "Core", "", "", 0);
            string              name             = "Double Brick - 270";
            IfcMaterialLayerSet materialLayerSet = new IfcMaterialLayerSet(new List <IfcMaterialLayer>()
            {
                layerFinish, airInfiltrationBarrier, structure
            }, name, "");

            materialLayerSet.Associates.GlobalId = "36U74BIPDD89cYkx9bkV$Y";
            md.NextObjectRecord = 300;
            IfcWallType wallType = new IfcWallType(name, materialLayerSet, IfcWallTypeEnum.NOTDEFINED)
            {
                GlobalId = "2aG1gZj7PD2PztLOx2$IVX"
            };

            wallType.ObjectTypeOf.GlobalId = "1$EkFElNT8TB_VUVG1FtMe";
            IfcWallStandardCase wallStandardCase = new IfcWallStandardCase(building, wallType, new Line(0, 0, 0, 5000, 0, 0), 2000, 0, true, null)
            {
                GlobalId = "0DWgwt6o1FOx7466fPk$jl"
            };

            wallStandardCase.MaterialSelect.Associates.GlobalId = "1BYoVhjtLADPUZYzipA826";
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            DatabaseIfc db       = new DatabaseIfc(ModelView.Ifc4DesignTransfer);
            IfcBuilding building = new IfcBuilding(db, "IfcBuilding")
            {
            };
            IfcProject project = new IfcProject(building, "IfcProject", IfcUnitAssignment.Length.Millimetre)
            {
            };

            //IfcBuildingStorey storey = new IfcBuildingStorey(building, "Ground Floor", 0);
            IfcMaterial      masonryFinish          = new IfcMaterial(db, "Masonry - Brick - Brown");
            IfcMaterial      masonry                = new IfcMaterial(db, "Masonry");
            IfcMaterialLayer layerFinish            = new IfcMaterialLayer(masonryFinish, 110, "Finish");
            IfcMaterialLayer airInfiltrationBarrier = new IfcMaterialLayer(db, 50, "Air Infiltration Barrier")
            {
                IsVentilated = IfcLogicalEnum.TRUE
            };
            IfcMaterialLayer    structure        = new IfcMaterialLayer(masonry, 110, "Core");
            string              name             = "Double Brick - 270";
            IfcMaterialLayerSet materialLayerSet = new IfcMaterialLayerSet(new List <IfcMaterialLayer>()
            {
                layerFinish, airInfiltrationBarrier, structure
            }, name);

            db.NextObjectRecord = 300;
            IfcWallType wallType = new IfcWallType(name, materialLayerSet, IfcWallTypeEnum.NOTDEFINED)
            {
            };
            // todo implement rhinocommon overload IfcWallStandardCase wallStandardCase = new IfcWallStandardCase(building, wallType, new Line(0, 0, 0, 5000, 0, 0), 2000, 0, true, null) {  };
        }
Esempio n. 4
0
        static void Main(string[] args)
        {
            DatabaseIfc db       = new DatabaseIfc(ModelView.Ifc4DesignTransfer);
            IfcBuilding building = new IfcBuilding(db, "IfcBuilding")
            {
            };
            IfcProject project = new IfcProject(building, "IfcProject", IfcUnitAssignment.Length.Millimetre)
            {
            };

            //IfcBuildingStorey storey = new IfcBuildingStorey(building, "Ground Floor", 0);
            IfcMaterial      masonryFinish          = new IfcMaterial(db, "Masonry - Brick - Brown");
            IfcMaterial      masonry                = new IfcMaterial(db, "Masonry");
            IfcMaterialLayer layerFinish            = new IfcMaterialLayer(masonryFinish, 110, "Finish");
            IfcMaterialLayer airInfiltrationBarrier = new IfcMaterialLayer(db, 50, "Air Infiltration Barrier")
            {
                IsVentilated = IfcLogicalEnum.TRUE
            };
            IfcMaterialLayer    structure        = new IfcMaterialLayer(masonry, 110, "Core");
            string              name             = "Double Brick - 270";
            IfcMaterialLayerSet materialLayerSet = new IfcMaterialLayerSet(new List <IfcMaterialLayer>()
            {
                layerFinish, airInfiltrationBarrier, structure
            }, name);
            IfcMaterialLayerSetUsage materialLayerSetUsage = new IfcMaterialLayerSetUsage(materialLayerSet, IfcLayerSetDirectionEnum.AXIS2, IfcDirectionSenseEnum.POSITIVE, 0);

            db.NextObjectRecord = 300;
            IfcWallType wallType = new IfcWallType(name, materialLayerSet, IfcWallTypeEnum.NOTDEFINED)
            {
            };
            IfcWallStandardCase wallStandardCase = new IfcWallStandardCase(building, materialLayerSetUsage, new IfcAxis2Placement3D(new IfcCartesianPoint(db, 0, 0, 0)), 5000, 2000)
            {
            };
        }
Esempio n. 5
0
		protected override void GenerateData(STPModelData md, IfcBuilding building)
		{
			IfcMaterial masonryFinish = new IfcMaterial(md, "Masonry - Brick - Brown", "", "");
			IfcMaterial masonry = new IfcMaterial(md, "Masonry", "", "");
			IfcMaterialLayer layerFinish = new IfcMaterialLayer(md, masonryFinish, 110, false, "Finish", "", "", 0);
			IfcMaterialLayer airInfiltrationBarrier = new IfcMaterialLayer(md, null, 50, true, "Air Infiltration Barrier", "", "", 0);
			IfcMaterialLayer structure = new IfcMaterialLayer(md, masonry, 110, false, "Core", "", "", 0);
			string name = "Double Brick - 270";
			IfcMaterialLayerSet materialLayerSet = new IfcMaterialLayerSet( new List<IfcMaterialLayer>() { layerFinish, airInfiltrationBarrier, structure }, name, "");
			materialLayerSet.Associates.GlobalId = "36U74BIPDD89cYkx9bkV$Y";
			md.NextObjectRecord = 300;
			IfcWallType wallType = new IfcWallType(name, materialLayerSet, IfcWallTypeEnum.NOTDEFINED) { GlobalId = "2aG1gZj7PD2PztLOx2$IVX" };
			wallType.ObjectTypeOf.GlobalId = "1$EkFElNT8TB_VUVG1FtMe";
			IfcWallStandardCase wallStandardCase = new IfcWallStandardCase(building, wallType, new Line(0, 0, 0, 5000, 0, 0), 2000, 0, true, null) { GlobalId = "0DWgwt6o1FOx7466fPk$jl" };
			wallStandardCase.MaterialSelect.Associates.GlobalId = "1BYoVhjtLADPUZYzipA826";
		}