Skip to main content
POST
Live voxel field preview (DX1) -- occupancy + signed distance of the part at a fidelity level, unverified, outside the result path

Authorizations

x-api-key
string
header
required

Required when the deployment sets SS_REQUIRE_AUTH=1

Body

application/json
geometry
object
required

Exactly one of primitive | csg | mesh_blob | brep_blob | assembly

cells_across_gap
number
default:2

DX1.b cells-across-gap rule, 1..=64: a wall or gap with fewer voxels across is a thin feature (measured by ray from each triangle's centroid); with fidelity_rule 'cells_across_gap' it also drives the voxel size

coverage
enum<string>
default:sdf

DX1.b boundary coverage: 'sdf' = clamp(1/2 - sdf/h, 0, 1) (exact on faces parallel to a voxel face) | 'exact' = the 9-ray fraction (ss_geometry occupancy_coverage) on every voxel within half a diagonal of the surface

Available options:
sdf,
exact
fidelity
integer
default:3

fidelity level 1..=5 (voxel budget 2^15 .. 2^24)

fidelity_rule
enum<string>
default:slider

DX1.b: 'slider' (the level or voxel size stands) | 'cells_across_gap' (refine to the coarsest finer level -- or, past level 5, the explicit size -- that gives the thinnest wall or gap cells_across_gap voxels; never coarser than the slider; PREVIEW_CAP past the WebGPU cap, never a clamp)

Available options:
slider,
cells_across_gap
include_buffers
boolean
default:false

also return occupancy_b64 (1 byte a voxel) and sdf_b64 (f32 LE); allowed up to 2^19 voxels (fidelity <= 2)

local_fidelity
object[]

DX1.b local fidelity regions: the one uniform grid is refined to the coarsest level whose voxel size resolves every region's size; fidelity_choice reports the cost and what DX1.c nested patches would cost instead (not built)

segments
integer
default:48

curved-face tessellation segments (8..=256)

sharp_edges
object

DX1.b sharp-edge capture: flag the voxels a B-Rep edge with a dihedral above angle_deg runs through; subsample gives them a 4^3 sub-cell SDF coverage (sdf coverage only)

voxel_size
number

explicit voxel size (model units) instead of the level; the buffer cap still applies

Response

kind 'preview', label 'preview -- not verified'; voxel_size, dims, origin, voxels, bricks, band, solid_voxels, solid_fraction, solid_volume, buffer_bytes vs buffer_cap_bytes, fidelity_table (5 rows), fidelity_choice {requested_level, level, voxel_size, driver, cells_across_gap, thinnest?, requested_voxels, chosen_voxels, cost_factor, regions [{size, resolves_at, patch_voxels}], nested_patch_voxels, note}, coverage, exact_coverage_voxels, sharp_edges? {angle_deg, edges, length, max_dihedral_deg, unpaired_edges, voxels, subsampled_voxels}, cells_across_gap, thin_features [{kind wall|gap, centre, bbox_lo, bbox_hi, triangles, thickness_lo, thickness_hi, cells, resolves_at}], timings_ms, coverage_b64? / sharp_b64? with include_buffers; no result key, nothing persisted