forked from bruno/brown-street
Compare commits
6 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9a44d6ae37 | |||
| 087a4b9bee | |||
| e159507581 | |||
|
|
d22893bad6 | ||
| 1463d1830b | |||
| f0a6c4f8dd |
5 changed files with 3189 additions and 3119 deletions
108
.forgejo/workflows/ids-lint.yml
Normal file
108
.forgejo/workflows/ids-lint.yml
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
# IDS compliance: every rule in every IDS/**/*.ids, against every model.
|
||||
#
|
||||
# Port of .github/workflows/ids-lint.yml. The script body is unchanged apart
|
||||
# from skipping libraries/; only the setup steps and `runs-on:` differ, because
|
||||
# ifc-ci already contains ifctester and idssplit.
|
||||
#
|
||||
# idssplit splits each IDS file into one file per rule before testing, so a
|
||||
# failure names the specific rule rather than only the specification.
|
||||
#
|
||||
# Runs on the user-scoped `ifc` runner (user ci-ifc) on hub.postle.net, whose
|
||||
# root-owned config.yaml has an empty `valid_volumes` -- no host path can be
|
||||
# mounted, which is what makes it safe for an outside contributor's PR.
|
||||
|
||||
name: IDS Compliance Check
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
ids-lint:
|
||||
runs-on: ifc
|
||||
container:
|
||||
image: hub.postle.net/bruno/ifc-ci:latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run IDS validations
|
||||
# shell: bash is REQUIRED, not decoration. The runner executes `run:`
|
||||
# blocks with /bin/sh (dash) unless told otherwise, so the GitHub
|
||||
# original's `shopt -s globstar` dies with "shopt: not found" and
|
||||
# exit 127 before the first file is checked. `[[ ]]` and arrays need
|
||||
# bash too.
|
||||
shell: bash
|
||||
# Deliberately greps output instead of trusting the exit status:
|
||||
# ifctester's CLI has no sys.exit anywhere, so a model that violates
|
||||
# every rule still exits 0. A naive `run: ifctester ...` would be a
|
||||
# permanently green check that can never fail.
|
||||
run: |
|
||||
set -e
|
||||
shopt -s globstar nullglob
|
||||
|
||||
if [ ! -d IDS ]; then
|
||||
echo "No IDS/ folder found"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
ids_sources=(IDS/**/*.ids)
|
||||
|
||||
if [ ${#ids_sources[@]} -eq 0 ]; then
|
||||
echo "No IDS files found in IDS/ folder"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# libraries/ holds vendored component sources, not deliverable models.
|
||||
ifc_files=()
|
||||
for f in **/*.ifc; do
|
||||
[[ "$f" == libraries/* ]] && continue
|
||||
ifc_files+=("$f")
|
||||
done
|
||||
|
||||
if [ ${#ifc_files[@]} -eq 0 ]; then
|
||||
echo "No IFC files found"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
mkdir -p split_ids
|
||||
|
||||
echo "Splitting IDS files..."
|
||||
for ids in "${ids_sources[@]}"; do
|
||||
idssplit "$ids" split_ids/
|
||||
done
|
||||
|
||||
split_ids_files=(split_ids/*.ids)
|
||||
if [ ${#split_ids_files[@]} -eq 0 ]; then
|
||||
echo "No rules found after splitting IDS files"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Running ifctester validations..."
|
||||
failed=0
|
||||
|
||||
for rule_ids in "${split_ids_files[@]}"; do
|
||||
for ifc in "${ifc_files[@]}"; do
|
||||
echo "::group::Test: $rule_ids with $ifc"
|
||||
echo "Testing: $rule_ids with $ifc"
|
||||
output=$(python3 -m ifctester --no-color "$rule_ids" "$ifc" || true)
|
||||
echo "$output"
|
||||
echo "::endgroup::"
|
||||
|
||||
if echo "$output" | grep -q '\[FAIL\]'; then
|
||||
echo "FAIL: $rule_ids with $ifc"
|
||||
failed=1
|
||||
else
|
||||
echo "PASS: $rule_ids with $ifc"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
if [ "$failed" -ne 0 ]; then
|
||||
echo "One or more validations failed"
|
||||
exit 1
|
||||
else
|
||||
echo "All validations passed"
|
||||
fi
|
||||
45
.forgejo/workflows/ifc-lint.yml
Normal file
45
.forgejo/workflows/ifc-lint.yml
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
# Schema/rule validation for every IFC model in the repo.
|
||||
#
|
||||
# Port of .github/workflows/ifc-lint.yml. Only the setup steps and `runs-on:`
|
||||
# changed: `ifc-ci` already contains ifcopenshell, so there is no setup-python
|
||||
# and no pip install -- on GitHub those were most of the runtime.
|
||||
#
|
||||
# Runs on the user-scoped `ifc` runner (user ci-ifc) on hub.postle.net, whose
|
||||
# root-owned config.yaml has an empty `valid_volumes`. A job here can mount no
|
||||
# host path at all, which is what makes it safe to run an outside contributor's
|
||||
# pull request.
|
||||
|
||||
name: IFC Validation
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
lint-ifc:
|
||||
runs-on: ifc
|
||||
container:
|
||||
image: hub.postle.net/bruno/ifc-ci:latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run IFC lint checks
|
||||
# shell: bash is REQUIRED, not decoration. The runner executes `run:`
|
||||
# blocks with /bin/sh (dash) unless told otherwise, so the GitHub
|
||||
# original's `shopt -s globstar` dies with "shopt: not found" and
|
||||
# exit 127 before the first file is checked. `[[ ]]` and arrays need
|
||||
# bash too.
|
||||
shell: bash
|
||||
# Gates on its own exit status: ifcopenshell.validate calls sys.exit()
|
||||
# on failure, so `set -e` fails the job.
|
||||
run: |
|
||||
set -e
|
||||
shopt -s globstar nullglob
|
||||
for file in **/*.ifc; do
|
||||
# libraries/ holds vendored component sources, not deliverable models.
|
||||
[[ "$file" == libraries/* ]] && continue
|
||||
echo "Validating $file..."
|
||||
python3 -m ifcopenshell.validate --rules "$file"
|
||||
done
|
||||
114
IDS/EN_Basic IDM Check.ids
Normal file
114
IDS/EN_Basic IDM Check.ids
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ids xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://standards.buildingsmart.org/IDS">
|
||||
<info>
|
||||
<title>EN_Basic IDM Check</title>
|
||||
<description>Example IDS for model validation according to the BIM Basic Information Delivery Manual (IDM)</description>
|
||||
<author>sgolchinfar@bimcollab.com</author>
|
||||
<date>2024-10-29</date>
|
||||
<purpose>Specify a set of agreements that IFC models must meet according to the basic IDM.</purpose>
|
||||
</info>
|
||||
<specifications>
|
||||
<specification name="(3.4) Current use of Entities" description="Run specification to get a list of all IfcBuildingElementProxy elements in your model. It is important to select the most suitable IFC Class for your elements and try to avoid using IfcBuildingElementProxy whenever possible." ifcVersion="IFC2X3 IFC4">
|
||||
<applicability minOccurs="0">
|
||||
<entity>
|
||||
<name>
|
||||
<simpleValue>IFCBUILDINGELEMENTPROXY</simpleValue>
|
||||
</name>
|
||||
</entity>
|
||||
</applicability>
|
||||
<requirements>
|
||||
<attribute>
|
||||
<name>
|
||||
<simpleValue>GlobalId</simpleValue>
|
||||
</name>
|
||||
<value>
|
||||
<simpleValue>?</simpleValue>
|
||||
</value>
|
||||
</attribute>
|
||||
</requirements>
|
||||
</specification>
|
||||
<specification name="(4.5) Fire Safety" description="Ensures that the FireRating values are adequate for internal, load-bearing walls [ 1. Use the sections 'Property set' and 'Property name' in case you would like to modify the elements to examine. In this case, we look for internal, load-bearing wall elements. 2. In the 'Value' field, indicate the FireRating required ]" ifcVersion="IFC2X3 IFC4">
|
||||
<applicability minOccurs="0">
|
||||
<property>
|
||||
<propertySet>
|
||||
<simpleValue>Pset_WallCommon</simpleValue>
|
||||
</propertySet>
|
||||
<baseName>
|
||||
<simpleValue>IsExternal</simpleValue>
|
||||
</baseName>
|
||||
<value>
|
||||
<simpleValue>False</simpleValue>
|
||||
</value>
|
||||
</property>
|
||||
<property>
|
||||
<propertySet>
|
||||
<simpleValue>Pset_WallCommon</simpleValue>
|
||||
</propertySet>
|
||||
<baseName>
|
||||
<simpleValue>LoadBearing</simpleValue>
|
||||
</baseName>
|
||||
<value>
|
||||
<simpleValue>True</simpleValue>
|
||||
</value>
|
||||
</property>
|
||||
</applicability>
|
||||
<requirements>
|
||||
<property>
|
||||
<propertySet>
|
||||
<simpleValue>Pset_WallCommon</simpleValue>
|
||||
</propertySet>
|
||||
<baseName>
|
||||
<simpleValue>FireRating</simpleValue>
|
||||
</baseName>
|
||||
<value>
|
||||
<simpleValue>30</simpleValue>
|
||||
</value>
|
||||
</property>
|
||||
</requirements>
|
||||
</specification>
|
||||
<specification name="(4.6) Building Physics Properties (Thermal Transmitance)" description="Check the presence of building physics properties in the selected elements. Here we test if the ThermalTransmittance (U-value) values are defined for wall elements. Other examples of common building physics properties are AcousticRating (soundproofing), SolarHeatGainTransmittance (SGGC value), and Translucency (light transmission) [ 1. Use the sections 'Property set' and 'Property Name' to modify the IFC Class and building physics properties to examine ]" ifcVersion="IFC2X3 IFC4">
|
||||
<applicability minOccurs="0">
|
||||
<property>
|
||||
<propertySet>
|
||||
<simpleValue>Pset_WallCommon</simpleValue>
|
||||
</propertySet>
|
||||
<baseName>
|
||||
<simpleValue>IsExternal</simpleValue>
|
||||
</baseName>
|
||||
<value>
|
||||
<simpleValue>True</simpleValue>
|
||||
</value>
|
||||
</property>
|
||||
</applicability>
|
||||
<requirements>
|
||||
<property>
|
||||
<propertySet>
|
||||
<simpleValue>Pset_WallCommon</simpleValue>
|
||||
</propertySet>
|
||||
<baseName>
|
||||
<simpleValue>Thermal Transmitance</simpleValue>
|
||||
</baseName>
|
||||
</property>
|
||||
</requirements>
|
||||
</specification>
|
||||
<specification name="(4.8) Project specific properties" description="Determine if custom properties defined by your project requirements are present in the selected elements [ 1. Use the 'IFC Element' section to select the IFC class you would like to test. 2. Modify the values of 'Property set' and 'Property name' to indicate your custom properties ]" ifcVersion="IFC2X3 IFC4">
|
||||
<applicability minOccurs="0">
|
||||
<entity>
|
||||
<name>
|
||||
<simpleValue>IFCFLOWSEGMENT</simpleValue>
|
||||
</name>
|
||||
</entity>
|
||||
</applicability>
|
||||
<requirements>
|
||||
<property>
|
||||
<propertySet>
|
||||
<simpleValue>AC_Pset_RenovationAndPhasing</simpleValue>
|
||||
</propertySet>
|
||||
<baseName>
|
||||
<simpleValue>Renovation Status</simpleValue>
|
||||
</baseName>
|
||||
</property>
|
||||
</requirements>
|
||||
</specification>
|
||||
</specifications>
|
||||
</ids>
|
||||
81
IDS/IDS_random_example.ids
Normal file
81
IDS/IDS_random_example.ids
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<ids:ids xmlns:ids="http://standards.buildingsmart.org/IDS" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://standards.buildingsmart.org/IDS http://standards.buildingsmart.org/IDS/1.0/ids.xsd">
|
||||
<ids:info>
|
||||
<ids:title>random example to show technical capabilities and usage</ids:title>
|
||||
<ids:copyright>buildingSMART International Ltd</ids:copyright>
|
||||
<ids:date>2021-09-17</ids:date>
|
||||
</ids:info>
|
||||
<ids:specifications>
|
||||
<ids:specification ifcVersion="IFC2X3 IFC4X3_ADD2" name="ramen">
|
||||
<ids:applicability minOccurs="0" maxOccurs="unbounded">
|
||||
<ids:entity>
|
||||
<ids:name>
|
||||
<ids:simpleValue>IFCWINDOW</ids:simpleValue>
|
||||
</ids:name>
|
||||
</ids:entity>
|
||||
<ids:classification>
|
||||
<ids:value>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The value should be a number; a dot; another number. For example '1.1', '2.4', etc.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:pattern value="[0-9]\.[0-9]"/>
|
||||
</xs:restriction>
|
||||
</ids:value>
|
||||
<ids:system>
|
||||
<ids:simpleValue>NL-Sfb</ids:simpleValue>
|
||||
</ids:system>
|
||||
</ids:classification>
|
||||
</ids:applicability>
|
||||
<ids:requirements>
|
||||
<ids:property dataType="IFCLENGTHMEASURE">
|
||||
<ids:propertySet>
|
||||
<ids:simpleValue>attribute</ids:simpleValue>
|
||||
</ids:propertySet>
|
||||
<ids:baseName>
|
||||
<ids:simpleValue>OverallWidth</ids:simpleValue>
|
||||
</ids:baseName>
|
||||
<ids:value>
|
||||
<xs:restriction base="xs:double">
|
||||
<xs:minInclusive value="0"/>
|
||||
<xs:maxInclusive value="120"/>
|
||||
</xs:restriction>
|
||||
</ids:value>
|
||||
</ids:property>
|
||||
<ids:property dataType="IFCTEXT" uri="http://identifier.buildingsmart.org/uri/dummy-example/FireRating">
|
||||
<ids:propertySet>
|
||||
<ids:simpleValue>AedesUVIP</ids:simpleValue>
|
||||
</ids:propertySet>
|
||||
<ids:baseName>
|
||||
<ids:simpleValue>FireRating</ids:simpleValue>
|
||||
</ids:baseName>
|
||||
<ids:value>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="30">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
<xs:Label xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Thirty minutes</xs:Label>
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="60">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
<xs:Label xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Sixty minutes</xs:Label>
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="90">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
<xs:Label xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Ninety minutes</xs:Label>
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
</xs:restriction>
|
||||
</ids:value>
|
||||
</ids:property>
|
||||
</ids:requirements>
|
||||
</ids:specification>
|
||||
</ids:specifications>
|
||||
</ids:ids>
|
||||
5960
model.ifc
5960
model.ifc
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue