SubD to B-rep
The Kiln is a page for modelling with a subdivision cage: a coarse mesh of quads that you push and pull, with a smooth surface that follows it. The page is always the cage. When the shape is right, STEP writes it as an exact solid, a boundary representation made of NURBS patches, converted from the cage as the file is written; STL, OBJ and glTF take the smooth surface home as triangles. The kernel runs in your browser, and nothing is uploaded.
This page sculpts a box and exports it. Open the Kiln beside this page and follow along.
Start with a cage
The Kiln opens on a box cage, two units a side and split in two along each axis: 26 vertices and 24 quads. The smooth surface is drawn over it, with the cage’s own edges on top. Box, Cylinder, Sphere and Torus on the left start another cage in its place, with the fields of its size beside Last edit. Each is an undo step, so Undo brings the cage before it back.
The cylinder’s two rims are creased, so its ends stay sharp. Tab hides the cage’s lines while the view has the keyboard focus, and Esc lets the view go, so that Tab walks the page’s controls again.
Pick, then edit
Choose what a click picks with Vertex, Edge or Face (1, 2, 3). A click picks one, Shift+click adds to the picks, and Alt+click on an edge picks the whole loop of edges it belongs to. The gizmo at the picks’ centre, drawn over the model so the surface never hides it, has every handle at once: drag an arrow to slide the picks along its axis, a ring to turn them about it, the square beside the centre to scale them, or the centre itself to move them across the view.
Anywhere else in the view, a drag turns the view, a drag with the right button pans it, and the wheel zooms. The note at the bottom of the view says what a click does in the current mode.
- Extrude: with faces picked, the drag starts at once and the new faces follow the mouse. Click to finish,
Escto cancel. A region extrudes as one: pick all four top quads of the box and they rise together, with a wall only around the edge. - Inset: the same, sideways, to shrink the picked faces into themselves and leave a ring around them.
- Subdivide splits the picked faces once: each becomes quads round a new point, and the faces beside them gain a corner, so they become five- or six-sided. In vertex or edge mode, or with no face picked, it subdivides the whole cage: four times the faces and the same smooth surface, so there are more points to shape. Each press is one undo step.
- Edge loop: with an edge picked, a new ring of edges across the strip of quads it belongs to.
- Crease and Uncrease: a creased edge stays sharp in the smooth surface instead of rounding off. Pin and Unpin hold a vertex in place, which does the same at a corner.
- Mirror X, Y or Z: model one half and get the whole. The cage becomes its half on the positive side of the plane, and every edit is made once, so it cannot break the symmetry. A face of the half may not lie in the plane, and one that crosses it needs an edge loop there first; the kernel says so when it refuses.
- Undo and Redo (
Ctrl+Z,Ctrl+Shift+Z) walk through the steps. A drag, from its first frame to its last, is one step.
The fields under Last edit hold the number of the edit just made: type 0.5 in an extrusion’s Distance and it is made again at exactly that. When the kernel refuses a value, the cage stays as it was and the kernel’s own words appear beside the tool.
Take it home
The Export buttons write the cage as it is:
- STEP: the exact solid, in millimetres, for any CAD program. The cage is converted as the file is written: the surface that its subdivision converges to, fitted patch by patch with NURBS and stitched into a closed body. The cage stays on screen, as it was.
- STL, OBJ and glTF: the smooth surface, as triangles. The glTF is in metres and Y-up, as glTF is; the other two keep the model’s own units and axes.
The conversion’s default tolerances are strict. The patches stay within 1e-4 of the cage’s diagonal from the smooth surface, the tangent may break by no more than 0.1° across the seams between them, and the kernel refines up to six levels to get there. A line under the buttons then gives the figures it reached, until the next edit. A quad of the cage becomes four faces of the solid, so a cage of 24 quads is a solid of 96 faces.
The conversion takes seconds. While the kernel works, the note under the view counts them and Stop beside it ends the export. The kernel then starts afresh on the cage as it was: no step is lost, only the file.
What the Kiln does not do
These are the kernel’s limits, shown as they are:
- High-valence vertices may be refused. A vertex where many faces meet, or a face of many sides, can make the conversion miss its tolerances at the defaults. The page then writes no file, keeps the cage and shows the figures the kernel measured beside Export: how far the surface was off, how far the tangent broke, and how many levels it tried. For a face of eight or more sides, or a vertex of valence eight or more, it adds a hint: try creasing the rim or using fewer sides. The tolerances are not loosened for you.
- A cage quad becomes four B-rep faces, as above, so a solid has many more faces than its cage. They are the patches the conversion needs, not the few faces of a part as a CAD program would draw it.
- No solid on the page. The Kiln sculpts the cage and exports it; there are no booleans, fillets or shells here. The kernel’s conversion, booleans, fillets and shells are in the SDK, for a solid in your own code.