@huukhanhnguyen/geometry / namespaces/Nesting
namespaces/Nesting
nest
constnest: (bin_json,parts_json,config_json,generations,seed) =>string|undefined=wasm.nesting_nest
bin_json is a Path2d, parts_json an array of them, config_json a partial NestConfig in camelCase ("{}" for the defaults: clipperScale, curveTolerance, spacing, rotations, populationSize, mutationRate, useHoles, exploreConcave).
generations and seed ride as f64 like every other number on this boundary; a seed stays exact below 2^53. Returns the NestResultJSON string, or undefined where the TypeScript returns null (invalid bin).
Parameters
bin_json
string
parts_json
string
config_json
string
generations
number
seed
number
Returns
string | undefined