基础的切片和质量控制

This commit is contained in:
2026-04-10 13:58:18 +08:00
commit 975f06eb46
3302 changed files with 650758 additions and 0 deletions

19
parse_presets.py Normal file
View File

@@ -0,0 +1,19 @@
import os
import configparser
def get_quality_presets():
preset_dir = os.path.join(os.path.dirname(__file__), 'print_config', 'presets', 'creality', 'base')
presets = []
if os.path.exists(preset_dir):
for f in os.listdir(preset_dir):
if f.startswith('base_global_') and f.endswith('.inst.cfg'):
config = configparser.ConfigParser()
try:
config.read(os.path.join(preset_dir, f))
name = config.get('general', 'name', fallback=f)
presets.append((f, name))
except Exception as e:
pass
return sorted(presets, key=lambda x: x[1])
print(get_quality_presets())