Open3D
Open3D copied to clipboard
It returns the different dimension for the function ClusterConnectedTriangles inside the latest version (0.15), which differs with the version 0.13
Checklist
- [X] I have searched for similar issues.
- [X] For Python issues, I have tested with the latest development wheel.
- [X] I have checked the release documentation and the latest documentation (for
masterbranch).
Describe the issue
Now i build the latest source code from github, and used ClusterConnectedTriangles(python cluster_connected_triangles) with .obj mesh, which returns the different dimension for the verctor of triangle_clusters(the first member of the returned tuple) and the vector of cluster_n_triangles(the second member of the returned tuple), but it returns the same dimension for the two vector(triangle_clusters and cluster_n_triangles) for the open3d version 0.13, so ,
Has this behavior of the function ClusterConnectedTriangles changed? or just a bug.
Regards
Steps to reproduce the bug
>>> import numpy as np
>>> import open3d as o3d
>>> mesh = o3d.io.read_triangle_mesh("/home/xxx.obj")
>>> triangle_clusters, cluster_n_triangles, cluster_area = (mesh.cluster_connected_triangles())
>>> np_triangle_clusters = np.asarray(triangle_clusters)
>>> np_cluster_n_triangles = np.asarray(cluster_n_triangles)
>>> np_cluster_n_triangles.size
6686
>>> np_triangle_clusters.size
1717802
>>>
>>> mesh.vertices
std::vector<Eigen::Vector3d> with 869074 elements.
Use numpy.asarray() to access data.
>>> mesh.triangles
std::vector<Eigen::Vector3i> with 1717802 elements.
Use numpy.asarray() to access data.
And the c++ function also the same behavior.
Error message
np_cluster_n_triangles.size 6686 np_triangle_clusters.size 1717802
mesh.vertices std::vectorEigen::Vector3d with 869074 elements. Use numpy.asarray() to access data. mesh.triangles std::vectorEigen::Vector3i with 1717802 elements. Use numpy.asarray() to access data.
Expected behavior
The vectors of the returned tuple should be the same dimension.
Open3D, Python and System information
- Operating system: Ubuntu 20.04
- Python version: Python 3.8
- Open3D version: '0.15.2+e1c485b4'
- System architecture: x86
- Is this a remote workstation?: no
- How did you install Open3D?: build from source
- Compiler version (if built from source): gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Additional information
The c++/python inter both had that behavior.