Federate West Riverside Hospital
Explore West Riverside Hospital's seven IFC4 discipline models federated in one viewer: architecture, structure and building services.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>Federate West Riverside Hospital</title>
<meta name="description" content="Explore West Riverside Hospital's seven IFC4 discipline models federated in one viewer: architecture, structure and building services.">
<style>
html, body { height: 100%; margin: 0; }
#example-viewer-mount { position: fixed; inset: 0; }
bim-grid#ifc-viewer { display: block; position: absolute; inset: 0; width: 100%; height: 100%; min-width: 0; min-height: 0; }
.example-ui { position: fixed; z-index: 10; box-sizing: border-box; color: #253041; font: 12px/1.4 system-ui, sans-serif; }
.example-ui.example-task { right: 10px; bottom: 64px; width: 224px; max-width: calc(100vw - 64px); display: grid; gap: 6px; padding: 10px; background: #fff; border: 1px solid #dfe3e8; border-radius: 4px; box-shadow: 0 1px 5px #14203310; }
.example-ui :is(h2, p) { margin: 0; }
.example-ui h2 { font-size: 13px; line-height: 1.3; font-weight: 650; }
.example-ui p { color: #5a6575; }
.example-ui button { max-width: 100%; padding: 5px 7px; font: inherit; cursor: pointer; }
.example-ui [hidden] { display: none; }
.example-ui.example-credit { right: 8px; bottom: 32px; width: max-content; max-width: calc(100vw - 64px); padding: 2px 5px; background: #ffffffdf; border-radius: 2px; font-size: 9px; text-align: right; overflow-wrap: anywhere; }
.example-ui.example-credit a { color: #566171; }
@media (max-width: 600px) {
.example-ui.example-task { right: 8px; padding: 8px; }
.example-ui button { min-height: 30px; }
}
</style>
<!-- generated:example-seo:start -->
<link rel="canonical" href="https://viewer.flinker.app/examples/west-riverside-hospital/index.html">
<meta name="robots" content="index,follow">
<meta property="og:title" content="Federate West Riverside Hospital">
<meta property="og:description" content="Explore West Riverside Hospital's seven IFC4 discipline models federated in one viewer: architecture, structure and building services.">
<meta property="og:url" content="https://viewer.flinker.app/examples/west-riverside-hospital/index.html"><meta property="og:type" content="article">
<meta property="og:site_name" content="Flinker IFC Viewer"><meta property="og:image" content="https://viewer.flinker.app/examples/west-riverside-hospital/thumbnail.webp">
<meta name="twitter:card" content="summary_large_image"><meta name="twitter:title" content="Federate West Riverside Hospital">
<meta name="twitter:description" content="Explore West Riverside Hospital's seven IFC4 discipline models federated in one viewer: architecture, structure and building services."><meta name="twitter:image" content="https://viewer.flinker.app/examples/west-riverside-hospital/thumbnail.webp">
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"Federate West Riverside Hospital","description":"Explore West Riverside Hospital's seven IFC4 discipline models federated in one viewer: architecture, structure and building services.","url":"https://viewer.flinker.app/examples/west-riverside-hospital/index.html","mainEntityOfPage":"https://viewer.flinker.app/examples/west-riverside-hospital/index.html","image":"https://viewer.flinker.app/examples/west-riverside-hospital/thumbnail.webp","inLanguage":"en","author":{"@type":"Organization","name":"Flinker","url":"https://www.flinker.app/"}}</script>
<!-- generated:example-seo:end -->
<script type="application/json" id="example-data">
{
"category": "Buildings",
"formats": [
"IFC"
],
"capabilities": [
"Federation"
],
"audience": "BIM workflow",
"order": 4,
"viewer": {
"assetIds": [
"west-riverside-arc-ifc4",
"west-riverside-elec-ifc4",
"west-riverside-fire-ifc4",
"west-riverside-mech-ifc4",
"west-riverside-plumb-ifc4",
"west-riverside-sprinkle-ifc4",
"west-riverside-str-ifc4"
]
},
"assets": [
{
"id": "west-riverside-arc-ifc4",
"name": "arc_ifc4.ifc",
"format": "IFC",
"bytes": 80937122,
"url": "https://huggingface.co/datasets/sylvainHellin/ifc-bench/resolve/1288fc91655823a36900b7bb75a671d5fa444afd/projects/west_riverside_hospital/arc_ifc4.ifc",
"sourceUrl": "https://huggingface.co/datasets/sylvainHellin/ifc-bench/blob/1288fc91655823a36900b7bb75a671d5fa444afd/projects/west_riverside_hospital/arc_ifc4.ifc",
"license": "CC BY 3.0",
"licenseUrl": "https://creativecommons.org/licenses/by/3.0/",
"noticeUrl": "https://viewer.flinker.app/examples/west-riverside-hospital/index.html#example-notices",
"attribution": "Solihin, W. West Riverside Hospital IFC Models. OpenIFC Model Repository, University of Auckland. Distributed in IFC-Bench by Sylvain Hellin. CC BY 3.0.",
"notes": "Imported unchanged. Only the IFC4 export of each discipline is included."
},
{
"id": "west-riverside-elec-ifc4",
"name": "elec_ifc4.ifc",
"format": "IFC",
"bytes": 4435308,
"url": "https://huggingface.co/datasets/sylvainHellin/ifc-bench/resolve/1288fc91655823a36900b7bb75a671d5fa444afd/projects/west_riverside_hospital/elec_ifc4.ifc",
"sourceUrl": "https://huggingface.co/datasets/sylvainHellin/ifc-bench/blob/1288fc91655823a36900b7bb75a671d5fa444afd/projects/west_riverside_hospital/elec_ifc4.ifc",
"license": "CC BY 3.0",
"licenseUrl": "https://creativecommons.org/licenses/by/3.0/",
"noticeUrl": "https://viewer.flinker.app/examples/west-riverside-hospital/index.html#example-notices",
"attribution": "Solihin, W. West Riverside Hospital IFC Models. OpenIFC Model Repository, University of Auckland. Distributed in IFC-Bench by Sylvain Hellin. CC BY 3.0.",
"notes": "Imported unchanged. Only the IFC4 export of each discipline is included."
},
{
"id": "west-riverside-fire-ifc4",
"name": "fire_ifc4.ifc",
"format": "IFC",
"bytes": 905021,
"url": "https://huggingface.co/datasets/sylvainHellin/ifc-bench/resolve/1288fc91655823a36900b7bb75a671d5fa444afd/projects/west_riverside_hospital/fire_ifc4.ifc",
"sourceUrl": "https://huggingface.co/datasets/sylvainHellin/ifc-bench/blob/1288fc91655823a36900b7bb75a671d5fa444afd/projects/west_riverside_hospital/fire_ifc4.ifc",
"license": "CC BY 3.0",
"licenseUrl": "https://creativecommons.org/licenses/by/3.0/",
"noticeUrl": "https://viewer.flinker.app/examples/west-riverside-hospital/index.html#example-notices",
"attribution": "Solihin, W. West Riverside Hospital IFC Models. OpenIFC Model Repository, University of Auckland. Distributed in IFC-Bench by Sylvain Hellin. CC BY 3.0.",
"notes": "Imported unchanged. Only the IFC4 export of each discipline is included."
},
{
"id": "west-riverside-mech-ifc4",
"name": "mech_ifc4.ifc",
"format": "IFC",
"bytes": 73047260,
"url": "https://huggingface.co/datasets/sylvainHellin/ifc-bench/resolve/1288fc91655823a36900b7bb75a671d5fa444afd/projects/west_riverside_hospital/mech_ifc4.ifc",
"sourceUrl": "https://huggingface.co/datasets/sylvainHellin/ifc-bench/blob/1288fc91655823a36900b7bb75a671d5fa444afd/projects/west_riverside_hospital/mech_ifc4.ifc",
"license": "CC BY 3.0",
"licenseUrl": "https://creativecommons.org/licenses/by/3.0/",
"noticeUrl": "https://viewer.flinker.app/examples/west-riverside-hospital/index.html#example-notices",
"attribution": "Solihin, W. West Riverside Hospital IFC Models. OpenIFC Model Repository, University of Auckland. Distributed in IFC-Bench by Sylvain Hellin. CC BY 3.0.",
"notes": "Imported unchanged. Only the IFC4 export of each discipline is included."
},
{
"id": "west-riverside-plumb-ifc4",
"name": "plumb_ifc4.ifc",
"format": "IFC",
"bytes": 23762808,
"url": "https://huggingface.co/datasets/sylvainHellin/ifc-bench/resolve/1288fc91655823a36900b7bb75a671d5fa444afd/projects/west_riverside_hospital/plumb_ifc4.ifc",
"sourceUrl": "https://huggingface.co/datasets/sylvainHellin/ifc-bench/blob/1288fc91655823a36900b7bb75a671d5fa444afd/projects/west_riverside_hospital/plumb_ifc4.ifc",
"license": "CC BY 3.0",
"licenseUrl": "https://creativecommons.org/licenses/by/3.0/",
"noticeUrl": "https://viewer.flinker.app/examples/west-riverside-hospital/index.html#example-notices",
"attribution": "Solihin, W. West Riverside Hospital IFC Models. OpenIFC Model Repository, University of Auckland. Distributed in IFC-Bench by Sylvain Hellin. CC BY 3.0.",
"notes": "Imported unchanged. Only the IFC4 export of each discipline is included."
},
{
"id": "west-riverside-sprinkle-ifc4",
"name": "sprinkle_ifc4.ifc",
"format": "IFC",
"bytes": 33990094,
"url": "https://huggingface.co/datasets/sylvainHellin/ifc-bench/resolve/1288fc91655823a36900b7bb75a671d5fa444afd/projects/west_riverside_hospital/sprinkle_ifc4.ifc",
"sourceUrl": "https://huggingface.co/datasets/sylvainHellin/ifc-bench/blob/1288fc91655823a36900b7bb75a671d5fa444afd/projects/west_riverside_hospital/sprinkle_ifc4.ifc",
"license": "CC BY 3.0",
"licenseUrl": "https://creativecommons.org/licenses/by/3.0/",
"noticeUrl": "https://viewer.flinker.app/examples/west-riverside-hospital/index.html#example-notices",
"attribution": "Solihin, W. West Riverside Hospital IFC Models. OpenIFC Model Repository, University of Auckland. Distributed in IFC-Bench by Sylvain Hellin. CC BY 3.0.",
"notes": "Imported unchanged. Only the IFC4 export of each discipline is included."
},
{
"id": "west-riverside-str-ifc4",
"name": "str_ifc4.ifc",
"format": "IFC",
"bytes": 6484576,
"url": "https://huggingface.co/datasets/sylvainHellin/ifc-bench/resolve/1288fc91655823a36900b7bb75a671d5fa444afd/projects/west_riverside_hospital/str_ifc4.ifc",
"sourceUrl": "https://huggingface.co/datasets/sylvainHellin/ifc-bench/blob/1288fc91655823a36900b7bb75a671d5fa444afd/projects/west_riverside_hospital/str_ifc4.ifc",
"license": "CC BY 3.0",
"licenseUrl": "https://creativecommons.org/licenses/by/3.0/",
"noticeUrl": "https://viewer.flinker.app/examples/west-riverside-hospital/index.html#example-notices",
"attribution": "Solihin, W. West Riverside Hospital IFC Models. OpenIFC Model Repository, University of Auckland. Distributed in IFC-Bench by Sylvain Hellin. CC BY 3.0.",
"notes": "Imported unchanged. Only the IFC4 export of each discipline is included."
}
]
}
</script>
</head>
<body>
<main id="example-viewer-mount" aria-label="Model viewer"><bim-grid id="ifc-viewer"></bim-grid></main>
<aside class="example-ui example-task" aria-label="Hospital federation">
<h2>Hospital federation</h2>
<p>Seven IFC4 discipline models share one viewer.</p>
<p>Open <strong>Files</strong> (folder) on the left toolbar. Toggle file checkboxes to compare disciplines. Select a component, then click <strong>1 element selected</strong> at the top left to open <strong>Properties</strong>.</p>
<button id="sample-retry" type="button" hidden>Retry sample</button>
</aside>
<div class="example-ui example-credit" aria-label="Sample source and license"><a href="https://huggingface.co/datasets/sylvainHellin/ifc-bench/tree/1288fc91655823a36900b7bb75a671d5fa444afd/projects/west_riverside_hospital" target="_blank" rel="noopener noreferrer">Wawan Solihin / OpenIFC · IFC-Bench</a> · <a href="https://creativecommons.org/licenses/by/3.0/" target="_blank" rel="noopener noreferrer">CC BY 3.0</a></div>
<template id="example-guide">
<h2 data-example-title>Federate West Riverside Hospital</h2>
<p data-example-description>Explore West Riverside Hospital's seven IFC4 discipline models federated in one viewer: architecture, structure and building services.</p>
<h3>Try it</h3>
<ol><li>Open Files (folder) on the left toolbar to see the seven IFC4 models in the federation.</li><li>Toggle file checkboxes to inspect architecture, structure, mechanical, plumbing, electrical, fire alarm and sprinkler models in their shared coordinates.</li><li>Select a component, then click 1 element selected at the top left to open Properties.</li></ol>
<h3>About this example</h3>
<p>For BIM users reviewing a multidisciplinary hospital project. The seven IFC4 files from the linked West Riverside Hospital folder are imported unchanged into one viewer, with their original names and placements. The complete download is approximately 224 MB; allow time and memory for all models to open.</p>
<p>The standalone page reads its source list once and adds files sequentially through the published SDK. Download feedback and errors use the viewer's message API. Retry sample resumes with the first unfinished file and retains files already imported.</p>
<p>Copy this folder and serve it over HTTP, for example <code>python -m http.server 8080</code>. Open <code>http://localhost:8080/</code>; the SDK and sample downloads require internet access.</p>
</template>
<template id="example-notices">
<h2>Sources and license notices</h2>
<p>Solihin, W. West Riverside Hospital IFC Models. Donated by Wawan Solihin (Singapore) and hosted on the OpenIFC Model Repository by Professor Robert Amor, University of Auckland. <a href="https://openifcmodel.cs.auckland.ac.nz/" target="_blank" rel="noopener noreferrer">Original repository</a>. Distributed by Sylvain Hellin in <a href="https://huggingface.co/datasets/sylvainHellin/ifc-bench/tree/1288fc91655823a36900b7bb75a671d5fa444afd/projects/west_riverside_hospital" target="_blank" rel="noopener noreferrer">IFC-Bench at the pinned revision</a>.</p>
<p>The seven IFC4 files are imported unchanged. The model-specific <a href="https://huggingface.co/datasets/sylvainHellin/ifc-bench/blob/1288fc91655823a36900b7bb75a671d5fa444afd/projects/west_riverside_hospital/license.txt" target="_blank" rel="noopener noreferrer">source license notice</a> specifies <a href="https://creativecommons.org/licenses/by/3.0/" target="_blank" rel="noopener noreferrer">Creative Commons Attribution 3.0 Unported</a> for these models.</p>
</template>
<script type="module">
import { Viewer } from "https://cdn.flinker.app/ifc-viewer/v4.0.3/ifc-viewer.es.js";
// Example-only download feedback. All file parsing remains in the published SDK.
async function loadExampleFile(name, url, load = blob => viewer.add(name, blob), size = 0) {
const show = stage => viewer.setMessage(name + ': ' + stage, { type: 'loading' });
const chunks = [], chunkSize = 4 * 1024 * 1024;
let offset = 0, attempts = 0, action = 'download', type = '';
try {
await show('Downloading');
while (!size || offset < size) {
try {
const end = Math.min(offset + chunkSize, size || Infinity) - 1;
const response = await fetch(url, {
headers: { Range: 'bytes=' + offset + '-' + end },
cache: 'no-store', signal: AbortSignal.timeout(60000),
});
if (!response.ok) {
await response.body?.cancel();
// GitHub raw hides Content-Range from browser JavaScript: probe EOF.
if (response.status === 416 && offset && !size) break;
throw Object.assign(new Error('HTTP ' + response.status), { retry: [408, 429].includes(response.status) || response.status >= 500 });
}
const range = response.headers.get('content-range')?.match(/^bytes (\d+)-(\d+)\/(\d+)$/);
if (range && Number(range[1]) !== offset) throw new TypeError('Unexpected byte range');
size ||= Number(range?.[3]) || 0;
const bytes = await response.arrayBuffer();
const expected = response.status === 206 ? (size ? Math.min(chunkSize, size - offset) : 0) : size;
if (!bytes.byteLength || (expected && bytes.byteLength !== expected) || (response.status === 206 && bytes.byteLength > chunkSize))
throw new TypeError('Incomplete download at byte ' + offset);
if (response.status === 200) chunks.length = 0; // Server ignored Range.
chunks.push(bytes);
offset = response.status === 200 ? bytes.byteLength : offset + bytes.byteLength;
type = response.headers.get('content-type') || '';
attempts = 0;
if (response.status === 200) break;
await show('Downloading' + (size ? ' ' + Math.round(offset / size * 100) + '%' : ''));
}
catch (error) {
if (error.retry === false || ++attempts === 3) throw error;
await show('Retrying download');
await new Promise(resolve => setTimeout(resolve, 500 * 2 ** (attempts - 1)));
}
}
action = 'open';
const result = await load(new Blob(chunks, { type }), show);
if (result?.isError) throw new Error('The viewer could not open the file');
await viewer.setMessage(null);
return result;
}
catch (error) {
throw new Error('Could not ' + action + ' ' + name + (action === 'download' ? ' from ' + url : '') + ': ' + error.message, { cause: error });
}
}
const { assets } = JSON.parse(document.getElementById('example-data').textContent);
const viewer = new Viewer('#ifc-viewer');
window.exampleViewer = viewer;
const imported = new Set();
const retry = document.querySelector('#sample-retry');
let running = false;
async function load() {
if (running) return;
running = true;
retry.hidden = true;
document.body.dataset.exampleState = 'loading';
try {
await viewer.ready;
for (const asset of assets) {
if (imported.has(asset.id)) continue;
await loadExampleFile(asset.name, asset.url, blob => viewer.add(asset.name, blob), asset.bytes);
imported.add(asset.id);
}
document.body.dataset.exampleState = 'loaded';
}
catch (error) {
document.body.dataset.exampleState = 'error';
await viewer.setMessage(error instanceof Error ? error.message : String(error), { type: 'error' });
retry.hidden = false;
}
finally {
running = false;
}
}
retry.addEventListener('click', () => { void load(); });
void load();
</script>
</body>
</html>
How it works
Try it
- Open Files (folder) on the left toolbar to see the seven IFC4 models in the federation.
- Toggle file checkboxes to inspect architecture, structure, mechanical, plumbing, electrical, fire alarm and sprinkler models in their shared coordinates.
- Select a component, then click 1 element selected at the top left to open Properties.
About this example
For BIM users reviewing a multidisciplinary hospital project. The seven IFC4 files from the linked West Riverside Hospital folder are imported unchanged into one viewer, with their original names and placements. The complete download is approximately 224 MB; allow time and memory for all models to open.
The standalone page reads its source list once and adds files sequentially through the published SDK. Download feedback and errors use the viewer's message API. Retry sample resumes with the first unfinished file and retains files already imported.
Copy this folder and serve it over HTTP, for example python -m http.server 8080. Open http://localhost:8080/; the SDK and sample downloads require internet access.
Sources and license notices
Solihin, W. West Riverside Hospital IFC Models. Donated by Wawan Solihin (Singapore) and hosted on the OpenIFC Model Repository by Professor Robert Amor, University of Auckland. Original repository. Distributed by Sylvain Hellin in IFC-Bench at the pinned revision.
The seven IFC4 files are imported unchanged. The model-specific source license notice specifies Creative Commons Attribution 3.0 Unported for these models.