Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
1
7
operation
stringclasses
1 value
split
stringclasses
1 value
program
stringlengths
106
1.01k
mesh_vertices
unknown
mesh_faces
unknown
num_vertices
int32
5
2.42k
num_faces
int32
4
5.42k
0
extrude
train
import cadquery as cq w0=cq.Workplane('ZX',origin=(500,600,500)) r=w0.sketch().segment((30,36),(510,2)).segment((536,295)).arc((551,332),(556,366)).segment((854,366)).segment((855,740)).segment((895,765)).segment((856,821)).segment((856,1000)).segment((397,1000)).segment((394,805)).segment((86,819)).segment((66,530)).a...
[ 0, 0, 251, 67, 0, 0, 22, 68, 0, 128, 124, 68, 0, 0, 251, 67, 0, 64, 97, 68, 0, 128, 124, 68, 0, 0, 6, 68, 0, 0, 22, 68, 0, 128, 4, 68, 0, 0, 6, 68, 0, 64, 97, 68, 0, 128, 4, 68, 43, 65, 12, 68, 0, 0, 46, 68...
[ 1, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 94, 0, 0, 0, 93, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 94, 0, 0, 0, 39, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 39, 0, 0...
336
668
1
extrude
train
import cadquery as cq w0=cq.Workplane('XY',origin=(502,500,554)) r=w0.sketch().segment((581,401),(596,415)).segment((581,431)).close().assemble().finalize().extrude(1).union(w0.workplane(offset=723).moveTo(420,586).cylinder(944,515))
[ 0, 128, 203, 67, 0, 192, 135, 68, 0, 64, 73, 68, 0, 128, 203, 67, 0, 192, 135, 68, 0, 160, 218, 68, 242, 209, 203, 67, 138, 138, 132, 68, 0, 64, 73, 68, 242, 209, 203, 67, 138, 138, 132, 68, 0, 160, 218, 68, 242, 209, ...
[ 159, 0, 0, 0, 151, 0, 0, 0, 150, 0, 0, 0, 158, 0, 0, 0, 159, 0, 0, 0, 150, 0, 0, 0, 152, 0, 0, 0, 159, 0, 0, 0, 158, 0, 0, 0, 152, 0, 0, 0, 153, 0, 0, 0, 159, 0, 0, 0, 150, 0, 0, 0, 153, 0, 0, 0, 152, 0...
258
508
10
extrude
train
import cadquery as cq w0=cq.Workplane('YZ',origin=(401,501,500)) w1=cq.Workplane('YZ',origin=(372,500,501)) r=w0.sketch().segment((630,710),(630,734)).arc((451,471),(754,372)).arc((989,392),(834,569)).arc((799,651),(735,711)).close().assemble().finalize().extrude(529).union(w1.workplane(offset=630).moveTo(41,305).cylin...
[ 0, 128, 200, 67, 106, 91, 107, 68, 234, 40, 129, 68, 0, 128, 200, 67, 93, 101, 107, 68, 185, 99, 130, 68, 0, 128, 200, 67, 145, 112, 107, 68, 126, 220, 127, 68, 0, 128, 200, 67, 101, 142, 107, 68, 231, 157, 131, 68, 0, ...
[ 62, 0, 0, 0, 116, 1, 0, 0, 61, 0, 0, 0, 62, 0, 0, 0, 117, 1, 0, 0, 116, 1, 0, 0, 61, 0, 0, 0, 129, 1, 0, 0, 74, 0, 0, 0, 61, 0, 0, 0, 116, 1, 0, 0, 129, 1, 0, 0, 59, 0, 0, 0, 117, 1, 0, 0, 62, 0, 0, ...
620
1,236
100
extrude
train
import cadquery as cq w0=cq.Workplane('YZ',origin=(345,501,501)) r=w0.sketch().push([(669,405)]).rect(586,639).rect(576,510,mode='s').finalize().extrude(281).union(w0.sketch().segment((61,266),(545,1)).segment((734,346)).segment((904,346)).segment((904,466)).segment((800,466)).segment((806,474)).segment((326,740)).clos...
[ 0, 128, 172, 67, 0, 128, 12, 68, 0, 192, 63, 68, 0, 128, 172, 67, 0, 192, 78, 68, 0, 32, 155, 68, 0, 128, 172, 67, 0, 64, 91, 68, 0, 160, 18, 68, 0, 128, 172, 67, 0, 64, 91, 68, 252, 161, 20, 68, 0, 128, 172, 67, ...
[ 3, 0, 0, 0, 2, 0, 0, 0, 134, 0, 0, 0, 3, 0, 0, 0, 134, 0, 0, 0, 135, 0, 0, 0, 6, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 11, 0, 0, 0, 10, 0, 0, 0, 6, 0, 0, 0, 12, 0, 0, 0, 6, 0, 0, 0, 3, 0, 0, 0, 12, 0...
268
532
1000
extrude
train
import cadquery as cq w0=cq.Workplane('XY',origin=(500,500,220)) r=w0.sketch().segment((305,480),(376,481)).arc((480,1),(585,480)).segment((771,481)).segment((771,1000)).segment((305,1000)).close().assemble().reset().face(w0.sketch().segment((406,156),(596,86)).segment((696,362)).segment((500,431)).close().assemble(),m...
[ 0, 0, 201, 67, 0, 192, 59, 68, 0, 0, 251, 67, 0, 0, 201, 67, 0, 192, 59, 68, 0, 192, 187, 68, 33, 92, 201, 67, 233, 136, 52, 68, 0, 0, 251, 67, 33, 92, 201, 67, 233, 136, 52, 68, 0, 192, 187, 68, 33, 92, 201, 67, ...
[ 110, 0, 0, 0, 111, 0, 0, 0, 123, 0, 0, 0, 122, 0, 0, 0, 123, 0, 0, 0, 131, 0, 0, 0, 122, 0, 0, 0, 110, 0, 0, 0, 123, 0, 0, 0, 130, 0, 0, 0, 131, 0, 0, 0, 141, 0, 0, 0, 130, 0, 0, 0, 122, 0, 0, 0, 131, 0...
402
796
10000
extrude
train
import cadquery as cq w0=cq.Workplane('ZX',origin=(500,504,502)) w1=cq.Workplane('ZX',origin=(500,639,499)) r=w0.sketch().push([(178,121)]).rect(815,740).reset().face(w0.sketch().segment((125,85),(141,85)).arc((182,70),(215,87)).segment((232,85)).segment((231,155)).segment((216,156)).arc((181,170),(140,156)).segment((1...
[ 0, 0, 123, 67, 0, 0, 252, 67, 0, 64, 136, 67, 0, 0, 123, 67, 0, 0, 252, 67, 0, 240, 135, 68, 0, 0, 123, 67, 0, 128, 9, 68, 0, 64, 136, 67, 0, 0, 123, 67, 0, 128, 9, 68, 0, 240, 135, 68, 113, 78, 9, 68, 0, 160, ...
[ 223, 1, 0, 0, 219, 1, 0, 0, 217, 1, 0, 0, 223, 1, 0, 0, 217, 1, 0, 0, 221, 1, 0, 0, 227, 1, 0, 0, 221, 1, 0, 0, 225, 1, 0, 0, 227, 1, 0, 0, 225, 1, 0, 0, 229, 1, 0, 0, 227, 1, 0, 0, 223, 1, 0, 0, 221, 1...
600
1,196
100000
extrude
train
import cadquery as cq w0=cq.Workplane('XY',origin=(501,501,870)) r=w0.sketch().push([(451,476)]).circle(951).circle(899,mode='s').finalize().extrude(1).union(w0.sketch().push([(701,882)]).rect(1000,686).rect(510,675,mode='s').finalize().extrude(15))
[ 153, 99, 135, 63, 101, 161, 113, 68, 0, 128, 89, 68, 153, 99, 135, 63, 101, 161, 113, 68, 0, 192, 89, 68, 83, 6, 220, 63, 50, 126, 125, 68, 0, 128, 89, 68, 83, 6, 220, 63, 50, 126, 125, 68, 0, 192, 89, 68, 236, 234, ...
[ 106, 1, 0, 0, 115, 1, 0, 0, 114, 1, 0, 0, 106, 1, 0, 0, 107, 1, 0, 0, 115, 1, 0, 0, 100, 1, 0, 0, 101, 1, 0, 0, 107, 1, 0, 0, 100, 1, 0, 0, 107, 1, 0, 0, 106, 1, 0, 0, 88, 1, 0, 0, 89, 1, 0, 0, 101, 1, ...
498
1,000
1000000
extrude
train
import cadquery as cq w0=cq.Workplane('YZ',origin=(76,21,25)) r=w0.sketch().segment((908,893),(172,893)).segment((172,157)).segment((908,157)).close().assemble().push([(562,547)]).circle(91,mode='s').finalize().extrude(308)
[ 0, 0, 152, 66, 0, 0, 65, 67, 0, 0, 54, 67, 0, 0, 152, 66, 0, 0, 65, 67, 0, 128, 101, 68, 0, 0, 152, 66, 0, 0, 246, 67, 0, 0, 15, 68, 0, 0, 152, 66, 123, 14, 246, 67, 179, 221, 13, 68, 0, 0, 152, 66, 123, 14, ...
[ 1, 0, 0, 0, 3, 1, 0, 0, 129, 0, 0, 0, 1, 0, 0, 0, 131, 0, 0, 0, 3, 1, 0, 0, 129, 0, 0, 0, 2, 1, 0, 0, 128, 0, 0, 0, 129, 0, 0, 0, 3, 1, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 131, 0, 0, 0, 1, 0, 0, 0, 0, ...
260
520
1000001
extrude
train
import cadquery as cq w0=cq.Workplane('YZ',origin=(63,5,3)) r=w0.sketch().segment((805,287),(178,287)).segment((178,366)).segment((73,327)).segment((73,562)).segment((178,522)).segment((178,601)).segment((805,601)).close().assemble().push([(295,494)]).rect(60,66,mode='s').push([(458,383)]).rect(99,54,mode='s').push([(1...
[ 0, 0, 124, 66, 0, 0, 156, 66, 0, 0, 165, 67, 0, 0, 124, 66, 0, 0, 156, 66, 0, 64, 13, 68, 0, 0, 124, 66, 0, 0, 240, 66, 0, 0, 242, 67, 0, 0, 124, 66, 24, 19, 240, 66, 152, 64, 241, 67, 0, 0, 124, 66, 24, 19, ...
[ 128, 0, 0, 0, 140, 0, 0, 0, 26, 1, 0, 0, 128, 0, 0, 0, 26, 1, 0, 0, 14, 1, 0, 0, 26, 1, 0, 0, 141, 0, 0, 0, 27, 1, 0, 0, 140, 0, 0, 0, 141, 0, 0, 0, 26, 1, 0, 0, 129, 0, 0, 0, 128, 0, 0, 0, 14, 1, 0, ...
284
576
1000002
extrude
train
import cadquery as cq w0=cq.Workplane('XZ',origin=(3,24,64)) r=w0.sketch().segment((360,468),(85,728)).segment((85,1)).segment((360,230)).segment((597,230)).segment((597,468)).close().assemble().push([(295,361)]).rect(206,238,mode='s').finalize().extrude(211).translate((1,188,1))
[ 0, 0, 178, 66, 0, 0, 128, 63, 0, 0, 132, 66, 0, 0, 178, 66, 0, 0, 128, 63, 0, 64, 70, 68, 0, 0, 178, 66, 0, 0, 84, 67, 0, 0, 132, 66, 0, 0, 178, 66, 0, 0, 84, 67, 0, 64, 70, 68, 0, 0, 68, 67, 0, 0, 128, 63,...
[ 9, 0, 0, 0, 5, 0, 0, 0, 7, 0, 0, 0, 9, 0, 0, 0, 8, 0, 0, 0, 5, 0, 0, 0, 7, 0, 0, 0, 4, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 14, 0, 0, 0, 6, 0, 0, 0, 4, 0, 0, 0, 14, 0, 0, ...
20
36
1000003
extrude
train
import cadquery as cq w0=cq.Workplane('YZ',origin=(37,8,17)) r=w0.sketch().segment((844,395),(844,508)).segment((606,508)).segment((606,746)).segment((844,746)).segment((844,803)).segment((332,803)).segment((332,395)).close().assemble().push([(659,654)]).rect(175,140,mode='s').finalize().extrude(161)
[ 0, 0, 20, 66, 0, 0, 170, 67, 0, 0, 206, 67, 0, 0, 20, 66, 0, 0, 170, 67, 0, 0, 77, 68, 0, 0, 20, 66, 0, 224, 16, 68, 0, 64, 22, 68, 0, 0, 20, 66, 0, 224, 16, 68, 0, 64, 57, 68, 0, 0, 20, 66, 0, 128, 25, 68,...
[ 8, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 20, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 1, 0, 0, 0, 23, 0, 0, 0, 11, 0, 0, 0, 1, 0, ...
24
44
1000004
extrude
train
import cadquery as cq w0=cq.Workplane('XZ',origin=(38,69,77)) r=w0.sketch().segment((388,511),(900,511)).segment((900,101)).segment((870,101)).segment((870,480)).segment((388,480)).close().assemble().push([(730,410)]).rect(148,90,mode='s').finalize().extrude(120).translate((1,52,1))
[ 0, 128, 213, 67, 0, 0, 128, 63, 0, 128, 11, 68, 0, 128, 213, 67, 0, 0, 128, 63, 0, 64, 19, 68, 0, 128, 213, 67, 0, 0, 242, 66, 0, 128, 11, 68, 0, 128, 213, 67, 0, 0, 242, 66, 0, 64, 19, 68, 0, 64, 99, 68, 0, 0,...
[ 11, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 11, 0, 0, 0, 1, 0, 0, 0, 9, 0, 0, 0, 8, 0, 0, 0, 11, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 8, 0, 0, 0, 6, 0, 0, 0, 10, 0, 0, 0, 8, 0, 0, 0, 6, 0, ...
12
20
1000005
extrude
train
import cadquery as cq w0=cq.Workplane('XZ',origin=(28,77,13)) r=w0.sketch().segment((412,341),(412,687)).segment((964,687)).segment((964,341)).close().assemble().push([(729,478)]).rect(123,151,mode='s').finalize().extrude(85).translate((1,9,1))
[ 0, 128, 220, 67, 0, 0, 128, 63, 0, 128, 177, 67, 0, 128, 220, 67, 0, 0, 128, 63, 0, 64, 47, 68, 0, 128, 220, 67, 0, 0, 172, 66, 0, 128, 177, 67, 0, 128, 220, 67, 0, 0, 172, 66, 0, 64, 47, 68, 0, 32, 46, 68, 0, ...
[ 3, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 14, 0, 0, 0, 12, 0, 0, 0, 2, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 15, 0, 0...
16
32
1000006
extrude
train
import cadquery as cq w0=cq.Workplane('XY',origin=(1,76,10)) r=w0.sketch().segment((109,723),(907,723)).segment((907,473)).arc((508,441),(109,473)).close().assemble().push([(479,579)]).circle(95,mode='s').finalize().extrude(67)
[ 0, 0, 220, 66, 0, 64, 9, 68, 0, 0, 32, 65, 0, 0, 220, 66, 0, 64, 9, 68, 0, 0, 154, 66, 0, 0, 220, 66, 0, 192, 71, 68, 0, 0, 32, 65, 0, 0, 220, 66, 0, 192, 71, 68, 0, 0, 154, 66, 15, 103, 95, 67, 254, 85, 5, ...
[ 15, 1, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 14, 1, 0, 0, 2, 0, 0, 0, 15, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 13, 1, 0, 0, 14, 1, 0, 0, 15, 1, 0, 0, 12, 1, ...
272
544
End of preview. Expand in Data Studio

GeomCAD

A procedural benchmark of executable CAD programs paired with triangle meshes, spanning four generative operations — extrude, revolve, sweep, and loft — at roughly one million samples per operation. Every numerical literal in every program is an integer in [0, 1000], 1,001 levels, which makes exact parameter-level comparison (Parameter Exact Match) well defined rather than approximate. Extrude alone never uses 0 and so occupies [1, 1000].

Loading

from datasets import load_dataset

ds = load_dataset("FanQY/GeomCAD", "extrude", split="train")
print(ds[0]["program"])

Each configuration is one CAD operation. Pass streaming=True to iterate without materialising a split locally.

Schema

Column Type Description
id string Sample identifier, unique within an operation
operation string extrude / revolve / sweep / loft
split string train / validation / test
program string Executable CadQuery program; all numeric literals are integers in [0, 1000], extrude [1, 1000]
mesh_vertices binary float32 array of shape (V, 3), C-order
mesh_faces binary int32 array of shape (F, 3), C-order
num_vertices int32 V
num_faces int32 F

Reconstructing the mesh

import numpy as np, trimesh

v = np.frombuffer(row["mesh_vertices"], dtype=np.float32).reshape(-1, 3)
f = np.frombuffer(row["mesh_faces"],    dtype=np.int32).reshape(-1, 3)
mesh = trimesh.Trimesh(vertices=v, faces=f, process=False)

Meshes are stored as an indexed mesh rather than as STL triangle soup. STL repeats each vertex about 5.6 times on average and stores a per-facet normal that is recoverable from the vertices; removing that redundancy shrinks the corpus roughly 5.7x. Deduplication compares exact float32 bit patterns — no vertex welding, no tolerance — so v[f] reconstructs the original triangle array byte for byte, and STL coordinates are float32 to begin with, so nothing is rounded.

Sampling a point cloud

The reference pipeline samples 8,192 points uniformly over the surface and reduces them to 256 by farthest point sampling:

points, _ = trimesh.sample.sample_surface(mesh, 8192)   # then FPS to 256

Meshes rather than precomputed point clouds are distributed deliberately: resampling the surface each epoch is a meaningful augmentation, and freezing a single 256-point draw would remove it. The mesh is also the more compact carrier — an 8,192-point float32 cloud is 98 KB per sample, larger than most of the meshes.

Note that trimesh.sample.sample_surface respects the global numpy seed only on some versions; newer releases construct their own default_rng. Set the seed explicitly if you need runs to be reproducible across environments.

Executing a program

import cadquery as cq

namespace = {}
exec(row["program"], {"cq": cq}, namespace)
solid = namespace["r"]
cq.exporters.export(solid, "out.step")      # STEP / BREP / IGES / STL / glTF / DXF / SVG

Programs execute through CadQuery's OCCT backend with no external dependencies, so every sample can also be exported to industrial B-Rep formats.

Integer parameters

Numeric literals are min–max normalised per script and rewritten as integers in [0, 1000], so every parameter a model must predict is drawn from one 1,001-level grid. The extent of the resulting solid is a consequence of the operation applied and is not itself constrained to that range; revolving a profile about an axis, for instance, carries it to the far side and spans about twice the profile radius by construction. Physical dimensions reported elsewhere (for example in figures comparing against float-parameter baselines) are the result of applying the per-script inverse map, and are therefore real-valued even though the program literals are not.

Splits

Operation Train Validation Test Total
extrude 998,815 1,500 1,500 1,001,815
revolve 998,965 1,035 1,500 1,001,500
sweep 998,796 1,071 1,500 1,001,367
loft 998,945 1,055 1,500 1,001,500
total 3,995,521 4,661 6,000 4,006,182

Training and validation come from each operation's procedural pool; the test split is generated independently through the same pipeline. Overlap at the level of sample indices is exactly zero. At the stricter level of program text, 15 training rows reproduce a test program (revolve 1, sweep 14) and one reproduces a validation program; they are listed in REPRODUCIBILITY.md and removed by the audit shipped with the corpus. Validation is 1,500 for extrude and smaller elsewhere because those held-out sets were carved from multi-operation training mixtures and only the rows belonging to each operation are kept here.

Mesh complexity varies sharply by operation, which matters when reading per-operation results:

Operation Faces median Faces mean Faces p95
extrude 492 529 1,438
revolve 992 3,054 10,926
sweep 384 5,008 24,742
loft 326 1,037 3,728

Loft programs carry a median of 2 profile sections (mean 2.59, max 5) and about twice the curve primitives of the other operations, so recovering a loft means recovering both the number of profiles and their ordering.

Layout

data/<operation>/<split>-NNNNN-of-NNNNN.parquet
manifest.json      per-shard row counts
statistics.json    per-operation split sizes

Shards target roughly 300 MB so that an interrupted transfer re-does little work.

Downloads last month
35