修改部分参数

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-05-08 01:16:40 +08:00
parent 40b8cc8023
commit a26f7214f9
30 changed files with 341 additions and 3206 deletions

View File

@@ -6,7 +6,7 @@ from app.utils.conf_parse import ConfParse
import json
import uuid
import configparser
from app.utils.slice_engines import get_slicer_engine
import os
@@ -44,17 +44,15 @@ def slice_stl_task(file_id, stl_filepath, quality_preset=None, material_preset=N
# Remove DB session to avoid locking the sqlite db during long slicing operations
db.session.remove()
from app.utils.slice_engines import get_slicer_engine
try:
# Optionally fetch the preferred engine from db conf or just default to cura
# For now default to cura or whichever is passed via kwargs if implemented later
# Optionally fetch the preferred engine from db conf or just default to prusa
# For now default to prusa or whichever is passed via kwargs if implemented later
conf_engine = SystemConfig.query.filter_by(key='slicer_engine').first()
engine_name = conf_engine.value if conf_engine and conf_engine.value else "cura"
engine_name = conf_engine.value if conf_engine and conf_engine.value else "prusa"
db.session.remove()
slicer = get_slicer_engine(engine_name)
slicer = get_slicer_engine(engine_name,app.config['PRINT_CONFIG_FOLDER'])
success, err_msg = slicer.slice(
app=app,