Beispiel #1
0
		protected override void GenerateData(STPModelData md, IfcBuilding building)
		{
			IfcBeamType beamType = GetParametericIPE200(md);
			IfcBeamStandardCase beamStandardCase = new IfcBeamStandardCase(building, beamType, new Line(0, 0, 0, 0, 1000, 0), Vector3d.ZAxis, IfcCardinalPointReference.TOPMID, new List<Plane>()) { GlobalId = "0a_qfeQLDA8e5qT$Do6J_t", Name= "Extrusion" };
			beamStandardCase.Material.Associates.GlobalId = "2uxxMWfA51AAznk5bQJylf";
			IfcBeamStandardCase beamStandardCase2 = new IfcBeamStandardCase(building, beamType, new Arc(new Point3d(0, 0, 400), new Point3d(-100, 500, 400), new Point3d(0, 1000, 400)), Vector3d.ZAxis, IfcCardinalPointReference.TOPMID, new List<Plane>()) { GlobalId ="1zqFh80l11VgfEm3ZWh6Xv", Name = "Revolution" };
		}
Beispiel #2
0
        protected override void GenerateData(DatabaseIfc database, IfcBuilding building)
        {
            IfcBeamType           beamType           = GetParametericIPE200(database);
            IfcMaterialProfileSet materialProfileSet = beamType.MaterialSelect as IfcMaterialProfileSet;
            IfcBeamStandardCase   beamStandardCase1  = new IfcBeamStandardCase(building, new IfcMaterialProfileSetUsage(materialProfileSet, IfcCardinalPointReference.TOPMID), new IfcAxis2Placement3D(new IfcCartesianPoint(database, 0, 0, 0), database.Factory.YAxis, database.Factory.XAxisNegative), 1000)
            {
                GlobalId = "2YX3YEaA13qOf$B1iBgAf6", Name = "TopMid", RelatingType = beamType
            };
            IfcBeamStandardCase beamStandardCase2 = new IfcBeamStandardCase(building, new IfcMaterialProfileSetUsage(materialProfileSet, IfcCardinalPointReference.BOTMID), new IfcAxis2Placement3D(new IfcCartesianPoint(database, 0, 0, 0), database.Factory.YAxis, database.Factory.XAxisNegative), 1000)
            {
                GlobalId = "39IDqhhC14BxCj_Ryk$esj", Name = "BotMid", RelatingType = beamType
            };
            IfcBeamStandardCase beamStandardCase3 = new IfcBeamStandardCase(building, new IfcMaterialProfileSetUsage(materialProfileSet, IfcCardinalPointReference.BOTLEFT), new IfcAxis2Placement3D(new IfcCartesianPoint(database, 500, 0, 0), database.Factory.YAxis, database.Factory.XAxisNegative), 1000)
            {
                GlobalId = "17CqI$IjrDARuaYNcWcoRH", Name = "BotLeft", RelatingType = beamType
            };
            IfcBeamStandardCase beamStandardCase4 = new IfcBeamStandardCase(building, new IfcMaterialProfileSetUsage(materialProfileSet, IfcCardinalPointReference.TOPRIGHT), new IfcAxis2Placement3D(new IfcCartesianPoint(database, 500, 0, 0), database.Factory.YAxis, database.Factory.XAxisNegative), 1000)
            {
                GlobalId = "3TOzuh11rACgRkioYYOjj5", Name = "TopRight", RelatingType = beamType
            };

            //Unique ids assigned to generate constant IfcScript  sample files, remove otherwise
            beamStandardCase1.MaterialSelect.Associates.GlobalId = "2v53tpkKfC1QI$UVEwGxEy";
            beamStandardCase2.MaterialSelect.Associates.GlobalId = "2GHGDnjC1BI8mr5FS1ysvq";
            beamStandardCase3.MaterialSelect.Associates.GlobalId = "1v094xksfDT9bOdSPNsjLB";
            beamStandardCase4.MaterialSelect.Associates.GlobalId = "0ys4PwYgT5dAduf$ECulk$";
        }
Beispiel #3
0
        protected override void GenerateData(DatabaseIfc db, IfcBuilding building)
        {
            IfcBeamType           beamType           = GetParametericIPE200(db);
            IfcMaterialProfileSet materialProfileSet = beamType.MaterialSelect as IfcMaterialProfileSet;
            IfcBeamStandardCase   beamStandardCase   = new IfcBeamStandardCase(building, new IfcMaterialProfileSetUsage(materialProfileSet, IfcCardinalPointReference.MID), new IfcAxis2Placement3D(new IfcCartesianPoint(db, 0, 0, 0), db.Factory.YAxis, db.Factory.XAxisNegative), 1000)
            {
                GlobalId = "0uo2yx7G19uwCu9sIjn6DQ", Name = beamType.Name, RelatingType = beamType
            };

            db.NextObjectRecord = 300;
            string name = "CHS219.1x6.3";
            IfcCircleHollowProfileDef chs219x6 = new IfcCircleHollowProfileDef(db, name, 219.1 / 2.0, 6.3);

            materialProfileSet = beamType.MaterialSelect as IfcMaterialProfileSet;
            IfcMaterialProfile materialProfile2 = new IfcMaterialProfile(name, materialProfileSet.MaterialProfiles[0].Material, chs219x6);
            IfcBeamType        beamType2        = new IfcBeamType(name, materialProfile2, IfcBeamTypeEnum.BEAM)
            {
                GlobalId = "3l_OKNTJr4yBOR5rYl6b9w"
            };

            materialProfileSet = beamType2.MaterialSelect as IfcMaterialProfileSet;
            IfcBeamStandardCase beamStandardCase2 = new IfcBeamStandardCase(building, new IfcMaterialProfileSetUsage(materialProfileSet, IfcCardinalPointReference.MID), new IfcAxis2Placement3D(new IfcCartesianPoint(db, 500, 0, 0), db.Factory.YAxis, db.Factory.XAxisNegative), 1000)
            {
                GlobalId = "3_NFDdmqr7mxekvlvcgwa7", Name = name, RelatingType = beamType2
            };

            //Unique ids assigned to generate constant IfcScript  sample files, remove otherwise
            beamStandardCase.MaterialSelect.Associates.GlobalId = "2SL41bR1rCj99SIKuKXeFl";
            beamType.ObjectTypeOf.GlobalId = "3s_DqAVvb3LguudTShJHVo";
            beamType.MaterialSelect.Associates.GlobalId          = "3tlx8qcefDouGWiGFgBV8d";
            beamType2.ObjectTypeOf.GlobalId                      = "3LrutsCpn4DPF9Zt4YdIEU";
            beamType2.MaterialSelect.Associates.GlobalId         = "14nDe0n1bErgiI78N83Oxd";
            beamStandardCase2.MaterialSelect.Associates.GlobalId = "1Set5Cyu9BFOWznvoQe1ho";
        }
Beispiel #4
0
        protected override void GenerateData(STPModelData md, IfcBuilding building)
        {
            IfcBeamType         beamType         = GetParametericIPE200(md);
            IfcBeamStandardCase beamStandardCase = new IfcBeamStandardCase(building, beamType, new Line(0, 0, 0, 0, 1000, 0), Vector3d.ZAxis, IfcCardinalPointReference.TOPMID, new List <Plane>())
            {
                GlobalId = "2YX3YEaA13qOf$B1iBgAf6", Name = "TopMid"
            };

            beamStandardCase.Material.Associates.GlobalId = "2v53tpkKfC1QI$UVEwGxEy";
            IfcBeamStandardCase beamStandardCase2 = new IfcBeamStandardCase(building, beamType, new Line(0, 0, 0, 0, 1000, 0), Vector3d.ZAxis, IfcCardinalPointReference.BOTMID, new List <Plane>())
            {
                GlobalId = "39IDqhhC14BxCj_Ryk$esj", Name = "BotMid"
            };

            beamStandardCase2.Material.Associates.GlobalId = "2GHGDnjC1BI8mr5FS1ysvq";
            IfcBeamStandardCase beamStandardCase3 = new IfcBeamStandardCase(building, beamType, new Line(500, 0, 0, 500, 1000, 0), Vector3d.ZAxis, IfcCardinalPointReference.BOTLEFT, new List <Plane>())
            {
                GlobalId = "17CqI$IjrDARuaYNcWcoRH", Name = "BotLeft"
            };

            beamStandardCase3.Material.Associates.GlobalId = "1v094xksfDT9bOdSPNsjLB";
            IfcBeamStandardCase beamStandardCase4 = new IfcBeamStandardCase(building, beamType, new Line(500, 0, 0, 500, 1000, 0), Vector3d.ZAxis, IfcCardinalPointReference.TOPRIGHT, new List <Plane>())
            {
                GlobalId = "3TOzuh11rACgRkioYYOjj5", Name = "TopRight"
            };

            beamStandardCase4.Material.Associates.GlobalId = "0ys4PwYgT5dAduf$ECulk$";
        }
Beispiel #5
0
        protected override void GenerateData(STPModelData md, IfcBuilding building)
        {
            IfcBeamType         beamType         = GetParametericIPE200(md);
            IfcBeamStandardCase beamStandardCase = new IfcBeamStandardCase(building, beamType, new Line(0, 0, 0, 0, 1000, 0), Vector3d.ZAxis, IfcCardinalPointReference.MID, new List <Plane>())
            {
                GlobalId = "0uo2yx7G19uwCu9sIjn6DQ", Name = beamType.Name
            };

            beamStandardCase.Material.Associates.GlobalId = "2SL41bR1rCj99SIKuKXeFl";
            md.NextObjectRecord = 300;
            string name = "CHS219.1x6.3";
            IfcCircleHollowProfileDef chs219x6           = new IfcCircleHollowProfileDef(md, name, 219.1 / 2.0, 6.3);
            IfcMaterialProfileSet     materialProfileSet = beamType.MaterialSelect as IfcMaterialProfileSet;
            IfcMaterialProfile        materialProfile2   = new IfcMaterialProfile(md, name, "", materialProfileSet.MaterialProfiles[0].Material, chs219x6, 0, "");
            IfcBeamType beamType2 = new IfcBeamType(name, materialProfile2, IfcBeamTypeEnum.BEAM)
            {
                GlobalId = "3l_OKNTJr4yBOR5rYl6b9w"
            };

            beamType2.ObjectTypeOf.GlobalId        = "3LrutsCpn4DPF9Zt4YdIEU";
            beamType2.Material.Associates.GlobalId = "14nDe0n1bErgiI78N83Oxd";
            IfcBeamStandardCase beamStandardCase2 = new IfcBeamStandardCase(building, beamType2, new Line(500, 0, 0, 500, 1000, 0), Vector3d.ZAxis, IfcCardinalPointReference.MID, new List <Plane>())
            {
                GlobalId = "3_NFDdmqr7mxekvlvcgwa7", Name = name
            };

            beamStandardCase2.Material.Associates.GlobalId = "1Set5Cyu9BFOWznvoQe1ho";
        }
Beispiel #6
0
        protected override void GenerateData(STPModelData md, IfcBuilding building)
        {
            IfcBeamType         beamType         = GetParametericIPE200(md);
            IfcBeamStandardCase beamStandardCase = new IfcBeamStandardCase(building, new IfcElemParams("0a_qfeQLDA8e5qT$Do6J_t", "Extrusion", "", "", ""), beamType, new Line(0, 0, 0, 0, 1000, 0), Vector3d.ZAxis, IfcCardinalPointReference.TOPMID, new List <Plane>());

            beamStandardCase.Material.Associates.GlobalId = "2uxxMWfA51AAznk5bQJylf";
            IfcBeamStandardCase beamStandardCase2 = new IfcBeamStandardCase(building, new IfcElemParams("1zqFh80l11VgfEm3ZWh6Xv", "Revolution", "", "", ""), beamType, new Arc(new Point3d(0, 0, 400), new Point3d(-100, 500, 400), new Point3d(0, 1000, 400)), Vector3d.ZAxis, IfcCardinalPointReference.TOPMID, new List <Plane>());
        }
Beispiel #7
0
		internal static void GenerateData(STPModelData md, IfcBuilding building,bool assembly)
		{
			IfcDocumentReference documentReference = new IfcDocumentReference(md, "", "MyReinforcementCode", "MyCodeISO3766", "", null);
			IfcRelAssociatesDocument associatesDocument = new IfcRelAssociatesDocument(md.Project, documentReference);
			associatesDocument.GlobalId = "1R7R97$uLAAv4wci$KGwn8";
			IfcMaterial material = new IfcMaterial(md, "ReinforcingSteel", "", "");
			List<Point3d> points = new List<Point3d>() { new Point3d(-69.0, 0.0, -122.0), new Point3d(-69.0, 0.0, -79.0), new Point3d(-54.9411254969541, 0.0, -45.0588745030455), new Point3d(-21.0, 0.0, -31.0), new Point3d(21.0, 0.0, -31.0), new Point3d(54.9411254969541, 0.0, -45.0588745030455), new Point3d(69.0, 0.0, -78.9999999999999), new Point3d(69.0, 0.00000000000000089, -321.0), new Point3d(54.9939785957165, 1.21791490472034, -354.941125496954), new Point3d(21.1804517666074, 4.15822158551252, -369.0), new Point3d(-20.6616529376114, 7.79666547283599, -369.0), new Point3d(-54.4751797667207, 10.7369721536282, -354.941125496954), new Point3d(-68.4812011710042, 11.9548870583485, -321.0), new Point3d(-69.0, 12.0, -79.0), new Point3d(-54.9411254969541, 12.0, -45.0588745030455), new Point3d(-21.0, 12.0, -31.0), new Point3d(21.0, 12.0, -31.0), new Point3d(54.9411254969541, 12.0, -45.0588745030455), new Point3d(69.0, 12.0, -78.9999999999999),new Point3d(69.0, 12.0, -122.0), };
			PolyCurve pc = new PolyCurve();
			pc.Append(new Line(points[0],points[1]));
			pc.Append(new Arc(points[1],points[2],points[3] ));
			pc.Append(new Line(points[3],points[4]));
			pc.Append(new Arc(points[4],points[5],points[6] ));
			pc.Append(new Line(points[6],points[7]));
			pc.Append(new Arc(points[7],points[8],points[9] ));
			pc.Append(new Line(points[9],points[10]));
			pc.Append(new Arc(points[10],points[11],points[12] ));
			pc.Append(new Line(points[12],points[13]));
			pc.Append(new Arc(points[13],points[14],points[15] ));
			pc.Append(new Line(points[15],points[16]));
			pc.Append(new Arc(points[16],points[17],points[18] ));
			pc.Append(new Line(points[18],points[19]));
			IfcBoundedCurve directrix = IfcBoundedCurve.ConvertCurve(md,pc);

			double barDiameter = 12, area = Math.PI * Math.Pow( barDiameter,2) / 4;
			IfcSweptDiskSolid sweptDiskSolid = new IfcSweptDiskSolid(directrix, barDiameter/2.0, 0);
			IfcRepresentationMap representationMap = new IfcRepresentationMap(sweptDiskSolid);
			string shapeCode = ""; //Todo
			IfcReinforcingBarType reinforcingBarType = new IfcReinforcingBarType(md, "12 Diameter Ligature", IfcReinforcingBarTypeEnum.LIGATURE, barDiameter, area, 1150, IfcReinforcingBarSurfaceEnum.TEXTURED, shapeCode, null) { GlobalId = "0jMRtfHYXE7u4s_CQ2uVE9", MaterialSelect = material, RepresentationMaps = new List<IfcRepresentationMap>() { representationMap} };
			reinforcingBarType.ObjectTypeOf.GlobalId = "1iAfl2ERbFmwi7uniy1H7j";
			reinforcingBarType.Material.Associates.GlobalId = "3gfVO40P5EfQyKZ_bF0R$6";
			if (assembly)
			{
				IfcMaterial concrete = new IfcMaterial(md,"Concrete","","Concrete");
				string name = "400x200RC";
				IfcRectangleProfileDef rectangleProfileDef = new IfcRectangleProfileDef(md, name, 400, 200);
				IfcMaterialProfile materialProfile = new IfcMaterialProfile(md,name,"",concrete,rectangleProfileDef,0,"");

				IfcBeamType beamType = new IfcBeamType(name, materialProfile, IfcBeamTypeEnum.BEAM) { GlobalId = "3bdpqVuWTCbxJ2S3ODYv6q"};
				beamType.ObjectTypeOf.GlobalId = "2oaQVVf79BrwRouvtRuQVg";
				beamType.Material.Associates.GlobalId = "2ZEgyI2v184hwa$_diRqS9";
				IfcBeamStandardCase beamStandardCase = new IfcBeamStandardCase(building, beamType, new Line(0, 0, 0, 0, 5000, 0), Vector3d.ZAxis, IfcCardinalPointReference.TOPMID, null) { GlobalId = "1yjQ2DwLnCC8k3i3X6D_ut" };
				beamStandardCase.Material.Associates.GlobalId = "3DWeleqqjEG9KshbOZXUdY";
				IfcElementAssembly elementAssembly = new IfcElementAssembly(beamStandardCase, IfcAssemblyPlaceEnum.FACTORY, IfcElementAssemblyTypeEnum.REINFORCEMENT_UNIT) { GlobalId = "0Q1tCJWdj4kOkZUg7rkf2h" };
				List<string> ids = new List<string>() { "0ohBfsArr3ruXYxacT4yl5","3YrK7RbE122fNRsP5djFAe","0wxAc63nj5AezFhfks7wLL","0bsov2wZL6tRRZmKy4vuUU","3qrgfIBb92ZegJTle7jou3","16m6R3JeT83fJPCze2yU$a","2SGIIYjSbCuu3HVwoLt1yh","0PsLby6eL8_hVEt4QwK0lZ","1325VJou5AngWp1djcV0hL","20zj_$BcH74xRgR4bDrLNb","3M4SfEMtHEJukgZR4hw$eV","23BYnIaOLBZPVTrKVEDJiy","2XulRByDL8ugyo4Uqv9rJr","2xvQMSga96XOT3VeCS6ZsK","2gUE6_w3j77f8YJGz_2RMl","0J0dRL4tT93REAabfASDom","048RJ151b81PqODsTMD4EA","3hXx9Kb6b5bvjgr9pwvpz0","0FmUHg8ZX0ZfY$0f5nkM2l","2_zvpwRdvAuRiTlHXX$Qp8","1mhkXHKfX6PxdS2vZn17wX","0CeIQzUqP5qOOeAjMtH2OX","3shtoAQL5BAhvwA_1Ph$lC","22j4RNKqD2IBRDGig5eaCF","3Wvu6qGJH4ChhTV3pl9CGh","37Qrf07Iz3tRMbSxEA4ynH","2gelqZ1Wv8BvCy6TstVGkd","1Q21dHc_X7eRppCHrT69Vb","0e6Wc08NLD59ueqCAK1gxp","3xdMOSZMj3cBOV_QTbXZha","1r_U9JTkHDWwkv_nfWFHVe","29I7_S2fT3WRD4zPH4YjmD","0$ciATTaP17PJMHQD0$N3Y","1irBeCCUf82wdGg7qTPCbW" };
				int jcounter = 0;
				for (int icounter = 25; icounter < 5000; icounter += 150)
				{
					IfcElement element = reinforcingBarType.GenerateMappedItemElement(elementAssembly, new Plane(new Point3d(0, icounter, 0), Vector3d.XAxis, Vector3d.YAxis));
					element.GlobalId = ids[jcounter++];
				}
				elementAssembly.IsDecomposedBy[0].GlobalId = "1WdB196Kb72f_pKgj5rklU";
			}
			else
			{ 
				IfcElement element = reinforcingBarType.GenerateMappedItemElement(building, Plane.WorldXY);
				element.GlobalId = "0WUveBtSTDbunNjDLsuRn$";
			}
		}
Beispiel #8
0
		protected override void GenerateData(STPModelData md, IfcBuilding building)
		{
			IfcBeamType beamType = GetParametericIPE200(md);
			IfcBeamStandardCase beamStandardCase = new IfcBeamStandardCase(building, beamType, new Line(0, 0, 0, 0, 1000, 0), Vector3d.ZAxis, IfcCardinalPointReference.TOPMID, new List<Plane>()) { GlobalId = "2YX3YEaA13qOf$B1iBgAf6", Name = "TopMid" };
			beamStandardCase.Material.Associates.GlobalId = "2v53tpkKfC1QI$UVEwGxEy";
			IfcBeamStandardCase beamStandardCase2 = new IfcBeamStandardCase(building, beamType, new Line(0, 0, 0, 0, 1000, 0), Vector3d.ZAxis, IfcCardinalPointReference.BOTMID, new List<Plane>()) { GlobalId = "39IDqhhC14BxCj_Ryk$esj", Name = "BotMid" };
			beamStandardCase2.Material.Associates.GlobalId = "2GHGDnjC1BI8mr5FS1ysvq";
			IfcBeamStandardCase beamStandardCase3 = new IfcBeamStandardCase(building, beamType, new Line(500, 0, 0, 500, 1000, 0), Vector3d.ZAxis, IfcCardinalPointReference.BOTLEFT, new List<Plane>()) { GlobalId = "17CqI$IjrDARuaYNcWcoRH", Name = "BotLeft" };
			beamStandardCase3.Material.Associates.GlobalId = "1v094xksfDT9bOdSPNsjLB";
			IfcBeamStandardCase beamStandardCase4 = new IfcBeamStandardCase(building, beamType, new Line(500, 0, 0, 500, 1000, 0), Vector3d.ZAxis, IfcCardinalPointReference.TOPRIGHT, new List<Plane>()) { GlobalId = "3TOzuh11rACgRkioYYOjj5", Name = "TopRight" };
			beamStandardCase4.Material.Associates.GlobalId = "0ys4PwYgT5dAduf$ECulk$";
		}
Beispiel #9
0
		protected override void GenerateData(STPModelData md, IfcBuilding building)
		{
			IfcBeamType beamType = GetParametericIPE200(md);
			IfcBeamStandardCase beamStandardCase = new IfcBeamStandardCase(building, beamType, new Line(0, 0, 0, 0, 1000, 0), Vector3d.ZAxis, IfcCardinalPointReference.MID, new List<Plane>()) {GlobalId = "0uo2yx7G19uwCu9sIjn6DQ", Name = beamType.Name };
			beamStandardCase.Material.Associates.GlobalId = "2SL41bR1rCj99SIKuKXeFl";
			md.NextObjectRecord = 300;
			string name = "CHS219.1x6.3"; 
			IfcCircleHollowProfileDef chs219x6 = new IfcCircleHollowProfileDef(md, name, 219.1 / 2.0, 6.3);
			IfcMaterialProfileSet materialProfileSet = beamType.MaterialSelect as IfcMaterialProfileSet;
			IfcMaterialProfile materialProfile2 = new IfcMaterialProfile(md, name, "", materialProfileSet.MaterialProfiles[0].Material, chs219x6, 0, "");
			IfcBeamType beamType2 = new IfcBeamType(name, materialProfile2, IfcBeamTypeEnum.BEAM) { GlobalId = "3l_OKNTJr4yBOR5rYl6b9w" };
			beamType2.ObjectTypeOf.GlobalId = "3LrutsCpn4DPF9Zt4YdIEU";
			beamType2.Material.Associates.GlobalId = "14nDe0n1bErgiI78N83Oxd";
			IfcBeamStandardCase beamStandardCase2 = new IfcBeamStandardCase(building, beamType2, new Line(500, 0, 0, 500, 1000, 0), Vector3d.ZAxis, IfcCardinalPointReference.MID, new List<Plane>()) { GlobalId = "3_NFDdmqr7mxekvlvcgwa7", Name = name };
			beamStandardCase2.Material.Associates.GlobalId = "1Set5Cyu9BFOWznvoQe1ho";
		}
Beispiel #10
0
        protected override void GenerateData(DatabaseIfc database, IfcBuilding building)
        {
            IfcBeamType beamType = GetParametericIPE200(database);
            IfcMaterialProfileSetUsage materialProfileSetUsage = new IfcMaterialProfileSetUsage(beamType.MaterialSelect as IfcMaterialProfileSet, IfcCardinalPointReference.TOPMID);
            IfcBeamStandardCase        beamStandardCase        = new IfcBeamStandardCase(building, materialProfileSetUsage, new IfcAxis2Placement3D(new IfcCartesianPoint(database, 0, 0, 0), database.Factory.YAxis, database.Factory.XAxisNegative), 1000)
            {
                GlobalId = "0a_qfeQLDA8e5qT$Do6J_t", Name = "Extrusion", RelatingType = beamType
            };
            IfcBeamStandardCase beamStandardCase2 = new IfcBeamStandardCase(building, materialProfileSetUsage, new IfcAxis2Placement3D(new IfcCartesianPoint(database, 0, 0, 400), new IfcDirection(database, -0.38461538, 0.92307692, 0), new IfcDirection(database, -0.92307692, -0.38461538, 0)), new Tuple <double, double>(-1300, 0), 0.789582239399523)
            {
                GlobalId = "1zqFh80l11VgfEm3ZWh6Xv", Name = "Revolution", RelatingType = beamType
            };

            //Unique ids assigned to generate constant IfcScript  sample files, remove otherwise
            beamStandardCase.MaterialSelect.Associates.GlobalId = "2uxxMWfA51AAznk5bQJylf";
        }
Beispiel #11
0
        internal static void GenerateInstance(IfcBuilding building, bool assembly)
        {
            DatabaseIfc          db = building.Database;
            IfcDocumentReference documentReference = new IfcDocumentReference(db)
            {
                Name = "MyReinforcementCode", Identification = "MyCodeISO3766"
            };
            IfcRelAssociatesDocument associatesDocument = new IfcRelAssociatesDocument(db.Project, documentReference)
            {
                GlobalId = "1R7R97$uLAAv4wci$KGwn8"
            };
            IfcMaterial material = new IfcMaterial(db, "ReinforcingSteel");
            List <Tuple <double, double, double> > points = new List <Tuple <double, double, double> >()
            {
                new Tuple <double, double, double>(-69.0, 0.0, -122.0), new Tuple <double, double, double>(-69.0, 0.0, -79.0), new Tuple <double, double, double>(-54.9411254969541, 0.0, -45.0588745030455), new Tuple <double, double, double>(-21.0, 0.0, -31.0), new Tuple <double, double, double>(21.0, 0.0, -31.0), new Tuple <double, double, double>(54.9411254969541, 0.0, -45.0588745030455), new Tuple <double, double, double>(69.0, 0.0, -78.9999999999999), new Tuple <double, double, double>(69.0, 0.00000000000000089, -321.0), new Tuple <double, double, double>(54.9939785957165, 1.21791490472034, -354.941125496954), new Tuple <double, double, double>(21.1804517666074, 4.15822158551252, -369.0), new Tuple <double, double, double>(-20.6616529376114, 7.79666547283599, -369.0), new Tuple <double, double, double>(-54.4751797667207, 10.7369721536282, -354.941125496954), new Tuple <double, double, double>(-68.4812011710042, 11.9548870583485, -321.0), new Tuple <double, double, double>(-69.0, 12.0, -79.0), new Tuple <double, double, double>(-54.9411254969541, 12.0, -45.0588745030455), new Tuple <double, double, double>(-21.0, 12.0, -31.0), new Tuple <double, double, double>(21.0, 12.0, -31.0), new Tuple <double, double, double>(54.9411254969541, 12.0, -45.0588745030455), new Tuple <double, double, double>(69.0, 12.0, -78.9999999999999), new Tuple <double, double, double>(69.0, 12.0, -122.0),
            };
            IfcBoundedCurve directrix = null;

            if (db.Release == ReleaseVersion.IFC2x3)
            {
                directrix = new IfcPolyline(db, points);
            }
            else
            {
                List <IfcSegmentIndexSelect> segments = new List <IfcSegmentIndexSelect>();
                segments.Add(new IfcLineIndex(1, 2));
                segments.Add(new IfcArcIndex(2, 3, 4));
                segments.Add(new IfcLineIndex(4, 5));
                segments.Add(new IfcArcIndex(5, 6, 7));
                segments.Add(new IfcLineIndex(7, 8));
                segments.Add(new IfcArcIndex(8, 9, 10));
                segments.Add(new IfcLineIndex(10, 11));
                segments.Add(new IfcArcIndex(11, 12, 13));
                segments.Add(new IfcLineIndex(13, 14));
                segments.Add(new IfcArcIndex(14, 15, 16));
                segments.Add(new IfcLineIndex(16, 17));
                segments.Add(new IfcArcIndex(17, 18, 19));
                segments.Add(new IfcLineIndex(19, 20));
                directrix = new IfcIndexedPolyCurve(new IfcCartesianPointList3D(db, points), segments);
            }
            double                barDiameter = 12, area = Math.PI * Math.Pow(barDiameter, 2) / 4;
            IfcSweptDiskSolid     sweptDiskSolid     = new IfcSweptDiskSolid(directrix, barDiameter / 2.0);
            IfcRepresentationMap  representationMap  = new IfcRepresentationMap(sweptDiskSolid);
            string                shapeCode          = ""; //Todo
            IfcReinforcingBarType reinforcingBarType = new IfcReinforcingBarType(db, "12 Diameter Ligature", IfcReinforcingBarTypeEnum.LIGATURE, barDiameter, area, 1150, IfcReinforcingBarSurfaceEnum.TEXTURED, shapeCode, null)
            {
                GlobalId = "0jMRtfHYXE7u4s_CQ2uVE9", MaterialSelect = material
            };

            reinforcingBarType.RepresentationMaps.Add(representationMap);
            db.Context.AddDeclared(reinforcingBarType);
            if (assembly)
            {
                IfcMaterial concrete = new IfcMaterial(db, "Concrete")
                {
                    Category = "Concrete"
                };
                string name = "400x200RC";
                IfcRectangleProfileDef rectangleProfileDef = new IfcRectangleProfileDef(db, name, 200, 400);
                IfcMaterialProfile     materialProfile     = new IfcMaterialProfile(name, concrete, rectangleProfileDef);

                IfcBeamType beamType = new IfcBeamType(name, materialProfile, IfcBeamTypeEnum.BEAM);
                db.Context.AddDeclared(beamType);
                IfcMaterialProfileSet materialProfileSet = beamType.MaterialSelect as IfcMaterialProfileSet;
                IfcBeam beam = new IfcBeam(building, new IfcLocalPlacement(building.Placement, new IfcAxis2Placement3D(new IfcCartesianPoint(db, 0, 0, 0))), null)
                {
                    Description = "Reinforced Beam"
                };
                IfcBeamStandardCase beamStandardCase = new IfcBeamStandardCase(beam, new IfcMaterialProfileSetUsage(materialProfileSet, IfcCardinalPointReference.TOPMID), new IfcAxis2Placement3D(new IfcCartesianPoint(db, 0, 0, 0), new IfcDirection(db, 0, 1, 0), new IfcDirection(db, -1, 0, 0)), 5000)
                {
                    GlobalId = "1yjQ2DwLnCC8k3i3X6D_ut", RelatingType = beamType
                };
                IfcElementAssembly elementAssembly = new IfcElementAssembly(beam, IfcAssemblyPlaceEnum.FACTORY, IfcElementAssemblyTypeEnum.REINFORCEMENT_UNIT);
                List <string>      ids             = new List <string>()
                {
                    "0ohBfsArr3ruXYxacT4yl5", "3YrK7RbE122fNRsP5djFAe", "0wxAc63nj5AezFhfks7wLL", "0bsov2wZL6tRRZmKy4vuUU", "3qrgfIBb92ZegJTle7jou3", "16m6R3JeT83fJPCze2yU$a", "2SGIIYjSbCuu3HVwoLt1yh", "0PsLby6eL8_hVEt4QwK0lZ", "1325VJou5AngWp1djcV0hL", "20zj_$BcH74xRgR4bDrLNb", "3M4SfEMtHEJukgZR4hw$eV", "23BYnIaOLBZPVTrKVEDJiy", "2XulRByDL8ugyo4Uqv9rJr", "2xvQMSga96XOT3VeCS6ZsK", "2gUE6_w3j77f8YJGz_2RMl", "0J0dRL4tT93REAabfASDom", "048RJ151b81PqODsTMD4EA", "3hXx9Kb6b5bvjgr9pwvpz0", "0FmUHg8ZX0ZfY$0f5nkM2l", "2_zvpwRdvAuRiTlHXX$Qp8", "1mhkXHKfX6PxdS2vZn17wX", "0CeIQzUqP5qOOeAjMtH2OX", "3shtoAQL5BAhvwA_1Ph$lC", "22j4RNKqD2IBRDGig5eaCF", "3Wvu6qGJH4ChhTV3pl9CGh", "37Qrf07Iz3tRMbSxEA4ynH", "2gelqZ1Wv8BvCy6TstVGkd", "1Q21dHc_X7eRppCHrT69Vb", "0e6Wc08NLD59ueqCAK1gxp", "3xdMOSZMj3cBOV_QTbXZha", "1r_U9JTkHDWwkv_nfWFHVe", "29I7_S2fT3WRD4zPH4YjmD", "0$ciATTaP17PJMHQD0$N3Y", "1irBeCCUf82wdGg7qTPCbW"
                };
                int jcounter = 0;
                for (int icounter = 25; icounter < 5000; icounter += 150)
                {
                    IfcElement element = reinforcingBarType.GenerateMappedItemElement(elementAssembly, new IfcCartesianTransformationOperator3D(db)
                    {
                        LocalOrigin = new IfcCartesianPoint(db, 0, icounter, 0)
                    });
                    //Unique ids assigned to generate constant IfcScript  sample files, remove otherwise
                    element.GlobalId = ids[jcounter++];
                }

                //Unique ids assigned to generate constant IfcScript  sample files, remove otherwise
                beam.GlobalId     = "1_KSmTR8T8bO37iRs24GkM";
                beamType.GlobalId = "3bdpqVuWTCbxJ2S3ODYv6q";
                beamType.ObjectTypeOf.GlobalId = "2oaQVVf79BrwRouvtRuQVg";
                beamType.MaterialSelect.Associates.GlobalId         = "2ZEgyI2v184hwa$_diRqS9";
                beamStandardCase.MaterialSelect.Associates.GlobalId = "3DWeleqqjEG9KshbOZXUdY";
                elementAssembly.GlobalId = "0Q1tCJWdj4kOkZUg7rkf2h";
                elementAssembly.IsDecomposedBy[0].GlobalId = "1WdB196Kb72f_pKgj5rklU";
                beam.IsDecomposedBy[0].GlobalId            = "1b1SnKocD0WRevlg8Aqhj5";
            }
            else
            {
                IfcElement element = reinforcingBarType.GenerateMappedItemElement(building, new IfcCartesianTransformationOperator3D(db));

                //Unique ids assigned to generate constant IfcScript  sample files, remove otherwise
                element.GlobalId = "0WUveBtSTDbunNjDLsuRn$";
            }

            //Unique ids assigned to generate constant IfcScript  sample files, remove otherwise

            reinforcingBarType.ObjectTypeOf.GlobalId = "1iAfl2ERbFmwi7uniy1H7j";
            reinforcingBarType.MaterialSelect.Associates.GlobalId = "3gfVO40P5EfQyKZ_bF0R$6";
        }
Beispiel #12
0
        internal static void GenerateData(STPModelData md, IfcBuilding building, bool assembly)
        {
            IfcDocumentReference     documentReference  = new IfcDocumentReference(md, "", "MyReinforcementCode", "MyCodeISO3766", "", null);
            IfcRelAssociatesDocument associatesDocument = new IfcRelAssociatesDocument(md.Project, documentReference);

            associatesDocument.GlobalId = "1R7R97$uLAAv4wci$KGwn8";
            IfcMaterial    material = new IfcMaterial(md, "ReinforcingSteel", "", "");
            List <Point3d> points   = new List <Point3d>()
            {
                new Point3d(-69.0, 0.0, -122.0), new Point3d(-69.0, 0.0, -79.0), new Point3d(-54.9411254969541, 0.0, -45.0588745030455), new Point3d(-21.0, 0.0, -31.0), new Point3d(21.0, 0.0, -31.0), new Point3d(54.9411254969541, 0.0, -45.0588745030455), new Point3d(69.0, 0.0, -78.9999999999999), new Point3d(69.0, 0.00000000000000089, -321.0), new Point3d(54.9939785957165, 1.21791490472034, -354.941125496954), new Point3d(21.1804517666074, 4.15822158551252, -369.0), new Point3d(-20.6616529376114, 7.79666547283599, -369.0), new Point3d(-54.4751797667207, 10.7369721536282, -354.941125496954), new Point3d(-68.4812011710042, 11.9548870583485, -321.0), new Point3d(-69.0, 12.0, -79.0), new Point3d(-54.9411254969541, 12.0, -45.0588745030455), new Point3d(-21.0, 12.0, -31.0), new Point3d(21.0, 12.0, -31.0), new Point3d(54.9411254969541, 12.0, -45.0588745030455), new Point3d(69.0, 12.0, -78.9999999999999), new Point3d(69.0, 12.0, -122.0),
            };
            PolyCurve pc = new PolyCurve();

            pc.Append(new Line(points[0], points[1]));
            pc.Append(new Arc(points[1], points[2], points[3]));
            pc.Append(new Line(points[3], points[4]));
            pc.Append(new Arc(points[4], points[5], points[6]));
            pc.Append(new Line(points[6], points[7]));
            pc.Append(new Arc(points[7], points[8], points[9]));
            pc.Append(new Line(points[9], points[10]));
            pc.Append(new Arc(points[10], points[11], points[12]));
            pc.Append(new Line(points[12], points[13]));
            pc.Append(new Arc(points[13], points[14], points[15]));
            pc.Append(new Line(points[15], points[16]));
            pc.Append(new Arc(points[16], points[17], points[18]));
            pc.Append(new Line(points[18], points[19]));
            IfcBoundedCurve directrix = IfcBoundedCurve.ConvertCurve(md, pc);

            double                barDiameter = 12, area = Math.PI * Math.Pow(barDiameter, 2) / 4;
            IfcSweptDiskSolid     sweptDiskSolid     = new IfcSweptDiskSolid(directrix, barDiameter / 2.0, 0);
            IfcRepresentationMap  representationMap  = new IfcRepresentationMap(sweptDiskSolid);
            string                shapeCode          = ""; //Todo
            IfcReinforcingBarType reinforcingBarType = new IfcReinforcingBarType(md, new IfcElemTypeParams("0jMRtfHYXE7u4s_CQ2uVE9", "12 Diameter Ligature", "", "", ""), material, representationMap, null, IfcReinforcingBarTypeEnum.LIGATURE, barDiameter, area, 1150, IfcReinforcingBarSurfaceEnum.TEXTURED, shapeCode, null);

            reinforcingBarType.ObjectTypeOf.GlobalId        = "1iAfl2ERbFmwi7uniy1H7j";
            reinforcingBarType.Material.Associates.GlobalId = "3gfVO40P5EfQyKZ_bF0R$6";
            if (assembly)
            {
                IfcMaterial            concrete            = new IfcMaterial(md, "Concrete", "", "Concrete");
                string                 name                = "400x200RC";
                IfcRectangleProfileDef rectangleProfileDef = new IfcRectangleProfileDef(md, IfcProfileTypeEnum.AREA, name, null, 400, 200);
                IfcMaterialProfile     materialProfile     = new IfcMaterialProfile(md, name, "", concrete, rectangleProfileDef, 0, "");

                IfcBeamType beamType = new IfcBeamType(md, new IfcElemTypeParams("3bdpqVuWTCbxJ2S3ODYv6q", name, "", "", ""), materialProfile, null, IfcBeamTypeEnum.BEAM);
                beamType.ObjectTypeOf.GlobalId        = "2oaQVVf79BrwRouvtRuQVg";
                beamType.Material.Associates.GlobalId = "2ZEgyI2v184hwa$_diRqS9";
                IfcBeamStandardCase beamStandardCase = new IfcBeamStandardCase(building, new IfcElemParams("1yjQ2DwLnCC8k3i3X6D_ut", "", "", "", ""), beamType, new Line(0, 0, 0, 0, 5000, 0), Vector3d.ZAxis, IfcCardinalPointReference.TOPMID, null);
                beamStandardCase.Material.Associates.GlobalId = "3DWeleqqjEG9KshbOZXUdY";
                IfcElementAssembly elementAssembly = new IfcElementAssembly(beamStandardCase, new IfcElemParams("0Q1tCJWdj4kOkZUg7rkf2h", "", "", "", ""), IfcAssemblyPlaceEnum.FACTORY, IfcElementAssemblyTypeEnum.REINFORCEMENT_UNIT);
                List <string>      ids             = new List <string>()
                {
                    "0ohBfsArr3ruXYxacT4yl5", "3YrK7RbE122fNRsP5djFAe", "0wxAc63nj5AezFhfks7wLL", "0bsov2wZL6tRRZmKy4vuUU", "3qrgfIBb92ZegJTle7jou3", "16m6R3JeT83fJPCze2yU$a", "2SGIIYjSbCuu3HVwoLt1yh", "0PsLby6eL8_hVEt4QwK0lZ", "1325VJou5AngWp1djcV0hL", "20zj_$BcH74xRgR4bDrLNb", "3M4SfEMtHEJukgZR4hw$eV", "23BYnIaOLBZPVTrKVEDJiy", "2XulRByDL8ugyo4Uqv9rJr", "2xvQMSga96XOT3VeCS6ZsK", "2gUE6_w3j77f8YJGz_2RMl", "0J0dRL4tT93REAabfASDom", "048RJ151b81PqODsTMD4EA", "3hXx9Kb6b5bvjgr9pwvpz0", "0FmUHg8ZX0ZfY$0f5nkM2l", "2_zvpwRdvAuRiTlHXX$Qp8", "1mhkXHKfX6PxdS2vZn17wX", "0CeIQzUqP5qOOeAjMtH2OX", "3shtoAQL5BAhvwA_1Ph$lC", "22j4RNKqD2IBRDGig5eaCF", "3Wvu6qGJH4ChhTV3pl9CGh", "37Qrf07Iz3tRMbSxEA4ynH", "2gelqZ1Wv8BvCy6TstVGkd", "1Q21dHc_X7eRppCHrT69Vb", "0e6Wc08NLD59ueqCAK1gxp", "3xdMOSZMj3cBOV_QTbXZha", "1r_U9JTkHDWwkv_nfWFHVe", "29I7_S2fT3WRD4zPH4YjmD", "0$ciATTaP17PJMHQD0$N3Y", "1irBeCCUf82wdGg7qTPCbW"
                };
                int jcounter = 0;
                for (int icounter = 25; icounter < 5000; icounter += 150)
                {
                    IfcElemParams ep = new IfcElemParams(ids[jcounter++], "", "", "", "");
                    reinforcingBarType.GenerateMappedItemElement(elementAssembly, new Plane(new Point3d(0, icounter, 0), Vector3d.XAxis, Vector3d.YAxis), ep);
                }
                elementAssembly.IsDecomposedBy[0].GlobalId = "1WdB196Kb72f_pKgj5rklU";
            }
            else
            {
                reinforcingBarType.GenerateMappedItemElement(building, Plane.WorldXY, new IfcElemParams("0WUveBtSTDbunNjDLsuRn$", "", "", "", ""));
            }
        }