Skip to main content
POST
A recipe fitted to a concept mesh by the engine (V2.b; M2C6 the profile converter)

Authorizations

x-api-key
string
header
required

Required when the deployment sets SS_REQUIRE_AUTH=1

Body

application/json
async
boolean
default:false

Answer 202 with a job (job_id fit-..., the content address of the request without its stamp; poll /v1/jobs/{job_id}: phases queued, fitting, done, error). The finished job's result is the synchronous answer. A play on a large concept mesh runs for a minute or more.

counts
integer[]

Grid cells per axis, 4..=128 (default 64 on the longest extent, in proportion on the others).

created_at
string
design_margin
number
default:0.01

With method: design (M2C8.i): the model's recipe is kept where it reads within this of the search's by volume.

Required range: 0 <= x <= 0.1
icd_key
string
max_evals
integer
default:600
max_features
integer
default:24

With profiles / best: the most features the play builds. 24 since M2C6.h (16 before): the play stops on its own when no move gains, so the cap only binds the largest parts, and those were the four lowest of the corpus (the pump 0.911 at 16 -> 0.919 at 21, where it stops; 32 adds nothing).

Required range: 1 <= x <= 40
method
enum<string>
default:rules

M2C8.i: design is THE SEARCH FOR THE SHAPE AND THE MODEL FOR THE DESIGN -- the converter's search (profiles) and the trained proposer (model) are both run and the model's recipe is kept wherever it reads within design_margin of the search's by volume (the search reads a mesh's shape best; the model writes the part's design: on drawn parts whose design is known it recovers 0.88 of the design's features and every pattern, the search half and three patterns of sixteen); the chosen fit with method: design, chosen (search or model), design_margin and candidates (search and model: each fit_key, iou_neutral, features, patterns, the model's account of itself, or the error that left it out: an unreachable model leaves the search's recipe). M2C8.d: model is THE TRAINED PROPOSER at play against the kernel -- a model (served by ml/mesh2cad/serve.py; the engine reaches it at SS_M2C_MODEL_URL) reads the mesh's grid and the grid of the solid built so far and writes the next move in tokens (mesh2cad_tokens); the kernel builds each move written, the solid's coverage against the mesh's decides, a refused move costs nothing, and the recipe is polished (polish) and graded as every fit is. hybrid then lets the converter's search continue from the model's recipe (profiles are the search's options), unless the model's play reads under 0.75 by volume, when the search starts from nothing. Both answer a recipe_fit in the converter's shape with method, chosen (model, hybrid or search: which recipe was kept), model (the server's account of itself: name, step, weights), play (tokens, frame, curve, kernel_calls, refusals, askings, ended, features, seconds), as_built, polished, searched and iou = iou_neutral. With no server configured they are 503 M2C_MODEL_UNCONFIGURED; an unreachable one is 502 M2C_MODEL_UNREACHABLE. M2C6: rules is the rule fitter (planes and cylinders read off the triangles; the artifact it has always stored). profiles is THE CONVERTER: the play with the profile moves of /v1/mesh2cad.env.play (outlines traced off the grading grid, extruded and revolved beside the primitives, the kernel deciding what builds), answering in a rule fit's shape -- iou on the rule fitter's grid, surface, fasteners, assembly, the recipe -- with method: profiles, iou_neutral, play (curve, iou_play, kernel_calls, refusals, features, sketched) and polish (fine, trials, moves, iou_before, iou_after, reverted, nudged, dropped, seconds). Its numbers are then POLISHED against a grid twice as fine (polish). best runs both and keeps the higher NEUTRAL IoU (iou_neutral: since M2C6.b the COVERAGE IoU -- each solid's coverage of a 128-cell grid, how full every cell is, the volume both hold over the volume either holds; it reads a mesh's volume to a part in ten thousand and a recipe's IoU the same to a few thousandths on any grid from 64 cells to 192, where one bit a cell at its centre wanders by three hundredths and flatters whichever search steered by it), fewer features on a tie: the chosen fit's manifest with method: best, chosen and candidates (each iou, iou_neutral, features, seconds). Every form is a recipe_fit artifact design.start and ideate.handoff take by fit_key.

Available options:
rules,
profiles,
best,
model,
hybrid,
design
min_gain
number
default:0.002
optimise
boolean
default:true
part
string
play_cells
integer
default:96

With profiles / best: the cells on the mesh's longest extent the play runs on. By volume (the coverage IoU) a play on 64 cells reads the four concept meshes at a mean of 0.882 and with the polish 0.889; a play on 96 with the polish and its snap 0.906 -- for three to four times the time on the largest mesh. M2C6.h: a part whose detail is two cells across at 96 (a gear's teeth) reads 0.924 at 96 and 0.950 at 160, for two to four times the time and up to 1.4 GB through its polish; a part without such detail reads the same.

Required range: 16 <= x <= 192
polish
boolean
default:true

With profiles / best: settle the play's numbers (every sketch edge and point, an extrusion's ends, a box's faces, a cylinder's radius, height and place) against a grid twice as fine, then SNAP every planar wall to where the mesh's coverage says the face is (M2C6.b: the bits of a grid place a wall to half a cell and no nearer). The verdict is by volume, on the whole solid: of the recipe snapped, polished and as built the highest coverage IoU stands, then each feature's other forms are tried in it. A feature that no longer builds on the polished ones is asked a little aside, then left out or the polish under it undone, whichever reads higher. polish in the answer: fine, trials, moves, snapped, iou_before, iou_after (coverage), reverted, declined, nudged, dropped.

profiles
object

With profiles / best: the profile moves' options, as on /v1/mesh2cad.env.play (picks, pieces, keep, refine, point_cost, multi, intent, tubes, sweeps, shells, mirrors, tapers, helices, band, verify, openings, blobs). With rules it is 400.

segments
integer
default:24
steer
enum<string>
default:bits

With profiles / best (M2C6.b): what a step of the play is rewarded by. bits: one bit a cell at its centre (as M2C5 played). volume: the coverage IoU of the kernel's solid against the mesh. Measured on four AI concept meshes the two reach the same fit (0.898 either way before the snap) and volume takes half as much time again, so it is not the default; the grade (iou_neutral) and the polish's verdict are by volume either way.

Available options:
bits,
volume
stl_blob_id
string

Response

The fit, the reports, the IoU and the recipe

The response is of type object.