CSG Machining
Overview
Section titled “Overview”CSG Machining cuts material out of a workpiece in real time, directly in the browser — no video, no pre-baked animation. As the cutter sweeps through the stock, material genuinely disappears: the mesh you see is rebuilt from the actual cut geometry every time enough of it changes.
Underneath, the workpiece is a voxel grid rather than the display mesh. Each tool subtracts its swept volume from that grid once per tick, and only the changed regions are re-tessellated — which is what keeps a continuous cut affordable at frame rate.
There is currently no public demo model for machining. The sample that used to be offered in the hosted demo was withdrawn, so the way to see this run today is to open a document of your own that carries the machining components, in a build that includes the machining kernel.
Authoring a machined workpiece
Section titled “Authoring a machined workpiece”Machining is configured with two components on the model, both part of the document schema:
| Component | What it marks |
|---|---|
| MachiningVolume | The workpiece. Sets the stock shape — box, cylinder or the node’s own mesh — its size, the voxel resolution, and which tools are allowed to cut it. |
| MachiningTool | A cutter. Pure geometry: shape (sphere, cylinder, ball-nose, torus or conical), diameter, length and corner radius. Its position each tick decides where it cuts. |
A tool has an effect only if the workpiece lists it, either directly or through a shared group name. Tools are applied in the order they are listed — with overlapping cutters, that order is part of the result.
Finer voxel resolution buys sharper detail and costs memory and rebuild time; it is the first thing to adjust if a cut looks coarse or the frame rate drops.
Signals
Section titled “Signals”Machining is driven by the same PLC-style signals a real controller would use:
| Signal | What it does |
|---|---|
| Spindle On | Material is only removed while this is true. Turn it off and the tool still moves, but nothing is cut. Leave it unbound and the tool always cuts. |
| Reset | A rising edge restores the workpiece to its original, unmachined shape and discards any queued cuts. |
| Machining Active | Written by the runtime: true while cuts or mesh rebuilds are still outstanding. |
You can drive these from the Machine Information System like any other signal, or let the document’s own sequence run them.
What to expect while it runs
Section titled “What to expect while it runs”- The workpiece starts as a solid block, cylinder or authored mesh. As the tool passes through it, the affected region is carved away and the surface is redrawn to match.
- Fast feed still cuts a continuous groove — the volume between two ticks is subtracted as a swept shape rather than as two separate stamps, so nothing is skipped between frames.
- Progress — the remaining material percentage decreases as the cut proceeds, so you can watch a job complete.
On a very demanding cut (fine detail, fast feed) the visible material removal can lag slightly behind the tool for a moment before catching up. This is expected and not a fault; it never produces incorrect geometry, only a brief visual delay.
See Also
Section titled “See Also”- Machine Information System — how to view and control signals like Spindle On and Reset
- Collision Detection — another live, physically-checked behavior in the viewer