Skip to content

Commit

Permalink
Performance improvement for generating a mesh2.
Browse files Browse the repository at this point in the history
  • Loading branch information
rsmith-nl committed Jan 20, 2022
1 parent a6e3f0d commit e0ec9df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions stl2pov.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Copyright © 2011-2020 R.F. Smith <rsmith@xs4all.nl>. All rights reserved.
# SPDX-License-Identifier: BSD-2-Clause
# Created: 2011-04-10T18:33:02+02:00
# Last modified: 2022-01-18T23:16:28+0100
# Last modified: 2022-01-20T12:57:18+0100
"""Program for converting an STL file into a POV-ray mesh or mesh2."""

import argparse
Expand Down Expand Up @@ -111,7 +111,7 @@ def mesh2(name, vertices):
]
# The indices sequence 0, 2, 1 is used because of the difference between
# the STL coordinate system and that used in POV-ray
lines += [f" <{p[0]}, {p[2]}, {p[1]}>," for p in points]
lines += [f" <{p[0]:e}, {p[2]:e}, {p[1]:e}>," for p in points]
lines[-1] = lines[-1][:-1]
lines += [" }\n face_indices {", f" {len(ifacets)},"]
lines += [f" <{f[0]}, {f[1]}, {f[2]}>," for f in ifacets]
Expand Down
2 changes: 1 addition & 1 deletion stltools/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2022.01.19"
__version__ = "2022.01.20"

0 comments on commit e0ec9df

Please # to comment.