> For the complete documentation index, see [llms.txt](https://bimwhale.gitbook.io/ifc-js/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bimwhale.gitbook.io/ifc-js/developer-guide/step-by-step/build-the-geometry.md).

# Build the Geometry

Let's head back to our main JS file.

{% code title="example/web-worker/main.js" %}

```javascript
function readFile(input) {
    const reader = new FileReader();
    reader.onload = () => {
        toggleLoader();
        const ifcWorker = new Worker('worker/worker.js');
        
        ifcWorker.onmessage = function (e) {
            let structured = e.data;
            structured.MainObject = mainObject;
            structured = buildGeometry(structured);
            scene.add(structured.MainObject);
        };
        
        ifcWorker.postMessage(reader.result); 
    };
    reader.readAsText(input.files[0]);
}
```

{% endcode %}

Let's focus on the  `ifcWorker.onmessage`. The first thing we are going to do is add back the mainObject.&#x20;

To clarify; we are now outside of the `Web Worker`. We can use Three.js as expected. Then, we build the geometry and add it to the scene.
