diff options
author | j.delarago <joeydelarago@gmail.com> | 2022-01-31 15:35:42 +0300 |
---|---|---|
committer | j.delarago <joeydelarago@gmail.com> | 2022-01-31 15:35:42 +0300 |
commit | 092dd8a918aec42ecd42bf0f51bfec6960a4aa8c (patch) | |
tree | ab8e123886470dcd72c3cef77a33f54f7089f854 /scripts/obj_trimmer.py | |
parent | 736988da7c9c2bde14dc6e6bbfc7997d13f24534 (diff) |
Add imports for typing, add spacing
CURA-7541
Diffstat (limited to 'scripts/obj_trimmer.py')
-rw-r--r-- | scripts/obj_trimmer.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/obj_trimmer.py b/scripts/obj_trimmer.py index ac8e331f38..703c648dd5 100644 --- a/scripts/obj_trimmer.py +++ b/scripts/obj_trimmer.py @@ -2,7 +2,7 @@ # Cura is released under the terms of the LGPLv3 or higher. import argparse import os -from typing import Optional, List +from typing import Optional, List, TextIO """ Used to reduce the size of obj files used for printer platform models. @@ -12,6 +12,7 @@ from typing import Optional, List Removes any rows that are not a face, vertex or vertex texture """ + def process_obj(input_file: str, output_file: str) -> None: with open(input_file, "r") as in_obj, open("temp", "w") as temp: trim_lines(in_obj, temp) @@ -68,6 +69,7 @@ def trim_vertex_texture(values: List[str]) -> str: values[i + 1] = str(float(coordinate)) return " ".join(values) + def merge_duplicate_vt(in_obj, out_obj): # Removes duplicate vertex texture ("vt") # Points references to all deleted copies in face ("f") to a single vertex texture |