Skip to content

Commit df2f805

Browse files
authored
Merge pull request #1 from Timothy-Edward-Kendon/master
Updated mesh_parser.py
2 parents 4544810 + 2c105ad commit df2f805

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Ofpp/mesh_parser.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import numpy as np
88
import os
9+
import re
910
import struct
1011
from collections import namedtuple
1112
from .field_parser import parse_internal_field, is_binary_format
@@ -244,7 +245,7 @@ def parse_faces_content(cls, content, is_binary, skip=10):
244245
if is_integer(lc):
245246
num = int(lc)
246247
if not is_binary:
247-
data = [[int(s) for s in ln[2:-2].split()] for ln in content[n + 2:n + 2 + num]]
248+
data = [[int(s) for s in re.findall(b"\d+", ln)[1:]] for ln in content[n + 2:n + 2 + num]]
248249
else:
249250
buf = b''.join(content[n+1:])
250251
disp = struct.calcsize('c')

0 commit comments

Comments
 (0)