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

fixed str to int bug #242

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pyntcloud/core_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,9 +564,9 @@ def get_mesh_vertices(self, rgb=False, normals=False):

points = self.points[use_columns].values

v1 = points[self.mesh["v1"].values]
v2 = points[self.mesh["v2"].values]
v3 = points[self.mesh["v3"].values]
v1 = points[self.mesh["v1"].astype(int).values]
v2 = points[self.mesh["v2"].astype(int).values]
v3 = points[self.mesh["v3"].astype(int).values]

return v1, v2, v3

Expand Down
2 changes: 1 addition & 1 deletion pyntcloud/io/obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def read_obj(filename):
for i in range(sum(c.isdigit() for c in f[0].split(" "))):
mesh_columns.append("v{}".format(i + 1))

mesh = pd.DataFrame([re.split(r'\D+', x) for x in f], dtype='i4', columns=mesh_columns)
mesh = pd.DataFrame([re.split(r'\D+', x) for x in f], dtype='float', columns=mesh_columns)
mesh -= 1 # index starts with 1 in obj file

data["mesh"] = mesh
Expand Down