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
1 and the length of the STEP text.What the code does
OpenGeometry.createloads 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.
operatecuts 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. exportStepreturns the STEP file astextand counts what it wrote inreport.
Next steps
- Make other shapes: Primitives, Sweep, Revolve.
- Learn how display works: Display.
- Look at the runnable examples.

