Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 12, 2024
1 parent fe03d11 commit b6bf215
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions coxeter/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,13 @@ def to_obj(shape, filename):

for f in shape.faces:
content += f"f {' '.join([str(v_index+1) for v_index in f])}\n"

content = content[:-1]

with open(filename, "w") as file:
file.write(content)



def to_off(shape, filename):
"""Save shape to an Object File Format (OFF) file.
Expand Down Expand Up @@ -88,7 +87,6 @@ def to_off(shape, filename):
file.write(content)



def to_stl(shape, filename):
"""Save shape to a stereolithography (STL) file.
Expand Down Expand Up @@ -259,7 +257,7 @@ def to_vtk(shape, filename):
content += f"POLYGONS {num_points} {num_points + num_connections}\n"
for f in shape.faces:
content += f"{len(f)} {' '.join([str(v_index) for v_index in f])}\n"
content = content.rstrip('\n')
content = content.rstrip("\n")

# Write file
with open(filename, "wb") as file:
Expand Down

0 comments on commit b6bf215

Please sign in to comment.