Modify 3mf generation script and generate new 3mf files

This commit is contained in:
Tomáš Batelka 2025-03-30 17:36:05 +02:00
parent 4b0a171624
commit f73e2892d9
28 changed files with 2 additions and 1 deletions

View file

@ -1,6 +1,7 @@
#!/usr/bin/freecadcmd
import os
import shutil
import subprocess
import FreeCAD as App # type: ignore
import Mesh # type: ignore
@ -19,7 +20,7 @@ git_short_hash = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']
# Remove the existing 3MF directory if it exists and create a new one
if os.path.exists(printed_3mf_dir):
os.rmdir(printed_3mf_dir)
shutil.rmtree(printed_3mf_dir, ignore_errors=True)
os.makedirs(printed_3mf_dir, exist_ok=True)