openframeworks / openframeworks/openFrameworks

ofMesh::save newline problem across different OSs

Open
#2,944 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bitesize bug core prelim-analysis section-3D
Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

I noticed a ply file generated by ofMesh::save on Windows can be opened in OSX but doesn't work the other way round. So I investigated by

    ofMesh mesh = ofMesh::box(10, 10, 10);
    mesh.save("test.ply");

on both Windows and OSX, took diff, and noticed newlines are different (obviously). Does it make sense to replace endl by \r\n in ofMesh::save for compatibility?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the implementation of ofMesh::save and reproduce the reported PLY export on Windows and OSX using the ofMesh::box example. Compare the generated files' newline handling and verify that a PLY saved on either OS opens correctly on the other. There is no file path or test named in the issue, so the relevant implementation and regression test must be located first.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.