Skip to main content
In this quickstart you make a wall from a rectangle, cut a door opening into it, show it in a Three.js scene and write it as a STEP file. Use a modern browser and a Node.js version that Vite supports.
1

Create the project

2

Serve the kernel files

Copy the kernel and the display worker into public/, so the page can fetch them from the site root:
3

Configure Vite

Put this in vite.config.ts:
4

Write the model

Replace src/main.ts with this:
5

Run it

Open the address that Vite prints. You see a blue wall with a door opening at x = 2. The console prints 1 and the length of the STEP text.

What the code does

  • OpenGeometry.create loads the kernel. Await it once, before you make a body.
  • The rectangle wire lies on the ground plane. The extrude raises it 3 m along +Y into a wall.
  • operate cuts the cuboid out of the wall. The cuboid stays a separate, live solid. It is not drawn, because it is not in the scene.
  • The wall is a THREE.Group, so it goes into the scene like any other object. Rendering asks the kernel for its mesh.
  • exportStep returns the STEP file as text and counts what it wrote in report.
Model units are metres and Y is up. See Coordinates and planes.

Next steps

Last modified on November 10, 2026