add face flatten tool
This commit is contained in:
parent
2aa1a2c663
commit
1a1a17a9bb
5 changed files with 79 additions and 2 deletions
|
|
@ -367,6 +367,17 @@ let model = {
|
|||
let { id, opt } = data;
|
||||
let tool = analyze(id, opt);
|
||||
log(`${id} | unrolling...`);
|
||||
let zlist = tool.listZ();
|
||||
let unrolled = tool.unrolled();
|
||||
return { vertices: unrolled.toFloat32(), zlist };
|
||||
},
|
||||
|
||||
flatten(data) {
|
||||
let { id, faces } = data;
|
||||
let tool = analyze(id, { });
|
||||
log(`${id} | flatten...`);
|
||||
let { unique, average } = tool.flattenZ(faces);
|
||||
log(`${id} | average=${average.round(3)} uniques=${unique.length}`);
|
||||
let unrolled = tool.unrolled();
|
||||
return { vertices: unrolled.toFloat32() };
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue