Closed jmwright closed 2 years ago
Finished in commit 05392e417cc2e676d8340c09fa5baccd8908703c
In the end it was not required to track the triangles. A collision object was created for each separate face mesh, and that was used to change the material color of the entire mesh at once.
Faces need to be selectable in order to enable selector synthesis. For Godot's 3D view, faces are broken down into triangles (meshes are created by tessellating the 3D b-rep object).
In the JSON that is returned from CadQuery, this hierarchy should be recorded and triangles should have an ID and a way to trace their parent face. Then when a triangle is intersected by the raycast from the mouse cursor, the top level face can be highlighted and selected.