Exemple #1
0
		protected override void GenerateData(STPModelData md, IfcBuilding building)
		{
			IfcMaterialProfile materialProfile = GetParametericIPE200Profile(md);
			IfcColumnType columnType = new IfcColumnType(materialProfile.Name,  materialProfile, IfcColumnTypeEnum.COLUMN) { GlobalId = "3qJDCKcPj1tgEHrIL1MUed" };
			columnType.ObjectTypeOf.GlobalId = "0QSJIMj99DcOpmktgECZT7";
			columnType.Material.Associates.GlobalId = "2RR6JzjWrDuRIDIKRwxCJZ";
			IfcColumnStandardCase column = new IfcColumnStandardCase(building, columnType, new Line(0, 0, 0, 0, 0, 2000), Vector3d.XAxis, IfcCardinalPointReference.MID, null) { GlobalId = "3S1GK_wA565RDoiWQEJc_l", Name= materialProfile.Name };
			column.Material.Associates.GlobalId = "2JRmkBe255UBkcHeZrq_Bl";
		}
Exemple #2
0
        protected override void GenerateData(STPModelData md, IfcBuilding building)
        {
            IfcMaterialProfile materialProfile = GetParametericIPE200Profile(md);
            IfcColumnType      columnType      = new IfcColumnType(md, new IfcElemTypeParams("3qJDCKcPj1tgEHrIL1MUed", materialProfile.Name, "", "", ""), materialProfile, null, IfcColumnTypeEnum.COLUMN);

            columnType.ObjectTypeOf.GlobalId        = "0QSJIMj99DcOpmktgECZT7";
            columnType.Material.Associates.GlobalId = "2RR6JzjWrDuRIDIKRwxCJZ";
            IfcColumnStandardCase column = new IfcColumnStandardCase(building, columnType, new Line(0, 0, 0, 0, 0, 2000), Vector3d.XAxis, IfcCardinalPointReference.MID, new IfcElemParams("3S1GK_wA565RDoiWQEJc_l", materialProfile.Name, "", "", ""), null);

            column.Material.Associates.GlobalId = "2JRmkBe255UBkcHeZrq_Bl";
        }
Exemple #3
0
        protected override void GenerateData(DatabaseIfc database, IfcBuilding building)
        {
            IfcMaterialProfile    materialProfile    = GetParametericIPE200Profile(database);
            IfcColumnType         columnType         = new IfcColumnType(materialProfile.Name, materialProfile, IfcColumnTypeEnum.COLUMN);
            IfcMaterialProfileSet materialProfileSet = columnType.MaterialSelect as IfcMaterialProfileSet;
            IfcColumnStandardCase column             = new IfcColumnStandardCase(building, new IfcMaterialProfileSetUsage(materialProfileSet, IfcCardinalPointReference.MID), new IfcAxis2Placement3D(new IfcCartesianPoint(database, 0, 0, 0)), 2000)
            {
                Name = materialProfile.Name, RelatingType = columnType
            };

            database.Context.AddDeclared(columnType);

            //Unique ids assigned to generate constant IfcScript  sample files, remove otherwise
            columnType.GlobalId = "3qJDCKcPj1tgEHrIL1MUed";
            column.GlobalId     = "3S1GK_wA565RDoiWQEJc_l";
            columnType.ObjectTypeOf.GlobalId = "0QSJIMj99DcOpmktgECZT7";
            columnType.MaterialSelect.Associates.GlobalId = "2RR6JzjWrDuRIDIKRwxCJZ";
            column.MaterialSelect.Associates.GlobalId     = "2JRmkBe255UBkcHeZrq_Bl";
        }
        protected override void GenerateInstance(IfcBuilding building)
        {
            DatabaseIfc database  = building.Database;
            double      angFactor = database.Factory.Options.AngleUnitsInRadians ? 1 : 180 / Math.PI;

            building.Comments.Add("These profile curves are intentionally expressed in a more complicated manner than possible to test parameterization");
            IfcMaterial material = new IfcMaterial(database, "Steel");

            //-IfcBSplineCurve
            //- IfcCompositeCurve
            //- IfcCompositeCurveSegment
            //- IfcIndexedPolyCurve
            //- IfcTrimmedCurve
            //- IfcPCurve ?
            double root2 = Math.Sqrt(2), root2div2 = Math.Sqrt(2) / 2.0, root3 = Math.Sqrt(3), root3div2 = Math.Sqrt(3) / 2.0;

            List <IfcCompositeCurveSegment> segments = new List <IfcCompositeCurveSegment>();
            IfcLine         line                     = new IfcLine(new IfcCartesianPoint(database, -1000, 1000), new IfcVector(new IfcDirection(database, 1, -1), 1000 * Math.Sqrt(2)));
            IfcTrimmedCurve trimmedCurve             = new IfcTrimmedCurve(line, new IfcTrimmingSelect((root2 - 1) / root2), new IfcTrimmingSelect(1 + (1 / root2)), true, IfcTrimmingPreference.PARAMETER);

            segments.Add(new IfcCompositeCurveSegment(IfcTransitionCode.CONTINUOUS, true, trimmedCurve));
            IfcCircle circle = new IfcCircle(database, 1000);

            trimmedCurve = new IfcTrimmedCurve(circle, new IfcTrimmingSelect(7.0 / 4 * Math.PI * angFactor), new IfcTrimmingSelect(3.0 / 4 * Math.PI * angFactor), true, IfcTrimmingPreference.PARAMETER);
            segments.Add(new IfcCompositeCurveSegment(IfcTransitionCode.CONTINUOUS, true, trimmedCurve));

            string name = "SemiCircle";
            IfcArbitraryClosedProfileDef profile            = new IfcArbitraryClosedProfileDef(name, new IfcCompositeCurve(segments));
            IfcMaterialProfileSet        materialProfileSet = new IfcMaterialProfileSet(name, new IfcMaterialProfile(name, material, profile));
            IfcColumnType columnType = new IfcColumnType(name, materialProfileSet, IfcColumnTypeEnum.COLUMN);

            database.Context.AddDeclared(columnType);
            IfcColumnStandardCase column = new IfcColumnStandardCase(building, new IfcMaterialProfileSetUsage(materialProfileSet, IfcCardinalPointReference.MID), new IfcAxis2Placement3D(new IfcCartesianPoint(database, 0, 0, 0)), 2000)
            {
                Name = name, RelatingType = columnType
            };

            //Unique ids assigned to generate constant IfcScript  sample files, remove otherwise
            columnType.GlobalId = "24mq0gwVr7bgEMXPmo$TrF";
            column.GlobalId     = "0RGc8lepr7BRF_EtHrWJ45";
            columnType.ObjectTypeOf.GlobalId = "0devdSRyf3uBEQbSqWTDjo";
            columnType.MaterialSelect.Associates.GlobalId = "1gdVo5TjPETPZlW8HSRupM";
            column.MaterialSelect.Associates.GlobalId     = "35z8gDFbb6gvrCOz$24tUJ";

            database.NextObjectRecord = 100;
            circle = new IfcCircle(new IfcAxis2Placement2D(new IfcCartesianPoint(database, 0, 1000))
            {
                RefDirection = new IfcDirection(database, -1, 0)
            }, root3 * 1000);
            segments     = new List <IfcCompositeCurveSegment>();
            trimmedCurve = new IfcTrimmedCurve(circle, new IfcTrimmingSelect(Math.PI / 3 * angFactor), new IfcTrimmingSelect(2 * Math.PI / 3 * angFactor), true, IfcTrimmingPreference.PARAMETER);
            segments.Add(new IfcCompositeCurveSegment(IfcTransitionCode.CONTINUOUS, true, trimmedCurve));
            circle = new IfcCircle(new IfcAxis2Placement2D(new IfcCartesianPoint(database, -1000 * root3div2, -500))
            {
                RefDirection = new IfcDirection(database, 0, -1)
            }, root3 * 1000);
            trimmedCurve = new IfcTrimmedCurve(circle, new IfcTrimmingSelect(Math.PI / 2 * angFactor), new IfcTrimmingSelect(5 * Math.PI / 6 * angFactor), true, IfcTrimmingPreference.PARAMETER);
            segments.Add(new IfcCompositeCurveSegment(IfcTransitionCode.CONTINUOUS, true, trimmedCurve));
            circle = new IfcCircle(new IfcAxis2Placement2D(new IfcCartesianPoint(database, 1000 * root3div2, -500))
            {
                RefDirection = new IfcDirection(database, 0, 1)
            }, root3 * 1000);
            trimmedCurve = new IfcTrimmedCurve(circle, new IfcTrimmingSelect(Math.PI / 6 * angFactor), new IfcTrimmingSelect(Math.PI / 2 * angFactor), true, IfcTrimmingPreference.PARAMETER);
            segments.Add(new IfcCompositeCurveSegment(IfcTransitionCode.CONTINUOUS, true, trimmedCurve));

            name               = "CurviLinearTriangle";
            profile            = new IfcArbitraryClosedProfileDef(name, new IfcCompositeCurve(segments));
            materialProfileSet = new IfcMaterialProfileSet(name, new IfcMaterialProfile(name, material, profile));
            columnType         = new IfcColumnType(name, materialProfileSet, IfcColumnTypeEnum.COLUMN);
            database.Context.AddDeclared(columnType);
            column = new IfcColumnStandardCase(building, new IfcMaterialProfileSetUsage(materialProfileSet, IfcCardinalPointReference.MID), new IfcAxis2Placement3D(new IfcCartesianPoint(database, 2500, 0, 0)), 2000)
            {
                Name = name, RelatingType = columnType
            };

            //Unique ids assigned to generate constant IfcScript  sample files, remove otherwise
            columnType.GlobalId = "3N_qc_BjX1hvEgwfRvVcb_";
            column.GlobalId     = "0bmIILAwj8$PLHK1jcmad0";
            columnType.ObjectTypeOf.GlobalId = "3tGocD1N51oOvSvHbJI_qD";
            columnType.MaterialSelect.Associates.GlobalId = "1M5oofzjD3IOM43brXW6wT";
            column.MaterialSelect.Associates.GlobalId     = "0gnTzVmkbE9hPsJDxOUOL3";

            database.NextObjectRecord = 150;
            IfcEllipse ellipse = new IfcEllipse(new IfcAxis2Placement2D(database), 1000, 500);

            segments     = new List <IfcCompositeCurveSegment>();
            trimmedCurve = new IfcTrimmedCurve(ellipse, new IfcTrimmingSelect(0), new IfcTrimmingSelect(Math.PI / 4 * angFactor), true, IfcTrimmingPreference.PARAMETER);
            segments.Add(new IfcCompositeCurveSegment(IfcTransitionCode.CONTINUOUS, true, trimmedCurve));
            double x = root2div2, y = 0.5 * root2div2, len = Math.Sqrt(0.5 + Math.Pow(y, 2));

            line         = new IfcLine(new IfcCartesianPoint(database, 0, 0), new IfcVector(new IfcDirection(database, x / len, y / len), 1));
            trimmedCurve = new IfcTrimmedCurve(line, new IfcTrimmingSelect(0), new IfcTrimmingSelect(len * 1000), false, IfcTrimmingPreference.PARAMETER);
            segments.Add(new IfcCompositeCurveSegment(IfcTransitionCode.CONTINUOUS, true, trimmedCurve));
            line         = new IfcLine(new IfcCartesianPoint(database, 0, 0), new IfcVector(new IfcDirection(database, 1, 0), 1));
            trimmedCurve = new IfcTrimmedCurve(line, new IfcTrimmingSelect(0), new IfcTrimmingSelect(1000), true, IfcTrimmingPreference.PARAMETER);
            segments.Add(new IfcCompositeCurveSegment(IfcTransitionCode.CONTINUOUS, true, trimmedCurve));

            name               = "PartialEllipse";
            profile            = new IfcArbitraryClosedProfileDef(name, new IfcCompositeCurve(segments));
            materialProfileSet = new IfcMaterialProfileSet(name, new IfcMaterialProfile(name, material, profile));
            columnType         = new IfcColumnType(name, materialProfileSet, IfcColumnTypeEnum.COLUMN);
            database.Context.AddDeclared(columnType);
            column = new IfcColumnStandardCase(building, new IfcMaterialProfileSetUsage(materialProfileSet, IfcCardinalPointReference.MID), new IfcAxis2Placement3D(new IfcCartesianPoint(database, 5000, 0, 0)), 2000)
            {
                Name = name, RelatingType = columnType
            };

            //Unique ids assigned to generate constant IfcScript  sample files, remove otherwise
            columnType.GlobalId = "0dtemVu1P2682BcO3CPWAy";
            column.GlobalId     = "1JCvykjKH71R7_uck4n6hN";
            columnType.ObjectTypeOf.GlobalId = "0rNx6sqCH2mOt1cWOT6zSU";
            columnType.MaterialSelect.Associates.GlobalId = "2OfhB1Dcz2cAdV$CDh9PHV";
            column.MaterialSelect.Associates.GlobalId     = "3bTNkVsf9099xrALHA6WhF";
        }