Split STMesh into submeshes of interest


I’m building an iOS app, and I would like to separate the resulting STMesh of my scan into submeshes, in order to filter out the “objects” that are polluting my main subject.

For instance, in this example, let’s say the user is only interested in the object “1”, I would like to be able to delete the other ones and keep only the object 1 in my scene.

So far, I was only able to find 1 submesh in my STMesh with the numberOfMeshes property. Converting my STMesh into a MDLMesh further in the app process didn’t help either, since it has only 1 submesh as well.

Is this possible ?

Thank you.


I think that SDK 0.9 purposely removed the generation of sub meshes. They were generated previously due to OpenGL limitations IIRC.


As @jim_selikoff said, in the Structure SDK (iOS) 0.9, we updated the STMesh class to be a single mesh.

You may save the STMesh as an OBJ file, then upload that file into SceneKit or something similar. The iOS SDK might then be able to give you the functionality of editing the mesh into sub-meshes.


Thank you both, @jim_selikoff and @anthony.monaco . It doesn’t look like SceneKit is going to cut it either. I guess we’ll have to apply some kind of HDBSCAN-like algorithm in order to separate these meshes.

While I’m here, I have another related question : we played a bit with the Scanner sample iOS app, and noticed that the .obj file contains scanned data below the “bounding box” of the app :


How come ? Isn’t the obj file supposed to contains what we scanned in the bounding box ?


Maybe looking into trimesh2 and applying the mesh_cc function to extract the connected meshes? Another library that could do this is the OpenFlipper/OpenMesh. I think if you could port either, then it would work really well for what you want and then you can have the user select on the meshes they want to keep.