internal static void GenerateData(STPModelData md, IfcBuilding building,bool openings) { IfcMaterial concrete = new IfcMaterial(md, "Concrete", "", ""); int thickness = 200; IfcMaterialLayer materialLayer = new IfcMaterialLayer(md, concrete, thickness, false, "Core", "", "", 0); string name = thickness + "mm Concrete"; IfcMaterialLayerSet materialLayerSet = new IfcMaterialLayerSet( materialLayer, name, ""); materialLayerSet.Associates.GlobalId = "2l_enLhI93reVwnim9gXUq"; md.NextObjectRecord = 300; IfcSlabType slabType = new IfcSlabType(name, materialLayerSet, IfcSlabTypeEnum.FLOOR) { GlobalId = "0RSW$KKbzCZ9QaSm3GoEan" }; slabType.ObjectTypeOf.GlobalId = "3wwDcmW5T3HfafURQewdD0"; PolyCurve polycurve = new PolyCurve(); polycurve.Append(new Line(0, 0, 0, 1000, 0, 0)); polycurve.Append(new Arc(new Point3d(1000, 0, 0), new Point3d(1400, 2000, 0), new Point3d(1000, 4000, 0))); polycurve.Append(new Line(1000, 4000, 0, 0, 4000, 0)); polycurve.Append(new Arc(new Point3d(0, 4000, 0), new Point3d(-400, 2000, 0), new Point3d(0, 0, 0))); IfcSlabStandardCase slabStandardCase = new IfcSlabStandardCase(building, slabType, polycurve, -200, true, null) { GlobalId = "1wAj$J2Az2V8wnBiVYd3bU" }; slabStandardCase.Material.Associates.GlobalId = "3ESAzibgr9BvK9M75iV84w"; if (openings) { IfcCircleProfileDef cpd = new IfcCircleProfileDef(md, "100DIA", 50); IfcExtrudedAreaSolid eas = new IfcExtrudedAreaSolid(cpd,new IfcAxis2Placement3D(md,new Plane(new Point3d(100,300,-200),Vector3d.XAxis,Vector3d.YAxis)),new IfcDirection(md,0,0,1),thickness); IfcOpeningStandardCase opening = new IfcOpeningStandardCase(slabStandardCase, null, eas) { GlobalId = "15RSTHd8nFVQWMRE7og7sd", Name = "Opening" }; opening.VoidsElement.GlobalId = "0gqEDsyEzFXvY$fc_rUxyO"; IfcRectangleProfileDef rpd = new IfcRectangleProfileDef(md, "RecessRectangle", 500, 1000); eas = new IfcExtrudedAreaSolid(rpd, new IfcAxis2Placement3D(md, new Plane(new Point3d(500, 1000, -50), Vector3d.XAxis, Vector3d.YAxis)), new IfcDirection(md, 0, 0, 1), 50); IfcOpeningElement recess = new IfcOpeningElement(slabStandardCase, eas, IfcOpeningElementTypeEnum.RECESS) { GlobalId = "0w93HZ19H2D99zbAVNb4o2", Name = "Recess" }; recess.VoidsElement.GlobalId = "3iUkij4q1DmxlXuHzQVJaM"; } }
public IfcThermalMaterialProperties(IfcMaterial __Material, IfcSpecificHeatCapacityMeasure?__SpecificHeatCapacity, IfcThermodynamicTemperatureMeasure?__BoilingPoint, IfcThermodynamicTemperatureMeasure?__FreezingPoint, IfcThermalConductivityMeasure?__ThermalConductivity) : base(__Material) { this._SpecificHeatCapacity = __SpecificHeatCapacity; this._BoilingPoint = __BoilingPoint; this._FreezingPoint = __FreezingPoint; this._ThermalConductivity = __ThermalConductivity; }
public IfcProductsOfCombustionProperties(IfcMaterial __Material, IfcSpecificHeatCapacityMeasure?__SpecificHeatCapacity, IfcPositiveRatioMeasure?__N20Content, IfcPositiveRatioMeasure?__COContent, IfcPositiveRatioMeasure?__CO2Content) : base(__Material) { this._SpecificHeatCapacity = __SpecificHeatCapacity; this._N20Content = __N20Content; this._COContent = __COContent; this._CO2Content = __CO2Content; }
protected IfcMaterialProfile GetParametericIPE200Profile(STPModelData md) { IfcMaterial material = new IfcMaterial(md, "S355JR", "", "Steel"); material.Associates.GlobalId = "1oJeVe14nCYf5cL0Mka0KL"; string name = "IPE200"; IfcIShapeProfileDef ipe200 = new IfcIShapeProfileDef(md, name, 200, 100, 5.6, 8.5, 12); return new IfcMaterialProfile(md, name, "", material, ipe200, 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$"; } }
public IfcHygroscopicMaterialProperties(IfcMaterial __Material, IfcPositiveRatioMeasure?__UpperVaporResistanceFactor, IfcPositiveRatioMeasure?__LowerVaporResistanceFactor, IfcIsothermalMoistureCapacityMeasure?__IsothermalMoistureCapacity, IfcVaporPermeabilityMeasure?__VaporPermeability, IfcMoistureDiffusivityMeasure?__MoistureDiffusivity) : base(__Material) { this._UpperVaporResistanceFactor = __UpperVaporResistanceFactor; this._LowerVaporResistanceFactor = __LowerVaporResistanceFactor; this._IsothermalMoistureCapacity = __IsothermalMoistureCapacity; this._VaporPermeability = __VaporPermeability; this._MoistureDiffusivity = __MoistureDiffusivity; }
public IfcMechanicalMaterialProperties(IfcMaterial __Material, IfcDynamicViscosityMeasure?__DynamicViscosity, IfcModulusOfElasticityMeasure?__YoungModulus, IfcModulusOfElasticityMeasure?__ShearModulus, IfcPositiveRatioMeasure?__PoissonRatio, IfcThermalExpansionCoefficientMeasure?__ThermalExpansionCoefficient) : base(__Material) { this._DynamicViscosity = __DynamicViscosity; this._YoungModulus = __YoungModulus; this._ShearModulus = __ShearModulus; this._PoissonRatio = __PoissonRatio; this._ThermalExpansionCoefficient = __ThermalExpansionCoefficient; }
public static IfcExtendedMaterialProperties GetExtendedProperties(this IfcMaterial material, IModel model, string pSetName, bool caseSensitive = true) { IfcExtendedMaterialProperties result = caseSensitive ? model.Instances.Where <IfcExtendedMaterialProperties>(pSet => pSet.Name == pSetName && pSet.Material == material).FirstOrDefault() : model.Instances.Where <IfcExtendedMaterialProperties>(pSet => pSet.Name.ToString().ToLower() == pSetName.ToLower() && pSet.Material == material).FirstOrDefault(); return(result); }
public IfcMechanicalConcreteMaterialProperties(IfcMaterial __Material, IfcDynamicViscosityMeasure?__DynamicViscosity, IfcModulusOfElasticityMeasure?__YoungModulus, IfcModulusOfElasticityMeasure?__ShearModulus, IfcPositiveRatioMeasure?__PoissonRatio, IfcThermalExpansionCoefficientMeasure?__ThermalExpansionCoefficient, IfcPressureMeasure?__CompressiveStrength, IfcPositiveLengthMeasure?__MaxAggregateSize, IfcText?__AdmixturesDescription, IfcText?__Workability, IfcNormalisedRatioMeasure?__ProtectivePoreRatio, IfcText?__WaterImpermeability) : base(__Material, __DynamicViscosity, __YoungModulus, __ShearModulus, __PoissonRatio, __ThermalExpansionCoefficient) { this._CompressiveStrength = __CompressiveStrength; this._MaxAggregateSize = __MaxAggregateSize; this._AdmixturesDescription = __AdmixturesDescription; this._Workability = __Workability; this._ProtectivePoreRatio = __ProtectivePoreRatio; this._WaterImpermeability = __WaterImpermeability; }
public IfcWaterProperties(IfcMaterial __Material, Boolean?__IsPotable, IfcIonConcentrationMeasure?__Hardness, IfcIonConcentrationMeasure?__AlkalinityConcentration, IfcIonConcentrationMeasure?__AcidityConcentration, IfcNormalisedRatioMeasure?__ImpuritiesContent, IfcPHMeasure?__PHLevel, IfcNormalisedRatioMeasure?__DissolvedSolidsContent) : base(__Material) { this._IsPotable = __IsPotable; this._Hardness = __Hardness; this._AlkalinityConcentration = __AlkalinityConcentration; this._AcidityConcentration = __AcidityConcentration; this._ImpuritiesContent = __ImpuritiesContent; this._PHLevel = __PHLevel; this._DissolvedSolidsContent = __DissolvedSolidsContent; }
public IfcMechanicalSteelMaterialProperties(IfcMaterial __Material, IfcDynamicViscosityMeasure?__DynamicViscosity, IfcModulusOfElasticityMeasure?__YoungModulus, IfcModulusOfElasticityMeasure?__ShearModulus, IfcPositiveRatioMeasure?__PoissonRatio, IfcThermalExpansionCoefficientMeasure?__ThermalExpansionCoefficient, IfcPressureMeasure?__YieldStress, IfcPressureMeasure?__UltimateStress, IfcPositiveRatioMeasure?__UltimateStrain, IfcModulusOfElasticityMeasure?__HardeningModule, IfcPressureMeasure?__ProportionalStress, IfcPositiveRatioMeasure?__PlasticStrain, IfcRelaxation[] __Relaxations) : base(__Material, __DynamicViscosity, __YoungModulus, __ShearModulus, __PoissonRatio, __ThermalExpansionCoefficient) { this._YieldStress = __YieldStress; this._UltimateStress = __UltimateStress; this._UltimateStrain = __UltimateStrain; this._HardeningModule = __HardeningModule; this._ProportionalStress = __ProportionalStress; this._PlasticStrain = __PlasticStrain; this._Relaxations = new HashSet <IfcRelaxation>(__Relaxations); }
public virtual void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _material = (IfcMaterial)value.EntityVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: _material = (IfcMaterial)(value.EntityVal); return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
public IfcOpticalMaterialProperties(IfcMaterial __Material, IfcPositiveRatioMeasure?__VisibleTransmittance, IfcPositiveRatioMeasure?__SolarTransmittance, IfcPositiveRatioMeasure?__ThermalIrTransmittance, IfcPositiveRatioMeasure?__ThermalIrEmissivityBack, IfcPositiveRatioMeasure?__ThermalIrEmissivityFront, IfcPositiveRatioMeasure?__VisibleReflectanceBack, IfcPositiveRatioMeasure?__VisibleReflectanceFront, IfcPositiveRatioMeasure?__SolarReflectanceFront, IfcPositiveRatioMeasure?__SolarReflectanceBack) : base(__Material) { this._VisibleTransmittance = __VisibleTransmittance; this._SolarTransmittance = __SolarTransmittance; this._ThermalIrTransmittance = __ThermalIrTransmittance; this._ThermalIrEmissivityBack = __ThermalIrEmissivityBack; this._ThermalIrEmissivityFront = __ThermalIrEmissivityFront; this._VisibleReflectanceBack = __VisibleReflectanceBack; this._VisibleReflectanceFront = __VisibleReflectanceFront; this._SolarReflectanceFront = __SolarReflectanceFront; this._SolarReflectanceBack = __SolarReflectanceBack; }
static void ImportProject(DatabaseIfc db) { #if IFCTest if (SQ.sql != null) { if (db.Project.GlobalId == ProjectModel.Set.Projectmodel.Code) { //the current model is the same as the IFC //TODO: ASk User if he want to replace the currently stored Data with the IFC One } var projectmodel = ProjectModel.Set.Projectmodel; #else var projectmodel = new ProjectModel(); #endif projectmodel.Code = db.Project.GlobalId; projectmodel.Name = db.Project.Name; IfcBuilding.ExtractBuilding(db); var walls = db.Where(o => o is IfcWall).Cast<IfcWall>(); foreach (var w in walls) { var finishmodel = new FinishModel(); IfcObjectType.ExtractTypicalProperties(w, finishmodel); finishmodel.FinishLib = IfcObjectType.ExtractType(w) as FinishLib; finishmodel.FinishLib.InsertOrReplace(); IfcData.InsertOrReplaceAll(finishmodel.FinishLib.Additional_Info); IfcData.InsertOrReplaceAll(finishmodel.Additional_Info); IfcMaterial.ExtractMaterial(w).ForEach(m=> { m.SetFkeyParent(finishmodel.FinishLib); m.InsertOrReplace(); }); finishmodel.InsertOrReplace(); } #if IFCTest } else { Utility.Constants.MainWindow.ShowModalMessageExternal("Please create a project first", ""); } #endif }
public Material(IfcStore Model, string name) { this.name = name; IfcMaterial result = Model.Instances.OfType <IfcMaterial>().Where(m => m.Name == name).FirstOrDefault(); if (result == null) { ifcMaterial = Model.Instances.New <IfcMaterial>(m => m.Name = name); } else { ifcMaterial = result; } }
public static IfcPropertySingleValue GetExtendedSingleValue(this IfcMaterial material, IModel model, string pSetName, string propertyName) { IfcExtendedMaterialProperties pSet = GetExtendedProperties(material, model, pSetName); if (pSet == null) { return(null); } IfcPropertySingleValue result = pSet.ExtendedProperties.Where <IfcPropertySingleValue>(sv => sv.Name == propertyName).FirstOrDefault(); return(result); }
protected override void GenerateData(STPModelData md, IfcBuilding building) { IfcBlock block = new IfcBlock(md,Plane.WorldXY, 2000,800,800); IfcRoundedRectangleProfileDef roundedRectangle = new IfcRoundedRectangleProfileDef(md, "VoidProfile", 600,1800,200); IfcExtrudedAreaSolid extrudedAreaSolid = new IfcExtrudedAreaSolid(roundedRectangle,new IfcAxis2Placement3D(md,new Plane(new Point3d( 1000,400,100),Vector3d.XAxis,Vector3d.YAxis)),new IfcDirection(md,0,0,1),700); IfcBooleanResult booleanResult = new IfcBooleanResult(IfcBooleanOperator.DIFFERENCE, block, extrudedAreaSolid); IfcCsgSolid csgSolid = new IfcCsgSolid(booleanResult); IfcRepresentationMap representationMap = new IfcRepresentationMap(csgSolid); IfcMaterial ceramic = new IfcMaterial(md, "Ceramic", "", ""); ceramic.Associates.GlobalId = "0Pkhszwjv1qRMYyCFg9fjB"; IfcSanitaryTerminalType sanitaryTerminalType = new IfcSanitaryTerminalType(md, "Bath", IfcSanitaryTerminalTypeEnum.BATH) { GlobalId = "1HarmwaPv3OeJSXpaoPKpg", MaterialSelect = ceramic, RepresentationMaps = new List<IfcRepresentationMap>() {representationMap } }; sanitaryTerminalType.ObjectTypeOf.GlobalId = "1lO$X3e3j9lfVMhNy4MzKB"; IfcElement element = sanitaryTerminalType.GenerateMappedItemElement(building, Plane.WorldXY); element.GlobalId = "3$$o7C03j0KQeLnoj018fc"; }
/// <summary> /// do not use obsolete /// </summary> /// <param name="location"></param> /// <param name="itemReference"></param> /// <param name="name"></param> BbMaterial(string location, string itemReference, string name) { IfcMaterial = new IfcMaterial { Name = name }; IfcMaterialClassificationRelationship = new IfcMaterialClassificationRelationship { MaterialClassifications = new List<IfcClassificationNotationSelect>(), ClassifiedMaterial = IfcMaterial, }; IfcClassificationReference = new IfcClassificationReference { Location = location, ItemReference = itemReference, Name = name, }; var ns = new IfcClassificationNotationSelect { Value = IfcClassificationReference, }; IfcMaterialClassificationRelationship.MaterialClassifications.Add(ns); //var ifcMaterialLayer = new IfcMaterialLayer // { // Material = IfcMaterial, // LayerThickness = new IfcPositiveLengthMeasure { Value = 0.0 }, // }; //var ifcMaterialLayerSet = new IfcMaterialLayerSet // { // MaterialLayers = new List<IfcMaterialLayer>(), // }; //ifcMaterialLayerSet.MaterialLayers.Add(ifcMaterialLayer); //var ifcMaterialLayerSetUsage = new IfcMaterialLayerSetUsage // { // ForLayerSet = ifcMaterialLayerSet, // LayerSetDirection = IfcLayerSetDirectionEnum. // }; }
/// <summary> /// do not use obsolete /// </summary> /// <param name="location"></param> /// <param name="itemReference"></param> /// <param name="name"></param> BbMaterial(string location, string itemReference, string name) { IfcMaterial = new IfcMaterial { Name = name }; IfcMaterialClassificationRelationship = new IfcMaterialClassificationRelationship { MaterialClassifications = new List <IfcClassificationNotationSelect>(), ClassifiedMaterial = IfcMaterial, }; IfcClassificationReference = new IfcClassificationReference { Location = location, ItemReference = itemReference, Name = name, }; var ns = new IfcClassificationNotationSelect { Value = IfcClassificationReference, }; IfcMaterialClassificationRelationship.MaterialClassifications.Add(ns); //var ifcMaterialLayer = new IfcMaterialLayer // { // Material = IfcMaterial, // LayerThickness = new IfcPositiveLengthMeasure { Value = 0.0 }, // }; //var ifcMaterialLayerSet = new IfcMaterialLayerSet // { // MaterialLayers = new List<IfcMaterialLayer>(), // }; //ifcMaterialLayerSet.MaterialLayers.Add(ifcMaterialLayer); //var ifcMaterialLayerSetUsage = new IfcMaterialLayerSetUsage // { // ForLayerSet = ifcMaterialLayerSet, // LayerSetDirection = IfcLayerSetDirectionEnum. // }; }
protected override void GenerateData(STPModelData md, IfcBuilding building) { IfcBlock block = new IfcBlock(md, Plane.WorldXY, 2000, 800, 800); IfcRoundedRectangleProfileDef roundedRectangle = new IfcRoundedRectangleProfileDef(md, IfcProfileTypeEnum.AREA, "VoidProfile", null, 600, 1800, 200); IfcExtrudedAreaSolid extrudedAreaSolid = new IfcExtrudedAreaSolid(roundedRectangle, new IfcAxis2Placement3D(md, new Plane(new Point3d(1000, 400, 100), Vector3d.XAxis, Vector3d.YAxis)), new IfcDirection(md, 0, 0, 1), 700); IfcBooleanResult booleanResult = new IfcBooleanResult(IfcBooleanOperator.DIFFERENCE, block, extrudedAreaSolid); IfcCsgSolid csgSolid = new IfcCsgSolid(booleanResult); IfcRepresentationMap representationMap = new IfcRepresentationMap(csgSolid); IfcMaterial ceramic = new IfcMaterial(md, "Ceramic", "", ""); ceramic.Associates.GlobalId = "0Pkhszwjv1qRMYyCFg9fjB"; IfcSanitaryTerminalType sanitaryTerminalType = new IfcSanitaryTerminalType(md, new IfcElemTypeParams("1HarmwaPv3OeJSXpaoPKpg", "Bath", "", "", ""), ceramic, representationMap, null, IfcSanitaryTerminalTypeEnum.BATH); sanitaryTerminalType.ObjectTypeOf.GlobalId = "1lO$X3e3j9lfVMhNy4MzKB"; sanitaryTerminalType.GenerateMappedItemElement(building, Plane.WorldXY, new IfcElemParams("3$$o7C03j0KQeLnoj018fc", "", "", "", "")); }
protected override void GenerateData(STPModelData md, IfcBuilding building) { IfcMaterial masonryFinish = new IfcMaterial(md, "Masonry - Brick - Brown", "", ""); IfcMaterial masonry = new IfcMaterial(md, "Masonry", "", ""); IfcMaterialLayer layerFinish = new IfcMaterialLayer(md, masonryFinish, 110, false, "Finish", "", "", 0); IfcMaterialLayer airInfiltrationBarrier = new IfcMaterialLayer(md, null, 50, true, "Air Infiltration Barrier", "", "", 0); IfcMaterialLayer structure = new IfcMaterialLayer(md, masonry, 110, false, "Core", "", "", 0); string name = "Double Brick - 270"; IfcMaterialLayerSet materialLayerSet = new IfcMaterialLayerSet( new List<IfcMaterialLayer>() { layerFinish, airInfiltrationBarrier, structure }, name, ""); materialLayerSet.Associates.GlobalId = "36U74BIPDD89cYkx9bkV$Y"; md.NextObjectRecord = 300; IfcWallType wallType = new IfcWallType(name, materialLayerSet, IfcWallTypeEnum.NOTDEFINED) { GlobalId = "2aG1gZj7PD2PztLOx2$IVX" }; wallType.ObjectTypeOf.GlobalId = "1$EkFElNT8TB_VUVG1FtMe"; IfcWallStandardCase wallStandardCase = new IfcWallStandardCase(building, wallType, new Line(0, 0, 0, 5000, 0, 0), 2000, 0, true, null) { GlobalId = "0DWgwt6o1FOx7466fPk$jl" }; wallStandardCase.MaterialSelect.Associates.GlobalId = "1BYoVhjtLADPUZYzipA826"; }
internal static void GenerateData(STPModelData md, IfcBuilding building, bool openings) { IfcMaterial concrete = new IfcMaterial(md, "Concrete", "", ""); int thickness = 200; IfcMaterialLayer materialLayer = new IfcMaterialLayer(md, concrete, thickness, false, "Core", "", "", 0); string name = thickness + "mm Concrete"; IfcMaterialLayerSet materialLayerSet = new IfcMaterialLayerSet(materialLayer, name, ""); materialLayerSet.Associates.GlobalId = "2l_enLhI93reVwnim9gXUq"; md.NextObjectRecord = 300; IfcSlabType slabType = new IfcSlabType(name, materialLayerSet, IfcSlabTypeEnum.FLOOR) { GlobalId = "0RSW$KKbzCZ9QaSm3GoEan" }; slabType.ObjectTypeOf.GlobalId = "3wwDcmW5T3HfafURQewdD0"; PolyCurve polycurve = new PolyCurve(); polycurve.Append(new Line(0, 0, 0, 1000, 0, 0)); polycurve.Append(new Arc(new Point3d(1000, 0, 0), new Point3d(1400, 2000, 0), new Point3d(1000, 4000, 0))); polycurve.Append(new Line(1000, 4000, 0, 0, 4000, 0)); polycurve.Append(new Arc(new Point3d(0, 4000, 0), new Point3d(-400, 2000, 0), new Point3d(0, 0, 0))); IfcSlabStandardCase slabStandardCase = new IfcSlabStandardCase(building, slabType, polycurve, -200, true, null) { GlobalId = "1wAj$J2Az2V8wnBiVYd3bU" }; slabStandardCase.Material.Associates.GlobalId = "3ESAzibgr9BvK9M75iV84w"; if (openings) { IfcCircleProfileDef cpd = new IfcCircleProfileDef(md, "100DIA", 50); IfcExtrudedAreaSolid eas = new IfcExtrudedAreaSolid(cpd, new IfcAxis2Placement3D(md, new Plane(new Point3d(100, 300, -200), Vector3d.XAxis, Vector3d.YAxis)), new IfcDirection(md, 0, 0, 1), thickness); IfcOpeningStandardCase opening = new IfcOpeningStandardCase(slabStandardCase, null, eas) { GlobalId = "15RSTHd8nFVQWMRE7og7sd", Name = "Opening" }; opening.VoidsElement.GlobalId = "0gqEDsyEzFXvY$fc_rUxyO"; IfcRectangleProfileDef rpd = new IfcRectangleProfileDef(md, "RecessRectangle", 500, 1000); eas = new IfcExtrudedAreaSolid(rpd, new IfcAxis2Placement3D(md, new Plane(new Point3d(500, 1000, -50), Vector3d.XAxis, Vector3d.YAxis)), new IfcDirection(md, 0, 0, 1), 50); IfcOpeningElement recess = new IfcOpeningElement(slabStandardCase, eas, IfcOpeningElementTypeEnum.RECESS) { GlobalId = "0w93HZ19H2D99zbAVNb4o2", Name = "Recess" }; recess.VoidsElement.GlobalId = "3iUkij4q1DmxlXuHzQVJaM"; } }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: case 2: base.IfcParse(propIndex, value); break; case 3: _representedMaterial = (IfcMaterial)value.EntityVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public IfcFluidFlowProperties(IfcGloballyUniqueId __GlobalId, IfcOwnerHistory __OwnerHistory, IfcLabel?__Name, IfcText?__Description, IfcPropertySourceEnum __PropertySource, IfcTimeSeries __FlowConditionTimeSeries, IfcTimeSeries __VelocityTimeSeries, IfcTimeSeries __FlowrateTimeSeries, IfcMaterial __Fluid, IfcTimeSeries __PressureTimeSeries, IfcLabel?__UserDefinedPropertySource, IfcThermodynamicTemperatureMeasure?__TemperatureSingleValue, IfcThermodynamicTemperatureMeasure?__WetBulbTemperatureSingleValue, IfcTimeSeries __WetBulbTemperatureTimeSeries, IfcTimeSeries __TemperatureTimeSeries, IfcDerivedMeasureValue __FlowrateSingleValue, IfcPositiveRatioMeasure?__FlowConditionSingleValue, IfcLinearVelocityMeasure?__VelocitySingleValue, IfcPressureMeasure?__PressureSingleValue) : base(__GlobalId, __OwnerHistory, __Name, __Description) { this._PropertySource = __PropertySource; this._FlowConditionTimeSeries = __FlowConditionTimeSeries; this._VelocityTimeSeries = __VelocityTimeSeries; this._FlowrateTimeSeries = __FlowrateTimeSeries; this._Fluid = __Fluid; this._PressureTimeSeries = __PressureTimeSeries; this._UserDefinedPropertySource = __UserDefinedPropertySource; this._TemperatureSingleValue = __TemperatureSingleValue; this._WetBulbTemperatureSingleValue = __WetBulbTemperatureSingleValue; this._WetBulbTemperatureTimeSeries = __WetBulbTemperatureTimeSeries; this._TemperatureTimeSeries = __TemperatureTimeSeries; this._FlowrateSingleValue = __FlowrateSingleValue; this._FlowConditionSingleValue = __FlowConditionSingleValue; this._VelocitySingleValue = __VelocitySingleValue; this._PressureSingleValue = __PressureSingleValue; }
public static void DeleteExtendedSingleValue(this IfcMaterial material, IModel model, string pSetName, string propertyName) { IfcExtendedMaterialProperties pSet = GetExtendedProperties(material, model, pSetName); if (pSet == null) { return; } IfcPropertySingleValue singleValue = GetExtendedSingleValue(material, model, pSetName, propertyName); if (singleValue == null) { return; } singleValue.NominalValue = null; }
public static IfcValue GetExtendedSingleValueValue(this IfcMaterial material, IModel model, string pSetName, string propertyName) { IfcExtendedMaterialProperties pSet = GetExtendedProperties(material, model, pSetName); if (pSet == null) { return(null); } IfcPropertySingleValue singleValue = GetExtendedSingleValue(material, model, pSetName, propertyName); if (singleValue == null) { return(null); } IfcValue result = singleValue.NominalValue; return(result); }
public static void SetExtendedSingleValue(this IfcMaterial material, IModel model, string pSetName, string propertyName, IfcValue value) { IfcExtendedMaterialProperties pSet = GetExtendedProperties(material, model, pSetName) ?? model.Instances.New <IfcExtendedMaterialProperties>(ps => { ps.Material = material; ps.Name = pSetName; }); IfcPropertySingleValue singleValue = GetExtendedSingleValue(material, model, pSetName, propertyName); if (singleValue == null) { singleValue = model.Instances.New <IfcPropertySingleValue>(sv => { sv.Name = propertyName; sv.NominalValue = value; }); pSet.ExtendedProperties.Add(singleValue); } }
protected override void GenerateData(STPModelData md, IfcBuilding building) { IfcMaterial masonryFinish = new IfcMaterial(md, "Masonry - Brick - Brown", "", ""); IfcMaterial masonry = new IfcMaterial(md, "Masonry", "", ""); IfcMaterialLayer layerFinish = new IfcMaterialLayer(md, masonryFinish, 110, false, "Finish", "", "", 0); IfcMaterialLayer airInfiltrationBarrier = new IfcMaterialLayer(md, null, 50, true, "Air Infiltration Barrier", "", "", 0); IfcMaterialLayer structure = new IfcMaterialLayer(md, masonry, 110, false, "Core", "", "", 0); string name = "Double Brick - 270"; IfcMaterialLayerSet materialLayerSet = new IfcMaterialLayerSet(md, new List <IfcMaterialLayer>() { layerFinish, airInfiltrationBarrier, structure }, name, ""); materialLayerSet.Associates.GlobalId = "36U74BIPDD89cYkx9bkV$Y"; md.NextObjectRecord = 300; IfcWallType wallType = new IfcWallType(md, new IfcElemTypeParams("2aG1gZj7PD2PztLOx2$IVX", name, "", "", ""), materialLayerSet, null, IfcWallTypeEnum.NOTDEFINED); wallType.ObjectTypeOf.GlobalId = "1$EkFElNT8TB_VUVG1FtMe"; IfcWallStandardCase wallStandardCase = new IfcWallStandardCase(building, new IfcElemParams("0DWgwt6o1FOx7466fPk$jl", "", "", "", ""), wallType, new Line(0, 0, 0, 5000, 0, 0), 2000, 0, true, null); wallStandardCase.Material.Associates.GlobalId = "1BYoVhjtLADPUZYzipA826"; }
static void Main(string[] args) { DatabaseIfc db = new DatabaseIfc(ModelView.Ifc4DesignTransfer); IfcBuilding building = new IfcBuilding(db, "IfcBuilding") { }; IfcProject project = new IfcProject(building, "IfcProject", IfcUnitAssignment.Length.Millimetre) { }; IfcMaterial material = new IfcMaterial(db, "Concrete"); IfcStructuralAnalysisModel analysisModel = new IfcStructuralAnalysisModel(building, "Analysis Model", IfcAnalysisModelTypeEnum.LOADING_3D); double y = -1309.6875; IfcCartesianPoint point = new IfcCartesianPoint(db, -3968.75, y, 3000.0); IfcPlane plane = new IfcPlane(new IfcAxis2Placement3D(point, db.Factory.YAxisNegative, db.Factory.XAxis)); List <IfcFaceBound> bounds = new List <IfcFaceBound>(); List <IfcCartesianPoint> points = new List <IfcCartesianPoint>(); points.Add(point); points.Add(new IfcCartesianPoint(db, 3071.25, y, 3000.0)); points.Add(new IfcCartesianPoint(db, 3071.25, y, 0.0)); points.Add(new IfcCartesianPoint(db, -3968.75, y, 0.0)); bounds.Add(new IfcFaceOuterBound(new IfcPolyloop(points), true)); points.Clear(); points.Add(new IfcCartesianPoint(db, 551.25, y, 1000.0)); points.Add(new IfcCartesianPoint(db, -448.75, y, 1000.0)); points.Add(new IfcCartesianPoint(db, -448.75, y, 2000.0)); points.Add(new IfcCartesianPoint(db, 551.25, y, 2000.0)); bounds.Add(new IfcFaceBound(new IfcPolyloop(points), true)); IfcFaceSurface face = new IfcFaceSurface(bounds, plane, true); IfcStructuralSurfaceMember surfaceMember = new IfcStructuralSurfaceMember(analysisModel, face, material, 1, 200); DirectoryInfo di = Directory.GetParent(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location)); di = Directory.GetParent(di.FullName); db.WriteFile(Path.Combine(di.FullName, "surfaceMember.ifc")); db.WriteFile(Path.Combine(di.FullName, "surfaceMember.ifcxml")); db.WriteFile(Path.Combine(di.FullName, "surfaceMember.ifcjson")); }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: _material = (IfcMaterial)(value.EntityVal); return; case 1: _layerThickness = value.RealVal; return; case 2: _isVentilated = value.BooleanVal; return; case 3: _name = value.StringVal; return; case 4: _description = value.StringVal; return; case 5: _category = value.StringVal; return; case 6: _priority = value.IntegerVal; return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
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); }
internal static void GenerateInstance(IfcBuilding building, bool openings) { DatabaseIfc db = building.Database; IfcMaterial concrete = new IfcMaterial(db, "Concrete") { Category = "Concrete" }; int thickness = 200; IfcMaterialLayer materialLayer = new IfcMaterialLayer(concrete, thickness, "Core"); string name = thickness + "mm Concrete"; IfcMaterialLayerSet materialLayerSet = new IfcMaterialLayerSet(materialLayer, name); db.NextObjectRecord = 300; IfcSlabType slabType = new IfcSlabType(name, materialLayerSet, IfcSlabTypeEnum.FLOOR); db.Context.AddDeclared(slabType); List <Coord2d> points = new List <Coord2d>() { new Coord2d(0, 0), new Coord2d(1000, 0), new Coord2d(1400, 2000), new Coord2d(1000, 4000), new Coord2d(0, 4000), new Coord2d(-400, 2000) }; 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, 1)); IfcBoundedCurve boundedCurve = IfcBoundedCurve.Generate(db, points, segments); IfcMaterialLayerSetUsage layerSetUsage = new IfcMaterialLayerSetUsage(materialLayerSet, IfcLayerSetDirectionEnum.AXIS3, IfcDirectionSenseEnum.NEGATIVE, 0); IfcSlab slabStandardCase = new IfcSlabStandardCase(building, layerSetUsage, new IfcAxis2Placement3D(new IfcCartesianPoint(db, 0, 0, 0)), new IfcArbitraryClosedProfileDef("Slab Perimeter", boundedCurve)) { RelatingType = slabType }; slabStandardCase.RelatingType = slabType; if (openings) { IfcCircleProfileDef cpd = new IfcCircleProfileDef(db, "100DIA", 50); IfcExtrudedAreaSolid eas = new IfcExtrudedAreaSolid(cpd, new IfcAxis2Placement3D(new IfcCartesianPoint(db, 100, 300, -200)), new IfcDirection(db, 0, 0, 1), thickness); IfcOpeningStandardCase opening = new IfcOpeningStandardCase(slabStandardCase, null, eas) { Name = "Opening" }; IfcRectangleProfileDef rpd = new IfcRectangleProfileDef(db, "RecessRectangle", 500, 1000); eas = new IfcExtrudedAreaSolid(rpd, new IfcAxis2Placement3D(new IfcCartesianPoint(db, 500, 1000, -50)), new IfcDirection(db, 0, 0, 1), 50); IfcOpeningElement recess = new IfcOpeningElement(slabStandardCase, null, new IfcProductDefinitionShape(new IfcShapeRepresentation(eas))) { Name = "Recess", PredefinedType = IfcOpeningElementTypeEnum.RECESS }; //Unique ids assigned to generate constant IfcScript sample files, remove otherwise opening.GlobalId = "15RSTHd8nFVQWMRE7og7sd"; opening.VoidsElement.GlobalId = "0gqEDsyEzFXvY$fc_rUxyO"; recess.GlobalId = "0w93HZ19H2D99zbAVNb4o2"; recess.VoidsElement.GlobalId = "3iUkij4q1DmxlXuHzQVJaM"; } //Unique ids assigned to generate constant IfcScript sample files, remove otherwise slabType.GlobalId = "0RSW$KKbzCZ9QaSm3GoEan"; slabStandardCase.GlobalId = "1wAj$J2Az2V8wnBiVYd3bU"; materialLayerSet.Associates.GlobalId = "2l_enLhI93reVwnim9gXUq"; slabType.ObjectTypeOf.GlobalId = "3wwDcmW5T3HfafURQewdD0"; slabStandardCase.MaterialSelect.Associates.GlobalId = "3ESAzibgr9BvK9M75iV84w"; }
/// <summary> /// Write the model to IFC. /// </summary> /// <param name="model"></param> /// <param name="path">The path to the generated IFC STEP file.</param> public static void ToIFC(this Model model, string path) { var ifc = new Document("Elements", "Elements", Environment.UserName, null, null, null, "Elements", null, null, null, null, null, null, null, null ); var proj = ifc.AllInstancesOfType <IfcProject>().FirstOrDefault(); // Add a site var site = new IfcSite(IfcGuid.ToIfcGuid(Guid.NewGuid()), null, "Hypar Site", "The default site generated by Hypar", null, null, null, null, IfcElementCompositionEnum.ELEMENT, new IfcCompoundPlaneAngleMeasure(new List <int> { 0, 0, 0 }), new IfcCompoundPlaneAngleMeasure(new List <int> { 0, 0, 0 }), 0, null, null); var projAggregate = new IfcRelAggregates(IfcGuid.ToIfcGuid(Guid.NewGuid()), proj, new List <IfcObjectDefinition> { site }); // Add building and building storey var building = new IfcBuilding(IfcGuid.ToIfcGuid(Guid.NewGuid()), null, "Default Building", "The default building generated by Hypar.", null, null, null, null, IfcElementCompositionEnum.ELEMENT, 0, 0, null); var storey = new IfcBuildingStorey(IfcGuid.ToIfcGuid(Guid.NewGuid()), null, "Default Storey", "The default storey generated by Hypar", null, null, null, null, IfcElementCompositionEnum.ELEMENT, 0); var aggregate = new IfcRelAggregates(IfcGuid.ToIfcGuid(Guid.NewGuid()), building, new List <IfcObjectDefinition> { storey }); // Aggregate the building into the site var siteAggregate = new IfcRelAggregates(IfcGuid.ToIfcGuid(Guid.NewGuid()), site, new List <IfcObjectDefinition> { building }); ifc.AddEntity(site); ifc.AddEntity(projAggregate); ifc.AddEntity(building); ifc.AddEntity(storey); ifc.AddEntity(aggregate); ifc.AddEntity(siteAggregate); var products = new List <IfcProduct>(); var context = ifc.AllInstancesOfType <IfcGeometricRepresentationContext>().FirstOrDefault(); // IfcRelAssociatesMaterial // IfcMaterialDefinitionRepresentation // https://forums.buildingsmart.org/t/where-and-how-will-my-colors-be-saved-in-ifc/1806/12 var styleAssignments = new Dictionary <Guid, List <IfcStyleAssignmentSelect> >(); var white = Colors.White.ToIfcColourRgb(); ifc.AddEntity(white); // TODO: Fix color support in all applications. // https://forums.buildingsmart.org/t/why-is-it-so-difficult-to-get-colors-to-show-up/2312/12 foreach (var m in model.AllElementsOfType <Material>()) { var material = new IfcMaterial(m.Name, null, "Hypar"); ifc.AddEntity(material); var color = m.Color.ToIfcColourRgb(); ifc.AddEntity(color); var transparency = new IfcNormalisedRatioMeasure(1.0 - m.Color.Alpha); var shading = new IfcSurfaceStyleShading(color, transparency); ifc.AddEntity(shading); var styles = new List <IfcSurfaceStyleElementSelect> { new IfcSurfaceStyleElementSelect(shading), }; var surfaceStyle = new IfcSurfaceStyle(material.Name, IfcSurfaceSide.BOTH, styles); ifc.AddEntity(surfaceStyle); var styleAssign = new IfcStyleAssignmentSelect(surfaceStyle); var assignments = new List <IfcStyleAssignmentSelect>() { styleAssign }; styleAssignments.Add(m.Id, assignments); } foreach (var e in model.Elements.Values.Where(e => { var t = e.GetType(); return(((e is GeometricElement && !((GeometricElement)e).IsElementDefinition) || e is ElementInstance) && t != typeof(ModelCurve) && t != typeof(ModelPoints) && t != typeof(AnalysisMesh)); })) { try { products.AddRange(e.ToIfcProducts(context, ifc, styleAssignments)); } catch (Exception ex) { Console.WriteLine($"There was an error writing an element of type {e.GetType()} to IFC: " + ex.Message); Console.WriteLine(ex.StackTrace); continue; } } var spatialRel = new IfcRelContainedInSpatialStructure(IfcGuid.ToIfcGuid(Guid.NewGuid()), products, storey); ifc.AddEntity(spatialRel); if (File.Exists(path)) { File.Delete(path); } File.WriteAllText(path, ifc.ToSTEP(path)); }
internal enum ShapeRep { AdvancedBrep, Brep, Tessellation } //,CSG, ClosedShell internal static void GenerateBasin(ShapeRep shapeRep, STPModelData md, IfcBuilding building) { md.NextObjectRecord = 500; IfcRepresentationMap representationMap = null; if (shapeRep == ShapeRep.AdvancedBrep) { #region advancedBrep IfcCartesianPoint cp1 = new IfcCartesianPoint(md, 0.0, 253.099263998677, 0.0); cp1.Comments.Add("geometry definition of the advanced brep"); IfcCartesianPoint cp2 = new IfcCartesianPoint(md, 0.0, 247.792422124388, -83.9999999999991); IfcCartesianPoint cp3 = new IfcCartesianPoint(md, 0.0, 268.843232748677, 0.0); IfcCartesianPoint cp4 = new IfcCartesianPoint(md, 0.0, 247.792422124388, -93.9999999999991); IfcVertexPoint vp1 = new IfcVertexPoint(cp1), vp2 = new IfcVertexPoint(cp2), vp3 = new IfcVertexPoint(cp3),vp4 = new IfcVertexPoint(cp4); IfcEdgeCurve edgeCurve1 = new IfcEdgeCurve(vp1, vp2, new IfcPolyline(cp1, cp2), true); //140 List<Point3d> points3d = new List<Point3d>() { new Point3d(239.758213537139, 192.193559404919, -83.9999999999991), new Point3d(0.0, 275.591853484122, -83.9999999999991), new Point3d(-239.75821353295, 192.193559404918, -83.9999999999991), new Point3d(0.0, -108.13323051355, -83.9999999999991), new Point3d(239.758213537139, 192.193559404919, -83.9999999999991), new Point3d(0.0, 275.591853484122, -83.9999999999991), new Point3d(-239.75821353295, 192.193559404918, -83.9999999999991) }; IfcBSplineCurveWithKnots nurbsCurve = new IfcBSplineCurveWithKnots(md, 3, points3d, IfcBSplineCurveForm.UNSPECIFIED, IfcLogicalEnum.TRUE, IfcLogicalEnum.TRUE, new List<int>() { 1,1, 1, 1, 1, 1, 1, 1, 1, 1,1 }, new List<double>() { -7.0, -6.0, -5.0, -4.0, -3.0, -2.0, -1.0, 0.0, 1.0, 2.0,3.0 }, IfcKnotType.UNSPECIFIED); IfcEdgeCurve edgeCurve2 = new IfcEdgeCurve(vp2, vp2, nurbsCurve, true); //149 List<Point2d> points2d = new List<Point2d>() { new Point2d(-437.751000004175, 168.150654933496), new Point2d(0.0, 295.573568531267), new Point2d(437.751000006541, 168.150654933498), new Point2d(0.0, -290.713822148428), new Point2d(-437.751000004175, 168.150654933496), new Point2d(0.0, 295.573568531267), new Point2d(437.751000006541, 168.150654933498) }; nurbsCurve = new IfcBSplineCurveWithKnots(md, 3, points2d, IfcBSplineCurveForm.UNSPECIFIED, IfcLogicalEnum.TRUE, IfcLogicalEnum.TRUE, new List<int>() { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ,1}, new List<double>() { -7.0, -6.0, -5.0, -4.0, -3.0, -2.0, -1.0, 0.0, 1.0, 2.0, 3.0 }, IfcKnotType.UNSPECIFIED); IfcEdgeCurve edgeCurve3 = new IfcEdgeCurve(vp1, vp1, nurbsCurve, true); //158 IfcEdgeCurve edgeCurve4 = new IfcEdgeCurve(vp3, vp4, new IfcPolyline(cp3, cp4), true); //162 points3d = new List<Point3d>() { new Point3d(-239.758213535044, 192.193559378247, -93.9999999999991), new Point3d(0.0, 275.591853497458, -93.9999999999991), new Point3d(239.758213535045, 192.193559378248, -93.9999999999991), new Point3d(0.0, -108.133230500215, -93.9999999999991), new Point3d(-239.758213535044, 192.193559378247, -93.9999999999991), new Point3d(0.0, 275.591853497458, -93.9999999999991), new Point3d(239.758213535045, 192.193559378248, -93.9999999999991) }; nurbsCurve = new IfcBSplineCurveWithKnots(md, 3, points3d, IfcBSplineCurveForm.UNSPECIFIED, IfcLogicalEnum.TRUE, IfcLogicalEnum.TRUE, new List<int>() { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, new List<double>() { -7.0, -6.0, -5.0, -4.0, -3.0, -2.0, -1.0, 0.0, 1.0, 2.0, 3.0 }, IfcKnotType.UNSPECIFIED); IfcEdgeCurve edgeCurve5 = new IfcEdgeCurve(vp4, vp4, nurbsCurve, true); //171 points2d = new List<Point2d>() { new Point2d(457.685108750143, 177.051077752302), new Point2d(0.0, 314.739310246865), new Point2d(-457.685108750141, 177.051077752299), new Point2d(0.0, -318.77998625438), new Point2d(457.685108750143, 177.051077752302), new Point2d(0.0, 314.739310246865), new Point2d(-457.685108750141, 177.051077752299) }; nurbsCurve = new IfcBSplineCurveWithKnots(md, 3, points2d, IfcBSplineCurveForm.UNSPECIFIED, IfcLogicalEnum.TRUE, IfcLogicalEnum.TRUE, new List<int>() { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, new List<double>() { -7.0, -6.0, -5.0, -4.0, -3.0, -2.0, -1.0, 0.0, 1.0, 2.0, 3.0 }, IfcKnotType.UNSPECIFIED); IfcEdgeCurve edgeCurve6 = new IfcEdgeCurve(vp3, vp3, nurbsCurve, true); //181 List<IfcOrientedEdge> orientedEdges = new List<IfcOrientedEdge>(); orientedEdges.Add(new IfcOrientedEdge(edgeCurve1, true)); orientedEdges.Add(new IfcOrientedEdge(edgeCurve2, true)); orientedEdges.Add(new IfcOrientedEdge(edgeCurve1, false)); orientedEdges.Add(new IfcOrientedEdge(edgeCurve3, true)); IfcFaceOuterBound faceOuterBound = new IfcFaceOuterBound(new IfcEdgeLoop(orientedEdges), true); List<List<Point3d>> surfaceControlPoints = new List<List<Point3d>>(); surfaceControlPoints.Add(new List<Point3d>() { new Point3d(437.751000006541, 168.150654933498, 0.0), new Point3d(0.0, 295.573568531267, 0.0), new Point3d(-437.751000004175, 168.150654933496, 0.0), new Point3d(0.0, -290.713822148428, 0.0), new Point3d(437.751000006541, 168.150654933498, 0.0), new Point3d(0.0, 295.573568531267, 0.0), new Point3d(-437.751000004175, 168.150654933496, 0.0) }); surfaceControlPoints.Add(new List<Point3d>() { new Point3d(371.75340451674, 176.164956423972, -27.9999999999997), new Point3d(0.0, 288.912996848885, -27.9999999999997), new Point3d(-371.753404513767, 176.16495642397, -27.9999999999997), new Point3d(0.0, -229.853624936802, -27.9999999999997), new Point3d(371.75340451674, 176.164956423972, -27.9999999999997), new Point3d(0.0, 288.912996848885, -27.9999999999997), new Point3d(-371.753404513767, 176.16495642397, -27.9999999999997) }); surfaceControlPoints.Add(new List<Point3d>() { new Point3d(305.75580902694, 184.179257914445, -55.9999999999994), new Point3d(0.0, 282.252425166504, -55.9999999999994), new Point3d(-305.755809023358, 184.179257914444, -55.9999999999994), new Point3d(0.0, -168.993427725176, -55.9999999999994), new Point3d(305.75580902694, 184.179257914445, -55.9999999999994), new Point3d(0.0, 282.252425166504, -55.9999999999994), new Point3d(-305.755809023358, 184.179257914444, -55.9999999999994) }); surfaceControlPoints.Add(new List<Point3d>() { new Point3d(239.758213537139, 192.193559404919, -83.9999999999991), new Point3d(0.0, 275.591853484122, -83.9999999999991), new Point3d(-239.75821353295, 192.193559404918, -83.9999999999991), new Point3d(0.0, -108.13323051355, -83.9999999999991), new Point3d(239.758213537139, 192.193559404919, -83.9999999999991), new Point3d(0.0, 275.591853484122, -83.9999999999991), new Point3d(-239.75821353295, 192.193559404918, -83.9999999999991) }); List<int> uMults = new List<int>() { 4, 4 }, vMults = new List<int>() {1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1 }; List<double> uKnots = new List<double>() { 0.0, 14.7110308353668 }; List<double> vKnots = new List<double>() { -7, -6.0, -5.0, -4.0, -3.0, -2.0, -1.0, 0.0, 1.0, 2.0,3.0 }; IfcBSplineSurfaceWithKnots nurbsSurface = new IfcBSplineSurfaceWithKnots(md, 3, 3, surfaceControlPoints, IfcBSplineSurfaceForm.UNSPECIFIED, IfcLogicalEnum.FALSE, IfcLogicalEnum.TRUE, IfcLogicalEnum.FALSE, uMults, vMults, uKnots, vKnots, IfcKnotType.UNSPECIFIED); IfcAdvancedFace face1 = new IfcAdvancedFace(faceOuterBound, nurbsSurface, false); orientedEdges = new List<IfcOrientedEdge>(); orientedEdges.Add(new IfcOrientedEdge(edgeCurve4, true)); orientedEdges.Add(new IfcOrientedEdge(edgeCurve5, true)); orientedEdges.Add(new IfcOrientedEdge(edgeCurve4, false)); orientedEdges.Add(new IfcOrientedEdge(edgeCurve6, true)); faceOuterBound = new IfcFaceOuterBound(new IfcEdgeLoop(orientedEdges), true); surfaceControlPoints = new List<List<Point3d>>(); surfaceControlPoints.Add(new List<Point3d>() { new Point3d(-457.685108750141, 177.051077752299, 0.0), new Point3d(0.0, 314.739310246865, 0.0), new Point3d(457.685108750143, 177.051077752302, 0.0), new Point3d(0.0, -318.77998625438, 0.0), new Point3d( -457.685108750141, 177.051077752299, 0.0), new Point3d(0.0, 314.739310246865, 0.0), new Point3d(457.685108750143, 177.051077752302, 0.0) }); surfaceControlPoints.Add(new List<Point3d>() { new Point3d(-385.042810345109, 182.098571627615, -31.333333333333), new Point3d(0.0, 301.690157997063, -31.333333333333), new Point3d(385.04281034511, 182.098571627617, -31.333333333333), new Point3d(0.0, -248.564401002992, -31.333333333333), new Point3d(-385.042810345109, 182.098571627615, -31.333333333333), new Point3d(0.0, 301.690157997063, -31.333333333333), new Point3d(385.04281034511, 182.098571627617, -31.333333333333) }); surfaceControlPoints.Add(new List<Point3d>() { new Point3d(-312.400511940076, 187.146065502931, -62.666666666666), new Point3d(0.0, 288.64100574726, -62.666666666666), new Point3d(312.400511940078, 187.146065502933, -62.666666666666), new Point3d(0.0, -178.348815751603, -62.6666666666661), new Point3d(-312.400511940076, 187.146065502931, -62.666666666666), new Point3d(0.0, 288.64100574726, -62.666666666666), new Point3d(312.400511940078, 187.146065502933, -62.666666666666) }); surfaceControlPoints.Add(new List<Point3d>() { new Point3d(-239.758213535044, 192.193559378247, -93.9999999999991), new Point3d(0.0, 275.591853497458, -93.9999999999991), new Point3d(239.758213535045, 192.193559378248, -93.9999999999991), new Point3d(0.0, -108.133230500215, -93.9999999999991), new Point3d(-239.758213535044, 192.193559378247, -93.9999999999991), new Point3d(0.0, 275.591853497458, -93.9999999999991), new Point3d(239.758213535045, 192.193559378248, -93.9999999999991) }); uMults = new List<int>() { 4, 4 }; vMults = new List<int>() { 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1 }; uKnots = new List<double>() { 0.0, 15.4213505620632 }; vKnots = new List<double>() { -3.0, -2.0, -1.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 }; nurbsSurface = new IfcBSplineSurfaceWithKnots(md, 3, 3, surfaceControlPoints, IfcBSplineSurfaceForm.UNSPECIFIED, IfcLogicalEnum.FALSE, IfcLogicalEnum.TRUE, IfcLogicalEnum.FALSE, uMults, vMults, uKnots, vKnots, IfcKnotType.UNSPECIFIED); IfcAdvancedFace face2 = new IfcAdvancedFace(faceOuterBound, nurbsSurface, false); IfcOrientedEdge orientedEdge = new IfcOrientedEdge(edgeCurve2, false); faceOuterBound = new IfcFaceOuterBound(new IfcEdgeLoop(orientedEdge), true); IfcPlane plane = new IfcPlane(new IfcAxis2Placement3D(cp2, null,null)); IfcAdvancedFace face3 = new IfcAdvancedFace(faceOuterBound, plane, true); orientedEdge = new IfcOrientedEdge(edgeCurve5, true); faceOuterBound = new IfcFaceOuterBound(new IfcEdgeLoop(orientedEdge),true); plane = new IfcPlane(new IfcAxis2Placement3D(cp4, null, null)); IfcAdvancedFace face4 = new IfcAdvancedFace(faceOuterBound, plane, false); orientedEdge = new IfcOrientedEdge(edgeCurve6, false); faceOuterBound = new IfcFaceOuterBound(new IfcEdgeLoop(orientedEdge),true); orientedEdge = new IfcOrientedEdge(edgeCurve3, false); IfcFaceBound facebound = new IfcFaceBound(new IfcEdgeLoop(orientedEdge), true); plane = new IfcPlane(new IfcAxis2Placement3D(cp1, null, null)); IfcAdvancedFace face5 = new IfcAdvancedFace(faceOuterBound,facebound, plane, true); IfcAdvancedBrep advancedBrep = new IfcAdvancedBrep(new List<IfcAdvancedFace>() { face1, face2, face3, face4, face5 }); representationMap = new IfcRepresentationMap(advancedBrep); #endregion } else if (shapeRep == ShapeRep.Brep) { #region facetedBrep List<IfcCartesianPoint> cps = new List<IfcCartesianPoint>(); List<IfcFace> faces = new List<IfcFace>(); cps.Add(new IfcCartesianPoint(md, 8.5265128291212E-14, 268.843232748677, 0)); cps.Add(new IfcCartesianPoint(md, -40.6565545240771, 267.741230885222, 0)); cps.Add(new IfcCartesianPoint(md, -81.1844472420702, 264.337146165631, 0)); cps.Add(new IfcCartesianPoint(md, -121.414523219646, 258.379966740374, 0)); cps.Add(new IfcCartesianPoint(md, -161.084488243579, 249.439282575701, 0)); cps.Add(new IfcCartesianPoint(md, -199.732402407963, 236.816640911423, 0)); cps.Add(new IfcCartesianPoint(md, -236.448287386336, 219.398404238099, 0)); cps.Add(new IfcCartesianPoint(md, -269.269780991348, 195.519340118616, 0)); cps.Add(new IfcCartesianPoint(md, -294.036921021401, 163.504056083023, 0)); cps.Add(new IfcCartesianPoint(md, -304.879990220018, 124.598157305706, 0)); cps.Add(new IfcCartesianPoint(md, -300.744331060112, 84.2991194842604, 0)); cps.Add(new IfcCartesianPoint(md, -286.871978591032, 46.1280924370721, 0)); cps.Add(new IfcCartesianPoint(md, -267.00397578777, 10.6705825582408, 0)); cps.Add(new IfcCartesianPoint(md, -242.91417242145, -22.0789599923818, 0)); cps.Add(new IfcCartesianPoint(md, -215.49737582355, -52.1038389186614, 0)); cps.Add(new IfcCartesianPoint(md, -185.233564258487, -79.2577607647334, 0)); cps.Add(new IfcCartesianPoint(md, -152.394753430662, -103.231127678777, 0)); cps.Add(new IfcCartesianPoint(md, -117.162752124351, -123.516605031891, 0)); cps.Add(new IfcCartesianPoint(md, -79.7327064970238, -139.366465926728, 0)); cps.Add(new IfcCartesianPoint(md, -40.4494524879168, -149.766330003707, 0)); cps.Add(new IfcCartesianPoint(md, -8.5265128291212E-14, -153.50296491882, 0)); cps.Add(new IfcCartesianPoint(md, 40.4494508793845, -149.766330296203, 0)); cps.Add(new IfcCartesianPoint(md, 79.7327043771191, -139.366466661145, 0)); cps.Add(new IfcCartesianPoint(md, 117.162756918928, -123.516602630764, 0)); cps.Add(new IfcCartesianPoint(md, 152.394751766558, -103.231128764915, 0)); cps.Add(new IfcCartesianPoint(md, 185.23356996992, -79.2577561301781, 0)); cps.Add(new IfcCartesianPoint(md, 215.497373929206, -52.103840795184, 0)); cps.Add(new IfcCartesianPoint(md, 242.914167878755, -22.078965508489, 0)); cps.Add(new IfcCartesianPoint(md, 267.003976250216, 10.6705832692101, 0)); cps.Add(new IfcCartesianPoint(md, 286.871977954697, 46.1280910808867, 0)); cps.Add(new IfcCartesianPoint(md, 300.744329678325, 84.2991139637225, 0)); cps.Add(new IfcCartesianPoint(md, 304.879990112863, 124.598158883845, 0)); cps.Add(new IfcCartesianPoint(md, 294.036920669161, 163.504056764251, 0)); cps.Add(new IfcCartesianPoint(md, 269.269779973882, 195.519341068674, 0)); cps.Add(new IfcCartesianPoint(md, 236.44828639794, 219.398404808304, 0)); cps.Add(new IfcCartesianPoint(md, 199.73240148445, 236.816641271916, 0)); cps.Add(new IfcCartesianPoint(md, 161.084487568103, 249.439282758701, 0)); cps.Add(new IfcCartesianPoint(md, 121.414531991753, 258.379965126806, 0)); cps.Add(new IfcCartesianPoint(md, 81.1844476691385, 264.337146116746, 0)); cps.Add(new IfcCartesianPoint(md, 40.6565563813857, 267.741230783552, 0)); IfcPolyloop polyloop = new IfcPolyloop(cps.GetRange(0,40)); IfcFaceOuterBound faceOuterBound = new IfcFaceOuterBound(polyloop,true); cps.Add(new IfcCartesianPoint(md, -2.36369146477955E-09, 253.099263998677, 0)); cps.Add(new IfcCartesianPoint(md, 38.4274900386849, 252.103548079205, 0)); cps.Add(new IfcCartesianPoint(md, 76.7439433401587, 249.028666176807, 0)); cps.Add(new IfcCartesianPoint(md, 114.803789550381, 243.649797844599, 0)); cps.Add(new IfcCartesianPoint(md, 152.382048016624, 235.580438211911, 0)); cps.Add(new IfcCartesianPoint(md, 189.083091558087, 224.18969850467, 0)); cps.Add(new IfcCartesianPoint(md, 224.125137689733, 208.456936531179, 0)); cps.Add(new IfcCartesianPoint(md, 255.793363304913, 186.795125569967, 0)); cps.Add(new IfcCartesianPoint(md, 280.260264776878, 157.383008003324, 0)); cps.Add(new IfcCartesianPoint(md, 291.499069651162, 120.929075349148, 0)); cps.Add(new IfcCartesianPoint(md, 287.781794186053, 82.8439932251812, 0)); cps.Add(new IfcCartesianPoint(md, 274.333349777552, 46.8976139888769, 0)); cps.Add(new IfcCartesianPoint(md, 255.041935323226, 13.6804471549583, 0)); cps.Add(new IfcCartesianPoint(md, 231.718321168942, -16.8550204261573, 0)); cps.Add(new IfcCartesianPoint(md, 205.26490842152, -44.72871539005, 0)); cps.Add(new IfcCartesianPoint(md, 176.16701831263, -69.8307253653909, 0)); cps.Add(new IfcCartesianPoint(md, 144.705875892003, -91.8966701176456, 0)); cps.Add(new IfcCartesianPoint(md, 111.075533913924, -110.483174825384, 0)); cps.Add(new IfcCartesianPoint(md, 75.4792575648176, -124.93688849428, 0)); cps.Add(new IfcCartesianPoint(md, 38.2480241625981, -134.377886037238, 0)); cps.Add(new IfcCartesianPoint(md, -1.27897692436818E-13, -137.758996454453, 0)); cps.Add(new IfcCartesianPoint(md, -38.2480094096726, -134.377888604729, 0)); cps.Add(new IfcCartesianPoint(md, -75.4792556281902, -124.936889137129, 0)); cps.Add(new IfcCartesianPoint(md, -111.075539062433, -110.483172351871, 0)); cps.Add(new IfcCartesianPoint(md, -144.705874376312, -91.8966710674264, 0)); cps.Add(new IfcCartesianPoint(md, -176.167011118929, -69.8307309751332, 0)); cps.Add(new IfcCartesianPoint(md, -205.264906834, -44.7287169020584, 0)); cps.Add(new IfcCartesianPoint(md, -231.718318258428, -16.855023827089, 0)); cps.Add(new IfcCartesianPoint(md, -255.041934669669, 13.6804461875579, 0)); cps.Add(new IfcCartesianPoint(md, -274.333348315742, 46.8976109786559, 0)); cps.Add(new IfcCartesianPoint(md, -287.781793945095, 82.843992280873, 0)); cps.Add(new IfcCartesianPoint(md, -291.499069558299, 120.929076449465, 0)); cps.Add(new IfcCartesianPoint(md, -280.260264225365, 157.383008985549, 0)); cps.Add(new IfcCartesianPoint(md, -255.793362494351, 186.795126279187, 0)); cps.Add(new IfcCartesianPoint(md, -224.12513653713, 208.45693715988, 0)); cps.Add(new IfcCartesianPoint(md, -189.083091723532, 224.189698444526, 0)); cps.Add(new IfcCartesianPoint(md, -152.382036267776, 235.580441242109, 0)); cps.Add(new IfcCartesianPoint(md, -114.803784949771, 243.649798652405, 0)); cps.Add(new IfcCartesianPoint(md, -76.7439536078398, 249.028665054834, 0)); cps.Add(new IfcCartesianPoint(md, -38.4274901357192, 252.103548074371, 0)); polyloop = new IfcPolyloop(cps.GetRange(40,40)); IfcFaceBound faceBound = new IfcFaceBound(polyloop,true); faces.Add(new IfcFace(faceOuterBound,faceBound)); cps.Add(new IfcCartesianPoint(md, 7.105427357601E-14, 247.792422124388, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, 22.543570345102, 247.043703986819, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, 44.9796137172465, 244.728140008744, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, 67.1650892668505, 240.670010701811, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, 88.8758496727837, 234.574313720423, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, 109.718194276454, 225.983554212619, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, 128.945156504883, 214.242543022066, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, 145.131083023098, 198.61702521984, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, 156.028264873931, 178.980157903609, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, 159.834545208795, 156.846549510419, -93.999999999999)); cps.Add(new IfcCartesianPoint(md, 157.205129966729, 134.492794130245, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, 150.333031384556, 113.029267864972, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, 140.585417581734, 92.698690766237, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, 128.649651812238, 73.5661983153641, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, 114.88081683599, 55.7059230027226, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, 99.4572081299554, 39.2537668954707, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, 82.4557792492348, 24.4401234195301, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, 63.9015117223512, 11.6305834057239, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, 43.825812852227, 1.38178464649553, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, 22.3741376569279, -5.50526474040419, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, 1.4210854715202E-14, -8.02430054072738, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, -22.3741369000302, -5.50526490804053, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, -43.8258109334306, 1.38178384202005, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, -63.9015107453348, 11.6305828171828, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, -82.4557778416754, 24.4401223202192, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, -99.4572071589388, 39.2537659566927, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, -114.880815789293, 55.7059217719804, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, -128.649650827451, 73.5661969013759, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, -140.585419271271, 92.6986938201311, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, -150.333030863305, 113.029266577227, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, -157.205128832971, 134.492789207233, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, -159.834545214161, 156.846549002985, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, -156.028266010736, 178.980154672375, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, -145.131082712872, 198.617025613766, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, -128.945159904117, 214.242540461469, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, -109.718192999937, 225.983554847043, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, -88.8758510792069, 234.574313243064, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, -67.16508882249, 240.670010803143, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, -44.9796135673833, 244.728140029868, -93.9999999999991)); cps.Add(new IfcCartesianPoint(md, -22.5435788308204, 247.043703417137, -93.9999999999991)); polyloop = new IfcPolyloop(cps.GetRange(80, 40)); faceOuterBound = new IfcFaceOuterBound(polyloop, true); faces.Add(new IfcFace(faceOuterBound)); cps.Add(new IfcCartesianPoint(md, -4.18794598999739E-09, 247.792422124388, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, -22.5435703494529, 247.043703987136, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, -44.9796137218369, 244.728140009905, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, -67.1650892718133, 240.670010704167, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, -88.8758496782756, 234.574313724111, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, -109.718194282579, 225.983554217461, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, -128.945156511477, 214.24254302742, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, -145.131083029256, 198.617025224586, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, -156.028264877734, 178.980157906939, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, -159.834545208922, 156.846549512965, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, -157.205129964107, 134.492794132934, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, -150.333031380544, 113.029267867934, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, -140.585417577166, 92.6986907692923, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, -128.649651807611, 73.5661983182769, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, -114.88081683159, 55.7059230052684, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, -99.4572081259275, 39.2537668974612, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, -82.45577924561, 24.4401234208308, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, -63.9015117190565, 11.6305834062858, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, -43.8258128490947, 1.38178464641787, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, -22.374137653742, -5.50526474077583, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, -5.6843418860808E-14, -8.02430054072741, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, 22.374136903413, -5.50526490696816, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, 43.8258109365215, 1.38178384447853, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, 63.9015107478721, 11.6305828210529, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, 82.4557778435065, 24.4401223253757, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, 99.4572071600111, 39.2537659629489, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, 114.880815789634, 55.7059217791287, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, 128.64965082716, 73.5661969092022, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, 140.585419270523, 92.6986938284213, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, 150.333030862371, 113.029266585776, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, 157.205128832256, 134.492789215875, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, 159.834545214197, 156.846549011699, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, 156.028266011557, 178.980154681359, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, 145.131082713423, 198.617025622727, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, 128.945159903547, 214.242540469453, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, 109.718192998164, 225.983554853335, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, 88.8758510764901, 234.574313247461, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, 67.1650888191183, 240.67001080579, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, 44.9796135636075, 244.728140031113, -83.9999999999991)); cps.Add(new IfcCartesianPoint(md, 22.5435788267922, 247.043703417465, -83.9999999999991)); polyloop = new IfcPolyloop(cps.GetRange(120, 40)); faceOuterBound = new IfcFaceOuterBound(polyloop, true); faces.Add(new IfcFace(faceOuterBound)); for (int icounter = 0; icounter < 40; icounter++) { polyloop = new IfcPolyloop(cps[icounter == 39 ? 0 : icounter + 1], cps[icounter], cps[icounter == 0 ? 80 : 120 - icounter]); faceOuterBound = new IfcFaceOuterBound(polyloop, true); faces.Add(new IfcFace(faceOuterBound)); polyloop = new IfcPolyloop(cps[80 + (icounter == 39 ? 0 : icounter + 1)], cps[80 + icounter], cps[icounter == 0 ? 0 : 40 - icounter]); faceOuterBound = new IfcFaceOuterBound(polyloop, true); faces.Add(new IfcFace(faceOuterBound)); polyloop = new IfcPolyloop(cps[40+( icounter == 39 ? 0 : icounter + 1)], cps[40+icounter], cps[icounter == 0 ? 120 : 160 - icounter]); faceOuterBound = new IfcFaceOuterBound(polyloop, true); faces.Add(new IfcFace(faceOuterBound)); polyloop = new IfcPolyloop(cps[120 + (icounter == 39 ? 0 : icounter + 1)], cps[120 + icounter], cps[icounter == 0 ? 40 : 80 - icounter]); faceOuterBound = new IfcFaceOuterBound(polyloop, true); faces.Add(new IfcFace(faceOuterBound)); } IfcClosedShell closedShell = new IfcClosedShell(faces); IfcFacetedBrep facetedBrep = new IfcFacetedBrep(closedShell); representationMap = new IfcRepresentationMap(facetedBrep); #endregion } else if (shapeRep == ShapeRep.Tessellation) { List<Point3d> points = new List<Point3d>() { new Point3d(-300.0, 150.0, 0.0), new Point3d(-260.012578, 202.771984, 0.0), new Point3d(-200.897703, 235.427328, 0.0), new Point3d(-135.653172, 254.960516, 0.0), new Point3d(-68.351281, 265.485063, 0.0), new Point3d(2.288734, 268.839531, 0.0), new Point3d(72.81782, 265.023844, 0.0), new Point3d(139.786906, 254.038063, 0.0), new Point3d(201.174906, 235.317031, 0.0), new Point3d(259.220938, 203.387031, 0.0), new Point3d(300.0, 150.0, 0.0), new Point3d(301.12175, 84.866148, 0.0), new Point3d(274.727594, 21.433672, 0.0), new Point3d(235.605922, -32.723826, 0.0), new Point3d(186.088641, -80.939688, 0.0), new Point3d(130.136258, -119.016594, 0.0), new Point3d(67.084977, -144.523266, 0.0), new Point3d(1.477218, -153.498641, 0.0), new Point3d(-64.392137, -145.234375, 0.0), new Point3d(-128.935, -119.668008, 0.0), new Point3d(-185.4365, -81.474469, 0.0), new Point3d(-235.751609, -32.555805, 0.0), new Point3d(-275.439625, 22.660475, 0.0), new Point3d(-301.2465, 85.400219, 0.0), new Point3d(0.0, 253.099266, 0.0), new Point3d(-65.777992, 249.952375, 0.0), new Point3d(-128.508695, 240.511688, 0.0), new Point3d(-189.983266, 222.998141, 0.0), new Point3d(-246.840234, 193.330969, 0.0), new Point3d(-286.93375, 143.116359, 0.0), new Point3d(-288.338563, 84.231891, 0.0), new Point3d(-263.388344, 25.178932, 0.0), new Point3d(-224.986906, -26.382564, 0.0), new Point3d(-176.642109, -71.667547, 0.0), new Point3d(-122.550633, -106.846461, 0.0), new Point3d(-61.391031, -130.155953, 0.0), new Point3d(1.00923, -137.756953, 0.0), new Point3d(63.202145, -129.69757, 0.0), new Point3d(123.138398, -106.540977, 0.0), new Point3d(176.955734, -71.42018, 0.0), new Point3d(224.650078, -26.756678, 0.0), new Point3d(262.387781, 23.516443, 0.0), new Point3d(288.070906, 83.103938, 0.0), new Point3d(286.93375, 143.116359, 0.0), new Point3d(248.344641, 192.212875, 0.0), new Point3d(191.622094, 222.376281, 0.0), new Point3d(129.659992, 240.269531, 0.0), new Point3d(64.742059, 250.052203, 0.0), new Point3d(-157.154922, 175.808609, -94.0), new Point3d(-136.207516, 207.772813, -94.0), new Point3d(-105.240203, 227.552281, -94.0), new Point3d(-71.061875, 239.383609, -94.0), new Point3d(-35.805801, 245.758375, -94.0), new Point3d(1.198953, 247.790172, -94.0), new Point3d(38.145594, 245.479016, -94.0), new Point3d(73.227336, 238.824875, -94.0), new Point3d(105.385414, 227.485469, -94.0), new Point3d(135.792813, 208.145344, -94.0), new Point3d(157.154922, 175.808609, -94.0), new Point3d(157.742547, 136.356797, -94.0), new Point3d(143.915969, 97.9355, -94.0), new Point3d(123.422102, 65.13209, -94.0), new Point3d(97.482477, 35.927559, -94.0), new Point3d(68.171844, 12.864227, -94.0), new Point3d(35.142449, -2.585266, -94.0), new Point3d(0.77384, -8.021682, -94.0), new Point3d(-33.731801, -3.015985, -94.0), new Point3d(-67.542563, 12.469661, -94.0), new Point3d(-97.140859, 35.603637, -94.0), new Point3d(-123.498414, 65.233859, -94.0), new Point3d(-144.288969, 98.678578, -94.0), new Point3d(-157.807906, 136.680281, -94.0), new Point3d(-300.0, 150.0, 0.0), new Point3d(-228.577453, 162.904313, -47.0), new Point3d(-157.154922, 175.808609, -94.0), new Point3d(-260.012578, 202.771984, 0.0), new Point3d(-136.207516, 207.772813, -94.0), new Point3d(-200.897703, 235.427328, 0.0), new Point3d(-105.240203, 227.552281, -94.0), new Point3d(-135.653172, 254.960516, 0.0), new Point3d(-71.061875, 239.383609, -94.0), new Point3d(-68.351281, 265.485063, 0.0), new Point3d(-35.805801, 245.758375, -94.0), new Point3d(2.288734, 268.839531, 0.0), new Point3d(1.198953, 247.790172, -94.0), new Point3d(72.81782, 265.023844, 0.0), new Point3d(38.145594, 245.479016, -94.0), new Point3d(139.786906, 254.038063, 0.0), new Point3d(73.227336, 238.824875, -94.0), new Point3d(201.174906, 235.317031, 0.0), new Point3d(105.385414, 227.485469, -94.0), new Point3d(259.220938, 203.387031, 0.0), new Point3d(135.792813, 208.145344, -94.0), new Point3d(300.0, 150.0, 0.0), new Point3d(157.154922, 175.808609, -94.0), new Point3d(301.12175, 84.866148, 0.0), new Point3d(157.742547, 136.356797, -94.0), new Point3d(274.727594, 21.433672, 0.0), new Point3d(143.915969, 97.9355, -94.0), new Point3d(235.605922, -32.723826, 0.0), new Point3d(123.422102, 65.13209, -94.0), new Point3d(186.088641, -80.939688, 0.0), new Point3d(97.482477, 35.927559, -94.0), new Point3d(130.136258, -119.016594, 0.0), new Point3d(68.171844, 12.864227, -94.0), new Point3d(67.084977, -144.523266, 0.0), new Point3d(35.142449, -2.585266, -94.0), new Point3d(1.477218, -153.498641, 0.0), new Point3d(0.77384, -8.021682, -94.0), new Point3d(-64.392137, -145.234375, 0.0), new Point3d(-33.731801, -3.015985, -94.0), new Point3d(-128.935, -119.668008, 0.0), new Point3d(-67.542563, 12.469661, -94.0), new Point3d(-185.4365, -81.474469, 0.0), new Point3d(-97.140859, 35.603637, -94.0), new Point3d(-235.751609, -32.555805, 0.0), new Point3d(-123.498414, 65.233859, -94.0), new Point3d(-275.439625, 22.660475, 0.0), new Point3d(-144.288969, 98.678578, -94.0), new Point3d(-301.2465, 85.400219, 0.0), new Point3d(-157.807906, 136.680281, -94.0), new Point3d(-300.0, 150.0, 0.0), new Point3d(-228.577453, 162.904313, -47.0), new Point3d(-157.154922, 175.808609, -94.0), new Point3d(-103.357523, 247.172063, -47.0), new Point3d(-153.068953, 231.489813, -47.0), new Point3d(-52.078543, 255.621719, -47.0), new Point3d(1.743843, 258.314844, -47.0), new Point3d(55.481707, 255.251438, -47.0), new Point3d(106.507117, 246.431469, -47.0), new Point3d(197.506875, 205.766188, -47.0), new Point3d(153.280156, 231.40125, -47.0), new Point3d(228.577453, 162.904313, -47.0), new Point3d(229.432141, 110.611469, -47.0), new Point3d(209.321781, 59.684586, -47.0), new Point3d(179.514016, 16.204132, -47.0), new Point3d(141.785563, -22.506064, -47.0), new Point3d(51.113715, -73.554266, -47.0), new Point3d(99.154047, -53.076184, -47.0), new Point3d(1.125529, -80.760164, -47.0), new Point3d(-49.061969, -74.12518, -47.0), new Point3d(-98.238781, -53.599176, -47.0), new Point3d(-141.288688, -22.935416, -47.0), new Point3d(-209.864297, 60.669523, -47.0), new Point3d(-179.625016, 16.339027, -47.0), new Point3d(-229.527203, 111.04025, -47.0), new Point3d(0.0, 247.792422, -84.0), new Point3d(35.45952, 245.798125, -84.0), new Point3d(71.015367, 239.395359, -84.0), new Point3d(104.952289, 227.684234, -84.0), new Point3d(136.019484, 207.942281, -84.0), new Point3d(157.154922, 175.808609, -84.0), new Point3d(157.77775, 136.530484, -84.0), new Point3d(143.710984, 97.530469, -84.0), new Point3d(123.041867, 64.626715, -84.0), new Point3d(96.919461, 35.394453, -84.0), new Point3d(67.443461, 12.407895, -84.0), new Point3d(34.616102, -2.748099, -84.0), new Point3d(0.55276, -8.022964, -84.0), new Point3d(-33.624148, -3.048111, -84.0), new Point3d(-67.121539, 12.207951, -84.0), new Point3d(-96.747688, 35.232555, -84.0), new Point3d(-123.226352, 64.87157, -84.0), new Point3d(-144.259, 98.61857, -84.0), new Point3d(-157.924344, 137.268734, -84.0), new Point3d(-157.154922, 175.808609, -84.0), new Point3d(-135.195516, 208.674078, -84.0), new Point3d(-104.054703, 228.091234, -84.0), new Point3d(-70.384797, 239.553859, -84.0), new Point3d(-36.026906, 245.732781, -84.0), new Point3d(0.0, 247.792422, -84.0), new Point3d(0.0, 253.099266, 0.0), new Point3d(64.742059, 250.052203, 0.0), new Point3d(129.659992, 240.269531, 0.0), new Point3d(191.622094, 222.376281, 0.0), new Point3d(248.344641, 192.212875, 0.0), new Point3d(286.93375, 143.116359, 0.0), new Point3d(288.070906, 83.103938, 0.0), new Point3d(262.387781, 23.516443, 0.0), new Point3d(224.650078, -26.756678, 0.0), new Point3d(176.955734, -71.42018, 0.0), new Point3d(123.138398, -106.540977, 0.0), new Point3d(63.202145, -129.69757, 0.0), new Point3d(1.00923, -137.756953, 0.0), new Point3d(-61.391031, -130.155953, 0.0), new Point3d(-122.550633, -106.846461, 0.0), new Point3d(-176.642109, -71.667547, 0.0), new Point3d(-224.986906, -26.382564, 0.0), new Point3d(-263.388344, 25.178932, 0.0), new Point3d(-288.338563, 84.231891, 0.0), new Point3d(-286.93375, 143.116359, 0.0), new Point3d(-246.840234, 193.330969, 0.0), new Point3d(-189.983266, 222.998141, 0.0), new Point3d(-128.508695, 240.511688, 0.0), new Point3d(-65.777992, 249.952375, 0.0), new Point3d(0.0, 253.099266, 0.0), new Point3d(0.0, 247.792422, -84.0), new Point3d(35.45952, 245.798125, -84.0), new Point3d(71.015367, 239.395359, -84.0), new Point3d(104.952289, 227.684234, -84.0), new Point3d(136.019484, 207.942281, -84.0), new Point3d(157.154922, 175.808609, -84.0), new Point3d(157.77775, 136.530484, -84.0), new Point3d(143.710984, 97.530469, -84.0), new Point3d(123.041867, 64.626715, -84.0), new Point3d(96.919461, 35.394453, -84.0), new Point3d(67.443461, 12.407895, -84.0), new Point3d(34.616102, -2.748099, -84.0), new Point3d(0.55276, -8.022964, -84.0), new Point3d(-33.624148, -3.048111, -84.0), new Point3d(-67.121539, 12.207951, -84.0), new Point3d(-96.747688, 35.232555, -84.0), new Point3d(-123.226352, 64.87157, -84.0), new Point3d(-144.259, 98.61857, -84.0), new Point3d(-157.924344, 137.268734, -84.0), new Point3d(-157.154922, 175.808609, -84.0), new Point3d(-135.195516, 208.674078, -84.0), new Point3d(-104.054703, 228.091234, -84.0), new Point3d(-70.384797, 239.553859, -84.0), new Point3d(-36.026906, 245.732781, -84.0) }; IfcCartesianPointList3D cartesianPointList3D = new IfcCartesianPointList3D(md, points); List<CoordIndex> coordIndex = new List<CoordIndex>() { new CoordIndex(28, 2, 29), new CoordIndex(1, 29, 2), new CoordIndex(30, 1, 24), new CoordIndex(29, 1, 30), new CoordIndex(24, 31, 30), new CoordIndex(3, 2, 28), new CoordIndex(5, 4, 27), new CoordIndex(6, 5, 25), new CoordIndex(25, 5, 26), new CoordIndex(4, 28, 27), new CoordIndex(5, 27, 26), new CoordIndex(3, 28, 4), new CoordIndex(23, 32, 31), new CoordIndex(33, 32, 23), new CoordIndex(24, 23, 31), new CoordIndex(34, 22, 21), new CoordIndex(23, 22, 33), new CoordIndex(22, 34, 33), new CoordIndex(21, 20, 35), new CoordIndex(36, 35, 20), new CoordIndex(34, 21, 35), new CoordIndex(37, 36, 19), new CoordIndex(20, 19, 36), new CoordIndex(18, 37, 19), new CoordIndex(7, 6, 48), new CoordIndex(8, 7, 47), new CoordIndex(7, 48, 47), new CoordIndex(8, 47, 46), new CoordIndex(46, 9, 8), new CoordIndex(46, 45, 10), new CoordIndex(11, 10, 45), new CoordIndex(12, 11, 44), new CoordIndex(45, 44, 11), new CoordIndex(10, 9, 46), new CoordIndex(12, 44, 43), new CoordIndex(15, 39, 16), new CoordIndex(40, 39, 15), new CoordIndex(38, 16, 39), new CoordIndex(18, 17, 37), new CoordIndex(16, 38, 17), new CoordIndex(17, 38, 37), new CoordIndex(13, 43, 42), new CoordIndex(12, 43, 13), new CoordIndex(14, 13, 42), new CoordIndex(15, 14, 40), new CoordIndex(14, 41, 40), new CoordIndex(42, 41, 14), new CoordIndex(48, 6, 25), new CoordIndex(50, 72, 49), new CoordIndex(51, 72, 50), new CoordIndex(71, 72, 52), new CoordIndex(51, 52, 72), new CoordIndex(53, 71, 52), new CoordIndex(69, 70, 63), new CoordIndex(71, 54, 70), new CoordIndex(66, 67, 65), new CoordIndex(67, 68, 65), new CoordIndex(68, 69, 64), new CoordIndex(71, 53, 54), new CoordIndex(54, 55, 61), new CoordIndex(55, 56, 61), new CoordIndex(58, 60, 57), new CoordIndex(60, 56, 57), new CoordIndex(59, 60, 58), new CoordIndex(65, 68, 64), new CoordIndex(69, 63, 64), new CoordIndex(62, 63, 70), new CoordIndex(62, 54, 61), new CoordIndex(61, 56, 60), new CoordIndex(62, 70, 54), new CoordIndex(74, 73, 76), new CoordIndex(80, 125, 126), new CoordIndex(126, 76, 78), new CoordIndex(126, 77, 76), new CoordIndex(76, 77, 74), new CoordIndex(82, 127, 125), new CoordIndex(127, 82, 84), new CoordIndex(127, 83, 81), new CoordIndex(125, 81, 79), new CoordIndex(128, 84, 129), new CoordIndex(88, 130, 86), new CoordIndex(92, 131, 90), new CoordIndex(90, 132, 88), new CoordIndex(94, 133, 92), new CoordIndex(96, 134, 94), new CoordIndex(98, 135, 96), new CoordIndex(128, 85, 83), new CoordIndex(77, 75, 74), new CoordIndex(77, 126, 79), new CoordIndex(85, 128, 87), new CoordIndex(87, 129, 89), new CoordIndex(131, 93, 132), new CoordIndex(134, 97, 133), new CoordIndex(97, 134, 99), new CoordIndex(133, 95, 131), new CoordIndex(132, 91, 130), new CoordIndex(135, 98, 136), new CoordIndex(102, 137, 100), new CoordIndex(106, 138, 104), new CoordIndex(104, 139, 102), new CoordIndex(137, 103, 136), new CoordIndex(108, 140, 106), new CoordIndex(138, 107, 139), new CoordIndex(139, 105, 137), new CoordIndex(99, 135, 101), new CoordIndex(141, 110, 112), new CoordIndex(114, 143, 142), new CoordIndex(141, 111, 109), new CoordIndex(110, 141, 140), new CoordIndex(118, 144, 145), new CoordIndex(120, 146, 144), new CoordIndex(116, 145, 143), new CoordIndex(122, 123, 146), new CoordIndex(140, 109, 138), new CoordIndex(111, 141, 142), new CoordIndex(113, 142, 143), new CoordIndex(145, 117, 115), new CoordIndex(146, 121, 119), new CoordIndex(123, 124, 121), new CoordIndex(144, 119, 117), new CoordIndex(148, 173, 172), new CoordIndex(149, 174, 173), new CoordIndex(151, 176, 175), new CoordIndex(152, 177, 176), new CoordIndex(150, 175, 174), new CoordIndex(154, 179, 178), new CoordIndex(155, 180, 179), new CoordIndex(157, 182, 181), new CoordIndex(158, 183, 182), new CoordIndex(156, 181, 180), new CoordIndex(153, 178, 177), new CoordIndex(160, 185, 159), new CoordIndex(161, 186, 160), new CoordIndex(163, 188, 162), new CoordIndex(164, 189, 163), new CoordIndex(162, 187, 161), new CoordIndex(166, 191, 165), new CoordIndex(167, 192, 166), new CoordIndex(169, 194, 168), new CoordIndex(171, 196, 170), new CoordIndex(170, 195, 169), new CoordIndex(168, 193, 167), new CoordIndex(165, 190, 164), new CoordIndex(159, 184, 183), new CoordIndex(217, 216, 215), new CoordIndex(217, 215, 218), new CoordIndex(220, 219, 214), new CoordIndex(215, 219, 218), new CoordIndex(197, 220, 214), new CoordIndex(214, 213, 197), new CoordIndex(219, 215, 214), new CoordIndex(210, 208, 211), new CoordIndex(213, 212, 205), new CoordIndex(212, 211, 207), new CoordIndex(197, 213, 205), new CoordIndex(198, 204, 199), new CoordIndex(200, 199, 203), new CoordIndex(203, 202, 201), new CoordIndex(200, 203, 201), new CoordIndex(203, 199, 204), new CoordIndex(209, 208, 210), new CoordIndex(208, 207, 211), new CoordIndex(206, 212, 207), new CoordIndex(212, 206, 205), new CoordIndex(197, 205, 204), new CoordIndex(197, 204, 198), new CoordIndex(80, 126, 78), new CoordIndex(82, 125, 80), new CoordIndex(127, 84, 128), new CoordIndex(127, 81, 125), new CoordIndex(125, 79, 126), new CoordIndex(84, 86, 129), new CoordIndex(130, 129, 86), new CoordIndex(131, 132, 90), new CoordIndex(132, 130, 88), new CoordIndex(133, 131, 92), new CoordIndex(134, 133, 94), new CoordIndex(135, 134, 96), new CoordIndex(128, 83, 127), new CoordIndex(128, 129, 87), new CoordIndex(129, 130, 89), new CoordIndex(93, 91, 132), new CoordIndex(97, 95, 133), new CoordIndex(134, 135, 99), new CoordIndex(95, 93, 131), new CoordIndex(91, 89, 130), new CoordIndex(98, 100, 136), new CoordIndex(137, 136, 100), new CoordIndex(138, 139, 104), new CoordIndex(139, 137, 102), new CoordIndex(103, 101, 136), new CoordIndex(140, 138, 106), new CoordIndex(107, 105, 139), new CoordIndex(105, 103, 137), new CoordIndex(135, 136, 101), new CoordIndex(141, 112, 142), new CoordIndex(114, 142, 112), new CoordIndex(141, 109, 140), new CoordIndex(110, 140, 108), new CoordIndex(118, 145, 116), new CoordIndex(120, 144, 118), new CoordIndex(116, 143, 114), new CoordIndex(122, 146, 120), new CoordIndex(109, 107, 138), new CoordIndex(111, 142, 113), new CoordIndex(113, 143, 115), new CoordIndex(145, 115, 143), new CoordIndex(146, 119, 144), new CoordIndex(123, 121, 146), new CoordIndex(144, 117, 145), new CoordIndex(148, 172, 147), new CoordIndex(149, 173, 148), new CoordIndex(151, 175, 150), new CoordIndex(152, 176, 151), new CoordIndex(150, 174, 149), new CoordIndex(154, 178, 153), new CoordIndex(155, 179, 154), new CoordIndex(157, 181, 156), new CoordIndex(158, 182, 157), new CoordIndex(156, 180, 155), new CoordIndex(153, 177, 152), new CoordIndex(185, 184, 159), new CoordIndex(186, 185, 160), new CoordIndex(188, 187, 162), new CoordIndex(189, 188, 163), new CoordIndex(187, 186, 161), new CoordIndex(191, 190, 165), new CoordIndex(192, 191, 166), new CoordIndex(194, 193, 168), new CoordIndex(196, 195, 170), new CoordIndex(195, 194, 169), new CoordIndex(193, 192, 167), new CoordIndex(190, 189, 164), new CoordIndex(159, 183, 158) }; IfcTriangulatedFaceSet triangulatedFaceSet = new IfcTriangulatedFaceSet(md, cartesianPointList3D, null, true, coordIndex, null); representationMap = new IfcRepresentationMap(triangulatedFaceSet); } md.NextObjectRecord = 200; IfcMaterial ceramic = new IfcMaterial(md, "Ceramic", "", ""); ceramic.Associates.GlobalId = "0Pkhszwjv1qRMYyCFg9fjB"; IfcSanitaryTerminalType sanitaryTerminalType = new IfcSanitaryTerminalType(md, "Wash Hand Basin", IfcSanitaryTerminalTypeEnum.WASHHANDBASIN) { GlobalId = "2Vk5O9OO94lfvLVH2WXKBZ", MaterialSelect = ceramic, RepresentationMaps = new List<IfcRepresentationMap>() { representationMap } }; sanitaryTerminalType.ObjectTypeOf.GlobalId = "01OIK6g$5EVxvitdj$pQSU"; IfcElement element = sanitaryTerminalType.GenerateMappedItemElement(building, Plane.WorldXY); element.GlobalId = "0dOOwKTsn8I8gwbP3LM1Yz"; }
public IfcMaterialProperties(IfcMaterial __Material) { this._Material = __Material; }
BbMaterial(string name) { IfcMaterial = new IfcMaterial { Name = name }; }
public IfcMaterialDefinitionRepresentation(IfcLabel?__Name, IfcText?__Description, IfcRepresentation[] __Representations, IfcMaterial __RepresentedMaterial) : base(__Name, __Description, __Representations) { this.RepresentedMaterial = __RepresentedMaterial; }