Esempio n. 1
0
        protected override void GenerateInstance(IfcBuilding building)
        {
            DatabaseIfc                database                = building.Database;
            IfcBeamType                beamType                = GetParametericIPE200(database);
            IfcMaterialProfileSet      materialProfileSet      = beamType.MaterialSelect as IfcMaterialProfileSet;
            IfcAxis2Placement3D        axis2dPlacement3d       = new IfcAxis2Placement3D(new IfcCartesianPoint(database, 0, 0, 0), database.Factory.YAxis, database.Factory.XAxisNegative);
            IfcMaterialProfileSetUsage materialProfileSetUsage = new IfcMaterialProfileSetUsage(materialProfileSet, IfcCardinalPointReference.TOPMID);

            //IfcBeam beam = new IfcBeam(building,materialProfileSetUsage, axis2dPlacement3d, 1000) { Name = beamType.Name, RelatingType = beamType };
        }
Esempio n. 2
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";
        }
Esempio n. 3
0
        protected override void GenerateInstance(IfcBuilding building)
        {
            DatabaseIfc           database           = building.Database;
            IfcBeamType           beamType           = GetParametericIPE200(database);
            IfcMaterialProfileSet materialProfileSet = beamType.MaterialSelect as IfcMaterialProfileSet;

            IfcAxis2Placement3D        axis2Placement3d        = new IfcAxis2Placement3D(new IfcCartesianPoint(database, 0, 0, 0), database.Factory.YAxis, database.Factory.XAxisNegative);
            IfcMaterialProfileSetUsage materialProfileSetUsage = new IfcMaterialProfileSetUsage(materialProfileSet, IfcCardinalPointReference.TOPMID);
            IfcBeamStandardCase        beamStandardCase1       = new IfcBeamStandardCase(building, materialProfileSetUsage, axis2Placement3d, 1000)
            {
                Name = "TopMid", RelatingType = beamType
            };

            axis2Placement3d        = new IfcAxis2Placement3D(new IfcCartesianPoint(database, 0, 0, 0), database.Factory.YAxis, database.Factory.XAxisNegative);
            materialProfileSetUsage = new IfcMaterialProfileSetUsage(materialProfileSet, IfcCardinalPointReference.BOTMID);
            IfcBeamStandardCase beamStandardCase2 = new IfcBeamStandardCase(building, materialProfileSetUsage, axis2Placement3d, 1000)
            {
                Name = "BotMid", RelatingType = beamType
            };

            axis2Placement3d        = new IfcAxis2Placement3D(new IfcCartesianPoint(database, 500, 0, 0), database.Factory.YAxis, database.Factory.XAxisNegative);
            materialProfileSetUsage = new IfcMaterialProfileSetUsage(materialProfileSet, IfcCardinalPointReference.BOTLEFT);
            IfcBeamStandardCase beamStandardCase3 = new IfcBeamStandardCase(building, materialProfileSetUsage, axis2Placement3d, 1000)
            {
                Name = "BotLeft", RelatingType = beamType
            };

            axis2Placement3d        = new IfcAxis2Placement3D(new IfcCartesianPoint(database, 500, 0, 0), database.Factory.YAxis, database.Factory.XAxisNegative);
            materialProfileSetUsage = new IfcMaterialProfileSetUsage(materialProfileSet, IfcCardinalPointReference.TOPRIGHT);
            IfcBeamStandardCase beamStandardCase4 = new IfcBeamStandardCase(building, materialProfileSetUsage, axis2Placement3d, 1000)
            {
                Name = "TopRight", RelatingType = beamType
            };

            //Unique ids assigned to generate constant IfcScript  sample files, remove otherwise
            beamStandardCase1.GlobalId = "2YX3YEaA13qOf$B1iBgAf6";
            beamStandardCase1.MaterialSelect.Associates.GlobalId = "2v53tpkKfC1QI$UVEwGxEy";
            beamStandardCase2.GlobalId = "39IDqhhC14BxCj_Ryk$esj";
            beamStandardCase2.MaterialSelect.Associates.GlobalId = "2GHGDnjC1BI8mr5FS1ysvq";
            beamStandardCase3.GlobalId = "17CqI$IjrDARuaYNcWcoRH";
            beamStandardCase3.MaterialSelect.Associates.GlobalId = "1v094xksfDT9bOdSPNsjLB";
            beamStandardCase4.GlobalId = "3TOzuh11rACgRkioYYOjj5";
            beamStandardCase4.MaterialSelect.Associates.GlobalId = "0ys4PwYgT5dAduf$ECulk$";
        }
        static IfcMaterial extractMaterial(IfcMaterialSelect materialSelect)         //To be enabled in opensource Library
        {
            IfcMaterial material = materialSelect as IfcMaterial;

            if (material != null)
            {
                return(material);
            }
            IfcMaterialProfile profile = materialSelect as IfcMaterialProfile;

            if (profile != null)
            {
                return(profile.Material);
            }
            IfcMaterialProfileSet profileSet = materialSelect as IfcMaterialProfileSet;

            if (profileSet == null)
            {
                IfcMaterialProfileSetUsage profileUsage = materialSelect as IfcMaterialProfileSetUsage;
                if (profileUsage != null)
                {
                    profileSet = profileUsage.ForProfileSet;
                }
            }
            if (profileSet != null)
            {
                return(profileSet.PrimaryMaterial);
            }
            IfcMaterialLayer layer = materialSelect as IfcMaterialLayer;

            if (layer != null)
            {
                return(layer.Material);
            }
            IfcMaterialLayerSet layerSet = materialSelect as IfcMaterialLayerSet;

            if (layerSet != null)
            {
                return(layerSet.PrimaryMaterial);
            }
            IfcMaterialLayerSetUsage layerSetUsage = materialSelect as IfcMaterialLayerSetUsage;

            if (layerSetUsage != null)
            {
                return(layerSetUsage.PrimaryMaterial);
            }
            IfcMaterialList list = materialSelect as IfcMaterialList;

            if (list != null)
            {
                return(list.PrimaryMaterial);
            }
            IfcMaterialConstituent constituent = materialSelect as IfcMaterialConstituent;

            if (constituent != null)
            {
                return(constituent.PrimaryMaterial);
            }
            IfcMaterialConstituentSet constituentSet = materialSelect as IfcMaterialConstituentSet;

            if (constituentSet != null)
            {
                return(constituentSet.PrimaryMaterial);
            }
            return(null);
        }