dmurdoch / rgl

rgl is a 3D visualization system based on OpenGL. It provides a medium to high level interface for use in R, currently modelled on classic R graphics, with extensions to allow for interaction.
https://dmurdoch.github.io/rgl/
GNU General Public License v2.0
85 stars 20 forks source link

Feature request: record original face indices after clipping a mesh with rgl #364

Closed dmurdoch closed 1 year ago

dmurdoch commented 1 year ago

This request was received from Stéphane Laurent:

As I understand, when we clip a mesh with rgl::clipMesh3d, each face of the clipped mesh is either a face of the original mesh or a subface of a face of the original mesh. Therefore it makes sense to desire the mapping between the faces of the clipped mesh and the faces of the original mesh. This would have as an application the possibility of keeping the face colors. Imagine e.g. an icosahedron with colored faces and you clip this icosahedron. It remains a piece of the icosahedron and we could color its faces with the colors of the original faces.

This affects clipMesh3d, clipObj3d, subdivision3d.

dmurdoch commented 1 year ago

Closed by #365