Output list of cylinder fits with cylinder dimensions and connectivity
achmurzy opened this issue · comments
Hello, I am interested in analyzing the fine-scale structure of tree branches with your application. However, there is no way to extract individual cylinders from the output model. All of the cylinders are fused together as a giant mesh. Is there a way to break apart the mesh, or add a flag to export all the cylinders in a row-based format like .csv? Thanks in advance, the outputs of your application are impressive and I'm interested in analyzing trees using it
Ok, so only the graph-based formats are available right now and I'll have to parse the Graph into a list of cylinders instead of writing it to a .ply mesh. Are you aware if Boost or Easy3D might have an easy way to output a Graph in a row-based file format like .csv? Thank you
In the exported skeleton file (the PLY format), the edges of the graph already store the indices of the two endpoints for all cylinders. The radii information is not recorded since the skeleton is intended to store the topology only and therefore a graph representation.
If you also want to store the radii of all cylinders, the easiest way is to add a per edge attribute to each cylinder. Please refer to the PLY format specification for more details.
Though PLY format is recommended, you can do whatever you like to fulfill your purpose, e.g., save in each line two 3D point coordinates and an extra radius value. This is not a standard format and we will not include it in AdTree.
I will work on this and initiate a pull request if it is working and useful. Thank you again
The issue has been solved so I am going to close it.
Good luck!