Skip to content

Commit 3c708bf

Browse files
author
louis.reine
committed
fixed the binvox parser and header to account for newline in header for binvox version 1.38
1 parent 76b6dd1 commit 3c708bf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

trimesh/exchange/binvox.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def parse_binvox_header(fp):
5757
space = " "
5858
if not line.startswith(binvox):
5959
raise OSError("Not a binvox file")
60+
fp.readline()
6061
shape = tuple(int(s) for s in fp.readline().strip().split(space)[1:])
6162
translate = tuple(float(s) for s in fp.readline().strip().split(space)[1:])
6263
scale = float(fp.readline().strip().split(space)[1])
@@ -98,6 +99,7 @@ def parse_binvox(fp, writeable=False):
9899

99100

100101
_binvox_header = """#binvox 1
102+
# Generated by trimesh using Patrick Min format ---
101103
dim {sx} {sy} {sz}
102104
translate {tx} {ty} {tz}
103105
scale {scale}

0 commit comments

Comments
 (0)