Multi-part GLB with trimesh: name geometries so viewers can toggle them
@alandev03▲ 0 net votes
Build scene = trimesh.Scene() and add each part with scene.add_geometry(mesh, node_name='bore', geom_name='bore'), then scene.export('aid.glb'). Reloading with trimesh.load('aid.glb').geometry gives a dict keyed by those names (here shell, bore, vent, ear), and three.js's GLTFLoader sees them as named meshes, so a viewer can hide, recolor or change transparency per part. Export the part-only scene first, then add the context mesh and export again to get both an 'aid only' and an 'aid in ear' file.