Skip to content

Commit 79036b7

Browse files
authored
Merge pull request #350 from jgunstone/add-systems
Add systems
2 parents f579161 + 0f60084 commit 79036b7

12 files changed

+1038
-852
lines changed

BDNS_Abbreviations_Core.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ ifc_core = [x for x in ifc_classes if not ifc_class_is_enum(x)]
6666
len_ifc_core = len(ifc_core)
6767
6868
init_notebook_mode(all_interactive=True)
69-
df = pd.read_csv("BDNS_Abbreviations_Register.csv") # .query("'IfcDistributionSystem' in ifc4_3")
69+
df = pd.read_csv("BDNS_Abbreviations_Register.csv").fillna("") # .query("'IfcDistributionSystem' in ifc4_3")
7070
df["ifc4_3"] = df.ifc4_3.str.replace("NOTDEFINED", "")
7171
df = df[df['is_ifc_default']==1]
7272
len_bdns_mappings= len(df)
@@ -97,4 +97,4 @@ show(df,
9797
style="table-layout:auto;width:100%;float:left",
9898
allow_html=True,
9999
)
100-
```
100+
```

BDNS_Abbreviations_Register.csv

Lines changed: 890 additions & 843 deletions
Large diffs are not rendered by default.

BDNS_Abbreviations_Register.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import pandas as pd
3030
from itables import init_notebook_mode, show
3131
3232
init_notebook_mode(all_interactive=True)
33-
df = pd.read_csv("BDNS_Abbreviations_Register.csv")
33+
df = pd.read_csv("BDNS_Abbreviations_Register.csv").fillna("")
3434
df["ifc4_3"] = df.ifc4_3.str.replace("NOTDEFINED", "")
3535
df["ifc4_3"] = [
3636
'<a href="https://identifier.buildingsmart.org/uri/buildingsmart/ifc/4.3/class/{}" target="_blank">{}</a>'.format(

BDNS_Abbreviations_Systems.qmd

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
execute:
3+
echo: false
4+
tbl-cap-location: bottom
5+
format:
6+
html:
7+
page-layout: custom
8+
toc: false
9+
jupyter:
10+
jupytext:
11+
text_representation:
12+
extension: .qmd
13+
format_name: quarto
14+
format_version: '1.0'
15+
jupytext_version: 1.16.1
16+
kernelspec:
17+
display_name: Python 3 (ipykernel)
18+
language: python
19+
name: python3
20+
---
21+
22+
# Building Device and Asset Naming Standards initiative
23+
24+
{{< include release.md >}}
25+
26+
# Systems Abbreviation
27+
28+
This sub-list is achieved by filtering and on the ifc4_3 column for classes containing `IfcDistributionSystem`.
29+
As a minimum BDNS aims to ensure that there is an abbreviation for every [IfcDistributionSystemEnum](https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/IfcDistributionSystemEnum.htm).
30+
31+
::: {.callout-important}
32+
## Systems Abbreviations are WIP
33+
34+
If you have comments on those shown please add to discussion here:
35+
https://github.com/theodi/BDNS/issues/157
36+
37+
:::
38+
39+
```{python}
40+
import pandas as pd
41+
import re
42+
from itables import init_notebook_mode, show
43+
44+
45+
def ifc_strip_enum(ifc_class: str) -> str:
46+
return re.sub(r"([A-Z0-9_]+_?)$", "", ifc_class)
47+
48+
49+
init_notebook_mode(all_interactive=True)
50+
df = pd.read_csv(
51+
"BDNS_Abbreviations_Register.csv"
52+
).fillna("")
53+
df["IfcEntity"] = [ifc_strip_enum(x) for x in df.ifc4_3]
54+
df = df.query("'IfcDistributionSystem' in IfcEntity")
55+
del df["IfcEntity"]
56+
57+
df["ifc4_3"] = [
58+
'<a href="https://identifier.buildingsmart.org/uri/buildingsmart/ifc/4.3/class/{}" target="_blank">{}</a>'.format(
59+
x, x
60+
)
61+
for x in df["ifc4_3"]
62+
]
63+
show(
64+
df,
65+
buttons=["pageLength", "csvHtml5"],
66+
lengthMenu=[20, 50, 100, 500],
67+
style="table-layout:auto;width:100%;float:left",
68+
allow_html=True,
69+
)
70+
71+
```

_quarto.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ website:
1313
text: Naming Specification Syntax
1414
- href: BDNS_Abbreviations_Register.qmd
1515
text: Abbreviations Register
16+
- href: BDNS_Abbreviations_Systems.qmd
17+
text: Systems Abbreviations
1618
- href: BDNS_Abbreviations_Core.qmd
1719
text: Abbreviations Core
1820

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
asset_description,asset_abbreviation,can_be_connected,dbo_entity_type,ifc4_3,ifc2x3,is_ifc_default
2+
system - airconditioning,AIRCON,0,,IfcDistributionSystemAIRCONDITIONING,,1
3+
system - catenary_system,CATNY,0,,IfcDistributionSystemCATENARY_SYSTEM,,1
4+
system - chemical,CHEM,0,,IfcDistributionSystemCHEMICAL,,1
5+
system - chilledwater,CHW,0,,IfcDistributionSystemCHILLEDWATER,,1
6+
system - communication,COMMS,0,,IfcDistributionSystemCOMMUNICATION,,1
7+
system - compressedair,CPAIR,0,,IfcDistributionSystemCOMPRESSEDAIR,,1
8+
system - condenserwater,CDW,0,,IfcDistributionSystemCONDENSERWATER,,1
9+
system - control,BMS,0,,IfcDistributionSystemCONTROL,,1
10+
system - conveying,CONVEY,0,,IfcDistributionSystemCONVEYING,,1
11+
system - domesticcoldwater,DCW,0,,IfcDistributionSystemDOMESTICCOLDWATER,,1
12+
system - domestichotwater,DHW,0,,IfcDistributionSystemDOMESTICHOTWATER,,1
13+
system - drainage,DRNG,0,,IfcDistributionSystemDRAINAGE,,1
14+
system - earthing,EARTH,0,,IfcDistributionSystemEARTHING,,1
15+
system - electrical (low voltage),LV,0,,IfcDistributionSystemELECTRICAL,,1
16+
system - electrical (high voltage),HV,0,,IfcDistributionSystemELECTRICAL,,0
17+
system - electroacoustic,AUDIO,0,,IfcDistributionSystemELECTROACOUSTIC,,1
18+
system - exhaust,EA,0,,IfcDistributionSystemEXHAUST,,1
19+
system - fireprotection,SPR,0,,IfcDistributionSystemFIREPROTECTION,,1
20+
system - fuel,FUEL,0,,IfcDistributionSystemFUEL,,1
21+
system - gas,GAS,0,,IfcDistributionSystemGAS,,1
22+
system - hazardous,HAZ,0,,IfcDistributionSystemHAZARDOUS,,1
23+
system - heating (low template hot water),LTHW,0,,IfcDistributionSystemHEATING,,1
24+
system - heating (medium template hot water),MTHW,0,,IfcDistributionSystemHEATING,,0
25+
system - lighting,LTG,0,,IfcDistributionSystemLIGHTING,,1
26+
system - lightningprotection,LPSY,0,,IfcDistributionSystemLIGHTNINGPROTECTION,,1
27+
system - mobilenetwork,MOB,0,,IfcDistributionSystemMOBILENETWORK,,1
28+
system - monitoring system,MS,0,,IfcDistributionSystemMONITORINGSYSTEM,,1
29+
system - municipalsolidwaste,WSTSOL,0,,IfcDistributionSystemMUNICIPALSOLIDWASTE,,1
30+
system - oil,OIL,0,,IfcDistributionSystemOIL,,1
31+
system - operational,OPSUP,0,,IfcDistributionSystemOPERATIONAL,,1
32+
system - operationaltelephonysystem,PHON,0,,IfcDistributionSystemOPERATIONALTELEPHONYSYSTEM,,1
33+
system - overhead_contactline_system,OVER,0,,IfcDistributionSystemOVERHEAD_CONTACTLINE_SYSTEM,,1
34+
system - powergeneration,EGEN,0,,IfcDistributionSystemPOWERGENERATION,,1
35+
system - rainwater,RW,0,,IfcDistributionSystemRAINWATER,,1
36+
system - refrigeration,RF,0,,IfcDistributionSystemREFRIGERATION,,1
37+
system - return_circuit,RETCIR,0,,IfcDistributionSystemRETURN_CIRCUIT,,1
38+
system - security,SEC,0,,IfcDistributionSystemSECURITY,,1
39+
system - sewage,SWG,0,,IfcDistributionSystemSEWAGE,,1
40+
system - signal,SIG,0,,IfcDistributionSystemSIGNAL,,1
41+
system - stormwater,STORM,0,,IfcDistributionSystemSTORMWATER,,1
42+
system - telephone,TELE,0,,IfcDistributionSystemTELEPHONE,,1
43+
system - tv,TV,0,,IfcDistributionSystemTV,,1
44+
system - vacuum,VAC,0,,IfcDistributionSystemVACUUM,,1
45+
system - vent,VENTP,0,,IfcDistributionSystemVENT,,1
46+
system - ventilation,VENT,0,,IfcDistributionSystemVENTILATION,,1
47+
system - wastewater,WSTWAT,0,,IfcDistributionSystemWASTEWATER,,1
48+
system - watersupply,WATSUP,0,,IfcDistributionSystemWATERSUPPLY,,1

scripts/25JUL-update-ifc-mappings/add_can_be_connected.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77

88
def read_csv(path: pathlib.Path) -> list[list]:
99
"""Read a CSV file and return its content as a list of lists."""
10-
return list(csv.reader(path.read_text().split("\n")))
10+
data = list(csv.reader(path.read_text().split("\n")))
11+
if data[-1] == []:
12+
data = data[:-1]
13+
return data
1114

1215
def write_csv(path: pathlib.Path, data: list[list]) -> None:
1316
"""Write a list of lists to a CSV file."""

scripts/25JUL-update-ifc-mappings/add_is_default.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77

88
def read_csv(path: pathlib.Path) -> list[list]:
99
"""Read a CSV file and return its content as a list of lists."""
10-
return list(csv.reader(path.read_text().split("\n")))
10+
data = list(csv.reader(path.read_text().split("\n")))
11+
if data[-1] == []:
12+
data = data[:-1]
13+
return data
1114

1215
def write_csv(path: pathlib.Path, data: list[list]) -> None:
1316
"""Write a list of lists to a CSV file."""

scripts/25JUL-update-ifc-mappings/can_be_connected_to_int.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55

66
def read_csv(path: pathlib.Path) -> list[list]:
77
"""Read a CSV file and return its content as a list of lists."""
8-
return list(csv.reader(path.read_text().split("\n")))
8+
data = list(csv.reader(path.read_text().split("\n")))
9+
if data[-1] == []:
10+
data = data[:-1]
11+
return data
912

1013
def write_csv(path: pathlib.Path, data: list[list]) -> None:
1114
"""Write a list of lists to a CSV file."""

scripts/25JUL-update-ifc-mappings/update_default_mappings.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88

99
def read_csv(path: pathlib.Path) -> list[list]:
1010
"""Read a CSV file and return its content as a list of lists."""
11-
return list(csv.reader(path.read_text().split("\n")))
11+
data = list(csv.reader(path.read_text().split("\n")))
12+
if data[-1] == []:
13+
data = data[:-1]
14+
return data
1215

1316
def write_csv(path: pathlib.Path, data: list[list]) -> None:
1417
"""Write a list of lists to a CSV file."""

0 commit comments

Comments
 (0)