有构建板,支持多模型构建,但生成支撑的切片还有bug
This commit is contained in:
19
tmp/test_pq2.py
Normal file
19
tmp/test_pq2.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import os, configparser
|
||||
|
||||
preset_dir = 'print_config/presets/creality/base'
|
||||
presets = []
|
||||
for f in os.listdir(preset_dir):
|
||||
if f.endswith('.inst.cfg'):
|
||||
config = configparser.ConfigParser()
|
||||
config.read(os.path.join(preset_dir, f))
|
||||
try:
|
||||
name = config.get('general', 'name', fallback=f)
|
||||
except:
|
||||
name = f.replace('.inst.cfg', '').replace('base_', '').replace('_', ' ')
|
||||
presets.append((f, name))
|
||||
|
||||
presets = sorted(presets, key=lambda x: str(x[1]).lower())
|
||||
print("Presets length:", len(presets))
|
||||
if len(presets) > 0:
|
||||
for p in presets[:5]:
|
||||
print(p)
|
||||
Reference in New Issue
Block a user