3D modeling in Python, built for LLMs.
<!DOCTYPE html>
<html lang="en"><head><meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>sand3d: fewer tokens for the same object</title>
<meta name="description" content="3D modeling in Python, built for LLMs.">
<link rel="icon" href="assets/sandflow-symbol-black.svg">
<link rel="stylesheet" href="assets/site.css">
</head><body><div class="page">
<div class="nav"><a class="titre" href="index.html"><img src="assets/sandflow-symbol-black.svg" alt="">sand3d</a><nav><a href="https://sandflow.ai/sand3d/">Website</a><span class="hfg"><img src="assets/hf-logo.svg" alt="Hugging Face"><a href="https://huggingface.co/collections/Sandflow/sand3d-6aec268fbdcd3bc174236168">Datasets</a><span class="sep">·</span><a href="https://huggingface.co/spaces/Sandflow/sand3d-explorer">Explorer</a></span><a class="gh" href="https://github.com/Sandflow-ai/sand3d"><img src="assets/github.svg" alt="">GitHub</a></nav></div>
<p class="repere">Why sand3d</p>
<h1>Fewer tokens for the same object</h1>
<div class="bande"></div>
<p>The token figure, part by part. Every program is counted the same way: o200k_base tokens, code only (docstrings and comments are not counted). A ratio is the other program's tokens over sand3d's.</p>
<div class="tablo"><table><tr><th>compared with</th><th>who wrote it</th><th>n</th><th>median ratio</th><th></th></tr><tr><td>Blender Python</td><td>written by an LLM</td><td>30 CAD parts</td><td><strong>4.0×</strong></td><td>9 of 30 build the right part</td></tr><tr><td>CadQuery</td><td>the dataset's own programs (Zero-To-CAD)</td><td>17 CAD parts</td><td><strong>2.3×</strong></td><td>synthetic programs, generated for the dataset</td></tr><tr><td>FeatureScript (Onshape)</td><td>the dataset's own programs (CADFS)</td><td>13 CAD parts</td><td><strong>6.0×</strong></td><td>real designs from public Onshape documents</td></tr><tr><td>Articraft's Python SDK</td><td>the dataset's own programs</td><td>12 articulated objects</td><td><strong>2.0×</strong></td><td>5 of 12 also use CadQuery; they also declare masses and inertias</td></tr></table></div>
<p>Who wrote what:</p>
<ul><li><strong>sand3d</strong>: the programs of this repo, written for it; each matches its reference mesh (the CAD model's, or the articulated object's), the CAD parts at an F-score of 0.95 at 2 % of the diagonal.</li><li><strong>Blender Python</strong>: written by an LLM from the CAD part's source; <em>right part</em> means it runs and its mesh matches the CAD model's.</li><li><strong>CadQuery, FeatureScript</strong>: the program the CAD dataset ships for the part. Zero-To-CAD-1m (Apache-2.0) is synthetic CadQuery; CADFS (CC BY 4.0) holds real Onshape designs in FeatureScript.</li><li><strong>Articraft</strong>: the program Articraft-10K (CC BY 4.0) ships for the object, written with its own Python SDK (meshes, joints, materials, masses), its tests left out; five also build shapes with CadQuery.</li></ul>
<p>Not compared: objects that come as meshes (Objaverse-type assets): no program exists to set beside sand3d's; the articulated objects in Blender Python: none was written; the CADFS parts in CadQuery: their source is FeatureScript.</p>
<h2 id="30-cad-parts">30 CAD parts</h2>
<div class="tablo"><table><tr><th>part</th><th>source</th><th>sand3d</th><th>Blender Python</th><th>right part</th><th>ratio</th><th>source program</th><th>ratio</th></tr><tr><td>a block with a side window open at its bottom, two rib slots under its +Y edge and a hole drilled on that edge</td><td><a href="https://huggingface.co/datasets/ADSKAILab/Zero-To-CAD-1m">Zero-To-CAD-1m</a> <code>d9657ce8-4340-baf8-564c-24ef95b451b9</code></td><td>330</td><td>862</td><td>yes</td><td>2.6×</td><td>CadQuery 502</td><td>1.5×</td></tr><tr><td>a quarter-torus pipe elbow, its inlet chamfered, a hole drilled into the inlet, every edge softened</td><td><a href="https://huggingface.co/datasets/ADSKAILab/Zero-To-CAD-1m">Zero-To-CAD-1m</a> <code>b8c707fe-e962-4eb1-8bc9-3465761f23b4</code></td><td>221</td><td>1084</td><td>no</td><td>4.9×</td><td>CadQuery 557</td><td>2.5×</td></tr><tr><td>a ring notched round its outside, the notches only through its lower half, their four vertical edges chamfered</td><td><a href="https://huggingface.co/datasets/ADSKAILab/Zero-To-CAD-1m">Zero-To-CAD-1m</a> <code>0d84288b-5014-5b32-4355-9452883f472d</code></td><td>339</td><td>996</td><td>no</td><td>2.9×</td><td>CadQuery 415</td><td>1.2×</td></tr><tr><td>an L bracket: a bar and a flange, and on top a rib following their L, grown 2 mm all round</td><td><a href="https://huggingface.co/datasets/ADSKAILab/Zero-To-CAD-1m">Zero-To-CAD-1m</a> <code>524d6a9e-b1a8-7a81-3809-d7eea0424235</code></td><td>181</td><td>525</td><td>no</td><td>2.9×</td><td>CadQuery 412</td><td>2.3×</td></tr><tr><td>a block drawn in inches' worth of millimetres, then scaled by 2.54</td><td><a href="https://huggingface.co/datasets/VladPyatov/CADFS">CADFS</a> <code>00400706</code></td><td>110</td><td>336</td><td>yes</td><td>3.1×</td><td>FeatureScript 682</td><td>6.2×</td></tr><tr><td>a large turned body: one outline revolved about a line of its own</td><td><a href="https://huggingface.co/datasets/VladPyatov/CADFS">CADFS</a> <code>00421068</code></td><td>927</td><td>1817</td><td>no</td><td>2.0×</td><td>FeatureScript 4531</td><td>4.9×</td></tr><tr><td>a round flange with four holes on a square, its top edge rounded</td><td><a href="https://huggingface.co/datasets/ADSKAILab/Zero-To-CAD-1m">Zero-To-CAD-1m</a> <code>b88686f2-ac53-4a3f-cb64-13d4b758199d</code></td><td>141</td><td>1068</td><td>no</td><td>7.6×</td><td>CadQuery 814</td><td>5.8×</td></tr><tr><td>a small hexagon with a wing on each side, one the mirror image of the other, their vertical edges rounded</td><td><a href="https://huggingface.co/datasets/ADSKAILab/Zero-To-CAD-1m">Zero-To-CAD-1m</a> <code>825dca76-e226-7c8f-a08f-59371e559adf</code></td><td>217</td><td>1355</td><td>no</td><td>6.2×</td><td>CadQuery 283</td><td>1.3×</td></tr><tr><td>a long rod, a rounded-triangle collar at its end, three pins standing on the collar, their tips cut to points</td><td><a href="https://huggingface.co/datasets/VladPyatov/CADFS">CADFS</a> <code>00878117</code></td><td>385</td><td>1630</td><td>yes</td><td>4.2×</td><td>FeatureScript 2633</td><td>6.8×</td></tr><tr><td>a thin tube along Y, its outer rims rounded, a pin hole through its wall near one end, that hole's outer mouth chamfered</td><td><a href="https://huggingface.co/datasets/ADSKAILab/Zero-To-CAD-1m">Zero-To-CAD-1m</a> <code>b7779e11-5886-fad1-7792-b970ba0f615e</code></td><td>233</td><td>1193</td><td>no</td><td>5.1×</td><td>CadQuery 479</td><td>2.1×</td></tr><tr><td>a square frame with a rounded window, two holes on its middle line, four drilled holes at its corners and a blind hole driven into its -Y side along its top edge</td><td><a href="https://huggingface.co/datasets/VladPyatov/CADFS">CADFS</a> <code>00305103</code></td><td>228</td><td>1048</td><td>yes</td><td>4.6×</td><td>FeatureScript 2944</td><td>12.9×</td></tr><tr><td>a closed round box, hollow inside, a slot through its +X side, a boss floating in the hollow and a forest of thin rods standing through it, top to bottom</td><td><a href="https://huggingface.co/datasets/ADSKAILab/Zero-To-CAD-1m">Zero-To-CAD-1m</a> <code>960d943d-5d36-c68d-54e6-e4271e4d24ec</code></td><td>319</td><td>892</td><td>no</td><td>2.8×</td><td>CadQuery 537</td><td>1.7×</td></tr><tr><td>a bored disc, every edge chamfered</td><td><a href="https://huggingface.co/datasets/ADSKAILab/Zero-To-CAD-1m">Zero-To-CAD-1m</a> <code>2bc02539-1e01-57fc-1095-3a4475a6b63e</code></td><td>94</td><td>1421</td><td>no</td><td>15.1×</td><td>CadQuery 339</td><td>3.6×</td></tr><tr><td>an elliptical plate, its top edge rounded right through its thickness, the word "Rato" standing on it</td><td><a href="https://huggingface.co/datasets/VladPyatov/CADFS">CADFS</a> <code>00466650</code></td><td>290</td><td>808</td><td>no</td><td>2.8×</td><td>FeatureScript 844</td><td>2.9×</td></tr><tr><td>a bored disc, its top edge cut back by a long, shallow chamfer, both edges of the chamfer rounded</td><td><a href="https://huggingface.co/datasets/VladPyatov/CADFS">CADFS</a> <code>00211684</code></td><td>117</td><td>623</td><td>no</td><td>5.3×</td><td>FeatureScript 1157</td><td>9.9×</td></tr><tr><td>a fork-like bracket: a T-shaped band with two legs, turned 40° about a far axis, and above it a notched plate, 25.4 thick</td><td><a href="https://huggingface.co/datasets/VladPyatov/CADFS">CADFS</a> <code>00456559</code></td><td>338</td><td>1003</td><td>no</td><td>3.0×</td><td>FeatureScript 1967</td><td>5.8×</td></tr><tr><td>half a turned ring, a small rib under it, an insert pin sticking out of its end</td><td><a href="https://huggingface.co/datasets/ADSKAILab/Zero-To-CAD-1m">Zero-To-CAD-1m</a> <code>6cc4cc5c-a504-8b54-5276-08afe080f807</code></td><td>241</td><td>981</td><td>no</td><td>4.1×</td><td>CadQuery 357</td><td>1.5×</td></tr><tr><td>a small drafted block, its bottom edges chamfered</td><td><a href="https://huggingface.co/datasets/ADSKAILab/Zero-To-CAD-1m">Zero-To-CAD-1m</a> <code>9728290b-d7bb-40ed-164a-ec6cf0f5447d</code></td><td>158</td><td>665</td><td>yes</td><td>4.2×</td><td>CadQuery 529</td><td>3.3×</td></tr><tr><td>a block with two holes off-centre, its vertical corners rounded and its top edges chamfered, holes included</td><td><a href="https://huggingface.co/datasets/ADSKAILab/Zero-To-CAD-1m">Zero-To-CAD-1m</a> <code>de5f2cdc-c1cf-076a-d8ea-e33766888363</code></td><td>151</td><td>1454</td><td>yes</td><td>9.6×</td><td>CadQuery 410</td><td>2.7×</td></tr><tr><td>a hub eaten from below by a wide cone, the cone's edges rounded; eight holes round its top, a slot in its rim, six ribs half sunk in its side</td><td><a href="https://huggingface.co/datasets/ADSKAILab/Zero-To-CAD-1m">Zero-To-CAD-1m</a> <code>2e1049b3-4bf1-6706-a401-6b8a76ffc082</code></td><td>317</td><td>944</td><td>no</td><td>3.0×</td><td>CadQuery 436</td><td>1.4×</td></tr><tr><td>a block with a flange on each end</td><td><a href="https://huggingface.co/datasets/ADSKAILab/Zero-To-CAD-1m">Zero-To-CAD-1m</a> <code>66f91767-51e3-c565-9b80-c45836127ee7</code></td><td>115</td><td>890</td><td>yes</td><td>7.7×</td><td>CadQuery 374</td><td>3.3×</td></tr><tr><td>a large panel, mirror-symmetric about Y = 0, its two top corners cut, two tall slots near each side</td><td><a href="https://huggingface.co/datasets/VladPyatov/CADFS">CADFS</a> <code>00298573</code></td><td>237</td><td>498</td><td>no</td><td>2.1×</td><td>FeatureScript 1340</td><td>5.7×</td></tr><tr><td>a tube with a long rounded slot right through it, across its axis</td><td><a href="https://huggingface.co/datasets/VladPyatov/CADFS">CADFS</a> <code>00115460</code></td><td>254</td><td>655</td><td>no</td><td>2.6×</td><td>FeatureScript 990</td><td>3.9×</td></tr><tr><td>a thin disc with twelve small notches round its rim</td><td><a href="https://huggingface.co/datasets/VladPyatov/CADFS">CADFS</a> <code>00374959</code></td><td>151</td><td>742</td><td>no</td><td>4.9×</td><td>FeatureScript 1083</td><td>7.2×</td></tr><tr><td>a tall cover lofted through six rectangles that narrow and turn as they rise, rib grooves cut into its foot, its top and bottom edges rounded</td><td><a href="https://huggingface.co/datasets/ADSKAILab/Zero-To-CAD-1m">Zero-To-CAD-1m</a> <code>5ad9d45b-ea4f-8079-1186-76e3b8d6a1b1</code></td><td>259</td><td>1129</td><td>no</td><td>4.4×</td><td>CadQuery 639</td><td>2.5×</td></tr><tr><td>a wall flange: a coned cup for a hub, a flange round it, a hole through the cup's point, its top edges chamfered and a ring of small knurls standing on its rim</td><td><a href="https://huggingface.co/datasets/ADSKAILab/Zero-To-CAD-1m">Zero-To-CAD-1m</a> <code>8719a024-46f7-2edf-2d5b-96f11059d3db</code></td><td>233</td><td>1146</td><td>no</td><td>4.9×</td><td>CadQuery 906</td><td>3.9×</td></tr><tr><td>an L bracket filled out by a gusset into a pentagon, its corners rounded, one countersunk hole near its inside corner</td><td><a href="https://huggingface.co/datasets/ADSKAILab/Zero-To-CAD-1m">Zero-To-CAD-1m</a> <code>116f16d9-515f-52a8-74cb-ee98471dea71</code></td><td>284</td><td>975</td><td>no</td><td>3.4×</td><td>CadQuery 553</td><td>1.9×</td></tr><tr><td>a turned part: a flanged base and a tall thin sleeve rising from it</td><td><a href="https://huggingface.co/datasets/VladPyatov/CADFS">CADFS</a> <code>00577926</code></td><td>154</td><td>616</td><td>yes</td><td>4.0×</td><td>FeatureScript 927</td><td>6.0×</td></tr><tr><td>a tube standing at one end of a plate whose other end is square, a rib along the plate's middle, cut back on a slant</td><td><a href="https://huggingface.co/datasets/VladPyatov/CADFS">CADFS</a> <code>00638437</code></td><td>357</td><td>1093</td><td>yes</td><td>3.1×</td><td>FeatureScript 1718</td><td>4.8×</td></tr><tr><td>a square nut: a bored square block, the corners of both faces turned off by a 30° cone, a V-notch across its top</td><td><a href="https://huggingface.co/datasets/VladPyatov/CADFS">CADFS</a> <code>00266126</code></td><td>315</td><td>742</td><td>no</td><td>2.4×</td><td>FeatureScript 2762</td><td>8.8×</td></tr></table></div>
<h2 id="12-articulated-objects">12 articulated objects</h2>
<div class="tablo"><table><tr><th>object</th><th>source</th><th>sand3d</th><th>Articraft program</th><th>ratio</th><th>uses CadQuery</th></tr><tr><td>a front-loading washing machine: a door on a hinge, an endless drum, a detergent drawer, an endless dial</td><td><a href="https://huggingface.co/datasets/camvsl/Articraft-10K">Articraft-10K</a> <code>rec_a-front-loading-washing-machine-with-a-white-rec_20260513_002941_547341_050bf63f</code></td><td>742</td><td>1538</td><td>2.1×</td><td>yes</td></tr><tr><td>a double-leaf garden gate: two leaves on hinges, a mirror pair, and a drop bolt sliding down the right leaf into a socket in the foundation</td><td><a href="https://huggingface.co/datasets/camvsl/Articraft-10K">Articraft-10K</a> <code>rec_garden_gate_30e6e784533b4583ac23a37b85f64c86</code></td><td>1232</td><td>2850</td><td>2.3×</td><td>no</td></tr><tr><td>a compact refrigerator: two doors on one hinge line, opening by negative angles, and a thermostat dial turning in a control housing fixed under the divider</td><td><a href="https://huggingface.co/datasets/camvsl/Articraft-10K">Articraft-10K</a> <code>rec_refrigerator_with_hinged_doors_eafdd7d9813b42fa80e8e2e8ff778665</code></td><td>1541</td><td>3264</td><td>2.1×</td><td>no</td></tr><tr><td>a compact keyboard: forty keys on plungers, a trackpoint on two crossed pivots, a media wheel on a fixed shaft</td><td><a href="https://huggingface.co/datasets/camvsl/Articraft-10K">Articraft-10K</a> <code>rec_keyboard_33e6828d32c148999830f99c31995d49</code></td><td>1628</td><td>3258</td><td>2.0×</td><td>no</td></tr><tr><td>a skateboard: two trucks steering on 45° kingpins, four endless wheels on the trucks</td><td><a href="https://huggingface.co/datasets/camvsl/Articraft-10K">Articraft-10K</a> <code>rec_skateboard_b74cde82df474176b7005c584ba8eb13</code></td><td>705</td><td>1505</td><td>2.1×</td><td>yes</td></tr><tr><td>a floor task lamp: a head that swivels on the column, an arm that lifts on the head's yoke, a shade that tilts at the arm's tip — a revolute chain three deep</td><td><a href="https://huggingface.co/datasets/camvsl/Articraft-10K">Articraft-10K</a> <code>rec_articulated_task_lamp_e3b37e132fda4a8b848be4c5ba370d7e</code></td><td>1319</td><td>2191</td><td>1.7×</td><td>no</td></tr><tr><td>an XYZ Cartesian stage: an X carriage on the base's rails, a Y stage on the carriage, a column welded to the Y stage, and a table sliding up the column</td><td><a href="https://huggingface.co/datasets/camvsl/Articraft-10K">Articraft-10K</a> <code>rec_xyz_cartesian_stage_9569f7654fbc435db20ac8bc588765a1</code></td><td>1271</td><td>2113</td><td>1.7×</td><td>no</td></tr><tr><td>a device on a tripod head: a pan, a tilt, a clamp that slides and its screw knob, two lock knobs; the legs and the device are fixed</td><td><a href="https://huggingface.co/datasets/camvsl/Articraft-10K">Articraft-10K</a> <code>rec_tripodmounted_device_a0b63454b90945138129d93d176264fc</code></td><td>3016</td><td>4192</td><td>1.4×</td><td>yes</td></tr><tr><td>compact theatre binoculars: two housings on a central hinge, a focus wheel that turns a full turn either way, two eyecups that twist</td><td><a href="https://huggingface.co/datasets/camvsl/Articraft-10K">Articraft-10K</a> <code>rec_binoculars_fc9fc306c6f8437683635fccb0369257</code></td><td>1467</td><td>2917</td><td>2.0×</td><td>no</td></tr><tr><td>a compact pickup tailgate: a gate on a lower hinge, two latch knobs and a work-stop bar that folds up from the gate's top edge</td><td><a href="https://huggingface.co/datasets/camvsl/Articraft-10K">Articraft-10K</a> <code>rec_pickup_tailgate_be20bae3a83e40c386c21adab290f72d</code></td><td>1808</td><td>3690</td><td>2.0×</td><td>no</td></tr><tr><td>a rugged screw-cap bottle: a cap that turns and lifts on the neck</td><td><a href="https://huggingface.co/datasets/camvsl/Articraft-10K">Articraft-10K</a> <code>rec_screwcap_bottle_aa1625790e9e4236941bc4c2650955de</code></td><td>1313</td><td>2520</td><td>1.9×</td><td>yes</td></tr><tr><td>a bevel-to-spur transfer: an endless vertical input shaft drives, through an 18/18 bevel pair, a horizontal transfer shaft, which drives a parallel output shaft through an 18/24 spur pair</td><td><a href="https://huggingface.co/datasets/camvsl/Articraft-10K">Articraft-10K</a> <code>rec_gear_assemblies_65e1d6ce16ad4dd58dffa5c555c5680b</code></td><td>1775</td><td>2675</td><td>1.5×</td><td>yes</td></tr></table></div>
<p class="counts">the source of this page: <a href="https://github.com/Sandflow-ai/sand3d/blob/main/docs/readme/tokens.md">docs/readme/tokens.md</a></p>
<div class="fin"><span>sand3d 1.6.3 · Apache-2.0 · <a href="https://github.com/Sandflow-ai/sand3d">source</a></span>
<img src="assets/sandflow-signature.svg" alt="Sandflow"></div>
</div><script>
document.querySelectorAll("[data-copy]").forEach(b => b.addEventListener("click", () => {
const text = document.getElementById(b.dataset.copy).textContent;
navigator.clipboard.writeText(text).then(() => { const t = b.textContent; b.textContent = "Copied";
setTimeout(() => b.textContent = t, 1400); });
}));
</script></body></html>