Пример #1
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$";
        }
Пример #2
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";
        }
Пример #3
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";
        }
Пример #4
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 };
        }
Пример #5
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";
        }
Пример #6
0
        public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex)
        {
            switch (propIndex)
            {
            case 0:
                _forProfileSet = (IfcMaterialProfileSet)(value.EntityVal);
                return;

            case 1:
                _cardinalPoint = value.IntegerVal;
                return;

            case 2:
                _referenceExtent = value.RealVal;
                return;

            default:
                throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper()));
            }
        }
Пример #7
0
        internal static DatabaseIfc Generate(ModelView mdv, string path)
        {
            DatabaseIfc db = new DatabaseIfc(true, mdv);
            //IfcGeometricRepresentationContext
            //IfcCartesianPoint
            //IfcAxis2Placement3D
            //IfcDirection
            //IfcAxis2Placement2D
            //IfcSIUnit
            //IfcLocalPlacement
            IfcSite site = new IfcSite(db, "TestSite");
            //IfcPerson  NOT RV
            //IfcOrganization  NOT RV
            //IfcPersonAndOrganization  NOT RV
            //IfcOwnerHistory  NOT RV
            //fcApplication NOT RV
            //                     IfcProjectLibrary NOT RV Can't have multiple context
            IfcProject project = new IfcProject(site, "TestProject", IfcUnitAssignment.Length.Millimetre)
            {
            };
            //IfcUnitAssignment
            //IfcRelAggregates
            IfcBuilding building = new IfcBuilding(site, "TestBuilding")
            {
            };
            IfcBuildingStorey buildingStorey = new IfcBuildingStorey(building, "TestBuildingStorey", 3000);
            IfcSpace          space          = new IfcSpace(buildingStorey, null, null)
            {
                Name = "TestSpace"
            };

            space.RelatingType = new IfcSpaceType(db, "TestSpaceType", IfcSpaceTypeEnum.INTERNAL);

            IfcZone zone = new IfcZone(buildingStorey, "TestZone", "TestZoneLongName", new List <IfcSpace>()
            {
                space
            });

            IfcLocalPlacement localPlacement = buildingStorey.Placement as IfcLocalPlacement;

            IfcMaterial material = new IfcMaterial(db, "TestMaterial")
            {
                Description = "TestDescription", Category = "TestCategory"
            };
            IfcMaterialProperties materialProperties = new IfcMaterialProperties("TestMaterialProperties", material);

            materialProperties.AddProperty(new IfcPropertySingleValue(db, "MassDensity", new IfcMassDensityMeasure(1)));
            IfcSurfaceStyleShading surfaceStyleShading = new IfcSurfaceStyleShading(new IfcColourRgb(db, 1, 0, 0)
            {
                Name = "Red"
            });
            IfcSurfaceStyle surfaceStyle = new IfcSurfaceStyle(surfaceStyleShading, null, null, null, null);
            IfcMaterialDefinitionRepresentation materialDefinitionRepresentation = new IfcMaterialDefinitionRepresentation(new IfcStyledRepresentation(new IfcStyledItem(surfaceStyle)
            {
                Name = "TestStyledItem"
            }), material);

            IfcIndexedPolyCurve          indexedPolyCurve          = IPE200Curve(db);
            IfcArbitraryClosedProfileDef arbitraryClosedProfileDef = new IfcArbitraryClosedProfileDef("IPE200", indexedPolyCurve);
            IfcMaterialProfile           materialProfile           = new IfcMaterialProfile("TestMaterialProfile", material, arbitraryClosedProfileDef);
            IfcMaterialProfileSet        materialProfileSet        = new IfcMaterialProfileSet("TestMaterialProfileSet", materialProfile);

            IfcExtrudedAreaSolid extrudedAreaSolid = new IfcExtrudedAreaSolid(arbitraryClosedProfileDef, new IfcAxis2Placement3D(new IfcCartesianPoint(db, 0, 0, 0), new IfcDirection(db, 1, 0, 0), new IfcDirection(db, 0, 1, 0)), new IfcDirection(db, 0, 0, 1), 5000);
            IfcBeamType          beamType          = new IfcBeamType(db, "TestBeamType", IfcBeamTypeEnum.BEAM);

            beamType.MaterialSelect = materialProfileSet;
            IfcBeam beam = new IfcBeam(buildingStorey, new IfcLocalPlacement(localPlacement, new IfcAxis2Placement3D(new IfcCartesianPoint(db, 1000, 2000, 0))
            {
                RefDirection = new IfcDirection(db, 0, 1, 0)
            }), new IfcProductDefinitionShape(new IfcShapeRepresentation(extrudedAreaSolid)));

            //IfcGeometricRepresentationSubContext
            beam.RelatingType = beamType;
            //IfcRelDefinesByType

            //	if(mdv != ModelView.Ifc4Reference)
            //			IfcActorRole  NOT RV

            //IfcActuator
            //IfcActuatorType
            //IfcAdvancedBrep  NOT RV
            //IfcAdvancedFace   NOT RV
            //IfcAirTerminal
            //IfcAirTerminalBox
            //IfcAirTerminalBoxType
            //IfcAirTerminalType
            //IfcAirToAirHeatRecovery
            //IfcAirToAirHeatRecoveryType
            //IfcAlarm
            //IfcAlarmType
            //IfcArbitraryOpenProfileDef
            //IfcArbitraryProfileDefWithVoids
            //IfcAsymmetricIShapeProfileDef  NOT RV
            //IfcAudioVisualAppliance
            //IfcAudioVisualApplianceType
            //IfcAxis1Placement
            //IfcBeamStandardCase  NOT RV
            //IfcBlock   NOT RV
            //IfcBoiler
            //IfcBoilerType
            //IfcBooleanClippingResult  NOT RV
            //IfcBooleanResult  NOT RV
            //IfcBSplineCurveWithKnots  NOT RV
            //IfcBSplineSurface  NOT RV
            //IfcBSplineSurfaceWithKnots  NOT RV
            //IfcBuildingElementPart
            //IfcBuildingElementPartType
            //IfcBuildingElementProxy
            //IfcBuildingElementProxyType
            //IfcBuildingSystem
            //IfcBurner
            //IfcBurnerType
            //IfcCableCarrierFitting
            //IfcCableCarrierFittingType
            //IfcCableCarrierSegment
            //IfcCableCarrierSegmentType
            //IfcCableFitting
            //IfcCableFittingType
            //IfcCableSegment
            //IfcCableSegmentType
            //IfcCartesianPointList2D
            //IfcCartesianPointList3D
            //IfcCartesianTransformationOperator2D
            //IfcCartesianTransformationOperator2DnonUniform
            //IfcCartesianTransformationOperator3D
            //IfcCartesianTransformationOperator3DnonUniform
            //IfcCenterLineProfileDef
            //IfcChiller
            //IfcChillerType
            //IfcChimney
            //IfcChimneyType
            //IfcCircle
            //IfcCircleHollowProfileDef  NOT RV
            //IfcCircleProfileDef  NOT RV
            //IfcCivilElement
            //IfcCivilElementType
            //IfcClassification
            //IfcClassificationReference
            //IfcClosedShell
            //IfcCoil
            //IfcCoilType
            //IfcColourRgbList
            //IfcColourSpecification
            //IfcColumn
            //IfcColumnStandardCase  NOT RV
            //IfcColumnType
            //IfcCommunicationsAppliance
            //IfcCommunicationsApplianceType
            //IfcComplexProperty
            //IfcCompositeProfileDef  NOT RV
            //IfcCompressor
            //IfcCompressorType
            //IfcCondenser
            //IfcCondenserType
            //IfcConnectedFaceSet  NOT RV
            //IfcConnectionCurveGeometry  NOT RV
            //IfcConnectionVolumeGeometry  NOT RV
            //IfcController
            //IfcControllerType
            //IfcConversionBasedUnit
            //IfcConversionBasedUnitWithOffset
            //IfcCooledBeam
            //IfcCooledBeamType
            //IfcCoolingTower
            //IfcCoolingTowerType
            //IfcCovering
            //IfcCoveringType
            //IfcCsgSolid  NOT RV
            //IfcCShapeProfileDef  NOT RV
            //IfcCurtainWall
            //IfcCurtainWallType
            //IfcCurveStyle
            //IfcCurveStyleFont
            //IfcCurveStyleFontPattern
            //IfcDamper
            //IfcDamperType
            //IfcDerivedProfileDef  NOT RV
            //IfcDerivedUnit
            //IfcDerivedUnitElement
            //IfcDimensionalExponents
            //IfcDiscreteAccessory
            //IfcDiscreteAccessoryType
            //IfcDistributionChamberElement
            //IfcDistributionChamberElementType
            //IfcDistributionCircuit
            //IfcDistributionControlElement
            //IfcDistributionControlElementType
            //IfcDistributionElement
            //IfcDistributionElementType
            //IfcDistributionFlowElement
            //IfcDistributionFlowElementType
            //IfcDistributionPort
            //IfcDistributionSystem
            //IfcDocumentReference
            //IfcDoor
            //IfcDoorLiningProperties
            //IfcDoorPanelProperties
            //IfcDoorStandardCase  NOT RV
            //IfcDoorType
            //IfcDuctFitting
            //IfcDuctFittingType
            //IfcDuctSegment
            //IfcDuctSegmentType
            //IfcDuctSilencer
            //IfcDuctSilencerType
            //IfcEdge	 NOT RV
            //IfcEdgeCurve  NOT RV
            //IfcEdgeLoop  NOT RV
            //IfcElectricAppliance
            //IfcElectricApplianceType
            //IfcElectricDistributionBoard
            //IfcElectricDistributionBoardType
            //IfcElectricFlowStorageDevice
            //IfcElectricFlowStorageDeviceType
            //IfcElectricGenerator
            //IfcElectricGeneratorType
            //IfcElectricMotor
            //IfcElectricMotorType
            //IfcElectricTimeControl
            //IfcElectricTimeControlType
            //IfcElementAssembly
            //IfcElementAssemblyType
            //IfcElementComponent
            //IfcElementComponentType
            //IfcElementQuantity
            //IfcEllipseProfileDef  NOT RV
            //IfcEnergyConversionDevice
            //IfcEnergyConversionDeviceType
            //IfcEngine
            //IfcEngineType
            //IfcEvaporativeCooler
            //IfcEvaporativeCoolerType
            //IfcEvaporator
            //IfcEvaporatorType
            //IfcExtendedProperties
            //IfcExternalInformation
            //IfcExternalReference
            //IfcExtrudedAreaSolidTapered  NOT RV
            //IfcFace  NOT RV
            //IfcFaceBasedSurfaceModel  NOT RV
            //IfcFaceBound  NOT RV
            //IfcFaceOuterBound  NOT RV
            //IfcFaceSurface  NOT RV
            //IfcFacetedBrep  NOT RV
            //IfcFan
            //IfcFanType
            //IfcFastener
            //IfcFastenerType
            //IfcFeatureElement
            //IfcFeatureElementAddition  NOT RV
            //IfcFeatureElementSubtraction
            //IfcFillAreaStyle
            //IfcFillAreaStyleHatching
            //IfcFilter
            //IfcFilterType
            //IfcFireSuppressionTerminal
            //IfcFireSuppressionTerminalType
            //IfcFixedReferenceSweptAreaSolid  NOT RV
            //IfcFlowController
            //IfcFlowControllerType
            //IfcFlowFitting
            //IfcFlowFittingType
            //IfcFlowInstrument
            //IfcFlowInstrumentType
            //IfcFlowMeter
            //IfcFlowMeterType
            //IfcFlowMovingDevice
            //IfcFlowMovingDeviceType
            //IfcFlowSegment
            //IfcFlowSegmentType
            //IfcFlowStorageDevice
            //IfcFlowStorageDeviceType
            //IfcFlowTerminal
            //IfcFlowTerminalType
            //IfcFlowTreatmentDevice
            //IfcFlowTreatmentDeviceType
            //IfcFooting
            //IfcFootingType
            //IfcFurnishingElement
            //IfcFurnishingElementType
            //IfcFurniture
            //IfcFurnitureType
            //IfcGeographicElement
            //IfcGeographicElementType
            //IfcGeometricCurveSet
            //IfcGeometricSet
            //IfcGrid
            //IfcGridAxis
            //IfcGridPlacement  NOT RV
            //IfcGroup
            //IfcHalfSpaceSolid  NOT RV
            //IfcHeatExchanger
            //IfcHeatExchangerType
            //IfcHumidifier
            //IfcHumidifierType
            //IfcIndexedColourMap
            //IfcIndexedTextureMap
            //IfcIndexedTriangleTextureMap
            //IfcInterceptor
            //IfcInterceptorType
            //IfcIShapeProfileDef
            //IfcJunctionBox
            //IfcJunctionBoxType
            //IfcLamp
            //IfcLampType
            //IfcLibraryInformation  NOT RV
            //IfcLibraryReference  NOT RV
            //IfcLightFixture
            //IfcLightFixtureType
            //IfcLine
            //IfcLoop   NOT RV
            //IfcLShapeProfileDef  NOT RV
            //IfcMapConversion
            //IfcMappedItem
            //IfcMaterialConstituent
            //IfcMaterialConstituentSet
            //IfcMaterialLayer
            //IfcMaterialLayerSet
            //IfcMaterialLayerSetUsage  NOT RV
            //IfcMaterialLayerWithOffsets  NOT RV
            //IfcMaterialProfileSetUsage  NOT RV
            //IfcMaterialProfileSetUsageTapering  NOT RV
            //IfcMaterialProfileWithOffsets  NOT RV
            //IfcMaterialUsageDefinition  NOT RV
            //IfcMeasureWithUnit
            //IfcMechanicalFastener
            //IfcMechanicalFastenerType
            //IfcMedicalDevice
            //IfcMedicalDeviceType
            //IfcMember
            //IfcMemberStandardCase  NOT RV
            //IfcMemberType
            //IfcMonetaryUnit
            //IfcMotorConnection
            //IfcMotorConnectionType
            //IfcNamedUnit
            //IfcOpeningElement
            //IfcOpeningStandardCase  NOT RV
            //IfcOpenShell  NOT RV
            //IfcOrientedEdge  NOT RV
            //IfcOutlet
            //IfcOutletType
            //IfcPcurve  NOT RV
            //IfcPhysicalComplexQuantity
            //IfcPhysicalQuantity
            //IfcPhysicalSimpleQuantity
            //IfcPile
            //IfcPileType
            //IfcPipeFitting
            //IfcPipeFittingType
            //IfcPipeSegment
            //IfcPipeSegmentType
            //IfcPlane  NOT RV
            //IfcPlate
            //IfcPlateStandardCase  NOT RV
            //IfcPlateType
            //IfcPoint
            //IfcPolygonalBoundedHalfSpace  NOT RV
            //IfcPolyline  NOT RV
            //IfcPolyLoop  NOT RV
            //IfcPort
            //IfcPostalAddress
            //IfcPreDefinedPropertySet
            //IfcPresentationItem
            //IfcPresentationLayerAssignment
            //IfcPresentationStyle
            //IfcPresentationStyleAssignment
            //IfcProductDefinitionShape
            //IfcProductRepresentation
            //IfcProfileDef
            //IfcProfileProperties
            //IfcProjectedCRS
            //IfcProjectionElement  NOT RV
            //IfcProperty
            //IfcPropertyAbstraction
            //IfcPropertyBoundedValue
            //IfcPropertyDefinition
            //IfcPropertyEnumeratedValue
            //IfcPropertyEnumeration
            //IfcPropertyListValue
            //IfcPropertySet
            //IfcPropertySetTemplate  NOT RV
            //IfcPropertyTableValue
            //IfcPropertyTemplate  NOT RV
            //IfcPropertyTemplateDefinition  NOT RV
            //IfcProtectiveDevice
            //IfcProtectiveDeviceTrippingUnit
            //IfcProtectiveDeviceTrippingUnitType
            //IfcProtectiveDeviceType
            //IfcPump
            //IfcPumpType
            //IfcQuantityArea
            //IfcQuantityCount
            //IfcQuantityLength
            //IfcQuantitySet
            //IfcQuantityTime
            //IfcQuantityVolume
            //IfcQuantityWeight
            //IfcRailing
            //IfcRailingType
            //IfcRamp
            //IfcRampFlight
            //IfcRampFlightType
            //IfcRampType
            //IfcRectangleHollowProfileDef  NOT RV
            //IfcRectangleProfileDef  NOT RV
            //IfcRectangularPyramid  NOT RV
            //IfcReinforcingBar
            //IfcReinforcingBarType
            //IfcReinforcingElement
            //IfcReinforcingElementType
            //IfcReinforcingMesh
            //IfcReinforcingMeshType
            //IfcRelAssignsToGroup
            //IfcRelAssociatesClassification
            //IfcRelAssociatesDocument
            //IfcRelAssociatesLibrary  NOT RV
            //IfcRelAssociatesMaterial
            //IfcRelConnectsElements  NOT RV
            //IfcRelConnectsPathElements  NOT RV
            //IfcRelConnectsPorts
            //IfcRelConnectsWithRealizingElements  NOT RV
            //IfcRelContainedInSpatialStructure
            //IfcRelCoversBldgElements
            //IfcRelDeclares
            //IfcRelDefinesByProperties
            //IfcRelFillsElement
            //IfcRelFlowControlElements  NOT RV
            //IfcRelInterferesElements  NOT RV
            //IfcRelNests
            //IfcRelProjectsElement  NOT RV
            //IfcRelServicesBuildings
            //IfcRelVoidsElement
            //IfcRepresentation
            //IfcRepresentationContext
            //IfcRepresentationItem
            //IfcRepresentationMap
            //IfcRevolvedAreaSolid
            //IfcRevolvedAreaSolidTapered  NOT RV
            //IfcRightCircularCone  NOT RV
            //IfcRightCircularCylinder  NOT RV
            //IfcRoof
            //IfcRoofType
            //IfcRoundedRectangleProfileDef  NOT RV
            //IfcSanitaryTerminal
            //IfcSanitaryTerminalType
            //IfcSensor
            //IfcSensorType
            //IfcShadingDevice
            //IfcShadingDeviceType
            //IfcShapeRepresentation
            //IfcShellBasedSurfaceModel  NOT RV
            //IfcSimplePropertyTemplate  NOT RV
            //IfcSlab
            //IfcSlabElementedCase  NOT RV
            //IfcSlabStandardCase  NOT RV
            //IfcSlabType
            //IfcSolarDevice
            //IfcSolarDeviceType
            //IfcSpaceHeater
            //IfcSpaceHeaterType
            //IfcSpatialZone
            //IfcSpatialZoneType
            //IfcSphere  NOT RV
            //IfcStackTerminal
            //IfcStackTerminalType
            //IfcStair
            //IfcStairFlight
            //IfcStairFlightType
            //IfcStairType
            //IfcStyleModel
            //IfcSurface  NOT RV
            //IfcSurfaceCurveSweptAreaSolid  NOT RV
            //IfcSurfaceOfLinearExtrusion  NOT RV
            //IfcSurfaceOfRevolution  NOT RV
            //IfcSurfaceStyleRendering
            //IfcSurfaceStyleWithTextures surfaceStyleWithTextures = new IfcSurfaceStyleWithTextures(new IfcImageTexture(db,true,true,""));
            //IfcSweptDiskSolid
            //IfcSwitchingDevice
            //IfcSwitchingDeviceType
            //IfcSystemFurnitureElement
            //IfcSystemFurnitureElementType
            //IfcTank
            //IfcTankType
            //IfcTelecomAddress  NOT RV
            //IfcTendon
            //IfcTendonAnchor
            //IfcTendonAnchorType
            //IfcTendonType
            //IfcTessellatedFaceSet
            //IfcTessellatedItem
            //IfcTextureCoordinate
            //IfcTextureVertexList
            //IfcTransformer
            //IfcTransformerType
            //IfcTransportElement
            //IfcTransportElementType
            //IfcTriangulatedFaceSet
            //IfcTrimmedCurve
            //IfcTShapeProfileDef  NOT RV
            //IfcTubeBundle
            //IfcTubeBundleType
            //IfcUnitaryControlElement
            //IfcUnitaryControlElementType
            //IfcUnitaryEquipment
            //IfcUnitaryEquipmentType
            //IfcUShapeProfileDef  NOT RV
            //IfcValve
            //IfcValveType
            //IfcVector
            //IfcVertex  NOT RV
            //IfcVertexPoint  NOT RV
            //IfcVibrationIsolator
            //IfcVibrationIsolatorType
            //IfcVirtualGridIntersection  NOT RV
            //IfcWall
            //IfcWallElementedCase  NOT RV
            //IfcWallStandardCase  NOT RV
            //IfcWallType
            //IfcWasteTerminal
            //IfcWasteTerminalType
            //IfcWindow
            //IfcWindowLiningProperties
            //IfcWindowPanelProperties
            //IfcWindowStandardCase  NOT RV
            //IfcWindowType
            //IfcZShapeProfileDef  NOT RV
            db.WriteFile(Path.Combine(path, mdv.ToString() + ".ifc"));
            return(db);
        }
Пример #8
0
        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";
        }
Пример #9
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";
        }
Пример #10
0
        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);
        }