From 6806eb0a05abb86644eec5bd56dd6a483fd9540f Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Wed, 29 May 2024 08:41:43 +1000 Subject: [PATCH] Create blank ifc4 qto base quantities ruleset --- src/blenderbim/scripts/get_all_qtos.py | 27 + src/ifc5d/ifc5d/IFC4QtoBaseQuantities.json | 628 ++++++++++++++++++++- 2 files changed, 651 insertions(+), 4 deletions(-) create mode 100644 src/blenderbim/scripts/get_all_qtos.py diff --git a/src/blenderbim/scripts/get_all_qtos.py b/src/blenderbim/scripts/get_all_qtos.py new file mode 100644 index 0000000000..ae0787335d --- /dev/null +++ b/src/blenderbim/scripts/get_all_qtos.py @@ -0,0 +1,27 @@ +import json +import ifcopenshell.util.pset +import ifcopenshell.util.type + + +def order_dict(dictionary): + # https://stackoverflow.com/questions/22721579/sorting-a-nested-ordereddict-by-key-recursively + return {k: order_dict(v) if isinstance(v, dict) else v for k, v in sorted(dictionary.items())} + + +results = {} + +psetqto = ifcopenshell.util.pset.get_template("IFC4") +for template in psetqto.templates: + for pset_template in template.by_type("IfcPropertySetTemplate"): + if not pset_template.Name.startswith("Qto_"): + continue + query = pset_template.ApplicableEntity + results.setdefault(query, {}) + results[query].setdefault(pset_template.Name, {}) + for quantity in pset_template.HasPropertyTemplates: + results[query][pset_template.Name][quantity.Name] = None + +results = order_dict(results) +print(results) +with open("results.json", "w") as f: + json.dump(results, f, indent=4) diff --git a/src/ifc5d/ifc5d/IFC4QtoBaseQuantities.json b/src/ifc5d/ifc5d/IFC4QtoBaseQuantities.json index f0627c19da..b5e5d8b014 100644 --- a/src/ifc5d/ifc5d/IFC4QtoBaseQuantities.json +++ b/src/ifc5d/ifc5d/IFC4QtoBaseQuantities.json @@ -1,15 +1,635 @@ { "name": "IFC4 Base Quantities", - "description": "This ruleset quantifies every single possible standardised base quantity in IFC4", + "description": "This ruleset quantifies every single possible standardised base quantity in IFC4 using only IfcOpenShell as a geometry processor.", "calculators": { "IOSTriangulation": { + "IfcActuator": { + "Qto_ActuatorBaseQuantities": { + "GrossWeight": null + } + }, + "IfcAirTerminal": { + "Qto_AirTerminalBaseQuantities": { + "GrossWeight": null, + "Perimeter": null, + "TotalSurfaceArea": null + } + }, + "IfcAirTerminalBox": { + "Qto_AirTerminalBoxTypeBaseQuantities": { + "GrossWeight": null + } + }, + "IfcAirToAirHeatRecovery": { + "Qto_AirToAirHeatRecoveryBaseQuantities": { + "GrossWeight": null + } + }, + "IfcAlarm": { + "Qto_AlarmBaseQuantities": { + "GrossWeight": null + } + }, + "IfcAudioVisualAppliance": { + "Qto_AudioVisualApplianceBaseQuantities": { + "GrossWeight": null + } + }, + "IfcBeam": { + "Qto_BeamBaseQuantities": { + "CrossSectionArea": null, + "GrossSurfaceArea": null, + "GrossVolume": null, + "GrossWeight": null, + "Length": null, + "NetSurfaceArea": null, + "NetVolume": null, + "NetWeight": null, + "OuterSurfaceArea": null + } + }, + "IfcBoiler": { + "Qto_BoilerBaseQuantities": { + "GrossWeight": null, + "NetWeight": null, + "TotalSurfaceArea": null + } + }, + "IfcBuilding": { + "Qto_BuildingBaseQuantities": { + "EavesHeight": null, + "FootprintArea": null, + "GrossFloorArea": null, + "GrossVolume": null, + "Height": null, + "NetFloorArea": null, + "NetVolume": null + } + }, + "IfcBuildingElementProxy": { + "Qto_BuildingElementProxyQuantities": { + "NetSurfaceArea": null, + "NetVolume": null + } + }, + "IfcBuildingStorey": { + "Qto_BuildingStoreyBaseQuantities": { + "GrossFloorArea": null, + "GrossHeight": null, + "GrossPerimeter": null, + "GrossVolume": null, + "NetFloorArea": null, + "NetHeigtht": null, + "NetVolume": null + } + }, + "IfcBurner": { + "Qto_BurnerBaseQuantities": { + "GrossWeight": null + } + }, + "IfcCableCarrierFitting": { + "Qto_CableCarrierFittingBaseQuantities": { + "GrossWeight": null + } + }, + "IfcCableCarrierSegment": { + "Qto_CableCarrierSegmentBaseQuantities": { + "CrossSectionArea": null, + "GrossWeight": null, + "Length": null, + "OuterSurfaceArea": null + } + }, + "IfcCableFitting": { + "Qto_CableFittingBaseQuantities": { + "GrossWeight": null + } + }, + "IfcCableSegment": { + "Qto_CableSegmentBaseQuantities": { + "CrossSectionArea": null, + "GrossWeight": null, + "Length": null, + "OuterSurfaceArea": null + } + }, + "IfcChiller": { + "Qto_ChillerBaseQuantities": { + "GrossWeight": null + } + }, + "IfcChimney": { + "Qto_ChimneyBaseQuantities": { + "Length": null + } + }, + "IfcCoil": { + "Qto_CoilBaseQuantities": { + "GrossWeight": null + } + }, + "IfcColumn": { + "Qto_ColumnBaseQuantities": { + "CrossSectionArea": null, + "GrossSurfaceArea": null, + "GrossVolume": null, + "GrossWeight": null, + "Length": null, + "NetSurfaceArea": null, + "NetVolume": null, + "NetWeight": null, + "OuterSurfaceArea": null + } + }, + "IfcCommunicationsAppliance": { + "Qto_CommunicationsApplianceBaseQuantities": { + "GrossWeight": null + } + }, + "IfcCompressor": { + "Qto_CompressorBaseQuantities": { + "GrossWeight": null + } + }, + "IfcCondenser": { + "Qto_CondenserBaseQuantities": { + "GrossWeight": null + } + }, + "IfcConstructionEquipmentResource": { + "Qto_ConstructionEquipmentResourceBaseQuantities": { + "OperatingTime": null, + "UsageTime": null + } + }, + "IfcConstructionMaterialResource": { + "Qto_ConstructionMaterialResourceBaseQuantities": { + "GrossVolume": null, + "GrossWeight": null, + "NetVolume": null, + "NetWeight": null + } + }, + "IfcController": { + "Qto_ControllerBaseQuantities": { + "GrossWeight": null + } + }, + "IfcCooledBeam": { + "Qto_CooledBeamBaseQuantities": { + "GrossWeight": null + } + }, + "IfcCoolingTower": { + "Qto_CoolingTowerBaseQuantities": { + "GrossWeight": null + } + }, + "IfcCovering": { + "Qto_CoveringBaseQuantities": { + "GrossArea": null, + "NetArea": null, + "Width": null + } + }, + "IfcCurtainWall": { + "Qto_CurtainWallQuantities": { + "GrossSideArea": null, + "Height": null, + "Length": null, + "NetSideArea": null, + "Width": null + } + }, + "IfcDamper": { + "Qto_DamperBaseQuantities": { + "GrossWeight": null + } + }, + "IfcDistributionChamberElement": { + "Qto_DistributionChamberElementBaseQuantities": { + "GrossSurfaceArea": null, + "GrossVolume": null, + "NetSurfaceArea": null, + "NetVolume": null + } + }, + "IfcDoor": { + "Qto_DoorBaseQuantities": { + "Area": null, + "Height": null, + "Perimeter": null, + "Width": null + } + }, + "IfcDuctFitting": { + "Qto_DuctFittingBaseQuantities": { + "GrossCrossSectionArea": null, + "GrossWeight": null, + "Length": null, + "NetCrossSectionArea": null, + "OuterSurfaceArea": null + } + }, + "IfcDuctSegment": { + "Qto_DuctSegmentBaseQuantities": { + "GrossCrossSectionArea": null, + "GrossWeight": null, + "Length": null, + "NetCrossSectionArea": null, + "OuterSurfaceArea": null + } + }, + "IfcDuctSilencer": { + "Qto_DuctSilencerBaseQuantities": { + "GrossWeight": null + } + }, + "IfcElectricAppliance": { + "Qto_ElectricApplianceBaseQuantities": { + "GrossWeight": null + } + }, + "IfcElectricDistributionBoard": { + "Qto_ElectricDistributionBoardBaseQuantities": { + "GrossWeight": null, + "NumberOfCircuits": null + } + }, + "IfcElectricFlowStorageDevice": { + "Qto_ElectricFlowStorageDeviceBaseQuantities": { + "GrossWeight": null + } + }, + "IfcElectricGenerator": { + "Qto_ElectricGeneratorBaseQuantities": { + "GrossWeight": null + } + }, + "IfcElectricMotor": { + "Qto_ElectricMotorBaseQuantities": { + "GrossWeight": null + } + }, + "IfcElectricTimeControl": { + "Qto_ElectricTimeControlBaseQuantities": { + "GrossWeight": null + } + }, + "IfcEvaporativeCooler": { + "Qto_EvaporativeCoolerBaseQuantities": { + "GrossWeight": null + } + }, + "IfcEvaporator": { + "Qto_EvaporatorBaseQuantities": { + "GrossWeight": null + } + }, + "IfcFan": { + "Qto_FanBaseQuantities": { + "GrossWeight": null + } + }, + "IfcFilter": { + "Qto_FilterBaseQuantities": { + "GrossWeight": null + } + }, + "IfcFireSuppressionTerminal": { + "Qto_FireSuppressionTerminalBaseQuantities": { + "GrossWeight": null + } + }, + "IfcFlowInstrument": { + "Qto_FlowInstrumentBaseQuantities": { + "GrossWeight": null + } + }, + "IfcFlowMeter": { + "Qto_FlowMeterBaseQuantities": { + "GrossWeight": null + } + }, + "IfcFooting": { + "Qto_FootingBaseQuantities": { + "CrossSectionArea": null, + "GrossSurfaceArea": null, + "GrossVolume": null, + "GrossWeight": null, + "Height": null, + "Length": null, + "NetVolume": null, + "NetWeight": null, + "OuterSurfaceArea": null, + "Width": null + } + }, + "IfcHeatExchanger": { + "Qto_HeatExchangerBaseQuantities": { + "GrossWeight": null + } + }, + "IfcHumidifier": { + "Qto_HumidifierBaseQuantities": { + "GrossWeight": null + } + }, + "IfcInterceptor": { + "Qto_InterceptorBaseQuantities": { + "GrossWeight": null + } + }, + "IfcJunctionBox": { + "Qto_JunctionBoxBaseQuantities": { + "GrossWeight": null, + "NumberOfGangs": null + } + }, + "IfcLaborResource": { + "Qto_LaborResourceBaseQuantities": { + "OvertimeWork": null, + "StandardWork": null + } + }, + "IfcLamp": { + "Qto_LampBaseQuantities": { + "GrossWeight": null + } + }, + "IfcLightFixture": { + "Qto_LightFixtureBaseQuantities": { + "GrossWeight": null + } + }, + "IfcMember": { + "Qto_MemberBaseQuantities": { + "CrossSectionArea": null, + "GrossSurfaceArea": null, + "GrossVolume": null, + "GrossWeight": null, + "Length": null, + "NetSurfaceArea": null, + "NetVolume": null, + "NetWeight": null, + "OuterSurfaceArea": null + } + }, + "IfcMotorConnection": { + "Qto_MotorConnectionBaseQuantities": { + "GrossWeight": null + } + }, + "IfcOpeningElement": { + "Qto_OpeningElementBaseQuantities": { + "Area": null, + "Depth": null, + "Height": null, + "Volume": null, + "Width": null + } + }, + "IfcOutlet": { + "Qto_OutletBaseQuantities": { + "GrossWeight": null + } + }, + "IfcPile": { + "Qto_PileBaseQuantities": { + "CrossSectionArea": null, + "GrossSurfaceArea": null, + "GrossVolume": null, + "GrossWeight": null, + "Length": null, + "NetVolume": null, + "NetWeight": null, + "OuterSurfaceArea": null + } + }, + "IfcPipeFitting": { + "Qto_PipeFittingBaseQuantities": { + "GrossCrossSectionArea": null, + "GrossWeight": null, + "Length": null, + "NetCrossSectionArea": null, + "NetWeight": null, + "OuterSurfaceArea": null + } + }, + "IfcPipeSegment": { + "Qto_PipeSegmentBaseQuantities": { + "GrossCrossSectionArea": null, + "GrossWeight": null, + "Length": null, + "NetCrossSectionArea": null, + "NetWeight": null, + "OuterSurfaceArea": null + } + }, + "IfcPlate": { + "Qto_PlateBaseQuantities": { + "GrossArea": null, + "GrossVolume": null, + "GrossWeight": null, + "NetArea": null, + "NetVolume": null, + "NetWeight": null, + "Perimeter": null, + "Width": null + } + }, + "IfcProjectionElement": { + "Qto_ProjectionElementBaseQuantities": { + "Area": null, + "Volume": null + } + }, + "IfcProtectiveDevice": { + "Qto_ProtectiveDeviceBaseQuantities": { + "GrossWeight": null + } + }, + "IfcProtectiveDeviceTrippingUnit": { + "Qto_ProtectiveDeviceTrippingUnitBaseQuantities": { + "GrossWeight": null + } + }, + "IfcPump": { + "Qto_PumpBaseQuantities": { + "GrossWeight": null + } + }, + "IfcRailing": { + "Qto_RailingBaseQuantities": { + "Length": null + } + }, + "IfcRampFlight": { + "Qto_RampFlightBaseQuantities": { + "GrossArea": null, + "GrossVolume": null, + "Length": null, + "NetArea": null, + "NetVolume": null, + "Width": null + } + }, + "IfcReinforcingElement": { + "Qto_ReinforcingElementBaseQuantities": { + "Count": null, + "Length": null, + "Weight": null + } + }, + "IfcRoof": { + "Qto_RoofBaseQuantities": { + "GrossArea": null, + "NetArea": null, + "ProjectedArea": null + } + }, + "IfcSanitaryTerminal": { + "Qto_SanitaryTerminalBaseQuantities": { + "GrossWeight": null + } + }, + "IfcSensor": { + "Qto_SensorBaseQuantities": { + "GrossWeight": null + } + }, + "IfcSite": { + "Qto_SiteBaseQuantities": { + "GrossArea": null, + "GrossPerimeter": null + } + }, + "IfcSlab": { + "Qto_SlabBaseQuantities": { + "Depth": null, + "GrossArea": null, + "GrossVolume": null, + "GrossWeight": null, + "Length": null, + "NetArea": null, + "NetVolume": null, + "NetWeight": null, + "Perimeter": null, + "Width": null + } + }, + "IfcSolarDevice": { + "Qto_SolarDeviceBaseQuantities": { + "GrossArea": null, + "GrossWeight": null + } + }, + "IfcSpace": { + "Qto_SpaceBaseQuantities": { + "FinishCeilingHeight": null, + "FinishFloorHeight": null, + "GrossCeilingArea": null, + "GrossFloorArea": null, + "GrossPerimeter": null, + "GrossVolume": null, + "GrossWallArea": null, + "Height": null, + "NetCeilingArea": null, + "NetFloorArea": null, + "NetPerimeter": null, + "NetVolume": null, + "NetWallArea": null + } + }, + "IfcSpaceHeater": { + "Qto_SpaceHeaterBaseQuantities": { + "GrossWeight": null, + "Length": null, + "NetWeight": null + } + }, + "IfcStackTerminal": { + "Qto_StackTerminalBaseQuantities": { + "GrossWeight": null + } + }, + "IfcStairFlight": { + "Qto_StairFlightBaseQuantities": { + "GrossVolume": null, + "Length": null, + "NetVolume": null + } + }, + "IfcSwitchingDevice": { + "Qto_SwitchingDeviceBaseQuantities": { + "GrossWeight": null + } + }, + "IfcTank": { + "Qto_TankBaseQuantities": { + "GrossWeight": null, + "NetWeight": null, + "TotalSurfaceArea": null + } + }, + "IfcTransformer": { + "Qto_TransformerBaseQuantities": { + "GrossWeight": null + } + }, + "IfcTubeBundle": { + "Qto_TubeBundleBaseQuantities": { + "GrossWeight": null, + "NetWeight": null + } + }, + "IfcUnitaryControlElement": { + "Qto_UnitaryControlElementBaseQuantities": { + "GrossWeight": null + } + }, + "IfcUnitaryEquipment": { + "Qto_UnitaryEquipmentBaseQuantities": { + "GrossWeight": null + } + }, + "IfcValve": { + "Qto_ValveBaseQuantities": { + "GrossWeight": null + } + }, + "IfcVibrationIsolator": { + "Qto_VibrationIsolatorBaseQuantities": { + "GrossWeight": null + } + }, "IfcWall": { "Qto_WallBaseQuantities": { - "Length": "net_get_x", - "Width": "net_get_y", + "GrossFootprintArea": null, + "GrossSideArea": null, + "GrossVolume": null, + "GrossWeight": null, "Height": "net_get_z", + "Length": "net_get_x", + "NetFootprintArea": null, "NetSideArea": "net_get_side_area", - "NetVolume": "net_get_volume" + "NetVolume": "net_get_volume", + "NetWeight": null, + "Width": "net_get_y" + } + }, + "IfcWasteTerminal": { + "Qto_WasteTerminalBaseQuantities": { + "GrossWeight": null + } + }, + "IfcWindow": { + "Qto_WindowBaseQuantities": { + "Area": null, + "Height": null, + "Perimeter": null, + "Width": null } } }