isl-org / isl-org/Open3D

Triangle Mesh Operations don't preserve Triangle Attributes

Open
#5,636 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

Hi, I am trying to use different functions from triangle mesh class including Subdivide, Simplify, Smoothing etc. I am attaching a Triangle attribute "triangle_material_ids_" to each triangle in my input mesh and then perform the above function. The output mesh from all of these functions does not contain any of information for my triangle attribute "triangle_material_ids_" and all of this information is lost while performing these operations. Example code in C++ API:
`using namespace open3d;`
`auto mesh = geometry::TriangleMesh::CreateBox(1, 1,1);`
`for (uint32_t i = 0; i < mesh->triangles_.size(); i++)`
` mesh->triangle_material_ids_.push_back(i);`

`auto mesh1 = mesh->SubdivideMidpoint(1);`

If the above code is compiled and ran the value of "triangle_material_ids" in mesh1 will be empty.
`std::cout << mesh1->triangle_material_ids_[i]<< std::endl;`

Looking at the code I see that only vertex_colors_ and vertex_normals_ data is preserved while rest of the data is lost in the process. Is this the case or am I missing something here?

Thanks

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.