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

parse_faces_content() fails for faces with more than 10 vertices #4

Open
Timothy-Edward-Kendon opened this issue Jul 23, 2019 · 0 comments

Comments

@Timothy-Edward-Kendon
Copy link
Contributor

Hi,

Firstly, thanks for the library. I discovered it yesterday and it's already been very handy to debug my setup.

In return, I just wanted to point out that the subroutine parse_faces_content() fails for faces with more than 10 points as the line data = [[int(s) for s in ln[2:-2].split()] for ln in content[n + 2:n + 2 + num]] reasonably assumes that faces have less than 10 vertices. Ominously it appears I have just produced a mesh containing a face with 10 vertices. As OpenFOAM supports any shape of cell, perhaps consider changing the line to data = [[int(s) for s in re.findall(b"\d+", ln)[1:]] for ln in content[n + 2:n + 2 + num]]. Of course this requires an import of the re library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant