Hi Mehdi,
I'm glad you got it resolved.
There is another non-obvious thing going on with Merging, and also the documentation on the schema (out of date, thank you for finding it).
First the non-obvious thing is that in our official front end, we put the user on rails and force them to remesh, and then simplify and convert, in that order. However in the API, you could do simplify and convert without remeshing. The difference here, is that remeshing will try to create a single mesh out of all the scan data, thereby removing redundant pieces, and filling in the blanks where it makes sense. Simplifying will take any data, and try to convert it and simplify it, but it will struggle to merge all that data together, so performing a simply and convert on a raw scan may result in intersecting geometry and holes.
Secondly, the schema's examples are a bit out of date, which is where I think you got your call from.
Heres a step by step copied from the frontend Websocket call.
1) Merge and prepare for remeshing. This merges a distinct selection of scans (in this case group 20), removes some overlapping points, and prepares the data for the next step.
{
"Task": {
"Index":23,
"Type":"Merge",
"Input":{
"selection":{
"mode":"selected",
"groups":[20]
}
}
}
}
2) Remeshing the raw data into a single mesh with holes removed
{
"Task":{
"Index":24,
"Type":"Merge",
"Input":{
"remesh":{
"quality":"Medium"
}
}
}
}
3) Simplify and Converting the remesh. This will reduce the number of faces, and apply a flow to the polygons that contours the geometry.
{
"Task":{
"Index":26,"Type":
"Merge","Input":{
"simplify":{
"method":"FlowQuads",
"faceCount":20000
}
}
}
}
4) Apply Texturing if the original data contains some texture data.
{
"Task":{
"Index":75,
"Input":{
"texturize":true
},
"State":"Started",
"Type":"Merge"
}
}
5) Getting the data back. There are multiple ways to continue from here. Option a) add the merged result back into the project as you did,. Option b) stream the merge result as a series of buffers, the way the front end software does for viewing, or Option c) Export the merge data as a file as in your last step. Here is the file export option for completeness
{
"Task":{
"Index":28,"Type":
"ExportMerge","Input":{
"format":"ply",
"texture":true
}
}
}
Hopefully this helps you and some other people who are exploring the API.