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

Update STL reader. #1628

Merged
merged 2 commits into from Oct 27, 2020
Merged

Update STL reader. #1628

merged 2 commits into from Oct 27, 2020

Conversation

jdumas
Copy link
Collaborator

@jdumas jdumas commented Oct 17, 2020

The following STLs from Thingi10K were not loading with the previous STL parser:

  • 1482988.stl
  • 1080516.stl
  • 56117.stl

This PR updates our STL parser (copied over from PyMesh) to fix those issues. Previous code had a lot of goto in it so I got scared, and preferred to use another implementation.

Check all that apply (change to [x])

  • All changes meet libigl style-guidelines.
  • Adds new .cpp file.
  • Adds corresponding unit test.
  • This is a minor change.

Derived::RowsAtCompileTime>=0?Derived::RowsAtCompileTime:0
,
Derived::ColsAtCompileTime>=0?Derived::ColsAtCompileTime:0
);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clang-format can be pretty bad sometimes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I gave up on code style for libigl as a whole. Maybe one day we'll adopt a .clang-format file...

Copy link
Collaborator

@qnzhou qnzhou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Jérémie! Looks good to me! Just minor comments.

include/igl/readSTL.cpp Outdated Show resolved Hide resolved
include/igl/readSTL.cpp Outdated Show resolved Hide resolved
include/igl/readSTL.cpp Outdated Show resolved Hide resolved
include/igl/readSTL.cpp Outdated Show resolved Hide resolved
include/igl/readSTL.cpp Show resolved Hide resolved
@jdumas jdumas merged commit 1e905cb into master Oct 27, 2020
@jdumas jdumas deleted the jdumas/stlread branch October 27, 2020 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants