Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

savePLYFile does not save face elements #1470

Closed
VictorLamoine opened this issue Dec 10, 2015 · 4 comments
Closed

savePLYFile does not save face elements #1470

VictorLamoine opened this issue Dec 10, 2015 · 4 comments
Labels
good first issue Skills/areas of expertise needed to tackle the issue kind: todo Type of issue module: io

Comments

@VictorLamoine
Copy link
Contributor

When saving a point cloud using savePLYFile; the number of faces (always 0) is not written in the file.

The file is ok to be read by MeshLab etc.. but this missing line prevents loading the file with loadPolygonFilePLY because VTK expects a face 0.

Here is the minimum expected by VTK:

  if ( (elem = vtkPLY::find_element (ply, "vertex")) == NULL ||
       vtkPLY::find_property (elem, "x", &index) == NULL ||
       vtkPLY::find_property (elem, "y", &index) == NULL ||
       vtkPLY::find_property (elem, "z", &index) == NULL ||
       (elem = vtkPLY::find_element (ply, "face")) == NULL ||
       vtkPLY::find_property (elem, "vertex_indices", &index) == NULL )
    {
    vtkErrorMacro(<<"Cannot read geometry");
    vtkPLY::ply_close (ply);
    }
@VictorLamoine VictorLamoine added the changelog: enhancement Meta-information for changelog generation label Dec 10, 2015
@taketwo taketwo removed the changelog: enhancement Meta-information for changelog generation label Feb 22, 2020
@stale
Copy link

stale bot commented May 19, 2020

Marking this as stale due to 30 days of inactivity. It will be closed in 7 days if no further activity occurs.

@stale stale bot added the status: stale label May 19, 2020
@kunaltyagi
Copy link
Member

Would merely adding an extra "face 0" line to the PLY writer suffice?

@stale stale bot removed the status: stale label May 24, 2020
@kunaltyagi kunaltyagi added module: io needs: author reply Specify why not closed/merged yet needs: feedback Specify why not closed/merged yet labels May 24, 2020
@VictorLamoine VictorLamoine changed the title savePLYFile dos not save face elements savePLYFile does not save face elements May 25, 2020
@VictorLamoine
Copy link
Contributor Author

From what I remember yes!

@kunaltyagi kunaltyagi added good first issue Skills/areas of expertise needed to tackle the issue kind: todo Type of issue and removed needs: author reply Specify why not closed/merged yet needs: feedback Specify why not closed/merged yet labels May 25, 2020
@mvieth
Copy link
Member

mvieth commented Jun 1, 2021

Fixed by #4774

@mvieth mvieth closed this as completed Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Skills/areas of expertise needed to tackle the issue kind: todo Type of issue module: io
Projects
None yet
Development

No branches or pull requests

4 participants